Click to See Complete Forum and Search --> : PHP/MySQL
Hi All,
I tried to use mysql_connect() to connect to mysql through PHP3 but I always get this message:
Call to unsupported or undefined function mysql_connect() in c:/windows/desktop/azee/srch.php3 on line 4
So could any one help me with this problem,thanks
Azee
Howdy, ok the error means that php is not configured properly to access your current database program...
First things first... as far as I know (I may be wrong).. all of your php scripts MUST be in your webpage directory... ex:
in your c:\inetpub\...\wwwroot OR something similar to that...depending on what kind of webserver program you are using... in my example it's IIS.
I'm not sure how you set up php/webserver/database so here's a link that will do all three for you.. and it should work find...
http://www.firepages.com.au/phpdev.htm
Rgds,
Swixy
Is your php compiled to works with MySQL? I think that No... =)
Write a <? phpinfo(); ?> and execute to see if you are using php+mysql
This is what I would do... Get yourself PHP 4.0 or higher... and upgrade your PHP 3.0
When it says that mysql_connect() is undefined it means that mysql_connect is not in the php library, meaning that your php doesn't know that there is such function as mysql_connect, meaning that you need to look into configuring php with mysql on windows.
Go to www.php.net to get newer version of php. I used php both on linux and windows and configuring version 4.0 with mysql shouldn't any problem.
Di
rlisboa
02-13-2001, 08:53 PM
Hi there.
You shoul try to check if you have the php_mysql.dll in your PHP directory... then, remove the ";" from the line below in your php.ini
;extension=php_mysql.dll
Good Look. I hope it works.
Ricardo
I think you have forgotten to uncomment
extention=php3_mysql.dll file which recides in the php3.ini file. I suggest(if I may)you review your php installation process. You may also visit the following website at-http://www.weberdev.com/
They have hands on tutorial on PHP as well as Mysql.
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.