Wrox Programmer Forums
|
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
 
Old May 26th, 2005, 04:48 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL/PHP

I'm currently running the latest versions of Apache, MySQL and PHP, and I've set my firewall to allow all requests on port 3306(The port I set my MySQL to watch for requests from), but I keep getting an error of: Can't create table '.\moviesite\movietype.frm' (errno: 121) when doing the chapter 3 exercises in "Beginning PHP5, Apache, MySQL -Web Developement". It can write the database perfectly, but it can't seem to write the tables.

I can write the tables though perfectly if I write them directly from MySQL under either the admin or the exception I set, it simply will not write the tables in the database when I request it through PHP. I am quite stumped on what to do and any help would be grealy appriciated. Thank you for your time.
 
Old May 27th, 2005, 02:09 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

You may try these things:
$host="localhost";
$host="localhost:3306";
$host="127.0.0.1";
$host="127.0.0.1:3306";
or specify IP lieu 127.0.0.1
As PHP manual says $host can b ":/path/to/socket" for UNIX it is perhaps ":/tmp/mysql.sock" I'm not sure for Windows. Try staus at your mysql prompt and see my.ini ( or mysql.ini ) file for information about TCP port MySQL is using. I hope, I've b'n helpful.

 
Old May 27th, 2005, 02:17 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

I found, I'm able2connect MySQL daemon, if I use $host=":anything";
where anything can be NULL or anything; surprised ;)

 
Old May 27th, 2005, 08:21 PM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've found out just what the error is, but I can't seem to find out how to fix it. The error of 121 actually corresponds it having the ability to write the table, but unable to write it as it states there is currently another instance of that table in existance;
"MySQL Error Code 121: Duplicate Key On Write Or Update"
Source: C:\mysql\bin\perror 121

The odd thing is, each time I get an error that it can't write the table, I delete the entire database that it's writing to(as there's nothing else there), yet that error still appears each time, for each table(It can write the base table perfectly fine, but the movietype and person tables afterwards, if added into the code, return the error). Any idea on just what to do? O.o







Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP-MySql imhappy Beginning PHP 1 September 24th, 2008 05:44 AM
PHP and MySQL MiNdWaRp PHP How-To 0 May 14th, 2007 06:25 PM
MySQL/PHP Help blackout Beginning PHP 1 August 8th, 2006 07:49 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
Using PHP with MySQL nav Beginning PHP 1 September 5th, 2004 04:02 AM





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