473,231 Members | 1,548 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,231 software developers and data experts.

Safe mode

Hi all,
i'm new at PHP.
it's running on Linux RedHat, with Apache 2.0.52.

i'm getting the following errors:
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/var/www/html/......
and
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid
is 500 is not allowed to access /proc/uptime owned by uid 0 in
/var/www/html/xxx.php on line 4

In my php.ini file, i have
safe_mode = false
i tried safe_mode = 0 or OFF, but same problem.

Anyone can help me plz ?

Thanks!

Jul 17 '05 #1
4 6455
Ray
Hi

It seems as though the apache user that was created on your box does not
have rights to access /proc/uptime.
Check your permissions on that directory.

Regards
Ray

"zeman" <ma********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi all,
i'm new at PHP.
it's running on Linux RedHat, with Apache 2.0.52.

i'm getting the following errors:
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in
/var/www/html/......
and
Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid
is 500 is not allowed to access /proc/uptime owned by uid 0 in
/var/www/html/xxx.php on line 4

In my php.ini file, i have
safe_mode = false
i tried safe_mode = 0 or OFF, but same problem.

Anyone can help me plz ?

Thanks!

Jul 17 '05 #2
hi ray,
[root@linux /]# ls -l /proc | grep uptime
-r--r--r-- 1 root root 0 Jun 16 14:41 uptime

It has "read" permission of owner, group, and other.
Apache is running with a user with UID 500.

Thanks

Jul 17 '05 #3
Ray
Hi

Ok, my permissions are set to the same as yours..

Try using something like this..

<?

$strUptime = exec("uptime");

echo "<pre>";
echo $strUptime;
echo "</pre>";

?>

It will return "15:01:35 up 8:52, 6 users, load average: 0.05, 0.16,
0.09"

Hope this helps..
Ray
"zeman" <ma********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
hi ray,
[root@linux /]# ls -l /proc | grep uptime
-r--r--r-- 1 root root 0 Jun 16 14:41 uptime

It has "read" permission of owner, group, and other.
Apache is running with a user with UID 500.

Thanks

Jul 17 '05 #4
well it's not only the uptime that i need, it's other functions.

if i change the owner of that file to UID 500, it works... but that's
not a solution.
i want to solve the safe mode thing.

Thanks!

Jul 17 '05 #5

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

Similar topics

1
by: Giobibo | last post by:
Hi. I want to send mail with the function mail(). I am on a shared server in SAFE MODE. When I send a mail I get the message: "SAFE MODE Restriction in effect. The fifth parameter is...
0
by: Yemi | last post by:
Hi There. I seem to be getting some inconsistent results when using passthru() in safe mode. They appear to be related to the fact that passthru should treat all command arguments as one single...
3
by: Jeremy Shovan | last post by:
What do I need to change to use the opendir() function when safe mode is in affect?? I have root access to the server and can make any changes neccessary except turn safe mode off Thanks in...
2
by: Paul Schmidinger | last post by:
Hi, I created a directory with PHP mkdir (mode 0777). Then I try to move_ulpoaded_file() to move a file into this directory. I get an error: Warning: move_uploaded_file(): SAFE MODE...
2
by: Joseph S. | last post by:
Hi all, Consider this case: I have a free php hosting account (a LAMP host) with an account name (also the name of my directory) 'sample'. Under 'sample', I have php scripts which can create...
8
by: Gary Nastrasio | last post by:
If I compile with /clr:safe, which is exactly meant by saying I can't use "Native Types" in my code? Is a native type something such as float, short, or int? Thanks, Gary
3
by: Rik | last post by:
Hello, first of all, my provider sucks, newsserver is down for the #nth time now, offcourse when I have an urgent question.... So this will be me first time using Google Groups, forgive me if...
1
by: Sephi | last post by:
Hello, I'm trying to disable safe mode from my php installation. First because this functionality will be removed in PHP6, and because it's very restrictive and it's giving me headaches when...
5
by: rdlowrey | last post by:
Hi, I'm pulling my hair out trying to make this work and any help would be appreciated ... When I try to move the uploaded file: move_uploaded_file($_FILES,"/var/www/vhosts/...
7
by: bvdp | last post by:
I'm finding my quest for a safe eval() quite frustrating :) Any comments on this: Just forget about getting python to do this and, instead, grab my set of values (from a user supplied text file)...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.