Getting 403 status from html/PHP
Hi,
This is my first attempt to put some PHP code on a linux server. The code is supposed to write to the files folder.
I get a 403 Forbidden! error with the URL: http://asdfasdfsdf.zxq.net/Testing/UpLoad.html <<<<<<< userid changed
drwxr--r-- 3 201405 vhosts 53 Jun 17 17:07 Testing <<<<<<<< The folder containing the html and php file
The contents of the Testing folder:
-rw-r--r-- 1 201405 vhosts 343 Jun 17 01:12 UpLoad.html
-rwxr--r-- 1 201405 vhosts 1543 Jun 17 17:07 UpLoad.php
drwxrw-rw- 2 201405 vhosts 6 Jun 17 01:30 files <<<<<<< The folder to be written to by the php filel
Thanks,
Norm
Re: Getting 403 status from html/PHP
Then you don't have write permission. Make sure you change the access permissions.
Re: Getting 403 status from html/PHP
Thanks for the response.
For which file/directory and for which user. I posted the settings for 4 objects. Each object can have 3 write permissions. That makes 12 different places to set write permission.
Re: Getting 403 status from html/PHP
Make the folder "testing" 755.
Re: Getting 403 status from html/PHP
Thanks again. I made the change and the settings are now:
drwxr-xr-x 3 201405 vhosts 53 Jun 17 17:07 Testing
In Testing:
-rwxr-xr-x 1 201405 vhosts 1565 Jun 18 02:26 UpLoad.php
I got some improvement. The html page loaded.
I now get the following message:
You cannot upload to the specified directory: files/, please CHMOD it to 777.
It is from the following lines in my PHP file:
Code:
if(!is_writable($upload_path))
die('You cannot upload to the specified directory: ' . $upload_path . ', please CHMOD it to 777.');
Re: Getting 403 status from html/PHP
So change it to 777 then.
Re: Getting 403 status from html/PHP
Thank you, that worked! 777
Now on to the hitcounter code
Norm