Giter Club home page Giter Club logo

Comments (10)

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024 1

Thanks @Potomac, the thing is that the servername should always be an FQDN name, and that why never was able to reproduce the error, and this is the default installation i'm going to adopt your sugestion and auto-add and .org to prevent that.

Thanks a lot.

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024 1

I really doesn't think we need add some logic as this script will be ran just the first time when starting the container.

Thanks a lot for your help @Potomac .

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024

This was taken from pkp/ojs forum before, as at the time i didn't exist this kind of cli install. Going to review this.

tools/install.php
https://github.com/pkp/ojs/blob/master/tools/install.php

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024

@Potomac54 as you told over #4, the script works asking questions which is not recommended over docker environment where sometimes we will never have access to bash prompt. The idea at the time was just to POST the necessary variables to conclude the installation, this worked at 2.x version and for lack of time was never reviewe 3.x version.

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024

We take a a look at this project to change the post URL and make it work: https://github.com/pkp/vagrant/blob/321f22c7ea03b1adf19041b86b6c27089d33b67d/scripts/ojs.sh#L26

from ojs.

Potomac avatar Potomac commented on September 8, 2024

I tried also the wget command of the vagrant github, it doesn't work, still no tables in the database

wget -O - --post-data="adminUsername=admin&adminPassword=ojsadmin&adminPassword2=ojsadmin&[email protected]&locale=en_US&additionalLocales[]=en_US&clientCharset=utf-8&connectionCharset=utf8&databaseCharset=utf8&filesDir=%2fhome%2fojs%2ffiles&encryption=sha1&databaseDriver=mysql&databaseHost=localhost&databaseUsername=ojs&databasePassword=ojs&databaseName=ojs&oaiRepositoryId=ojs2.localhost" "http://localhost/ojs/index.php/index/install/install"

I think we can capture the complete http post request with the developer tools of firefox (CTRL + Shift + I, and "network tab"), when using the install page of OJS manually, then we will have the right OJS 3.x url parameters for the http post request

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024

@Potomac the url informed by you is wrong, it should be "http://localhost/index/install/install", there is no need for the index.php reference and the OJS path doesn't exist in this environment, can you please download the latest master branch and test again, i've made some changes.

And yes, using developer tools was and excelente idea on how to catch the post request, but as i mentioned, using my docker-compose at master branch worked. Going to continue the tests.

from ojs.

lucasdiedrich avatar lucasdiedrich commented on September 8, 2024

I think that i maybe fixed this over the last patches because i'm not able to reproduce. Below are the page after an complete docker-compose, the system goes directly to login screen and with default admin working.

Please, at the docker-compose change the ojs container to lucasdiedrich/ojs:master.

image

from ojs.

Potomac avatar Potomac commented on September 8, 2024

@lucasdiedrich : I found the cause of the error, in your curl command the adminEmail parameter is not correct (bad syntax), check here :

&adminEmail=admin%40${SERVERNAME}&locale=en_US

for example if $SERVERNAME=localhost then the email will be : admin@localhost, but the install form (OJS 3.1.1.1-4) will refuse this kind of email adress,

because install form will expect this syntax for email adress : [email protected] (for example [email protected])

the fix is very simple, just add ".org" :

&adminEmail=admin%40${SERVERNAME}.org&locale=en_US

or set a fake address :

&adminEmail=admin%40example.org&locale=en_US

from ojs.

Potomac avatar Potomac commented on September 8, 2024

Or you can do a check in ojs-cli-install :

if SERVERNAME = localhost then add a ".org" (&adminEmail=admin%40${SERVERNAME}.org)

if SERVERNAME is a FQDN name (foo.fr) then keep the current code (&adminEmail=admin%40${SERVERNAME})

from ojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.