Hi MySQL gurus,

I'm using the LAMP stack and I'm currently creating a script that allows file uploading through a HTML form. The script itself is to be redistributed so I do not really know anything about the systems it runs on, except maybe that it's LAMP. I keep getting errors because I upload to large files, ie the files are larger than the MySQL servers max_allowed_packet parameter. I would like to check this value during runtime and take proper action. So;

How can I check the value of MySQLs max_allowed_packet parameter from a PHP script during runtime?

I tried this before:
<?php
 connectToDatabase();
 $result = mysql_query("SHOW VARIABLES");
 $row = mysql_fetch_assoc($result);
 echo "VALUE=" . $row['max_allowed_packet'];
?>

But this does not work, as SHOW VARIABLES seems to be console only; not a valid query.

How can I proceed?


regards, martin

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to