-
June 17th, 2010, 04:45 PM
#1
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
Norm
-
June 17th, 2010, 07:59 PM
#2
Re: Getting 403 status from html/PHP
Then you don't have write permission. Make sure you change the access permissions.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 17th, 2010, 08:15 PM
#3
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.
Norm
-
June 17th, 2010, 08:47 PM
#4
Re: Getting 403 status from html/PHP
Make the folder "testing" 755.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 17th, 2010, 09:31 PM
#5
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.');
Norm
-
June 18th, 2010, 06:51 AM
#6
Re: Getting 403 status from html/PHP
So change it to 777 then.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
June 18th, 2010, 08:39 AM
#7
Re: Getting 403 status from html/PHP
Thank you, that worked! 777
Now on to the hitcounter code
Norm
Norm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|