Help - Search - Members - Calendar
Full Version: PHP, MySQL, Plesk OH MY!
The Planet Forums > Control Panels > Plesk
DoobyWho
Okay - I am shooting in the dark here. I have a PHP script that uploads files. Whenever uploading files larger than 16M I get a message about "Got packet larger then 'max_allowed_packet'". Now, at first I was having a problem with getting my setting for max_allowed_packet to show up, then i read that mysql 3.2 only allows up to 16M for that value.

I read around and found that Plesk 7.5 supports MySQL 4. So I found instructions on how to upgrade to mysql 4 and did so via www.atomicrocketturtle.com and the plesk forums. I added the ART channels to my config and used "up2date mysql" to update mysql. Now i've checked and sure enough it's updated to mysql4 so it now shows that max_allowed_packet is set to 1GB. Still doesnt work with files larger than 16M! So I've changed every relative value in the php.ini file as well as putting a .htaccess file with LimitRequestBody set really high.

Still doesn't work! I've looked all around and the only thing I can find that might explain what is going on is the fact that my php is still linking to the mysql3 library. According to what I have read, there is a problem with sending packets over 16M between PHP and the MySQL 3x library. It is suggested that I rebuild PHP with the library for my mysql4 installation.

I've looked all around and cannot find good, detailed instructions on how to do this and I am afraid that if I do this I am going to break something w/ Plesk or something else on the server. I also don't want to do this and it not fix the problem. Do you have any other ideas or instructions on how to do this? Thanks!

And yes, I have looked at this post: http://forum.ev1servers.net/showthread.php?t=56417

I am also apparently missing the root user account in mysql. I echo out the users table and root doesnt exist. I had read i have to update the grant tables after updating mysql but i cant because i cant login as root, only admin.
theuruguayan
paste your my.cnf. and which is the upload max size in the php.ini file in your server? paste it here too.
DoobyWho
My.cnf
---------
[mysqld]
safe-show-database
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_allowed_packet=1G;

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid




PHP.ini relative settings (ive set everything really high just for now, once i get it working i'll tune the settings)
-----------------------
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 3000
max_input_time = 6000
memory_limit = 302M
post_max_size = 300M
upload_max_filesize = 300M


It couldn't have to do with "default_socket_timeout = 60" could it?

I also have a .htaccess file in the directory with LimitRequestBody set to 0 (which is supposed to be unlimited).
theuruguayan
instead of writing 1G

write: 1000MB restart mysql and try again.
DoobyWho
i dont think thats the problem (as when I check the variable by using the show variable command it shows it set to 1G) but I'll give it a shot.
DoobyWho
that didn't work. same error.

I really think it has something to do with the mysql client API being 3x
DoobyWho
The person in this thread seems to have had the same problem and devised a workaround for it, however, I don't want a "workaround". I want to fix the problem so I don't have to go and change the code and have all of my clients update their files.
http://www.codingforums.com/showthread.php?t=56289
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.