PHP5/MySQL Problem
Been dealing with a very frustrating couple of days, and have hit a wall. I had a working gallery2 installation, then upgraded mysqli, and all hell broke loose. When I try to open a page (in this case gallery2) that connects to the database. It always says Too many open links. The thing is, it even says that if mysqld is not running. I'm running under freebsd 6.1. You can examine my server setup at http://geekfleet.tai-gear.com/server-info You can examine the php setup at http://geekfleet.tai-gear.com/phpinfo.php The problem I'm having now is that php5 won't connect to the mysql server. It's not a gallery thing, I've confirmed that I have the exact same problem with a simple script to just connect to the mysql server and read the database. And, in fact, the exact same error occurs if mysqld is not running at all. Apache shows -- [Mon Jul 16 02:07:10 2007] [error] [client 66.249.66.10] PHP Warning: mysql_connect() [a href='function.mysql-connect'function.mysql-connect/a]: Too many open links (0) in /usr/local/www/apache22/data/gallery2/lib/adodb/drivers/adodb-mysql.in c.php on line 366 Here is the info in php.ini -- [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = Off ; Maximum number of persistent links. -1 means no limit. mysql.max_persistent = -1 ; Maximum number of links (persistent + non-persistent). -1 means no limit. mysql.max_links = -1 ; Default port number for mysql_connect(). If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysql.default_port = ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user = ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var(mysql.default_password) ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password = ; Maximum time (in secondes) for connect timeout. -1 means no limit mysql.connect_timeout = 60 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans an d ; SQL-Errors will be displayed. mysql.trace_mode = Off [MySQLi] ; Maximum number of links. -1 means no limit. mysqli.max_links = -1 ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysqli.default_port = 3306 ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysqli.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysqli.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysqli.default_user = ; Default password for mysqli_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var(mysqli.default_pw) ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysqli.default_pw = ; Allow or prevent reconnect mysqli.reconnect = Off ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: PHP5/MySQL Problem
Please ignore if this problem has already been solved. --- Joseph Mays [EMAIL PROTECTED] wrote: Been dealing with a very frustrating couple of days, and have hit a wall. I had a working gallery2 installation, then upgraded mysqli, and all hell broke loose. When I try to open a page (in this case gallery2) that connects to the database. It always says Too many open links. The thing is, it even says that if mysqld is not running. I'm running under freebsd 6.1. You can examine my server setup at http://geekfleet.tai-gear.com/server-info You can examine the php setup at http://geekfleet.tai-gear.com/phpinfo.php The problem I'm having now is that php5 won't connect to the mysql server. It's not a gallery thing, I've confirmed that I have the exact same problem with a simple script to just connect to the mysql server and read the database. And, in fact, the exact same error occurs if mysqld is not running at all. Apache shows -- [Mon Jul 16 02:07:10 2007] [error] [client 66.249.66.10] PHP Warning: mysql_connect() [a href='function.mysql-connect'function.mysql-connect/a]: Too many open links (0) in /usr/local/www/apache22/data/gallery2/lib/adodb/drivers/adodb-mysql.in c.php on line 366 Note that it says 0 open links is too many. Note also that the file error was reported in is adodb-mysql.inc.php. I haven't used ado to connect to MySQL but perhaps it does not get the limit from the mysql.max_persistent setting in the MySQL section of php.ini. Check line 366 in adodb-mysql.inc.php and look for a call to get_ini( and see what variable it is specifying (or perhaps it's a hardcoded value?). Here is the info in php.ini -- [MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = Off ; Maximum number of persistent links. -1 means no limit. mysql.max_persistent = -1 ; Maximum number of links (persistent + non-persistent). -1 means no limit. mysql.max_links = -1 ; Default port number for mysql_connect(). If unset, mysql_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysql.default_port = ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysql.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysql.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysql.default_user = ; Default password for mysql_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var(mysql.default_password) ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysql.default_password = ; Maximum time (in secondes) for connect timeout. -1 means no limit mysql.connect_timeout = 60 ; Trace mode. When trace_mode is active (=On), warnings for table/index scans an d ; SQL-Errors will be displayed. mysql.trace_mode = Off [MySQLi] ; Maximum number of links. -1 means no limit. mysqli.max_links = -1 ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. mysqli.default_port = 3306 ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. mysqli.default_socket = ; Default host for mysql_connect() (doesn't apply in safe mode). mysqli.default_host = ; Default user for mysql_connect() (doesn't apply in safe mode). mysqli.default_user = ; Default password for mysqli_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var(mysqli.default_pw) ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. mysqli.default_pw = ; Allow or prevent reconnect mysqli.reconnect = Off ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: 5.1 mysql problem
[EMAIL PROTECTED] wrote: I installed Freebsd 5.1-release. I then installed lynx from the ports system without problem. I then installed apache13 from ports without problem. When I tried to install mysql323-client. I did this by cd /usr/ports/databases/mysql323-client. I then did a make. It trundled away for a while, and eventually errored out. configure: error: Your compiler cannot convert a longlong value to a float! I tried to install mysql323-server but it errored out the same way. Any ideas why it won't compile ? I checked the version of gcc the system is using, and the man page say gcc-3.2.1. Do you have to use mysql323-client? Did you tried the newest mysql client from the newest port tree? I was trying to install mysql323-client on a machine. I wanted the same mysql version as what is on my production box. So, I'd prefer not to install mysql40-client. thanks, Darryl ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: 5.1 mysql problem - solved
Cc: [EMAIL PROTECTED] Subject: RE: 5.1 mysql problem [EMAIL PROTECTED] wrote: I installed Freebsd 5.1-release. I then installed lynx from the ports system without problem. I then installed apache13 from ports without problem. When I tried to install mysql323-client. I did this by cd /usr/ports/databases/mysql323-client. I then did a make. It trundled away for a while, and eventually errored out. configure: error: Your compiler cannot convert a longlong value to a float! I tried to install mysql323-server but it errored out the same way. Any ideas why it won't compile ? I checked the version of gcc the system is using, and the man page say gcc-3.2.1. Do you have to use mysql323-client? Did you tried the newest mysql client from the newest port tree? I was trying to install mysql323-client on a machine. I wanted the same mysql version as what is on my production box. So, I'd prefer not to install mysql40-client. thanks, Darryl After some googling, I found the following solution: 1. cd /usr/ports/databases/mysql323-client 2. rm -rf work 3. make extract 4. vi work/mysql-3.23.56/config find longlong. in the function that follows, change close to fclose. save file. 5. make 6. make install works like a champ. Seems to be a bug in the config script. thanks, Darryl ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
5.1 mysql problem
I installed Freebsd 5.1-release. I then installed lynx from the ports system without problem. I then installed apache13 from ports without problem. When I tried to install mysql323-client. I did this by cd /usr/ports/databases/mysql323-client. I then did a make. It trundled away for a while, and eventually errored out. configure: error: Your compiler cannot convert a longlong value to a float! I tried to install mysql323-server but it errored out the same way. Any ideas why it won't compile ? I checked the version of gcc the system is using, and the man page say gcc-3.2.1. thanks, Darryl - This mail sent through IMP: http://horde.org/imp/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
mysql problem
Hello, I am using IMP+mysql and after mysql is runningfor a few days I got this error: DB Error: connect failed line 108 /usr/local/www/horde/lib/Prefs/sql.php restarting mysql fixes hte problem but this happens every 2 days. IS there anyone who got this problem too? I have FreeBSD-4.8-STABLE. I do not know why but same donfiguration with Linux did not gave me this problem. thanks Rick ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mysql problem
Hi, Please reinstall your mysql port with WITH_LINUXTHREADS=YES from the ports collection. This will fix your problems. To run this without problems, you should upgrade to FreeBSD 4.8 STABLE, Release has a little problem. Martin Martin Blapp, [EMAIL PROTECTED] [EMAIL PROTECTED] -- ImproWare AG, UNIXSP ISP, Zurlindenstrasse 29, 4133 Pratteln, CH Phone: +41 61 826 93 00 Fax: +41 61 826 93 01 PGP: finger -l [EMAIL PROTECTED] PGP Fingerprint: B434 53FC C87C FE7B 0A18 B84C 8686 EF22 D300 551E -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: MySQL Problem
Konrad Scorciapino wrote: Hi, Look in /var/db/mysql/ and look for the error logs. I think they are labeled hostname.err. They should tell you what is wrong. Hmmm... The problems started when I deleted the mysql database... Now I've fixed it I've deleted the database as a regular user, as could anyone else do. Is there any way to prevent regular users from deleting those important databases? a) How did you delete it? rm -r? b) What do you mean by regular user? If you use rm to delete the directory, then that's a problem that should be fixed ... MySQL shouldn't install it's data files rw by just any user. However ... I'm looking at my MySQL install and all the data directories are rw only by user mysql. If you logged into mysql and use drop database and it succeeded, then you probably weren't a regular user. Read the docs on MySQL security, there's a lot to it. -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
MySQL Problem
Hi, I had MySQL working perfectly yesterday, but when I logged on today and tried to use it, it just didn't worked. I tried to find it with `ps waux | grep mysqld`, but got nothing. Then I tried to start it manually: [EMAIL PROTECTED] /home/konrad # /usr/local/etc/rc.d/mysql-server.sh start [EMAIL PROTECTED] /home/konrad # But the server didn't really started, so again I got nothing from `ps waux | grep mysqld`. I also tried to stop it: [EMAIL PROTECTED] /home/konrad # /usr/local/etc/rc.d/mysql-server.sh stop mysql-server isn't running [EMAIL PROTECTED] /home/konrad # What could be wrong? Thank you! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: MySQL Problem
Hi, There is a program to install files necessary to the server. Look in /usr/local/[s]bin. Which program is that? Thank you! ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: MySQL Problem
On Tue, Apr 01, 2003 at 04:48:13PM -0300, Konrad Scorciapino wrote: Hi, I had MySQL working perfectly yesterday, but when I logged on today and tried to use it, it just didn't worked. I tried to find it with `ps waux | grep mysqld`, but got nothing. Then I tried to start it manually: [EMAIL PROTECTED] /home/konrad # /usr/local/etc/rc.d/mysql-server.sh start [EMAIL PROTECTED] /home/konrad # But the server didn't really started, so again I got nothing from `ps waux | grep mysqld`. I also tried to stop it: [EMAIL PROTECTED] /home/konrad # /usr/local/etc/rc.d/mysql-server.sh stop mysql-server isn't running [EMAIL PROTECTED] /home/konrad # What could be wrong? Thank you! Look in /var/db/mysql/ and look for the error logs. I think they are labeled hostname.err. They should tell you what is wrong. -- /\ | Bob Bomar [EMAIL PROTECTED] http://www.bomar.us/~bob | || | FreeBSD: The Power to Serve. http://www.freeBSD.org | \/ pgp0.pgp Description: PGP signature