Date: 11/25/99
- Next message: Bill Spornitz: "[PHP-DEV] backtrace from segmentation fault"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2817 Updated: (copy) assignement works like reference assignement"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
"getting lost" was perhaps a wrong formulation. It would have
been better to say the connection won't open.
I try to explain it again:
If you have a page with a form with input type file and submit
it to another page, that opens a MySQL link you get this
"Warning: 1 is not a MySQL link index..." error message.
My example was very short; it's a page that submits the
form to itself and opens a senseless database connection.
It was just to demonstrate the problem in a very short
script. You may make 2 pages of it:
page1.html:
-----------
<html>
<form enctype="multipart/form-data" method="POST" action="page2.php3">
<input type="file" name="uploadfile">
<input type="submit">
<form>
</html>
page2.php3:
-----------
<?php
$conn=mysql_connect(HOST,USER,PASSWORD);
$db=mysql_select_db(DBNAME,$conn);
mysql_query("select max(id) from TABLE",$db);
?>
<html>
foo bar
</html>
There will always be an error if you choose a file. And no error if
you do not choose one.
Bye,
Volker
At 16:33 25.11.99 +0000, you wrote:
>ID: 2757
>Updated by: zeev
>Reported By: volker <email protected>
>Status: Open
>Bug Type: MySQL related
>Assigned To:
>Comments:
>
>What do you mean by it getting lost?
>
>Are you submitting a file upload to a PHP page that has
>a MySQL link opened in it? Does it not open? Does it open
>and then suddenly close?
>
>I'm not sure if the example you enclosed represents a single file (in which
>case it's a really weird script) or two files, in which case I don't
>understand when the SQL handle may get lost...
>
>Full Bug description available at: http://bugs.php.net/version4/?id=2757
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bill Spornitz: "[PHP-DEV] backtrace from segmentation fault"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #2817 Updated: (copy) assignement works like reference assignement"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

