473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

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
Jul 17 '05 #1
2 1691
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.********@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

Jul 17 '05 #2
Chris Ritson <C.********@ncl.ac.uk> wrote in
news:Xn*****************************@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.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Henrik Oddershede | last post by:
Hi. I am having a problem with safe_mode in PHP-4.3.2. I was running an Apache-1.3.27 web server on solaris8 with PHP-4.3.1 with safe_mode on - and everything was working fine. Yesterday, I...
0
by: Gerrit Kuilder | last post by:
Hello All, I have the following question: a hosting provider has turned local safe_mode off and the master safe_mode is on. This prevents an application/php script to work. The provider...
1
by: David Ruiz | last post by:
Hi all, I've tried to compile PHP-4.3.3 for a HORDE installation and it requires that PHP is compiled with safe_mode disabled. I compiled it like this: --disable-safe_mode...
2
by: Salmo Bytes | last post by:
I have a script that wants to mirror a directory structure, reading from location1 and writing (mkdir) at location2. This code works fine on a my own desktop test box. But fails at 'mkdir' when...
1
by: Felix Natter | last post by:
hi, I would like to upload a file (via a form), then read that (temporary) file and write the contents into a database. The first problem is that open_basedir=/home/CUSTOMER so I can't just read...
2
by: ZMAN | last post by:
Hello all! The ISP that hosts a few of my sites switched on safe_mode, now my calls to Pear (require_once('DB.php');) are not working. I get: Warning: main(): SAFE MODE Restriction in effect....
0
by: bedek | last post by:
Hello How to set BASH variable form PHP which is working in "safe_mode" ? .... and to check if it's set for sure ? I find out that I should create directory for binaries in home direcotry of...
1
by: ramc18 | last post by:
My PHP.INI configuration have safe_mode = Off but in local execution it get On. I noticed this strange behaviour with a script that shows an error in move_uploaded_file. I write a minimal script...
0
by: Zeilkman | last post by:
Hi everybody, I'm runing LAMP on a Fedora 7 + Plesk server. PHP Version 5.0.4 Apache 2.0 Handler The "local value" of Safe Mode is ON and the "master value" is OFF I try to change the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.