 |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6  | This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 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
|
|
|
|

February 18th, 2009, 01:23 PM
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
createmovie.php and moviedata.php
Hi
I hope someone can help me with this problem.
I have fallen at the first hurdle trying to run the files createmovie.php and moviedata.php. The problem happens when I run createmovie.php, the following error is displayed:-
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\createmovie.php on line 7
The code causing this problem is at the start of the file:-
<?php
//connect to MySQL
$host = "localhost";
$user = "bp5am";
$pass = "jacobs";
$connect = mysql_connect($host, $user, $pass)
or die ("Check your server connection");
//create the main database
$create = mysql_query("CREATE DATABASE IF NOT EXISTS moviesite")
or die (mysql_error());
I have tried every combination to no avail. When I run MySQL from the DOS prompt I can log in no problem with my password jacobs - hence the variable $pass set to jacobs above.
I would love some help with this because I will not be able to progress with the book if I cannot solve this problem.
Kind regards
|
|

February 18th, 2009, 04:27 PM
|
|
Authorized User
|
|
Join Date: Dec 2008
Posts: 50
Thanks: 1
Thanked 5 Times in 5 Posts
|
|
try using
mysqli_connect();
if still not resolved, create a new php file called phpinfo.php and insert the following code
PHP Code:
<?php
phpinfo();
?>
now visit this page from your browser and see if mysql or mysqli library is installed and configured properly with your PHP
if not check the php.ini if the line for mysql or mysqli module is not commented out
restart server
Regards
|
|

April 12th, 2009, 03:09 PM
|
|
Authorized User
|
|
Join Date: Dec 2007
Posts: 65
Thanks: 9
Thanked 2 Times in 2 Posts
|
|
Dear Larajo
i am too going through the same problem of createmovie.php and moviedata.php
when i run createmovie.php on my browser...i got nothing except disappointment
but my otherfiles are working fine on http://localhost/filename.php
like you i put my password in both the file of createmovie.php and moviedate.php .
but things could not work. still i am trying and trying....if u have got the solution pls. mail me at with the php file attached in zip at: [email protected] or if i got the solution i will do the same for you..if u send me ur email id.
regards,
__________________
sandeep gupta
|
|

December 11th, 2009, 08:27 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
createmovie.php
I had this problem also.
I read on-line that the default installation of PHP does not include extensions for MySQL.
My solution was to re-install PHP making sure to select the advanced install options and select the mysql and mysqli extensions. I'd also install the PHP manual too. It's an easy fix, now everything works great.
Hope this helps.
Dan
|
|

December 28th, 2009, 12:49 PM
|
|
Registered User
|
|
Join Date: Dec 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Check that Apache, PHP and MySQL are configured
I had similar problems when I started the exercises in this book. I even had to reinstall Apache, PHP and MySQL. Be ABSOLUTELY sure that you have followed the configuration instructions to the "t". If these aren’t configured properly, you will have problems. My problems were mostly with typing errors. :)
P.S. I got Apache, PHP and MySQL in a single package (xampp) for free from www.apachefriends.org This was very helpful in that it made the installation a breeze.
Last edited by Andrew M.; December 28th, 2009 at 12:59 PM..
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Setting up createmovie.php, moviedata.php |
ephemera |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
2 |
December 28th, 2009 01:24 PM |
| potential createmovie.php error |
ElizabethN |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
8 |
August 25th, 2004 09:46 AM |
| createmovie.php logon trouble |
JohnAlden |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
3 |
May 25th, 2004 01:11 PM |
| Error troubleshooting - createmovie.php |
samgman |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
1 |
May 13th, 2004 01:24 AM |
| createmovie.php |
joebloggs |
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 |
11 |
April 26th, 2004 06:37 PM |
|
 |