OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PHP 5.2.x incompatibility

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.

Postby yokaze » Mon Mar 19, 2007 2:21 am

In the meantime, I have come up with a work-around that avoids the broken function; you can add this to OJS by applying the patch at:
http://pkp.sfu.ca/ojs/download/patch/co ... mizer.diff
...which will temporarily remove some functionality that you probably aren't using (unless you've been developing your own plugins).


Hi, just to add to the reports. Our journal is suffering this bug as well, and I've tried applying the temporary patch. Unfortunately, it appears to work on our test server running Apache, but dies (it returns a 404 when accessing the index.php redirect) on the production server, which is a shared host running IIS 6, PHP 5.2.1 and Zend Optimizer v3.2.4.
yokaze
 
Posts: 4
Joined: Mon Mar 19, 2007 2:12 am

Postby asmecher » Mon Mar 19, 2007 9:38 am

Hi yokaze,

Are you sure this is the same bug? Try creating a test script called something like test.php with the following contents:
Code: Select all
<?php
phpinfo();
?>
Request it in your browser, first directly (i.e. http://www.some-site.com/path/to/test.php), then using a request with path_info (i.e. http://www.some-site.com/path/to/test.php/including/path_info/data). If you get a 404 for the second request, search this forum for path_info to find discussion of the problem.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm

applying patch

Postby shier-jones » Tue Mar 20, 2007 12:29 pm

Sorry to seem so dim - but I have no idea how to apply this patch.. Please can you provide some instructions - Thanks
shier-jones
 
Posts: 18
Joined: Sun Sep 18, 2005 3:25 am

Postby asmecher » Tue Mar 20, 2007 12:56 pm

Hi shier-jones,

This is usually done using the "patch" tool, but if you haven't used it before, you might be better off making the changes by hand.

The patch files are aren't too hard to read, even though they're meant to be used by the patch tool. Lines starting with "-" indicate lines that need to be removed; lines starting with "+" indicate lines that need to be added. Lines beginning with "diff", "+++", "---", and "@@" are instructions to the patch tool to tell it where to look. Other lines are just provided for context so the patch tool knows where it's supposed to modify files.

The patch linked above involves changing classes/db/DAO.inc.php and includes/functions.inc.php. Edit them by hand, find the functions named (e.g. "function DAO") and make the single-line changes (carefully). Please back up any file before you modify it.

If you are able to use the patch tool, here is the command line to run from the OJS installation directory:
Code: Select all
patch -p0 < /path/to/optimizer.diff
(...using the appropriate patch to the optimizer.diff file, of course.)

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm

Postby yokaze » Wed Mar 21, 2007 11:49 pm

Hi Alec,

Sorry for bringing this up again... my host reverted back to PHP 5.1.6 / Zend Optimizer v3.0.2, but my installation of OJS is still not working. The relevant info is as follows:

- OJS returning "CGI Error: The specified CGI application misbehaved by not returning a complete set of HTTP headers."
- Host running Win2003 + IIS6 + PHP 5.1.6 + Zend Optimizer v3.0.2
- PHP appears to be running in cgi mode
- I set "disable_path_info = On" as per your earlier advice
- I reverted DAO.inc.php and functions.inc.php back to the originals (OJS v2.1.1)

Strangely, OJS has been running fine for the past 2 months or so 'til all these issues erupted (not sure if the host was running php in cgi mode prior to this, though).
yokaze
 
Posts: 4
Joined: Mon Mar 19, 2007 2:12 am

patch and subsequent errors

Postby shier-jones » Thu Mar 22, 2007 12:59 am

We are making some progress..
instead of a core dump, I now get ..
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/epworth/public_html/ojs/includes/functions.inc.php:159) in /home/epworth/public_html/ojs/classes/session/SessionManager.inc.php on line 56

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/epworth/public_html/ojs/includes/functions.inc.php:159) in /home/epworth/public_html/ojs/classes/session/SessionManager.inc.php on line 56

Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/epworth/public_html/ojs/classes/session/SessionManager.inc.php on line 209

Warning: Cannot modify header information - headers already sent by (output started at /home/epworth/public_html/ojs/includes/functions.inc.php:159) in /home/epworth/public_html/ojs/classes/core/Request.inc.php on line 33

Any ideas?
shier-jones
 
Posts: 18
Joined: Sun Sep 18, 2005 3:25 am

FIXED!

Postby shier-jones » Thu Mar 22, 2007 1:03 am

Sorry.. I remembered to go back and check that there was NOTHING at the end of the file - my word processor had added the usual CRLF
The site is now up again - THANKS
shier-jones
 
Posts: 18
Joined: Sun Sep 18, 2005 3:25 am

Bingo!

Postby Carlo » Thu Apr 26, 2007 9:51 pm

Thanks Alec.
Now the site is ok.

Will the changes that I made in those files affect some features of the journal?

regards
Carlo
Carlo
 
Posts: 6
Joined: Wed Apr 25, 2007 7:57 am
Location: São Paulo - BRAZIL

Postby asmecher » Fri Apr 27, 2007 9:03 am

Hi Carlo,

The patch disables certain features that you might be using if you're writing plugins to modify OJS's database interactions, but that's not likely; it doesn't affect any features that ship with OJS.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8815
Joined: Wed Aug 10, 2005 12:56 pm

Previous

Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests