![]() |
Apache/PHP/MySQL Config Question
I'm having some problems with some scripts and I've searched around and people said that in the phpinfo() active links should be turned off:
MySQL Support enabled Active Persistent Links 0 Active Links 1 But I can not find out if I disable it in the php.ini or the my.cnf. First time I've ran into this problem. Can somebody please help me out here? It could've also been the other admin that compiled it, but he's on vacation. I've check my other servers and they have: MySQL Support enabled Active Persistent Links 0 Active Links 0 But the php.ini config looks the same for the mysql configs and the my.cnf are the same. Is this from the way PHP was compiled or even how mysql was compiled. Thanks, jDoG |
* bump *
|
should just able to add the directive to the php.ini file. A graceful restart of apache may be needed as well, I've not mucked with active links.
|
Quote:
MySQL Support enabled Active Persistent Links 0 Active Links 0 I've never seen this directive at all before in a php.ini file, and not sure exactly what to do. I've search google, and a lot of servers have it set to zero, searched the php.net website's, and can't find anything that shows how to disable this. Which is kindof surpising and leading me to think that it is compiled into PHP, which is still surpising to me. jDoG |
Quote:
http://www.easysoft.com/products/999...9&product=2002 |
Quote:
jDoG |
Quote:
|
Quote:
jDoG |
Quote:
(I do unix sysadmin for a living, yes I've setup a config file...ha) I'm still looking.... |
Quote:
jDoG |
Quote:
|
Quote:
jDoG |
Quote:
still looking... |
JDog please hit me up on ICQ - 193397101
|
Punting for now, need sleep. Will see what i find in the morning. my mysql books are at the office ;(
|
Quote:
jDoG |
So'd you figure it out yet fucktard?
I say that in the lightest sense ;) |
Looks like you did... just read your phpinfo...
|
Quote:
jDoG |
Quote:
jDoG |
What server is it on?
Don't call me a fuck at CTO/Lead Programmer ;) I hope you know I am just busting your chops... I think you have the largest command line entry I have ever seen for the install BTW. |
Quote:
But the configs are the same. Nothing drastic that would change the Active Links that I could see. Only main difference I see of the compiles are GLib. jDoG |
[MSSQL]
; Allow or prevent persistent links. mssql.allow_persistent = On ; Maximum number of persistent links. -1 means no limit. mssql.max_persistent = -1 ; Maximum number of links (persistent+non persistent). -1 means no limit. mssql.max_links = -1 The top of the mysql section of the php.ini look similar to this? Make sure you are looking at the correct ini file since zend should have taken it over if you installed it. Make sure it is symbolically linked from the base directory of your apache installation to zends base directory too. |
Configuration File (php.ini) Path /etc/php.ini - File I am looking at
[MySQL] ; Allow or prevent persistent links. mysql.allow_persistent = On ; 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 And the top part of that file. jDoG |
in the php.ini
is it showing Make sure allow_persistent = On in your php.ini file ?????? edit: lol nm |
Quote:
jDoG |
Quote:
|
* bump * for the day people
|
Anybody ever heard of this?
jDoG |
bump for afternoon crew!
jDoG |
What problem are you trying to solve?
"Active Links" is not a boolean operator. It will be how many active links php has (or thinks it has) to a mysql server. http://www.google.com/search?hl=en&l...e+Links+5%2 2 http://www.google.com/search?hl=en&l...e+Links+6%2 2 http://www.google.com/search?hl=en&l...e+Links+7%2 2 |
Quote:
jDoG |
Quote:
Is there a problem behind all this that you want help with? |
I had a friend a while back who wanted to do the same thing. I don't know how he did it but he figured it out. To bad i lost touch with him.
There was reason to set active links to 0, but i don't remember why that was. All jdog wants to do is turn "active links" off. So he wants to go from this, MySQL Support enabled Active Persistent Links 0 Active Links 1 to this: MySQL Support enabled Active Persistent Links 0 Active Links 0 this is viewable in the phpinfo.php page i believe |
I understand what he asked, I understand what you asked again, but do you understand what posted here ?
|
Quote:
jDoG |
Wonder if what is compiled in?
|
Quote:
jDoG |
Are you still trying to find a way to turn 'active links' off?
|
Quote:
This is the first time that I've been this confused on a PHP/MySQL install. jDoG |
Are you using PHP's mysql extension?
|
Quote:
jDoG |
Quote:
|
Here. I will make this easy for you.
http://cvs.sourceforge.jp/cgi-bin/vi...viewcvs-markup That is the source code to the mysql extension. Here is the function to take note of, it sets the variables you see in the mysql section when you call phpinfo(). PHP_MINFO_FUNCTION(mysql) { char buf[32]; php_info_print_table_start(); php_info_print_table_header(2, "MySQL Support", "enabled"); sprintf(buf, "%ld", MySG(num_persistent)); php_info_print_table_row(2, "Active Persistent Links", buf); sprintf(buf, "%ld", MySG(num_links)); php_info_print_table_row(2, "Active Links", buf); php_info_print_table_row(2, "Client API version", mysql_get_client_info()); #if !defined (PHP_WIN32) && !defined (NETWARE) php_info_print_table_row(2, "MYSQL_MODULE_TYPE", PHP_MYSQL_TYPE); php_info_print_table_row(2, "MYSQL_SOCKET", MYSQL_UNIX_ADDR); php_info_print_table_row(2, "MYSQL_INCLUDE", PHP_MYSQL_INCLUDE); php_info_print_table_row(2, "MYSQL_LIBS", PHP_MYSQL_LIBS); #endif php_info_print_table_end(); DISPLAY_INI_ENTRIES(); } This line here: sprintf(buf, "%ld", MySG(num_links)); sets the value of 'buf' to the value of MySG(num_links) This line here: php_info_print_table_row(2, "Active Links", buf); Is the value you see in phpinfo() for "Active Links". in the function 'php_mysql_do_connect' MySG(num_links) is INcremented. And in the function '_close_mysql_link' MySG(num_links) is DEcremented. |
Well that explains it, now I'm just surprised why this other server would always show 0 even tho there are 300 queries a seconds on it.
jDoG |
Is PHP / Apache responsible for those 300 queries per second or is it something running in the background or perhaps another server connecting to this database?
|
Quote:
jDoG |
Here's the actual problem, the forums on the server were upgraded to vBulletin 3.0.3 and since then the server has been have slow performance issues. I had a php programmer tell me that the Active Links 1 was causing the problem. But now I'm not too sure about that.
But this problem happened when moving servers and doing the upgrade at the same time. jDoG |
vBulliten =(
Do yourself a favor and test everything 1 step at a time until it gets fixed. I know your pain first hand, I did it with GFY when we moved her to JH. |
Quote:
So probably just ride it out, since he's touchy about other people touching his setup. jDoG |
All times are GMT -7. The time now is 08:14 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123