PDA

View Full Version : phpcgi vs phpcli



floyd
12-01-2008, 06:28 AM
phpcgi fixes file permissions problems with files being owned by apache,

But if I switch to phpcgi does that mean that the users will have to change their scripts at all? Can php still be embedded into html documents?

nobaloney
12-01-2008, 11:41 AM
The problem you may have is if the files running php aren't owned by the site user. You may need to fix file ownership:

# cd /home/USERNAME/domains/DOMAIN.EXT/
# chown -R USERNAME:USERNAME public_html
# chown -R USERNAME:USERNAME private_html
Don't forget to replace USERNAME both places where it appears with the proper username (case-sensitive, usually all lower case), and also replace DOMAIN.EXT with the proper domain name, always in lower-case.

Jeff

floyd
12-02-2008, 07:42 AM
So if I switch to phpcgi and change the ownerships to the files all the users' php scripts will continue to function as normal? Even the php embedded in html files?

nobaloney
12-02-2008, 12:43 PM
When I embed php in html files I use a php extension. Do you?

.php files should continue to work, but of course I have no idea of there are some commands which will give you problems. We've not had any problems so far.

Jeff

floyd
12-02-2008, 04:04 PM
I personally don't use php at all. I am more concerned about other users/customers on the server.