Re: Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload
| From: | Zeev Suraski | Date: | Thu, 25 Nov 1999 18:29:40 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #2757 Updated: MySQL-Connection gets lost at file upload | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-13117@lists.php.net to get a copy of this message | ||
Ok, that's fairly weird. I'll check it out.
Zeev
On Thu, 25 Nov 1999, Volker Kueffel wrote:
> 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@vskm.org
> >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@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
--
-----------------------------------------------------
Zeev Suraski <zeev@zend.com> http://www.zend.com/