RE: [PHP] PHP/MYSQL Connection trouble (charset)
From: Christian Ista [mailto:[EMAIL PROTECTED] File 'c:\mysql\share\charsets\?.conf' not found (Errcode: 2) Character set '#33' is not a compiled character set and is not specified in the 'c:\mysql\share\charsets\Index' file Resource id #5 I answer to myself. In fact I reinstall MySQL 4.x in the same directory with latin as default charset and that's work now :) Christian, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php/mysql connection
John W. Holmes wrote in message : Because a default install of MySQL includes an anonymous user, one with no username or password. There is also a root user with no password. Read the MySQL manual on Installation and the GRANT command on how to fix this. ---John W. Holmes... ... John, I was under the impression that the mysql database had as default user when installed: .. anonymous root And that the _anonymous_ user could only create a database that began with the word - test. Using the following commands: ... C:\WINDOWS\cd c:\mysql\bin C:\mysql-shareware --standalone C:\mysql\binmysqladmin CREATE houses Database houses created C:\mysql\binmysql Welcome to the mysql monitor... mysqlUSE houses Database changed And the database houses was created _without_ the word test. Why is this? Thanking you, Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php/mysql connection
John, I was under the impression that the mysql database had as default user when installed: .. anonymous root The last time I installed MySQL it had four default users, I think. And that the _anonymous_ user could only create a database that began with the word - test. Maybe... check the mysql.user and mysql.db tables to see what permissions each user has. Regardless, you generally want to delete all but the root@localhost user and give that user a password. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php/mysql connection
Because a default install of MySQL includes an anonymous user, one with no username or password. There is also a root user with no password. Read the MySQL manual on Installation and the GRANT command on how to fix this. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 02, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: [PHP] php/mysql connection Newbie question and OT. Sorry. I am able to conncet to a mysql server with the following call to mysql_connect(). $connect=@mysql_connect(,,); There are no parameters in the function call. Why can I connect if there are no parameters? However, if I give mysqladmin the password of: goodpassword and call: $connect=@mysql_connect(localhost,root,goodpassword); I connect. But if I call: $connect=@mysql_connect(localhost,root,badpassword); I cannot connect. Or from the command line... From the command line: C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin mysqld-shareware --standalone \\enter C:\mysql\bin mysql \\enter note: no password have been entered. \\ I get the: Welcome to the MySql monitor... ... Or... C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin mysqld-shareware --standalone \\enter C:\mysql\bin mysql -u root - p \\ enter Enter password goodpassword \\ I get the: Welcome to the MySql monitor... C:\Windows\cd c:\mysql\bin \\enter C:\mysql\bin mysqld-shareware --standalone \\enter C:\mysql\bin mysql -u root - p \\ enter Enter password badpassword \\ I do _not_ get the: Welcome to the MySql monitor... Why is this when I thought it needs a password to connect to the MySql monitor? Thanks, TR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP-MySQL connection problem
My server is running on shared server which has support for PHP 4.1.2. I installed mySQL for our shared server. I also installed phpMyAdmin. Both are running properly. But I am facing following problems 1) If there is any error in the script - It is not getting displayed - screen is becoming blank, so it is becoming very difficult for me to make out any mistake. Check PHP.ini and make sure display_errors is ON. 2) I am trying to send email - but not getting any email. This is the script ? $mailBody = This is one line \ n This is a second line \n\n this is a third line; $boolMail = mail ([EMAIL PROTECTED], Test mail, $mailBody); print (Email has been send ); ? I am getting print statement but not the mail. Any extra settings are required ? Just the settings in PHP.ini in the mail section. Ensure you are even using a PHP.ini to begin with, too. If there isn't one, PHP will use its own defaults. Load up a page that has just ? Phpinfo(); ? in it and in the first block shown, it'll tell you where PHP thinks it's PHP.ini file is. Edit that file if it's there. If it's not, then look for a PHP-ini.dist or PHP-ini.recommended in the files you downloaded and rename it to PHP.ini and copy it to that location. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP-MySQL connection problem
Hi, I tried to display phpinfo and I am getting following values display_errors On On display_startup_errors On On error_append_string no value no value error_logno value no value error_prepend_string no valueno value error_reporting 1 1 (Still there is no display of error) sendmail_from[EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i short_open_tagOn On SMTP localhost localhost I changed the script as follows, now it is giving error that - can not even queue - btw where the queue is stored ? and where can I see the sendmail log ? ? $mailBody = This is test email; $boolMail = mail ([EMAIL PROTECTED], Test mail subj from local linux server - PHP, $mailBody); if ($boolMail){ print Email has been queued.; } else{ print Can not even queue email; } ? I tried giving mail directly from sendmail going to /usr/sbin - I am not sure how to give commands in unix but I tried following block, --- shellcd /usr/sbin shellsendmail manisha From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Test from new aurica kl;efkvg;lkf rkfkrjek sdjkfjsd ^D - to terminate it message given - Failed to send message to any users Now how shall I proceed ? Thanks and regards Manisha
Re: [PHP] PHP/mysql connection problem
Jo wrote: The problem: When connecting to the mysql server on the local machine its fine, but when you connect to a remote machine eg $db = mysql_connect(x.x.x.x, user, password); and request something from the database, it connects, BUT it takes about 5 minutes... I have an idea, yes. Make sure that the machine you are connecting to can do a reverse lookup on the machine you are connecting from. Meaning, either your DNS has to be properly configured to include thie remote machine, or you need to add it to your /etc/hosts file. To see whether I'm even on the right track, try to telnet or ftp manually rather than make a database connection. You should see the same timeout condition occur, because the remote machine will basically try to see who is connecting, and if it can't figure it out, it's going to first time out before giving up. Happy hacking. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/mysql connection problem
Hey all, this is probably more to do with Mysql but I figured i'd ask here as well. The problem: When connecting to the mysql server on the local machine its fine, but when you connect to a remote machine eg $db = mysql_connect(x.x.x.x, user, password); and request something from the database, it connects, BUT it takes about 5 minutes... that depends on load on the server or network i think... how much info are you tring to get? try it will a very small amount and see if there is a difference...