Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
PHP uploading file through form under Plesk
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- PHP uploading file through form under Plesk
PHP uploading file through form under Plesk
24-04-2009 2:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi there everyone, home somebody can shed some light on this.
I have a page which is intended to allow the upload of an image file into a database. The file is transmitted to the server using the usual http method (POST a form). This used to work fine on my ccgi account, but I have just realised that it doesn't work on the plesk platform. A quick bit of troubleshooting tells me that the file is being uploaded to the server successfully, but I think the php can't find the file in it's temporary area, so it doesn't know where to find it to start processing it for the database insert.
Is this method of upload possible on Plesk? Where do files go when they are uploaded through POST requests?
Hope someone has come across this already, and not been confounded!
Thanks
Sandy Noble
I have a page which is intended to allow the upload of an image file into a database. The file is transmitted to the server using the usual http method (POST a form). This used to work fine on my ccgi account, but I have just realised that it doesn't work on the plesk platform. A quick bit of troubleshooting tells me that the file is being uploaded to the server successfully, but I think the php can't find the file in it's temporary area, so it doesn't know where to find it to start processing it for the database insert.
Is this method of upload possible on Plesk? Where do files go when they are uploaded through POST requests?
Hope someone has come across this already, and not been confounded!
Thanks
Sandy Noble
Message 1 of 4
(1,875 Views)
3 REPLIES 3
Re: PHP uploading file through form under Plesk
25-04-2009 9:20 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have a geneology programme running on the same server, and have very little trouble uploading Photos and files using the upload feature of the programe which is in php. would need a few more details of the file name and perhaps a copy so I can perhaps try it out.
Message 2 of 4
(627 Views)
Re: PHP uploading file through form under Plesk
27-04-2009 1:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi Sandy,
Yes, you can POST files to PAYH. POSTed files are stored under a temporary filename in /tmp and then moved to one of your own folders using something like
Just a guess, but you might run into difficulties if the folder to which you're trying to move the file is not writable by Apache. Try setting the relevant folder permissions to 777.
Gabe
Yes, you can POST files to PAYH. POSTed files are stored under a temporary filename in /tmp and then moved to one of your own folders using something like
move_uploaded_file($_FILES['myfile']['tmp_name'], basename($_FILES['myfile']['name']))
Just a guess, but you might run into difficulties if the folder to which you're trying to move the file is not writable by Apache. Try setting the relevant folder permissions to 777.
Gabe
Message 3 of 4
(627 Views)
Re: PHP uploading file through form under Plesk
29-04-2009 9:54 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for the confirmation guys, I am reassured. I did think it must be a permissions problem, but I didn't really know which folder I should be changing the properties on. I'll give this a shot on the weekend, and see what happens!
Cheers
Sandy
Cheers
Sandy
Message 4 of 4
(627 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- PHP uploading file through form under Plesk