This is a discussion on PHP safe_mode sometimes appears to be on? within the PHP Language forums, part of the PHP Programming Forums category; I have just upgraded a web server to use apache 1.3.29 with php 4.3.4. Since this ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have just upgraded a web server to use apache 1.3.29 with php 4.3.4.
Since this upgrade (from php 4.1.1) a number of our PHP paes have come up with errors complaining that safe mode is in operation and that as UIDs don't match the page cannot be served. Safe mode is NOT switched on globally either in php.ini or in the httpd.conf file for that part of the web site. The only place we use safe mode is in a different virtual host where staff and students are able to create their own pages. Not only that, if you refresh the offending page in the browser, the page is usually served correctly without errors. I have emptied my browser cache but this makes no difference, the problem still occurs from time to time. Has anyone else seen this strange behaviour? Have you any suggestions what to look for? Chris Ritson |
|
|||
|
I had a weird problem with php that I fixed by recompiling it with no
optimization. I am compiling with gcc 3.3.1. Normally I compile with -O3. I had to compile with -O0 (no optimization) and then my problem went away. Something you could possibly try. Chris Ritson <C.R.Ritson@ncl.ac.uk> writes: > I have just upgraded a web server to use apache 1.3.29 with php 4.3.4. > Since this upgrade (from php 4.1.1) a number of our PHP paes have come up > with errors complaining that safe mode is in operation and that as UIDs > don't match the page cannot be served. > > Safe mode is NOT switched on globally either in php.ini or in the > httpd.conf file for that part of the web site. The only place we use safe > mode is in a different virtual host where staff and students are able to > create their own pages. Not only that, if you refresh the offending page > in the browser, the page is usually served correctly without errors. I > have emptied my browser cache but this makes no difference, the problem > still occurs from time to time. > > Has anyone else seen this strange behaviour? Have you any suggestions > what to look for? > > Chris Ritson |
|
|||
|
Chris Ritson <C.R.Ritson@ncl.ac.uk> wrote in
news:Xns94D89EE443440CRRitsonnclacuk@128.240.233.5 5: > I have just upgraded a web server to use apache 1.3.29 with php > 4.3.4. Since this upgrade (from php 4.1.1) a number of our PHP paes > have come up with errors complaining that safe mode is in operation > and that as UIDs don't match the page cannot be served. > > Safe mode is NOT switched on globally either in php.ini or in the > httpd.conf file for that part of the web site. The only place we use > safe mode is in a different virtual host ... > Not only that, if you refresh > the offending page in the browser, the page is usually served > correctly without errors. I have now found what appears to be a work-around for this. As stated, safe mode is switched off globally in php.ini. Although it should have no effect, adding:- php_admin_flag safe_mode off to my <Directory /> </Directory> entry in httpd.conf has prevented the problem occuring. I have no proof, but my guess is that if one of the httpd worker processes has processed a request in safe mode, the default setting is not returned to its value from php.ini when the next request is processed. When I get a chance on a test server, I will upgrade to the latest versions of httpd 1 and php 4 and if the problem still occurs, I will report a bug. Chris Ritson. |