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.

path_info

Postby jbsarma » Sun Jun 24, 2012 2:49 pm

I have managed to install OJS with disable_path_info = On setting in the config.php. But this is not ideal as URLs are looking very complex and also interferes with certain functionalities. I am with 1and1 server and trying to find a way to get around the problem of the server not supporting path_info variable. So far, I tried adding a php5.ini with cgi.fix_pathinfo = 0 in the OJS folder but to no effect. I have seen there is orig_ptah_info available but have not tried changing PATH_INFO declarations in Request.inc.php with ORIG_PATH_INFO yet, as suggested in this post. Does anyone have any experience with 1and1 server and provide me a solution that works. I also wonder if this common problem will be solved by the OJS team in near future so that OJS installs OK on server not supprting paqth_info. Thanks.
1and1 server
OJS 2.3.7, Linux, PHP version 5.2.17
jbsarma
 
Posts: 8
Joined: Wed Jun 06, 2012 2:22 pm

Re: Common OJS Installation errors

Postby asmecher » Sun Jun 24, 2012 4:58 pm

Hi jbsarma,

This is a problem with PHP configuration that we can't work around from within OJS, unfortunately. However, adding a php5.ini configuration file in your installation directory probably won't work -- every host will allow different configuration overrides and they will be configured in a few different ways, but they're typically done via a .htaccess file. I'd suggest checking with your host's documentation on how to override PHP configuration.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm

Re: Common OJS Installation errors

Postby aadilsi » Fri Feb 08, 2013 11:23 am

Hi Alec,
I have been searching for quiet some time to find a solution to get the site working with the disable_path_info=OFF. Unfortunately, I haven't come across any solution. I wrote to the Godaddy support team and this is what they replied.
It appears that you are having an issue with being able to configure your hosting account to set the disable_path_info=OFF. Our Linux hosting accounts run in CGI mode. When PHP 5 runs in this mode, the server variable element PATH_INFO behaves differently than under PHP 4. PHP 5 scripts can use the element SCRIPT_NAME in place of PATH_INFO to ensure the expected value is returned.

They also provided this link. http://support.godaddy.com/groups/web-hosting/forum/topic/relative-path-gone-after-tailing-after-php/
If this help anyone understand, they can share it with me too, :)
Thanks,
--
Eddy
aadilsi
 
Posts: 39
Joined: Sun Jan 13, 2013 3:05 am

Re: Common OJS Installation errors

Postby asmecher » Fri Feb 08, 2013 11:52 am

Hi Eddy,

In that case, GoDaddy is operating outside of the CGI/1.1 spec (see http://www.ietf.org/rfc/rfc3875 section 4.1.5). It's not necessary for PATH_INFO to be broken this way to use CGI-based hosting with PHP5; we run in a FastCGI environment ourselves and PATH_INFO works fine. But I doubt any of that will convince GoDaddy to correct their setup...

You should be able to work around this by changing references to PATH_INFO to use SCRIPT_NAME instead; PATH_INFO is referenced in OJS 2.3.x in the following files:
  • lib/pkp/classes/core/PKPRequest.inc.php
  • lib/pkp/classes/core/PKPPageRouter.inc.php
  • lib/pkp/classes/core/PKPComponentRouter.inc.php
  • lib/pkp/classes/core/PKPRouter.inc.php
I suspect SCRIPT_NAME won't be a drop-in replacement, since it probably includes a leading "index.php" before the PATH_INFO data.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm

Re: Common OJS Installation errors

Postby aadilsi » Sun Feb 10, 2013 1:19 am

Hi Alec,
Pardon my imprudence, but you will have to spoon feed me here.
How do I achieve this
You should be able to work around this by changing references to PATH_INFO to use SCRIPT_NAME instead; PATH_INFO is referenced in OJS 2.3.x in the following files:

I dont know much myself, everything I do is based on instructions :)
Thanks again
--
Eddy
aadilsi
 
Posts: 39
Joined: Sun Jan 13, 2013 3:05 am

Re: Common OJS Installation errors

Postby jbsarma » Mon Jun 10, 2013 12:23 pm

Until few days back my OJS 2.4.2 installation on a GoDaddy Linux shared server was perfectly working with 'disable_path_info = Off' with nice URL. But all of a sudden without any change to the server setting the sites stopped working with this setting and I had to 'disable_path_info = On' to get the site working but now with long complicated URL. It is very strange why this happened without apparently GoDaddy making any changes to their server. Is there any explanation. What can I do now to solve the issue so that I can go back to 'disable_path_info = Off'. I received the following reply from GoDaddy - they obviously failed to appreciate the issue:
Thank you for contacting Online Support. Upon review of your hosting account, we haven't made any changes to the hosting server which would cause the problems you are describing. Please review the scripting to verify any rewrites are working properly.
If you are performing mod_rewrites on your site, please see How do I use mod_rewrite?

Thanks in anticipation.
jbsarma
 
Posts: 8
Joined: Wed Jun 06, 2012 2:22 pm

Re: Common OJS Installation errors

Postby asmecher » Mon Jun 10, 2013 1:36 pm

Hi jbsarma,

The only explanation, unfortunately, is a configuration change on the GoDaddy server.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9212
Joined: Wed Aug 10, 2005 12:56 pm

Re: Common OJS Installation errors

Postby Glam » Fri Jul 12, 2013 1:43 pm

asmecher wrote:You should be able to work around this by changing references to PATH_INFO to use SCRIPT_NAME instead; PATH_INFO is referenced in OJS 2.3.x in the following files:
  • lib/pkp/classes/core/PKPRequest.inc.php
  • lib/pkp/classes/core/PKPPageRouter.inc.php
  • lib/pkp/classes/core/PKPComponentRouter.inc.php
  • lib/pkp/classes/core/PKPRouter.inc.php
I suspect SCRIPT_NAME won't be a drop-in replacement, since it probably includes a leading "index.php" before the PATH_INFO data.


Hi, Alec and friends.

I have the same problem with Godaddy hosting. According to your answer, I've made changes on core files, like this:

This line

Code: Select all
$this->_contextPaths = explode('/', trim($_SERVER['PATH_INFO'], '/'), $this->_contextDepth + 1);


becomes

Code: Select all
$this->_contextPaths = explode('/', trim($_SERVER['SCRIPT_NAME'], '/'), $this->_contextDepth + 1);


But this workaround isn't working for me. ¿Is that mod correct? I need my site's URLs back because there are many external sites linking to my OJS documents.

Thanks for your help. Best regards.
Glam
 
Posts: 1
Joined: Thu Jul 11, 2013 2:04 pm

Previous

Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests