OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Common OJS Installation errors

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Common OJS Installation errors

Postby smiri » Wed Apr 02, 2008 10:29 pm

This Post will have a list of common OJS installation errors and their solutions:

  • I'm seeing infinite re-direction loop when I try to access OJS.
    http://www.mydomain.org/ojs/index.php/index/index.php/index/index.php/index/index.php/index/index.php/index/...
    -- Solution: Some servers don't support the kinds of URLs used by OJS by default; try turning on the disable_path_info option in config.inc.php to work around it.
  • I'm seeing this error: DB Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
    -- Solution: This is a mysql server error. Either your mysql server is not running and needs to be started, or you don't have the correct Database Settings in your config.inc.php file.
  • On my first visit to my site, Instead of the install page, I see a database error.
    -- Solution: Your server cannot redirect you to the installation page using the path methods we use in OJS. So, instead you're staying in the index page and OJS is looking for an installed journal. This can be resolved by setting "disable_path_info" to "On" in your config.inc.php file.
  • More to come soon

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Common OJS Installation errors

Postby thiessenp » Mon Apr 14, 2008 6:53 am

On the installation note. I've been having no end of trouble trying to upgrade from OJS 2.1 to 2.2. I realize that the issues are probably local because the install errors posted here slowed down after December. But right, all my issues involve a table error of some sort, eg. ERROR: Upgrade failed: DB: Duplicate entry 'title-en_US' for key 1. I also have seen missing table errors, missing key errors and so on.

Would you have any rule of thumb for trouble shooting this sort of error in OJS? To resolve table issues I've mainly been tweaking tables but after 6 table errors it starts to get tedious.

Thanks,
-peter
thiessenp
 
Posts: 26
Joined: Wed Nov 28, 2007 1:08 pm
Location: Toronto

Re: Common OJS Installation errors

Postby SamF » Mon Apr 14, 2008 8:29 am

The installation instructions in this forum appear to be missing a step or two.

According to the instructions, we first upload and unzip, then we set the permissions, then we install and set up, at which point we get to put in information like our database host and name and password.

However, when I first tried this, I got the error

DB Error: Can't connect to local MySQL server through socket...

Your note above says "...or you don't have the correct Database Settings in your config.inc.php file." Well we weren't told to change this, and it seemed like we were going to get to change it later.

So I made the relevant changes in the config file, and now I get the error

DB Error: Table 'aitoolsgeeklog2.journals' doesn't exist

Now , if all users need to create this table first, this should certainly be in the instructions. If I'm only seeing this because I'm adding OJS to a pre-existing database, then it would be nice if there were some additional instructions if more steps are required (I've posted several questions asking if it's ok to add OJS to a pre-existing database, and haven't gotten a yea or nay either way, so I'm going ahead and trying it).

Thanks,
Sam
SamF
 
Posts: 16
Joined: Wed Apr 09, 2008 4:05 pm

Re: Common OJS Installation errors

Postby smiri » Mon Apr 14, 2008 10:16 am

thiessenp wrote:On the installation note. I've been having no end of trouble trying to upgrade from OJS 2.1 to 2.2. I realize that the issues are probably local because the install errors posted here slowed down after December. But right, all my issues involve a table error of some sort, eg. ERROR: Upgrade failed: DB: Duplicate entry 'title-en_US' for key 1. I also have seen missing table errors, missing key errors and so on.

Would you have any rule of thumb for trouble shooting this sort of error in OJS? To resolve table issues I've mainly been tweaking tables but after 6 table errors it starts to get tedious.

Thanks,
-peter


Hi Peter,

The errors you're seeing is due to database upgrade errors.

- Please make a copy of your original database (2.1), drop it, recreate it and then restore it from the old backup and then run the db upgrade script. ("php tools/upgrade.php upgrade")
- Or perhaps you can create a new database ("ojs2.2") and restore it from the dump of your ojs 2.1 database. This way you have to remember to change the database name in your config.inc.php file before running the database upgrade script.

In your case looks like you didn't run the upgrade script, or that it failed the first time and you've been working with a corrupt database. So try to start all over with a clean database.

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Common OJS Installation errors

Postby smiri » Mon Apr 14, 2008 10:32 am

Hi SamF,

Your case is a special case with requirements that not many other OJS users would want. So your errors are specific to your situation and do not need any additional steps in the installation instructions. The installation steps are for simply installing OJS on it's own from scratch.

Also, if you follow the installation instructions, then you would have to enter / change your database settings at step 10 (in the install screen).

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Common OJS Installation errors

Postby SamF » Mon Apr 14, 2008 11:03 am

smiri wrote:Also, if you follow the installation instructions, then you would have to enter / change your database settings at step 10 (in the install screen).


