Upload file not working on Apache

I'm trying to test a php script which works just fine on our OS X server, but not on my G4 Powerbook running 10.4.3
The upload does not happen when i call the php page from localhost via web browser.

This is a part of php.ini about file uploads
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload tmpdir =

Or is it up to Apache configuration?

Mac OS X (10.4.3)

Posted on Nov 28, 2005 11:29 AM

Reply
3 replies

Nov 28, 2005 7:01 PM in response to Tomi Saloniemi

Tomi,

have you checked to see if the owner (or the group containing the owner) of the httpd process (usually www) has write permission to the folder to which you want to upload the file?

if the directory is, say:

/Library/WebServer/Documents/uploads

and file permissions on this directory are as such:

-rw-rw-r-- 1 root admin

then the www user (the one running the httpd process) cannot write files to this directory. A solution would be to change the owner/group of the directory to which to want to upload such that the www user could write to that directory.

-b

DP867 MDD and 12 1Ghz PB

Nov 29, 2005 12:01 AM in response to Brant Faircloth

To be more precise i'm trying to upload a temp file via form on a html document, from which a php script gets it's parameters.
I do not know where apache uploads temporary files?

Here's part of my html code:
form action=" *****.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX FILESIZE" value="512000">
*******

Valitse ID - file:

ID - file<input name="idfile" type="file">

<input type="submit" value="Send file">
</form>

Thanks for help

Nov 29, 2005 6:52 AM in response to Tomi Saloniemi

Tomi,

you can specify the directory to which you want to upload in your php.ini (as long as the directory is owned by the httpd process, again).

barring that, the file should be uploaded to /tmp, it can then be moved using php to another directory of your choosing (if you decide not to specify an upload directory in your php.ini).


cheers,
b

DP867 MDD and 12 1Ghz PB

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Upload file not working on Apache

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.