Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#2153 closed defect (bug) (fixed)

WP 2.0 not working (PHP 4.2.2 / PHP-CGI with PHP_SELF empty)

Reported by: Ozh Owned by: ryan
Priority: highest omg bbq Milestone:
Component: General Version: 2.0
Severity: blocker Keywords: PHP_SELF CGI
Cc:

Description

wp-includes/vars.php now checks for empty PHP_SELF, but wp-settings.php uses $_SERVERPHP_SELF? a lot.
On servers where PHP_SELF is empty, every page return a blank page.

Attachments (1)

php_self_patch_for_wp-settings.diff (1.4 KB) - added by abhay 7 years ago.
patch using similar method as vars.php

Download all attachments as: .zip

Change History (13)

abhay7 years ago

patch using similar method as vars.php

  • Keywords has-patch added
  • Keywords has-patch removed

incomplete fix.. still looking.

comment:3   ryan7 years ago

  • Milestone changed from 2.0 to 2.1
  • Owner changed from anonymous to ryan

comment:4   ryan7 years ago

Try removing the checks for install.php in PHP_SELF and just checked if WP_INSTALLING is defined.

comment:5   Ozh7 years ago

It seems that for once PHP_SELF is not the problem
Here's how I've managed WP2 to run on my server :

  • disable caching system (otherwise it returns blank pages only)
  • add echo ' '; at the end of wp-settings.php (otherwise PHP returns an error 500)

I'll keep on my investigating to understand what's so special with my server...

comment:6   Ozh7 years ago

(sorry if I look like spamming about my life that concerns no one)

best workaround I've found yet is :

  • disable cache in wp-settings.php
  • add : if (!strpos($_SERVERREQUEST_URI?,'/wp-admin/')) echo ' '; at the end of wp-settings.php (no echo makes error 500 for pages but admin section works fine)

comment:7   Ozh7 years ago

  • Resolution set to worksforme
  • Status changed from new to closed
  • Summary changed from WP 2.0 not working on PHP/CGI with PHP_SELF empty to WP 2.0 not working (PHP 4.2.2 / PHP-CGI with PHP_SELF empty)

I've resolved the second point : header("HTTP:1/1 $header $text") (line 2153 of functions.php) produced the Error 500. My host is running PHP 4.2.2, which is rather old now, this could be the culprit. Anyway, header("Status..") works the same.

I'm still looking after the caching troubles (still echo blank pages)

  • Resolution worksforme deleted
  • Status changed from closed to reopened

This should be fixed on WordPress's end also, since the download pages say we support PHP 4.2 or higher.

comment:9   ryan7 years ago

[3382] for PHP_SELF fix.

  • Milestone changed from 2.1 to 2.0.1
  • Resolution set to fixed
  • Status changed from reopened to closed

this has been resolved, right?

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.