php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #6815 php.ini-optimized disables passing of apache vars
Submitted: 2000-09-20 11:26 UTC Modified: 2000-09-24 16:47 UTC
From: johnford at speakeasy dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.2 OS: SuSE Linux 6.4
Private report: No CVE-ID: None
 [2000-09-20 11:26 UTC] johnford at speakeasy dot org
First of all, let me say, this IS a configuration problem, and copious reading of the documentation will sort this out for anyone willing to take the time. BUT, some people, as I would have, would rather compile, install, and go.

The problem I came across is that when I upgraded to PHP4, I copied php.ini-optimized to /usr/local/lib/php.ini (Hell, who doesn't want something "optimized").  Then I started running into all sorts of problems with my existing scripts.  Logins we failing, counters were not incrementing correctly, and various other stuff.  

I finaly noticed that all of my scripts that were having problems used global variables like "$PHP_AUTH_USER" and "$PHP_SELF", and then I did some debugging to find that these variables were empty.

FInally, I figured out that the supplied php.ini-optimized diabled global-variables, even though I had enabled them at compile-time. Basically, I think this is bad.  Since everyone, of course, is going to want their installation to be "optimized" a lot of people are going to install this version of php.ini, instead of the supplied php.ini-dist. (Yes, I realize the INSTALL file says to copy php.ini-dist, but no mention is made that php.ini-optimized might break things.)

RTFM notwithstanding, I think it would benefit all involved if php.ini-optimized were renamed to something not so enticing and so noted in the docs.

That's my lame bug-report.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-24 16:46 UTC] jmoore@php.net
The reason for this is to try to encourage to stop people using register_globals and to try and discourage people from relying on them so much as this can cause scripts to be insecure. Most of the time this is not an issue but if you are interested see the recent posts about php on bugtrak. I will look into adding a note to the install file.
There is also a rather large note about whats changed at the top of php.ini-optimized about whats different.

James
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 04:00:01 2026 UTC