I do a fair bit of PHP development. This weekend though has seen me tearing my hair out over well, I’m not sure if it’s PHP, Apache or what. I use the pivotlog.net blog software for the portent and mensan blogs.

One of the nice things about pivot is that you can install a new one or upgrade by using a script called pivot-setup.php – BUT it was creating files and folders with user and group (on a Linux webserver) with user nobody- the same user that the Apache webserver runs under. FTP, and even Cpanel on the box could NOT make any impact on these files etc. I had to put a support ticket in to have their user/group changed- no the php functions to do this were not allowed on the server. (chown() and chgrp()).

Anyway to cut a long story short, it turns out it is php related. Under php4, on this server, files were created as I said user nobody. But if I set the default php to be 5 (you have to add this line into .htaccesS)

AddType application/x-httpd-php5 .php5 .php .htm .html

then php creates files with the same user as the domain owner. (It’s a rented virtual server from Aventure.com). So ftp and cpanel work fine with those files and folders.

That addtype also has .htm and .html files processed for php.