"Bulent" <[EMAIL PROTECTED]> wrote on 09/27/2005 04:19:56 AM:

> Hello
> 
> I am a novice about mysql
> I use mysql4.0.24 with php4.3.10.
> When I upload  jpeg/gif  files to my webpage I get an error  as below;
> PHP Warning:  mysql_close(): supplied resource is not a valid MySQL-
> Link resource in /var/.....
> What shall I do ?
> 
> My php configuration as below;
>       GD Support  enabled 
>       GD Version  2.0 or higher 
>       GIF Read Support  enabled 
>       GIF Create Support  enabled 
>       JPG Support  enabled 
>       PNG Support  enabled 
>       WBMP Support  enabled 
> 
> 
> mysql
>       MySQL Support enabled 
>       Active Persistent Links  0 
>       Active Links  0 
>       Client API version  4.0.24 
>       MYSQL_MODULE_TYPE  external 
>       MYSQL_SOCKET  /tmp/mysql.sock 
>       MYSQL_INCLUDE  -I/usr/local/include/mysql 
>       MYSQL_LIBS  -L/usr/local/lib/mysql -lmysqlclient 
> 

Your upload code had a failure before it got to mysql_close() (probably 
due to trying to send a command larger than max_packet_length) so by the 
time it got to mysql_close() there was nothing left to close. Modify your 
PHP so that it detects and prints the errors for each database related 
statement and you will discover the real problem.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to