Jan 19, 2004, 01:22 PM
I tried altering my php.ini file in /usr/local/php/lib/ so that error messages would be displayed for my own debugging abilities. I used pico, but when I try to write out the file it says "cannot open file for writing." I tried taking my php.ini from my PC and moving it to /usr/local/php/lib/ but it says something to the effect of "permission denied." I can't chmod the file ("operation not permitted"). I am the admin, so I don't know why I wouldn't be able to do this or any of the above operations. Thanks in advance.
Jan 19, 2004, 01:46 PM
you're logged in as the administrator, but are you logged in as root? instead of "pico php.ini" (or whatever your command is) use "sudo pico php.ini" (ie, type 'sudo' before your command.) you'll be asked for your admin password.
sudo executes whatever command follows it as the root user, which should solve your problem. note that it doesn't actually log you in as root -- it only executes the command directly following it. think of it as temporary root access.
also, you may not want to use the php.ini file from your PC. i'm not sure if the php engine builds the same way under OS X. but i don't actually know one way or the other, so you might know better than i.
edit: and this should go without saying, but there's a reason OS X doesn't automatically let you run as root. so be careful when you're mucking about with system files.