|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
FATAL ERROR. I need help!!!
Hi.
I have created a php page that I want to connect to the mysql database. The beggining of the code goes as follows. <?php $connect = mysql_connect("localhost", "user", "userpass") or die ("This didn't work!!!"); //there is more code after this but my problem stems from the first line ?> When I open up this page in my browser I get the message: Fatal Error:Call to undefined function mysql_connect()in C I have saved/copied/updated libmysql.dll to C:"WINDOWS"/"system"/"system32" php.ini is in C/windows. Have altered php.ini so extention_dir= "C:phpext". Uncommented extention=php_mysql.dll in php.ini. Apache httpd.conf has been added to. Have created paths in system variables and created a PHPRC path. php5ts.dll has been copied to C:windows and I still get the error. I created a page using <?php phpinfo() ?> and when I open that up in my browser all it shows in the Configuration file(php.ini)Path is C:WINDOWS (there is no php.ini extention on the path). MySQL runs in the command prompt. PHP and Apache work as I can view pages in the browser but it just wont connect to mysql. I am running windows xp pro 2002. PHP5.1.4 with Apache2.0.55 with MYSQL4.0.20.....I have tried restarting the computer after every change with no effect. Tried restarting apache after every change with no effect. Can somebody help me here??? I feel like I'm really sinking!!!!!!!!!! |
|
#2
|
||||
|
||||
|
RE: FATAL ERROR. I need help!!!
I will bet you it is reading the recommended php.ini in the PHP directory instead of the one in the WINDOWS directory. Your current phpinfo page - does it have a section for the mysql data?
try saving your php.ini-recommended as php.ini in the PHP directory with all the mysql stuff done. restart the apache and see what the phpinfo page now says. |
|
#3
|
|||
|
|||
|
RE: FATAL ERROR. I need help!!!
I'll give the php.ini recommended a go. And no, there's no mysql info on the phpinfo page!
|
|
#4
|
|||
|
|||
|
RE: FATAL ERROR. I need help!!!
Just edited the php.ini-recommended file and renamed it php.ini. Restarted Apache and still no luck.
|
|
#5
|
||||
|
||||
|
RE: FATAL ERROR. I need help!!!
OK - couple more options - do each one individually to find out exactly what is going on.
place the php.ini with all the mysql activation stuff in 1) the php directory. Restart apache - and look at phpinfo. If mysql activated - stop. 2) remove php.ini from php directory - place in C:/WINDOWS Restart apache - and look at phpinfo. If mysql activated - stop. 3) remove php.ini from C:/WINDOWS place in C:/WINDOWS/system32 Restart apache - and look at phpinfo. If mysql activated - stop. 4) remove php.ini from C:/WINDOWS/system32 place in C:/WINDOWS/system Restart apache - and look at phpinfo. If mysql activated - stop. 5) and if all else fails - place the php.ini in all of them - cross your fingers and pray that it works. Restart apache - and look at phpinfo. |
|
#6
|
|||
|
|||
|
RE: FATAL ERROR. I need help!!!
Still no luck. Not to worry. A mate of mine put me onto uniserver and all works great now!!!!!! Wierd problem though. Be great to know if anyone else was able to resolve this same problem. Thanks heaps for your help.
|
|
#7
|
|||
|
|||
|
RE: FATAL ERROR. I need help!!!
I had working configuration
WXPpro, Apache2.0.55, PHP4.4.2, MYSQL4.0.18 when i uninstall PHP4.4.2 and install PHP5.1.4 <?php phpinfo() ?> don't show information about MySQL I started reading PHP manual and I find this solution: 1. I don't copied or moved any file to other directory. 2. Add to PATH variable this string C:WEBPHP514;C:WEBMySQL4bin; (click ControlPanel-System-Advanced-EnvironmentVariables) 3. edit php.ini ; Directory in which the loadable extensions (modules) reside. extension_dir = "./ext" extension=php_mysql.dll Now after <?php phpinfo() ?> i see information about MySQL Bye Bruster bruster@cho.sk |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > FATAL ERROR. I need help!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|