Help - Search - Members - Calendar
Full Version: Can't Upload A File To A Directory........
TotalChoice Hosting Family Forums > TotalChoice Hosting General Support > Security Discussions
chip
Hope this is the right forum............

Using CodeCharge Studio to develop a PHP based project which includes a file upload module on a HTML page. When I access the page from my website I receive an error within the page, which is normal if there is a problem, stating "Upload folder doen't exist". I have created the folder in question, did a chmod 777 on the directory. I am using /home/XXXXX/....... as the path. I got this from the file manager in Cpanel.

First question - I am on a shared server, do you have 'open base dir restriction' setup which means I can't access sub-directories from outside Cpanel or ftp?

Second question - If I don't know what I am talking about, could you please point me in the right direction with path and permisions to allow me to upload a file from a web page.

If you need additional info, please let me know.


Thanks for your help,
TCH-Andy
Hi Chip smile.gif

The reason is usually because you have put a / in the wrong place, and hence got the path wrong.

For example if you are in /home/x1x1x1/public_html and you want to upload to the folder folder1 with file aaa

You can either write
/home/x1x1x1/public_html/folder1/aaa
or
folder1/aaa

But

/folder1/aaa would be the wrong place, because of the / at the beginning - and hence you wouldn't have permissions there.

Can you paste the full error message for us ? (crossing out any personal information of course)
chip
Thanks Andy,

Putting too many "/" and directory names into my path. You made me think what directory my page was running in and just put in the name of the directoy I wanted to save the file to. The directory for saving the file was a sub-directory. Page was running in www/demotest, all I needed to use for a path was "pcrimage".

You guys are awesome as always, Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.