I received the first error, "DB Error: Can't connect to local MySQL server through socket..." before I was able to configure anything to do with my DB. I would have received this error even if I wanted to start a new DB. So I can't see how it has to do with "special requirements."

Everything was still on the defaults. I hadn't made any changes to the config file. I never had the chance to get to Step 10, even starting a fresh install, no special requirements.

Also, a quick search of the forum finds other people having the same problem, e.g.: here and here

As for my special requirements (using an existing DB), I noted above that it would just be nice to have some "additional instructions" somewhere, as a number of posts here do imply that some people would like to be able to install like this (e.g. when their hosting service only provides them with one DB).
SamF
 
Posts: 16
Joined: Wed Apr 09, 2008 4:05 pm

Re: Common OJS Installation errors

Postby smiri » Mon Apr 14, 2008 10:24 pm

Hi SamF,

Have you changed your config.inc.php file to show installed = On ? Installed variable in the config file should be set to Off when you start.

I would suggest you delete all your current files and start over again. You should NOT have to configure anything before you get to step 10. The first screen you should see is the installation page and that's where you should have to put your database settings. The one thing you should make sure about is that none of the table names in OJS already exist in your current database. Other than that, I don't think you should have a problem.

Also, the links you found in the forums are from almost 1.5 years ago and a pretty old version of OJS.

Regards,
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Common OJS Installation errors

Postby SamF » Tue Apr 15, 2008 5:44 am

Hi Siavash,

I started completely afresh. I downloaded v. 2.2, and unzipped it into my folder path/to/public_html/ojai (I can't access the folder below my public html on a GoDaddy hosting plan). I then set the permissions as it says in the instructions. That gets me to the end of step 8. I skipped step 9 for now, because if I understand your replies here and in other threads, it should not be looking for my DB before the first install page.

Then step 10, I navigate to http://www.ai-tools.org/ojai/, and receive the warning

DB Error: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)

I set debug=true in the config file (my first edit of that file), and I get

Code: Select all
(mysql): SELECT * FROM journals WHERE path = 'ojai' 
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/content/a/i/t/aitools/html/OJAI/lib/adodb/drivers/adodb-mysql.inc.php on line 496
2002: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)
DB Error: Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)


So it certainly looks to me like the install script is trying to access the DB before the first page of the install procedure.

So then I made a brand-new DB (not sharing one, which is what I would really want to do eventually, but no matter), completing Step 9 in the instructions. I go to my start page (step 10). Same error.

I then put in all the info about my new DB into my config file, and then I got the other error that I got in my first post, although now with debug turned on there is a little more info:

Code: Select all
(mysql): SELECT * FROM journals WHERE path = 'ojai'   1146: Table 'aitoolsojai.journals' doesn't exist

                        adodb_mysql._execute(SELECT * FROM journals WHERE path = 'ojai') % line  845, file: adodb.inc.php
                     adodb_mysql.execute(SELECT * FROM journals WHERE path = ?, Array[1]) % line   62, file: DAO.inc.php
                  journaldao.retrieve(SELECT * FROM journals WHERE path = ?, ojai) % line   49, file: JournalDAO.inc.php
               journaldao.getjournalbypath(ojai) % line  421, file: Request.inc.php
            request.getjournal() % line  103, file: CmsPlugin.inc.php

DB Error: Table 'aitoolsojai.journals' doesn't exist


So I'm not trying to do anything custom, I'm not a special case as far as I know. I'm perfectly happy (for now) using a brand-new database. I've followed the instructions to a tee, as far as I can tell. I still get the same errors. I still never get to the first page of the install.

Also, the links you found in the forums are from almost 1.5 years ago and a pretty old version of OJS.

Sorry, I guess those two links went to the same place. I meant to link the second one to here from a couple weeks ago, where it seemed two users had similar problems.
SamF
 
Posts: 16
Joined: Wed Apr 09, 2008 4:05 pm

Re: Common OJS Installation errors

Postby smiri » Tue Apr 15, 2008 10:55 pm

Hi SamF,

This is really weird. We never got a replay from Hakan in the other post to see if and how he resolved this issue.

The only thing I can think of now is you could try setting "disable_path_info = Off" in your confing.inc.php file to "On". There might be a problem with your server redirecting you to the install page.

Also, have a look at your server error_logs to see if there is a mention of any problem with redirecting you to the install page.

I believe you are not being redirected to the install page and the site is trying to access the journal home page. And since there is no journal installed, then you get the error above.

If that also fails, could you post the content of your config.inc.php file here or send them to me as a private message. Make sure you block out your mysql password, but leave everything else in place. Also, where did you go to download your OJS package? Did you download it from our PKP site?

Regards,
Siavash
smiri
 
Posts: 183
Joined: Thu Sep 06, 2007 7:01 pm

Re: Common OJS Installation errors

Postby SamF » Wed Apr 16, 2008 10:56 am

