PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
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  
Old May 7th, 2006, 10:22 AM
steviej1 steviej1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 4 steviej1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 Crogram FilesApache GroupApache2testcreatemovie.php on line 3
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!!!!!!!!!!

Reply With Quote
  #2  
Old May 7th, 2006, 10:45 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,721 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 26 m 5 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old May 8th, 2006, 07:23 AM
steviej1 steviej1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 4 steviej1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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!

Reply With Quote
  #4  
Old May 8th, 2006, 07:29 AM
steviej1 steviej1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 4 steviej1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: FATAL ERROR. I need help!!!

Just edited the php.ini-recommended file and renamed it php.ini. Restarted Apache and still no luck.

Reply With Quote
  #5  
Old May 8th, 2006, 09:52 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,721 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 26 m 5 sec
Reputation Power: 6
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.

Reply With Quote
  #6  
Old May 10th, 2006, 07:31 AM
steviej1 steviej1 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 4 steviej1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #7  
Old June 3rd, 2006, 12:04 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > FATAL ERROR. I need help!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway