[Phpmyadmin-devel] [Phpmyadmin-cvs] CVS: phpMyAdmin sql.php3,1.108,1.109]

Salut Marc, ----- Forwarded message from Marc Delisle <lem9@users.sourceforge.net> ----- Modified Files: sql.php3 Log Message: patch 565627 Index: sql.php3 =================================================================== RCS file: /cvsroot/phpmyadmin/phpMyAdmin/sql.php3,v retrieving revision 1.108 retrieving revision 1.109 [....] ! mysql_free_result($cna_all_result); [...] ----- End forwarded message ----- because of this line (mysql_free_result), I now get lots of warnings when a page calls sql.php3... : Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/ admin/www/mysql2/sql.php3 on line 346 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/libraries/ob.lib.php3 on line 53 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 23 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 24 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 25 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 26 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 28 If I comment the line, everything looks good... :) Same setup as usual (php 4.2.1, mysql 3.23.44, unix). Is this function really backward compatible? Regards, Olivier -- _________________________________________________________________ Olivier Mueller - om@8304.ch - PGPkeyID: 0E84D2EA - Switzerland qmail projects: http://omail.omnis.ch - http://webmail.omnis.ch

I saw this problem as well, The most simple fix is: -mysql_free_result($cna_all_result); +@mysql_free_result($cna_all_result); I've put that in for now, and it works. On Sat, 22 Jun 2002, Olivier M. wrote:
Salut Marc,
----- Forwarded message from Marc Delisle <lem9@users.sourceforge.net> -----
Modified Files: sql.php3 Log Message: patch 565627
Index: sql.php3 =================================================================== RCS file: /cvsroot/phpmyadmin/phpMyAdmin/sql.php3,v retrieving revision 1.108 retrieving revision 1.109
[....]
! mysql_free_result($cna_all_result);
[...]
----- End forwarded message -----
because of this line (mysql_free_result), I now get lots of warnings when a page calls sql.php3... :
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/ admin/www/mysql2/sql.php3 on line 346 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/libraries/ob.lib.php3 on line 53 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 23 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 24 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 25 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 26 Warning: Cannot add header information - headers already sent by (output started at /home/ admin/www/mysql2/sql.php3:346) in /home/admin/www/mysql2/header.inc.php3 on line 28
If I comment the line, everything looks good... :) Same setup as usual (php 4.2.1, mysql 3.23.44, unix). Is this function really backward compatible?
Regards, Olivier
-- Robin Hugh Johnson E-Mail : robbat2@orbis-terrarum.net Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 ICQ# : 30269588 or 41961639

On Sat, Jun 22, 2002 at 01:49:12PM -0700, Robin Johnson wrote:
I saw this problem as well, The most simple fix is: -mysql_free_result($cna_all_result); +@mysql_free_result($cna_all_result); I've put that in for now, and it works.
sure, it "works", but it is not clean :) what about using the right function only after a test of the php or mysql version ? regards, Olivier -- _________________________________________________________________ Olivier Mueller - om@8304.ch - PGPkeyID: 0E84D2EA - Switzerland qmail projects: http://omail.omnis.ch - http://webmail.omnis.ch
participants (2)
-
Olivier M.
-
Robin Johnson