Ticket #2153 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

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

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

Change History

abhay6 years ago

patch using similar method as vars.php

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

incomplete fix.. still looking.

comment:3   ryan6 years ago

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

comment:4   ryan6 years ago

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

comment:5   Ozh6 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   Ozh6 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   Ozh6 years ago

  • Status changed from new to closed
  • Resolution set to worksforme
  • 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)

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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

comment:9   ryan6 years ago

[3382] for PHP_SELF fix.

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

this has been resolved, right?

  • Milestone 2.0.1 deleted

Milestone 2.0.1 deleted

Note: See TracTickets for help on using tickets.