Turn off safe_mode in the php.ini
Moderator: General Moderators
Turn off safe_mode in the php.ini
Hi, does anyone knows how to turn off safe_mode in the php.ini?
I cannot even find any php.ini in my server, do you know where i must look for?
I read in articles, saying:
To Turn off PHP "safemode" on Your Linux Virtual Dedicated Server
1. Using SSH, connect to your server.
2. Once you are logged in, type su -.
3. For your password, type the same password you used to connect to your server.
4. At the command prompt type: vi /etc/php.ini
6. Go to the line safe_mode = on and press the "i" key.
7. Change the line to safe_mode = off and press the "Esc" key.
8. Type :wq and press Enter to save your file and quit vi.
I have access to etc but i cannot find any php.ini in it...
Please kindly help, i need this urgently.
I cannot even find any php.ini in my server, do you know where i must look for?
I read in articles, saying:
To Turn off PHP "safemode" on Your Linux Virtual Dedicated Server
1. Using SSH, connect to your server.
2. Once you are logged in, type su -.
3. For your password, type the same password you used to connect to your server.
4. At the command prompt type: vi /etc/php.ini
6. Go to the line safe_mode = on and press the "i" key.
7. Change the line to safe_mode = off and press the "Esc" key.
8. Type :wq and press Enter to save your file and quit vi.
I have access to etc but i cannot find any php.ini in it...
Please kindly help, i need this urgently.
/etc/php.ini is a possible location, but more likely it's under /usr/local/php/lib/php.ini or possibly /etc/httpd/php.ini
Since you seem to have access to the command line via SSH and can operate as root, try these commands:
prompt# locate php.ini
That should tell you right away, if it doesn't, locate the php binary:
prompt# which php (to essentially check if the php binary is in your PATH and where it might be found)
prompt# php --ini
Barring that, list the /etc directory and see if there is an 'httpd' or 'apache' directory there, search those paths. Also look under /usr/local, another likely place for a PHP installation.
Oh, one other option, create a phpinfo() script and check the output from that:
Since you seem to have access to the command line via SSH and can operate as root, try these commands:
prompt# locate php.ini
That should tell you right away, if it doesn't, locate the php binary:
prompt# which php (to essentially check if the php binary is in your PATH and where it might be found)
prompt# php --ini
Barring that, list the /etc directory and see if there is an 'httpd' or 'apache' directory there, search those paths. Also look under /usr/local, another likely place for a PHP installation.
Oh, one other option, create a phpinfo() script and check the output from that:
Code: Select all
<?php phpinfo();?>Hmm. Based on your first post, you seem to indicate that you have console access to this server; at any rate, I was directing you to view the output from phpinfo() so you could see where the php.ini file exists. (under 'Loaded Configuration File').
Anything you want to know can surely be found in the PHP Manual sections on 'Safe Mode' and 'php.ini directives'.
These indicate that you can only alter safe mode options in the php.ini or httpd.conf configuration files. What would the purpose be if you could alter these directives as a normal user?
Anything you want to know can surely be found in the PHP Manual sections on 'Safe Mode' and 'php.ini directives'.
These indicate that you can only alter safe mode options in the php.ini or httpd.conf configuration files. What would the purpose be if you could alter these directives as a normal user?
Solved
Thanks very very much for your help, really appreciate you alot.
Solved it, i was using Plesk control panel.
If you click on the url, and select Group Action, you will be able to find the safe mode can be turned off or on .
Thank again.
Solved it, i was using Plesk control panel.
If you click on the url, and select Group Action, you will be able to find the safe mode can be turned off or on .
Thank again.
Can you tell howm you made this solve?
Hello,
I am facing same problem so please tell me which way you made it solve?
Thanks,
Aziz Rattani
I am facing same problem so please tell me which way you made it solve?
Thanks,
Aziz Rattani
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Solved
ewwwmichslle wrote:Solved it, i was using Plesk control panel.
Did you read the thread history?I am facing same problem so please tell me which way you made it solve?
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
- stereofrog
- Forum Contributor
- Posts: 386
- Joined: Mon Dec 04, 2006 6:10 am
- The Phoenix
- Forum Contributor
- Posts: 294
- Joined: Fri Oct 06, 2006 8:12 pm
Because Safe Mode is false security.AKA Panama Jack wrote:And why in the world are you wanting to run with Safe Mode off?
{shudders}
http://ilia.ws/archives/18-PHPs-safe_mo ... urity.html