OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PATH_INFO and ORIG_PATH_INFO

OCS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, michael

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page. While these are OJS-specific, the OCS codebase is similar enough to OJS they should be of help. There is also an [url=http://pkp.sfu.ca/ocs_documentation[/url]OCS Documentation[/url] page with some more general documentation that might also be of interest.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a technical support question, try the OCS Technical Support subforum.

PATH_INFO and ORIG_PATH_INFO

Postby maw » Fri Mar 28, 2014 3:23 pm

I was having trouble getting short URLs to work for my conference. I tried every solution I could find on these support forums and ended up going in circles.

It turned out that with our hosts combination of Linux, Apache and PHP that when mod rewrite is used the values that would normally be in PATH_INFO were now in ORIG_PATH_INFO. Instead of modifying the 4 or 5 references to PATH_INFO with a straight find and replace I followed the advice found at http://infopotato.com/blog/index/path_info and made each instance test for both. I ended up having to take a slightly different approach for each instance as some test for a value and then use it, others test for the value not existing, etc. While I would be willing to share my code I would suggest that a better approach would be to take the PATH_INFO or ORIG_PATH_INFO value and put it into an OCS constant and then change the references to use the constant. This would also enable the possibility of cleanly dealing with the IIS issue mentioned at the blog.

I would guess that OJS would have the same problem.

Michael.
maw
 
Posts: 2
Joined: Fri Mar 28, 2014 3:10 pm

Re: PATH_INFO and ORIG_PATH_INFO

Postby maw » Fri Mar 28, 2014 3:34 pm

... and then I thought to check the OJS forums as well and found this post: https://pkp.sfu.ca/support/forum/viewto ... 6&start=30

Thought I should mention that I tried
Code: Select all
$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
but I couldn't change $_SERVER values, this might be due to my host using suPHP which locks down a lot of settings.

Michael
maw
 
Posts: 2
Joined: Fri Mar 28, 2014 3:10 pm


Return to OCS Development

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest