Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 14th, 2007, 04:24 AM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default php connect to mySql

Hi I'am new to this
Can not connect php to mySql
running windows xp professional
installed apache, Php and MySql
Completed chapter 2 OK
MySql works from command line and have created a test data base OK
Trying createmovie.php page 95 chapter 3
Nothing happens only blank screen, code correct as I have now copied it from web site
I have been trying for 2 weeks. I think it is a problem with the config of PHP/MySql as its not to clear in the book. It referes to my.cnf should this be my.ini ?
many thanks

Reply With Quote
  #2 (permalink)  
Old March 16th, 2007, 06:58 PM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Manu Sharma
many thanks for your reply
have tried everything you suggest still wont work
this works fine
If I try chapter 3 createmovie.php I get nothing only blank page.
with the wrong password I should get check your serve connection.

Do You think I should re-install PHP & MySql again and if so in which order?
PHP must be working but not connecting to MySql.
MySql works as command line.
many thanks

Reply With Quote
  #3 (permalink)  
Old March 18th, 2007, 12:17 PM
Authorized User
Join Date: Feb 2007
Location: , , India.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

hi parrot face,

check if you get any mention of mysql in the page produced on running the phpinfo() code.....if it appears then ur php and mysql r connected.....
...please post the code that u r using so that i can hav a look at it..

Reply With Quote
  #4 (permalink)  
Old March 20th, 2007, 03:42 AM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Manu Sharma
phpinfo()produces the following:

System Windows NT TITS 5.1 build 2600
Build Date Feb 7 2007 23:10:31
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINDOWS\php.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*

I have reInstalled PHP. Chapter 3 createmovie.php starts to run but I get the following fatal error

Fatal error: Call to undefined function mysql_create_db() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\createmovie.php on line 8

I think I still have an installation problem as its not findinging the functions.

many thanks

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
connect to mysql db from php 5 crmpicco PHP Databases 1 September 26th, 2007 05:14 PM
unable to connect PHP with Mysql bhavna MySQL 1 June 5th, 2007 07:52 PM
Connect php to mysql using dreamweaver Nicholsen MySQL 1 December 14th, 2006 07:26 AM
Connect php to mysql Nicholsen MySQL 1 December 3rd, 2006 02:34 AM
php connect to mysql p2ptolu Beginning PHP 2 February 24th, 2005 10:43 AM

All times are GMT -4. The time now is 06:49 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.