cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading photos

N/A

Uploading photos

I've tried a script to upload photos by php via the browser.

For some reason I keep getting an error.

The page is at http://cgi.dcloud.force9.co.uk/form.php

Has anyone a clue how I can get this working properly. Its meant to upload .jpeg files.
18 REPLIES
N/A

Uploading photos

See thread below

Uploading to web space via Form & PHP

What is the error?

Where have you placed the file?

Have you done a CHMOD 777 on your upload directory?

Remember - server side code can't be viewed via a URL.
N/A

Thanks

I've done all of those and still no joy?
N/A

Uploading photos

I need more info on your error.

Mine works and I use the same script.

Answer my queries and I might be able to help.

Cheers

Martin
N/A

Uploading photos

What website have you got it working on?

Phil
N/A

Uploading photos

works on my own F9 cgi space

Works fine.

Again - tell me the error and I might be able to help !!
N/A

Uploading photos

The error is "upload_file.php page not found"

I have placed the file in http://cgi.dcloud.force9.co.uk

I have cmodded the directory to 777
N/A

Uploading photos

Not sure about your upload problem, but a little tip I was told and use on my cgi server. Upload a blang html file and call it index, that way when people visit your cgi address, they don't get a listing of all your directories and files.

Regards

Mark
N/A

Uploading photos

Not sure about your upload problem, but a little tip I was told and use on my cgi server. Upload a blang html file and call it index, that way when people visit your cgi address, they don't get a listing of all your directories and files.

Regards

Mark
N/A

Uploading photos

The action is set to upload_file.php meaning the form is submitting to a page that does not exist.

As you have named your file form.php simply change the action to form.php

or

just rename your file to upoad_file.php without modifying the action.
N/A

Weird

http://cgi.dcloud.force9.co.uk/snaphappy/upload_file.php

Just done exactly that and still no job.

Can u give me a link of the form working on your server to prove it actually does work?
N/A

Uploading photos

See thread Uploading to web space via Form & PHP showing others have got it to work.
N/A

Uploading photos

Have you changed line 7 to reflect the name of your destination folder?

define("DESTINATION_FOLDER", "../uploads/");
N/A

Uploading photos

Just tried that and still no joy.

Did you say you had the script working on your website? If so what is the url?

Mine is http://cgi.dcloud.force9.net/snaphappy/upload_file.php
N/A

Uploading photos

Move your uploads directory up one so it is not in the snaphappy directory and it should work.

so your directory structure should be

dcloud/
snaphappy/upload_file.php
uploads/
cgi-bin/
etc

the upoads directory should not be in the snaphappy directory.


Don't forget to chmod 777

You also need to include error/success files in the snaphappy directory. These are named in the script.

My upload area is protected so you wouldn't be able to access it. I've checked and it still works.