 |
 |
php config issues
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
I need a bit of help getting PHP configured the way I need it to be. I am trying to write an upload script for a friend, but the upload portions of the script always seem to fail. As far as I understand, PHP automatically uploads the temporary file to a default location. When I do a phpinfo(), this value is not set. I am using a build of PHP that does not have a default php.ini file, so I attempted to create my own. I added a file in /usr/local/lib and /usr/lib, but neither of them seem to change the value displayed in phpinfo().
Code:
upload_tmp_dir = /tmp
Is that the correct format for the php.ini file? Any help to get this working would be appreciated.
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
I think it is set to 1 by default. Regardless, when I print out the phpinfo() variables on my TiBook, it has file_uploads set to 1. I'm not sure why, but when I created the files /usr/lib/php.ini and /usr/local/lib/php.ini, neither of them seemed to take effect. Anyone?
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
Duh...needed to restart Apache 
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Nov 2001
Location: Washington, DC 20009
Status:
Offline
|
|
Okay, I'm getting close. I've gotten the script to work...almost. I do a check at the end that tests to see if the file was uploaded successfully and if not, to print the error code to the screen. Each time I attempt to upload a 24kb Word Document, 2 is displayed in the browser. I looked this up, and the PHP website says that is the error code indicating that max_file_size has been reached. I was successfully able to upload a 4kb document. I've read in various places that the max_file_size must be indicated as a hidden field in your HTML form. I've tried doing this. Is it that my max_file_size value just isn't big enough? I tried a 1 followed by about 15 zeros, but that didn't work either. Is there a way to make the max_file_size value infinitely large? Where do post_max_size and upload_file_size fit in to the picture? I set the latter two both to "50M" which should be 50MB, right?
|
|
Just my $.02 :-)
Ti Powerbook 1Ghz w/ Superdrive ......and lovin' it! :)
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Dec 2002
Status:
Offline
|
|
upload_max_filesize is a setting in the ini file, setting to "50M" will be 50 MB yes
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|