PHP safe_mode sometimes appears to be on?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-27-2004
Chris Ritson
 
Posts: n/a
Default PHP safe_mode sometimes appears to be on?

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
Reply With Quote
  #2 (permalink)  
Old 04-27-2004
Rusty Wright
 
Posts: n/a
Default Re: PHP safe_mode sometimes appears to be on?

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

Reply With Quote
  #3 (permalink)  
Old 05-04-2004
Chris Ritson
 
Posts: n/a
Default Re: PHP safe_mode sometimes appears to be on?

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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:45 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0