smiri wrote:The only thing I can think of now is you could try setting "disable_path_info = Off" in your confing.inc.php file to "On". There might be a problem with your server redirecting you to the install page.

Hooray! That worked! :mrgreen:

Thanks very much for your help, Siavash.

Now I have a question about manual install, which will make you groan over my multitude of problems, but I'm putting it in another thread, since it's it's not quite related.

Thanks!
SamF
 
Posts: 16
Joined: Wed Apr 09, 2008 4:05 pm

Re: Common OJS Installation errors

Postby sukhi » Sun Apr 19, 2009 1:02 am

Dear All,

I have been running a journal (http://ijmi.org) on OJS 2.1 on an ISP's Server. It had been running fine for about one and half year.

Few days back we noticed that site is not accessible. It was in fact going into infinite re-direction loop as mentioned here.

I contacted Alec, who also advised me to set 'disable_path_info' "on" in the config.inc.php (as advised here as well).

With the suggested changes, the site started working but (obviously) with 'unclean' URLs. We would like to have 'clean' (PATH_INFO) URLs again to preserve the consistency of URLs with that of previously published Journal Issues. Otherwise any reaching an article with previous 'clean' URL lands into a page with un-formated display of the journal.

We are in touch with our ISP to configure PHP so as to provide PATH_INFO Variable to OJS. However, we have not been successful yet to get the desired configuration from our ISP.

We have found from PhpInfo() that present configuration is giving variable ORIG_PATH_INFO instead of PATH_INFO. I also tried to modify the /classes/core/Request.inc.php by replacing all occurrences of PATH_INFO with ORIG_PATH_INFO. Even this could not solve the problem of infinite redirection loop.




[quote="smiri"]This Post will have a list of common OJS installation errors and their solutions:

[list]
[*]
I'm seeing infinite re-direction loop when I try to access OJS.
http://www.mydomain.org/ojs/index.php/index/index.php/index/index.php/index/index.php/index/index.php/index/...
-- Solution: Some servers don't support the kinds of URLs used by OJS by default; try turning on the disable_path_info option in config.inc.php to work around it.
[/*]
[*]
sukhi
 
Posts: 15
Joined: Wed Aug 10, 2005 1:48 am
Location: New Delhi, India

Re: Common OJS Installation errors

Postby mcrider » Mon Apr 20, 2009 3:20 pm

Hi Sukhdev,

If your server is using ORIG_PATH_INFO instead of PATH_INFO, you should be able to fix this by replacing the PATH_INFO declarations in Request.inc.php with ORIG_PATH_INFO -- I suggest trying again, and making sure you replace all occurrences (I count 10).

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Common OJS Installation errors

Postby sukhi » Tue Apr 21, 2009 9:39 pm

Thanks, Matt and Alec!

The site is now up.

ISP has provided to a way out to set local php configuration. As suggested by Alec, setting cgi.fix_pathinfo = 0, did the trick.

Earlier I tried replacing replacing all occurrences of PATH_INFO with ORIG_PATH_INFO in Request.inc.php. However, the problem of Redirection Loop persisted. However it did showed marginal improvement in the sense the main page did come up after some delay. But, did not went further. It seems, something else was also required.

Anyway, my problem is solved.

Thanks

mcrider wrote:If your server is using ORIG_PATH_INFO instead of PATH_INFO, you should be able to fix this by replacing the PATH_INFO declarations in Request.inc.php with ORIG_PATH_INFO -- I suggest trying again, and making sure you replace all occurrences (I count 10).
Matt
sukhi
 
Posts: 15
Joined: Wed Aug 10, 2005 1:48 am
Location: New Delhi, India

Re: Common OJS Installation errors

Postby Binaryhelp » Mon Nov 14, 2011 11:18 am

I am also having trouble with setting up a fresh installation using 1and1.com hosting. I have tried many of the fixes, and still can not get the OJS system to install.

Has any ever been able to get OJS working using 1and1.com Internet Hosting ?

thanks,
Allan
Binaryhelp
 
Posts: 2
Joined: Mon Nov 14, 2011 9:20 am

Re: Common OJS Installation errors

Postby Binaryhelp » Mon Nov 14, 2011 2:32 pm

Thank you jfreyes!

I am migrating a journal from a college to the 1AND1.com hosting service (i.e. away from the controls of the IT department at the college). So in theory all I had to do was copy the DB, and the Folder and change the DB server in the config.ini.php file. It did not work. I was getting the infinite loop and weird SQL error messages.

But thanks to your tip, I also turned "On" the PATH_INFO, and voila it worked !! after 2 weeks of head pounding.

Thank you again. Now, I have to "upgrade" it to the latest version (after they verify it has migrated properly).

--BinaryHelp
Binaryhelp
 
Posts: 2
Joined: Mon Nov 14, 2011 9:20 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], cedavid and 5 guests