LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-01-2002, 02:27 PM   #1
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Rep: Reputation: 30
PHP and uploading files


hi,
i'm very well versed in PHP and have used it for many web applications. i recently wrote a small uploading script which works perfectly for most files. however, whenever i try and upload a larger file (like an mp3) the script fails after so long.

i *think* the script is limiting my upload to 2 megs and cutting me off after that. but i changed the value from 2M to 45M in the php.ini file and still the same error. the error exactly is that the PHP script thinks a file was uploaded, but can't find the data.

i'm thinking this has something to do with my system. apache is installed in /usr/local/apache and the conf files are all in apache/conf. however, the only php.ini file i could find on my system was in /etc/apache, which is not where my apache conf files are (though i did find some old ones in there). so perhaps PHP is loading defaults? i copied /etc/apache/php.ini to /usr/local/apache/conf/ but still no effects.

any help is appreciated. :-)
 
Old 07-01-2002, 11:24 PM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Call the phpinfo() function in a php file and you will see what settings are being picked up by php. There is a file size limit as well as a php timeout. You may be hitting the timeout while uploading the larger files.
 
Old 07-01-2002, 11:55 PM   #3
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
You might also want to check apache error_log and access_log. And of course cross post to php-general news-group.
 
Old 07-02-2002, 09:40 AM   #4
Syncrm
Member
 
Registered: Aug 2001
Location: Lansing, Michigan
Distribution: slackware8+
Posts: 472

Original Poster
Rep: Reputation: 30
crabboy, you're right... i hadn't thought of checking the phpinfo() function to see what the output would be. but despite making those changes to my php.ini file, my upload max is set to 2M, which is where i'm getting into trouble.

does anyone know how to change the php defaults? i tried putting my php.ini file in /etc/apache and /usr/local/apache/conf with no changes (restarted apache too). might i have to rebuild php?
 
Old 07-02-2002, 09:53 AM   #5
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
I don't intend this to be a flame, just practical advice.
This is a "general linux" forum, not a apache
or PHP forum.

http://php.net,
http://httpd.apache.org

Both have excellent support via mailing list and news groups. Post your PHP specifc question there, you'll stand a much metter change of getting the answer your looking for.
 
Old 07-02-2002, 12:49 PM   #6
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
On the top of the phpinfo() output you should see a line for Configuration File (php.ini) location. My ini file is in /usr/local/lib/php.ini
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
uploading multiple files with php dizzutch Programming 0 01-04-2005 05:29 PM
PHP error message when uploading files obj63 Programming 4 08-26-2004 01:15 PM
Uploading files using PHP giving Permission Denied error MatthewG Programming 4 05-27-2004 04:38 PM
Problems with uploading files tried php.conf bwreath Linux - General 0 07-31-2003 04:31 PM
uploading with apache and php chens_83 Linux - General 6 02-16-2003 06:09 AM


All times are GMT -5. The time now is 11:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration