Bug #14781: ftp_login failure after mysql_connect
| From: | flim at novadoc dot de | Date: | Mon, 31 Dec 2001 16:30:50 +0000 |
| Subject: | Bug #14781: ftp_login failure after mysql_connect | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-75442@lists.php.net to get a copy of this message | ||
From: flim@novadoc.de
Operating system: Linux Redhat 6.2/7.2
PHP version: 4.1.1
PHP Bug Type: Unknown/Other Function
Bug description: ftp_login failure after mysql_connect
I wanted to connect to a ftp server, get some files and insert them into a
database.
I started connecting to the ftp server, then logging in and that worked
fine. Then I added a mysql_connect and now I get an error on ftp_login that
says that it can not find ftpbuf.
(tried on two systems: Linux Redhat 6.2, Linux Redhat 7.2).
I'm not sure if this is a failure of ftp functions, mysql, a documentation
problem or me being too stupid.
After dropping all unneccessary code, the file looks like that:
<?php
$hHandle=mysql_connect("localhost", "nobody", "")
or die ("no connection.\n");
mysql_close ($hHandle); #this can be dropped
$hFtp = ftp_connect ("localhost") #this works
|| die ("Could not connect.\n");
# next line results in an error:
$iLoginResult=ftp_login($hFtp, "nobody", "")
|| die ("Error: Unable to login\n");
?>
I got the following error message:
Warning: Unable to find ftpbuf 1 in "scipt" on line "XX",
(which is the ftp_login line (ftp_connect works!)).
If you drop mysql_connect, its working fine...
I'm using build in mysql support (for version 3.23.39), ftp is of course
enabled too.
Hopefully this is a stupid question and there is an easy answer...
Thanks in advance and a happy new year,
flim
--
Edit bug report at: http://bugs.php.net/?id=14781&edit=1