RE: [PHP] Encrypted 2.5+M files do upload, but don't create a record when stored as LongBlobs (PHP/Apache/MySQL)

From: Steven Altsman (webphp_at_efastfunding.com)
Date: 03/17/05


To: <webphp@efastfunding.com>, <php-general@lists.php.net>, <users@httpd.apache.org>
Date: Thu, 17 Mar 2005 09:10:27 -0600

This may be a stupid question. If it is, could somebody do a one line reply
of "it is." That way I will know to turn my attention elsewhere.

I've gone through about 45 pages of archives trying to glean anything useful
out of it, and either it's the same answer or the version is about 4 years
out of date.

-----Original Message-----
From: Steven Altsman [mailto:webphp@efastfunding.com]
Sent: Wednesday, March 16, 2005 12:15 PM
To: php-general@lists.php.net; users@httpd.apache.org
Subject: [PHP] Encrypted 2.5+M files do upload, but don't create a record
when stored as LongBlobs (PHP/Apache/MySQL)

Files under 2.5 megs will go into the database just fine, any thing over
that will return the page without errors, but will not be injected into the
database. Not even a record is created.

Edited PHP.INI to allow up to 40M of data to be uploaded. Set the script
timeout to be 9000 seconds. Set the script operational memory to 80M. I
did a print_r of $_FILES and the results show that there is a file in the
tmp directory, but I'm not sure after that if there is a problem with mcrypt
or MySQL. I did read something about a limitation of MySQL and max packet
size between server and client, but only 4.1 or less is mentioned with that.
I also switched from the fopen/fread combo and did file_get_contents
instead, as it was recommended to be more efficient.

http://us4.php.net/fopen
http://us4.php.net/fread
http://us4.php.net/file_get_contents
http://us3.php.net/mcrypt
http://us3.php.net/features.file-upload
http://us3.php.net/print_r

http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-195.html
http://www.totalchoicehosting.com/forums/lofiversion/index.php/t10276.html
http://www.chipmunk-scripts.com/board/index.php?forumID=27&ID=1674
http://scripts.franciscocharrua.com/database-file-upload-download.php
http://www.hotscripts.com/Detailed/33694.html

http://www.google.com

If there is any other links to M's that I haven't R'ed, please let me know.
Otherwise I'm clueless. Google gives me a metric tonne of information, but
it is mostly people asking the same question I am with recommendations on
editing the PHP.INI. Obviously this is a useful script that many people
have written in their own way for their own needs, and I'm sure they've run
into the same problem I'm encountering now.

Using MySQL 5.0.2, PHP 5, newest mcrypt, mhash, Apache 2, FC 3, it is on
port 443 with a valid SSL cert, and if you need to know any other version or
variable info I will gladly provide it.

-=-=-=-=-=-=- /docs/phpinfo.php -=-=-=-=-=-

allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off

8< -- Snip Snip --- 8<

version_comment Official MySQL RPM
version_compile_machine i686
version_compile_os pc-linux
wait_timeout 28800

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Relevant Pages

  • Re: Cyrus IMAP with pam_mysql?
    ... FreeBSD, but if you check the startup script, all the parameters are ... Default log directories are in the default data directory, ... Makefile for mysql) They are changed in the above script prior to ... imaps auth sufficient pam_unix.so ...
    (freebsd-questions)
  • Re: MySQL to SQL
    ... basically I want to take a MySql script and load it into a SQL database. ... BIOS_RELEASE_DATE datetime default NULL, ... CUSTOM_TEXT_FIELD1 mediumtext, ...
    (microsoft.public.scripting.wsh)
  • Re: mysql - kern.maxfiles limit exceeded by uid 500 please see tuning(7)
    ... Since mysql crashes after 5 days of running your script, ... better check its operation and see if it is causing your system to exceed ...
    (comp.unix.bsd.freebsd.misc)
  • Re: MySQL
    ... Then you can use it from inside MySQL or on the commandline ... it is crying out for a script wrapper to make it more flexible. ... you have the option to use a csv engine. ... So you can now select from your dbase files into a csv file. ...
    (alt.os.linux.suse)
  • Re: cron problem with Oracles lsnrctl and MySQL
    ... > backs up Oracle and MySQL data. ... A simplified script looks like: ... I also have the same issue trying to start MySQL (same ... > just fine outside of cron. ...
    (comp.os.linux)