Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 26th, 2005, 04:48 PM
Registered User
 
Join Date: May 2005
Location: , , .
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.
Reply With Quote
  #2 (permalink)  
Old May 27th, 2005, 02:09 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
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.

Reply With Quote
  #3 (permalink)  
Old May 27th, 2005, 02:17 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
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 ;)

Reply With Quote
  #4 (permalink)  
Old May 27th, 2005, 08:21 PM
Registered User
 
Join Date: May 2005
Location: , , .
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


Reply With Quote
Reply


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



All times are GMT -4. The time now is 01:33 PM.


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