Hi,
I have MySQL 4.1 and PHP 5
when i use mysql_connect() ,explorer type this error:
Fatal error: Call to undefined function mysql_pconnect()
please help me about this error.
ThanksHave you installed MySQL support in PHP? (See the MySQL chapter of the manual). It's not done by default any more; changes in the MySQL license saw inbuilt-by-default support for MySQL removed from PHP5. Besides, there's the MySQLi extension, now, which offers better access to MySQL.As weedpacket said, I agree. However, you may also want to check you php.ini file (usually located at C:/windows/php.ini) and see if the extension is enabled (not commented out)
-- Here is what you'll need to find.
If the extension is commented out, it will look like this:
;extension=php_mysql.dll
so just remove the semi-colon to make it look like this:
extension=php_mysql.dll
save php.ini, and restart your web server.
Hope this helps, -RobertOriginally posted by robert_w_ark
However, you may also want to check you php.ini file (usually located at C:/windows/php.ini) and see if the extension is enabled (not commented out)
Assuming they're running Windows of course (not an assumption I'd make.)Wait a tick; he's using MySQL 4.1?
Isn't 4.1 the version that saw the password type change (length in characters grew I believe)? The new MySQLi extension, I think, has better support for MySQL 4.1 as Weedpacket suggested.
Unless he's using the 'old_passwords' flag in my MySQL config file... won't he want & NEED the MySQLi extension to communicate w/ MySQL?I had the same problems a few weeks ago. I followed all the instructions like editing php.ini: setting the right extensions directory, allowing the mysql(i).dll files. and such.
I still had problems. So I just went back to basic and used phpinfo(). The resulting page told me that it did not use the php.ini file I wanted. I'll admit a very newbie mistake but hey we all are at some point.
So my advice to you would be to check this. Hope it works out for you.
Greetz, Ritter63Originally posted by fbagheri
Hi,
I have MySQL 4.1 and PHP 5
when i use mysql_connect() ,explorer type this error:
Fatal error: Call to undefined function mysql_pconnect()
please help me about this error.
Thanks
You should also check that you are looking at the correct source code file. It's very strange that php would complain about mysql_pconnect when the source code is using mysql_connect.Still, if he can't use pconnect he wont be able to use connect...
I have MySQL 4.1 and PHP 5
when i use mysql_connect() ,explorer type this error:
Fatal error: Call to undefined function mysql_pconnect()
please help me about this error.
ThanksHave you installed MySQL support in PHP? (See the MySQL chapter of the manual). It's not done by default any more; changes in the MySQL license saw inbuilt-by-default support for MySQL removed from PHP5. Besides, there's the MySQLi extension, now, which offers better access to MySQL.As weedpacket said, I agree. However, you may also want to check you php.ini file (usually located at C:/windows/php.ini) and see if the extension is enabled (not commented out)
-- Here is what you'll need to find.
If the extension is commented out, it will look like this:
;extension=php_mysql.dll
so just remove the semi-colon to make it look like this:
extension=php_mysql.dll
save php.ini, and restart your web server.
Hope this helps, -RobertOriginally posted by robert_w_ark
However, you may also want to check you php.ini file (usually located at C:/windows/php.ini) and see if the extension is enabled (not commented out)
Assuming they're running Windows of course (not an assumption I'd make.)Wait a tick; he's using MySQL 4.1?
Isn't 4.1 the version that saw the password type change (length in characters grew I believe)? The new MySQLi extension, I think, has better support for MySQL 4.1 as Weedpacket suggested.
Unless he's using the 'old_passwords' flag in my MySQL config file... won't he want & NEED the MySQLi extension to communicate w/ MySQL?I had the same problems a few weeks ago. I followed all the instructions like editing php.ini: setting the right extensions directory, allowing the mysql(i).dll files. and such.
I still had problems. So I just went back to basic and used phpinfo(). The resulting page told me that it did not use the php.ini file I wanted. I'll admit a very newbie mistake but hey we all are at some point.
So my advice to you would be to check this. Hope it works out for you.
Greetz, Ritter63Originally posted by fbagheri
Hi,
I have MySQL 4.1 and PHP 5
when i use mysql_connect() ,explorer type this error:
Fatal error: Call to undefined function mysql_pconnect()
please help me about this error.
Thanks
You should also check that you are looking at the correct source code file. It's very strange that php would complain about mysql_pconnect when the source code is using mysql_connect.Still, if he can't use pconnect he wont be able to use connect...