 |
 |
How do you get permission to edit a php.Ini file by using terminal?
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
okay. I need to edit this php.ini but How do you get permission to edit the php.Ini file by using terminal?
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
|
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2006
Status:
Offline
|
|
I tried that and this what happens:
damian-hynes-computer:~ Damo$ sudo /usr/local/php5/lib/php.ini
sudo: /usr/local/php5/lib/php.ini: command not found
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2000
Location: Los Angeles
Status:
Offline
|
|
Don't you have to do something like authenticate using sudo and then open the file using one of the text editors? It looks like you're just writing sudo and then typing the path to the file, but then again I may have missed something because that's an obvious thing.
|

"The natural progress of things is for liberty to yield and government to gain ground." TJ
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Sudo gives the command it's executed with permission to affect the file; it doesn't do anything to the file itself. I'm not sure what the permissions on the file are, but you might be able to do something like sudo chmod g+w /usr/local/lib/php.ini. Of course, you'd want to reverse that afterward unless you want to leave the file with looser permissions.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status:
Offline
|
|
Make sure you make a backup of that file first (or maybe your entire drive). I say this because it doesn't sound like you know what you are doing. And not knowing what you are doing with sudo will lead to disaster.
By default php.ini isn't in /usr/local/php5/lib which makes me think you installed some package, which makes me wonder why it's not already read/writeable by you. If the reason is you don't know how to open and edit a file, then the correct command to use is:
'pico /usr/local/php5/lib/php.ini'
If the reason is you don't know how to use sudo then the syntax for sudo is
sudo [I]program to execute as root/I]
So to edit /usr/local/php5/lib/php.ini' as root the command would be:
sudo pico /usr/local/php5/lib/php.ini
WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Apple's php.ini is in /etc (or /private/etc, which is the same thing)
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |