Web Hosting Talk







View Full Version : PHP/Safemod/ and maybe apache?


nethosting
07-22-2002, 05:21 PM
Warning: SAFE MODE Restriction in effect. The script whose uid is 507 is not
allowed to access /proc/loadavg owned by uid 0 in
/home/virtual/site5/fst/var/www/html/sources/functions.php on line 1277

Warning: fopen("/proc/loadavg","r") - Success in
/home/virtual/site5/fst/var/www/html/sources/functions.php on line 1277

Warning: SAFE MODE Restriction in effect. The script whose uid is 507 is not
allowed to access ./Skin/s11/skin_global.php owned by uid 48 in
/home/virtual/site5/fst/var/www/html/index.php on line 180

i get these erors when php safe mode is on. however if i go in to apache's conf and turn it off, i dont have any errors.

how can i fix these errors, so that i can turn safe mode on?

loopforever
07-22-2002, 05:32 PM
Looks like you're trying to execute a shell command through your script, safe mode blocks this on purpose. You can't have safe mode on for that domain, and still be able to execute those commands.

esdjco
07-22-2002, 07:18 PM
fopen is a denied function I believe if safe mode is on. Not sure on this but that would explain the second error.

nethosting
07-22-2002, 07:24 PM
okay, is there a way to set php mode to off, on just one specific domain? i have ensim 3.0 server.

do i just add something in to /etc/httpd/conf/virtual/site5 config?

esdjco
07-22-2002, 07:27 PM
Yes simple... search the RS forums for safe mode and youll get the correct resoulution to this problem.

nethosting
07-22-2002, 07:53 PM
thanks

KDAWebServices
07-23-2002, 08:33 PM
Your problem was with the user who owns the PHP file, did not match the user who owns the file you were trying to open.