Anyone familiar with file uploading scripts?

Entity

Lifer
Oct 11, 1999
10,090
0
0
I'm trying to setup a script on my own webserver that allows for large file uploads - 50-100mb. I've got a script working (PhpExplorer), and it works fine with 4-5mb files, but I can't get it working with anything larger than that. When I upload a 10mb file, for example, I just get a "The page cannot be displayed" error after I upload the file.

I've changed the following settings:

In /etc/php4/apache/php.ini

post_max_size = 150M

; Maximum allowed size for uploaded files.
upload_max_filesize = 150M

In telecharger.php of PhpExplorer:

<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="104857600">

Any ideas?

Please LMK - it's fairly urgent for work.

Rob
 

AdamDuritz99

Diamond Member
Mar 26, 2000
3,233
0
71
edit- misunderstood the question completely.

Oh if you find out the problem let me know. I've been trying to figure out this too.

peace
sean
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Anything in php_log when you execute your script?
Hmm. Where is php_log? Don't see it under /var/log/ . . .
Here's a little code that might help ya..
Thanks, I may give that a try if this script doesn't work. We're using it for several users and everyone likes it, but one user wants to be able to upload larger files...

Rob
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
The location of your php_log file is configured in php.ini... Do a search for php_log in your php.ini file...

By default it should be in your /tmp directory...
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
The location of your php_log file is configured in php.ini... Do a search for php_log in your php.ini file...

By default it should be in your /tmp directory...
Nowhere to be found in the php.ini . . .

Rob
 

AdamDuritz99

Diamond Member
Mar 26, 2000
3,233
0
71
If you go to phpbuilder.com, you might find some help there. Nothing seems to work for me though.

peace
sean
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: Entity
The location of your php_log file is configured in php.ini... Do a search for php_log in your php.ini file...

By default it should be in your /tmp directory...
Nowhere to be found in the php.ini . . .

Rob

There should be a section in php.ini that specifies the parameters for logging and error handling... In there, there should be a line like:
error_log = /tmp/php_log

Maybe looking for the word error_log would be better...

 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Hmm. No error log reporting for this particular "error" - it simply doesn't work.

Back to the drawing board . . .

Rob
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Make sure in your php.ini file, these 2 directives have the following values:

error_reporting = E_ALL
log_errors = On
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Oh also dont forget to restart apache after you make changes to php.ini.... I know it sounds obvious, but just a reminder...
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Yay! I got an actual error message to play with!

[27-May-2002 17:20:39] PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4000 bytes) in Unknown on line 0

Ideas?

Rob
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Apparently that means that the script is taking up too much memory . . . however, I can't think of how to change that for the life of me. Bleh.

Move to a new script, I guess.

Rob
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
When you upload a file, php actually reads the whole file into memory before writing it to disk....

In your php.ini file, there's a line like:
memory_limit = 8M

which states the max amount of memory a script can use... u are exhausting this limit...
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Hmm. Next question: is there a better way to do this? Should I up the memory limit, or should I find a script that manages resouces better? Is there going to be a major downfall to doing this on a regular basis (users will be regularly uploading 70mb files, etc.). Recommendations?

thx-
Rob
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: Entity
Hmm. Next question: is there a better way to do this? Should I up the memory limit, or should I find a script that manages resouces better? Is there going to be a major downfall to doing this on a regular basis (users will be regularly uploading 70mb files, etc.). Recommendations?

thx-
Rob

Apparently right now there are no way around this problem except to increase the memory_limit... They (PHP ppl) may change it in the future, but no fixes available yet...

 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: Entity
Thanks for all the help. It works now, which is all that matters.

Rob

alright cool....

Consider that my 'thank you' to you for running that CS server... :)

 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Consider that my 'thank you' to you for running that CS server...
NP. :)

I'm going to come up with a more permanent solution for the CS server in the near future, I hope . . . I should have a better box for the summer at least to be running dedicated mainly to the CS server.

Rob
 

BCYL

Diamond Member
Jun 7, 2000
7,803
0
71
Originally posted by: Entity
Consider that my 'thank you' to you for running that CS server...
NP. :)

I'm going to come up with a more permanent solution for the CS server in the near future, I hope . . . I should have a better box for the summer at least to be running dedicated mainly to the CS server.

Rob

I dont play CS much anymore though... I came to your server a couple of times when you first had it up, but I formatted my computer and never re-installed it since I dont play much anyways...

now I am playing GTA3, so no time for CS... :D