Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| 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 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
  #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

  #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
Default

Hi Manu Sharma
many thanks for your reply
have tried everything you suggest still wont work
<?php
phpinfo();
?>
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


  #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
Default

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..


  #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
Default

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





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





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