{"id":32,"date":"2007-02-25T21:58:00","date_gmt":"2007-02-25T21:58:00","guid":{"rendered":"http:\/\/dhbolton.com\/blog\/?p=32"},"modified":"2007-02-25T21:58:00","modified_gmt":"2007-02-25T21:58:00","slug":"php-grrr","status":"publish","type":"post","link":"https:\/\/dhbolton.com\/blog\/chgrp\/php-grrr\/","title":{"rendered":"PHP &#8211; GRRR!"},"content":{"rendered":"<p>I do a fair bit of PHP development. This weekend though has seen me tearing my hair out over well, I&#8217;m not sure if it&#8217;s PHP, Apache or what. I use the pivotlog.net blog software for the <a href=\"http:\/\/portent.org\/\">portent<\/a> and <a href=\"http:\/\/mensan.eu\/\">mensan<\/a> blogs.<\/p>\n<p>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 &#8211; 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()).<\/p>\n<p>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) <\/p>\n<p><span>AddType application\/x-httpd-php5 .php5 .php .htm .html <\/span><\/p>\n<p>then php creates files with the same user as the domain owner. (It&#8217;s a rented virtual server from Aventure.com). So ftp and cpanel work fine with those files and folders.<\/p>\n<p>That addtype also has .htm and .html files processed for php.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I do a fair bit of PHP development. This weekend though has seen me tearing my hair out over well, I&#8217;m not sure if it&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[12,13,30,33],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-chgrp","category-chown","category-nobody","category-php"],"_links":{"self":[{"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhbolton.com\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}