hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : How to turn PHP safe mode off?
Reply

Forum Jump

How to turn PHP safe mode off?

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
Mr. Awesome
 
Join Date: Jul 2002
Posts: 6,025

How to turn PHP safe mode off?


I am trying to use the backquotes to execute a system command, but it says the following message:
Quote:
Warning: Cannot execute using backquotes in safe mode in /home/virtual/site1/fst/var/www/html/test.php on line 9
So.. I guess I need to turn off safe mode. I have no idea how to do this.

Can anyone walk me through? phpinfo() says that my "safe_mode" directive is off for Master Value, but is on for Local Value.

I guess there's a switch somewhere I need to set?

Thanks!



Sponsored Links
  #2  
Old
Junior Guru Wannabe
 
Join Date: Sep 2002
Posts: 77
http://www.php.net/manual/en/features.safe-mode.php

In php.ini set safe mode to off I believe.

__________________
Fuel Guru
High Octane Web Hosting!
http://www.fuelhosting.com

  #3  
Old
Mr. Awesome
 
Join Date: Jul 2002
Posts: 6,025
My php.ini already is telling me that safe_mode is off.

This is from my php.ini file:

;
; Safe Mode
;
safe_mode = Off


Does anyone know why the Master Value says off, but the Local Value says it is on?

What does local value mean? How can I set this off?

Thanks!

Sponsored Links
  #4  
Old
Junior Guru Wannabe
 
Join Date: Sep 2002
Posts: 77
did you restart?

__________________
Fuel Guru
High Octane Web Hosting!
http://www.fuelhosting.com

  #5  
Old
Junior Guru Wannabe
 
Join Date: Sep 2002
Posts: 77
Apache --- Sorry do not restart the server just restart Apache the service.

__________________
Fuel Guru
High Octane Web Hosting!
http://www.fuelhosting.com

  #6  
Old
Web Hosting Master
 
Join Date: Mar 2001
Location: Ireland
Posts: 1,354
The 'master' value is your php.ini , while the 'local' one refers to the directory you are looking at.

Basically you can override/change the local value using a .htaccess

I'd advise you to poke around on the PHP site.

__________________
Blacknight
ICANN accredited domain registrar

  #7  
Old
Mr. Awesome
 
Join Date: Jul 2002
Posts: 6,025
Quote:
Originally posted by blacknight
The 'master' value is your php.ini , while the 'local' one refers to the directory you are looking at.

Basically you can override/change the local value using a .htaccess

I'd advise you to poke around on the PHP site.
I have confirmed that the php.ini file has safe_mode set to off, and have restarted apache to make sure.

So now I need to find out why the Local Value is set to on..

Is there a way to search all files within a group of directories for the words "safe_mode"? I looked at the .htaccess file for the directory, but couldn't find anything to do with php. I figure maybe I can search for this text and then simply look inside each resulting file to see if it is being set there.

Thanks.

  #8  
Old
Web Hosting Master
 
Join Date: Aug 2002
Posts: 2,618
Look at the link fuelguru posted above, read the whole page. That's the answer you need.

__________________
YourCheapHost.com - Low cost multi domain hosting solutions. [Legal adult content friendly]
Reliable web site hosting is our motto. We have Alertra stats to back that up.
Proven provider of high quality shared and reseller accounts since 2002.


  #9  
Old
Mr. Awesome
 
Join Date: Jul 2002
Posts: 6,025
Quote:
Originally posted by net-trend
Look at the link fuelguru posted above, read the whole page. That's the answer you need.
I must be stupid, then.

After reading that whole page three times I still can't figure out how to set the Local Value of safe_mode to off. I've looked in php.ini, httpd.conf, .htaccess files and a few other places, but can't find anywhere that has safe_mode set to on.

Can anyone help?

  #10  
Old
Web Hosting Master
 
Join Date: Nov 2001
Posts: 852
Are you using any sort of hosting control panel?

  #11  
Old
Web Hosting Guru
 
Join Date: Aug 2002
Location: Toronto, Canada
Posts: 286
just add this to the end of the httpd.conf file and restart apache.

<Directory /var/www/html>
php_admin_flag safe_mode off
</Directory>

__________________
www.prolinker.com - free automatic linking to your website

Reply

Related posts from TheWhir.com
Title Type Date Posted
Dell to Shut Down Consumer-Focused Cloud Storage Service DellData Safe Web Hosting News 2014-06-13 11:58:00
Elastica Launches Data Science Powered Cloud Security Solution, Raises $6.3M in Funding Web Hosting News 2014-02-20 10:32:24
FireLayers Emerges from Stealth Mode with Policy-Based Security Platform for Cloud Apps Web Hosting News 2014-02-18 12:51:57
Inside 1&1's New Hosting Services and Approach Web Hosting News 2014-05-09 12:40:26
CloudFlare Railgun Offers Hosting Customers One-Click Dynamic Caching Web Hosting News 2013-02-27 10:44:29


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?