Hi All,
I recently migrated code from my home server (windows) to a dedicated
hosting server (Linux). I seem to have some issues with permissions and I'm
not sure how to fix it.
Take the simple script I wrote below.
=================================================
<?php
$directory_make = $_SERVER['DOCUMENT_ROOT'] . "/tgwedding/test";
mkdir("$directory_make", 0777);
?>
It produces the following error:
Warning: mkdir() failed (Permission denied) in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/php4.php on line 3
=================================================
The above behavior is on the Linux machine. Now, I run the same script on
my windows box and it works perfectly.
In another script I upload .jpg files to a directory. It was working
perfectly on the windows home server and on the Linux box I get an access
denied error like this:
Warning: Unable to create
'/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/users/client1/album/175
_7538.jpg': Permission denied in
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/photos.php on line 226
Could someone please?