Windows XP Setup - Login.php 404

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 1
Joined: Wed Mar 24, 2004 2:27 pm
Location: Palmerston North, New Zealand

Windows XP Setup - Login.php 404

Postby dpwallace » Wed Mar 24, 2004 2:46 pm

Had some login issues after the initial installation of OJS. The system would reply with a 404 message that the page was not found after entering the usercode and password.

I checked the Apache error log and found errors regarding….

Code: Select all

[error] [client xx.xx.xx.xx] script not found or unable to stat: C:/apache/Apache2/php/login.php

I searched the web and tried all of their suggestions to fix the problem re cgi settings etc without success.

I looked into the PHP code of the login script and added the following line of code (filename: login.php, after line 34)

Code: Select all

$baseurl = str_replace("php/","",$baseurl);

This strips out the "php/" section of the base URL that I thought was causing the 404 issue. I also restarted my development server after install of OJS as this code “fix” did not take effect until after the system restart. I have no idea why this worked, the normal Apache re-start did not make any improvements. To clarify, this was a entire system re-start, not just Apache…. Strange I know, but it helped somehow!!!

I do not like changing other peoples code, but as OJS has not been officially tested on Windows, I thought I would try and get it going as it looks really good!!

Should mention my environment….
Windows XP Professional (development server)
Apache 2.0.48
MySQL 3.23.47
PHP 4.3.4

I hope this helps someone else!!!

Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby kevin » Wed Mar 24, 2004 3:30 pm

Are you running the CGI version of PHP? When running PHP in CGI mode (as opposed to as an Apache module), the server SCRIPT_NAME variable is set to the path to the CGI binary ("/php/php.exe" on Windows), rather than the actual path to the script. This would have caused the problem you described, as SCRIPT_NAME is used to build the URL used for redirects.

I'd recommend using PHP as an Apache module instead.


Postby Guest » Wed Mar 24, 2004 4:47 pm

The catch is that we have a CMS that requires PHP to run in CGI mode only. I want to use OJS within our CMS.

The "fix" seems to work fine now. I need to do further testing after the "fix" to see if there is any further impact on OJS.

Posts: 945
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Windows testing

Postby ramon » Wed Mar 31, 2004 5:16 am

Dear fellows,

We at IBICT have tested the system in WinXP, and everthing works fine EXCEPT file transfers. Which means uploading articles was not possible.
We used the XAMPP installation of Apache, MySQL and PHP.

We believe it´s a difference between linux and windows on how they handle files' and directory permissions, as well as how the code was written. If anyone solves this problem, or doesn´t have it, we´d like to know, as many potential users here may use Windows as a platform for testing.

We did not attempt to try to fix this problem, as we and all of the Brazilian Government are migrating from Microsoft to Unix-based systems, including for day-to-day activities, in an attempt to reduce computer and software costs.

But it is definitely worth a look.

Return to “OJS Editorial Support and Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest