 |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0  | This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

June 6th, 2007, 05:05 PM
|
Registered User
|
|
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Trouble connecting MySQL to PHP
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\test\createmovie.php on line 4
I'm getting this error when I try to run one of the code examples in "Beginning PHP5, Apache, MySQL Web Development" chapter 3, page 95.
It seems to me that this is because I haven't successfully established a connection between MySQL and PHP. I checked the configuartion file php.ini-recommended and I followed all the instructions on the configuration setup, page 16. Any assistance will be appreciated.
|

June 14th, 2007, 11:21 PM
|
Registered User
|
|
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello. I had this problem too, but it's been awhile, so I don't recall the specifics as to how I fixed this. However, be sure that your php.ini file is in c:\windows (assuming you are using windows) so Apache can find it. And make sure you edit c:\windows\php.ini instead of c:\php\php.ini. Check page 14 in the book and it points this out, if you didn't already do that. I think I may have copied c:\php\php.ini over to c:\windows\php.ini when I first encountered this problem.
I also left my libmysql.dll file in c:\php. I have included c:\php in my PATH enviroment variable.
I wish I could recall where I discovered all this stuff...it's been at least a month since I set this stuff up. I'm on chapter 7 now.
Well, good luck. Hope this helps!
**If anyone knows why Apache looks in c:\windows instead of c:\php for the php.ini file, please let me know. I assume its some sore of variable I can set either in a config file or the path environment variable itself.
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Connecting to mysql withh PHP |
ramon |
Beginning PHP |
1 |
October 18th, 2008 03:40 PM |
Connecting mysql to php?? |
Manu Sharma |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
3 |
March 5th, 2007 01:40 AM |
Connecting To MySQL from PHP |
AlisP2P |
MySQL |
1 |
January 4th, 2006 02:27 AM |
Trouble connecting to MySQL server (CH3) |
mrouse |
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 |
0 |
October 20th, 2005 01:44 PM |
connecting to mysql using Php |
webmoron |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
6 |
August 24th, 2004 04:30 AM |
|
 |