GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Apache/PHP/MySQL Config Question (https://gfy.com/showthread.php?t=351070)

JDog 09-02-2004 11:24 PM

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

JDog 09-02-2004 11:39 PM

* bump *

toddler 09-02-2004 11:41 PM

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.

JDog 09-02-2004 11:47 PM

Quote:

Originally posted by toddler
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.
What is the directive? Because I'm on another server, where the php.ini has:

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

toddler 09-02-2004 11:52 PM

Quote:

Originally posted by JDog
What is the directive? Because I'm on another server, where the php.ini has:

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

read this man:

http://www.easysoft.com/products/999...9&product=2002

JDog 09-02-2004 11:54 PM

Quote:

Originally posted by toddler
read this man:

http://www.easysoft.com/products/999...9&product=2002

That article is pointed to Active Persistent Links, which I already know how to disable/enable. It's the Acitve Links 1 that I want to disable.

jDoG

toddler 09-02-2004 11:55 PM

Quote:

Originally posted by JDog
That article is pointed to Active Persistent Links, which I already know how to disable/enable. It's the Acitve Links 1 that I want to disable.

jDoG

I'm thinking that active links is just that "i have X active links to my db"

JDog 09-03-2004 12:02 AM

Quote:

Originally posted by toddler
I'm thinking that active links is just that "i have X active links to my db"
Are you telling me that the server that says: Active Links 0 has no active links to the db????? The server that has that average's over 250 queries a SECOND. Have you ever setup a config file before? Do you know what 0/1 means? 0 = Disabled, 1 = Enabled.

jDoG

toddler 09-03-2004 12:13 AM

Quote:

Originally posted by JDog
Are you telling me that the server that says: Active Links 0 has no active links to the db????? The server that has that average's over 250 queries a SECOND. Have you ever setup a config file before? Do you know what 0/1 means? 0 = Disabled, 1 = Enabled.

jDoG

Yes I've setup a server before. I've not, however, seen this directive before. Judging by what I'm NOT seeing on both mysql.com and php.net, not to mention google, not too many people have.

(I do unix sysadmin for a living, yes I've setup a config file...ha)

I'm still looking....

JDog 09-03-2004 12:17 AM

Quote:

Originally posted by toddler
Yes I've setup a server before. I've not, however, seen this directive before. Judging by what I'm NOT seeing on both mysql.com and php.net, not to mention google, not too many people have.

(I do unix sysadmin for a living, yes I've setup a config file...ha)

I'm still looking....

Sorry about the previous post, I just can't find shit about it, and google hasn't been much help for me also. Thanks for the help tho! :)

jDoG

toddler 09-03-2004 12:20 AM

Quote:

Originally posted by JDog
Sorry about the previous post, I just can't find shit about it, and google hasn't been much help for me also. Thanks for the help tho! :)

jDoG

no worries. google doesn't let me down much, but GIS of 'active links' is hell...

JDog 09-03-2004 12:22 AM

Quote:

Originally posted by toddler
no worries. google doesn't let me down much, but GIS of 'active links' is hell...
GIS? What's that? Wow a place I haven't heard! :)

jDoG

toddler 09-03-2004 12:27 AM

Quote:

Originally posted by JDog
GIS? What's that? Wow a place I haven't heard! :)

jDoG

naw, just a tla you haven't heard : google internet search...

still looking...

RoTT 09-03-2004 12:27 AM

JDog please hit me up on ICQ - 193397101

toddler 09-03-2004 12:44 AM

Punting for now, need sleep. Will see what i find in the morning. my mysql books are at the office ;(

JDog 09-03-2004 01:01 AM

Quote:

Originally posted by toddler
Punting for now, need sleep. Will see what i find in the morning. my mysql books are at the office ;(
Thanks for the help man, really appreaciate it. :) Thanks again!

jDoG

V_RocKs 09-03-2004 01:34 AM

So'd you figure it out yet fucktard?

I say that in the lightest sense ;)

V_RocKs 09-03-2004 01:36 AM

Looks like you did... just read your phpinfo...

JDog 09-03-2004 01:41 AM

Quote:

Originally posted by V_RocKs
Looks like you did... just read your phpinfo...
Nope haven't figured it out yet, that's not the right server you're looking at! Still looking into it! But thanks you fuckass! :Graucho

jDoG

JDog 09-03-2004 01:41 AM

Quote:

Originally posted by V_RocKs
Looks like you did... just read your phpinfo...
Nope haven't figured it out yet, that's not the right server you're looking at! Still looking into it! But thanks you fuckass!

jDoG

V_RocKs 09-03-2004 01:49 AM

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.

JDog 09-03-2004 01:58 AM

Quote:

Originally posted by V_RocKs
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.

I know, I was just busting your's back! I wasn't serious. Yea it's a crazy install, but I wasn't the one that did this compile. Currently I don't have a public on that is viewable.

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

V_RocKs 09-03-2004 02:10 AM

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

JDog 09-03-2004 02:22 AM

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

irishfury 09-03-2004 02:23 AM

in the php.ini

is it showing

Make sure allow_persistent = On in your php.ini file

??????



edit: lol nm

JDog 09-03-2004 02:40 AM

Quote:

Originally posted by irishfury
in the php.ini

is it showing

Make sure allow_persistent = On in your php.ini file

??????



edit: lol nm

Yep. :) But that isn't the problem :(

jDoG

irishfury 09-03-2004 02:43 AM

Quote:

Originally posted by JDog
Yep. :) But that isn't the problem :(

jDoG

what exactly is happening....cause fromt the sounds of this I'm thinking it is a compiling issue though any little bit of info of what's going on would help...

JDog 09-03-2004 09:37 AM

* bump * for the day people

JDog 09-03-2004 10:37 AM

Anybody ever heard of this?

jDoG

JDog 09-03-2004 01:45 PM

bump for afternoon crew!

jDoG

hive 09-03-2004 02:22 PM

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

JDog 09-03-2004 03:29 PM

Quote:

Originally posted by hive
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

Alright but you're telling me that a server that has 300 queries per second always show's 0 active links?

jDoG

hive 09-03-2004 03:50 PM

Quote:

Originally posted by JDog
Alright but you're telling me that a server that has 300 queries per second always show's 0 active links?

jDoG

I am not telling you anything other than 'active links' is not a boolean.

Is there a problem behind all this that you want help with?

onlymovies 09-03-2004 03:59 PM

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

hive 09-03-2004 04:02 PM

I understand what he asked, I understand what you asked again, but do you understand what posted here ?

JDog 09-03-2004 04:12 PM

Quote:

Originally posted by hive
I understand what he asked, I understand what you asked again, but do you understand what posted here ?
Yea I under you're saying that it's not boolean. I wonder if it is compiled in, that's what I'm beginning to think! Thanks for your help tho!

jDoG

hive 09-03-2004 04:16 PM

Wonder if what is compiled in?

JDog 09-03-2004 04:23 PM

Quote:

Originally posted by hive
Wonder if what is compiled in?
If it was a agrument that the other sys admin used when compiling PHP.

jDoG

hive 09-03-2004 04:26 PM

Are you still trying to find a way to turn 'active links' off?

JDog 09-03-2004 04:28 PM

Quote:

Originally posted by hive
Are you still trying to find a way to turn 'active links' off?
Yes, another programmer said that he's seen slow down because of this. And I can't find anything in the php.ini that would disable this, which is why it's leading me to believe that it is a agrument that was used while compiling PHP on the machine.

This is the first time that I've been this confused on a PHP/MySQL install.

jDoG

hive 09-03-2004 04:42 PM

Are you using PHP's mysql extension?

JDog 09-03-2004 04:54 PM

Quote:

Originally posted by hive
Are you using PHP's mysql extension?
Yes it is using the mysql.so extension.

jDoG

Buddy 09-03-2004 05:18 PM

Quote:

Originally posted by hive
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

JDog, if you do nothing else today do this one thing; listen to hive. he knows his shit.

hive 09-03-2004 05:31 PM

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.

JDog 09-03-2004 05:42 PM

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

hive 09-03-2004 05:52 PM

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?

JDog 09-03-2004 05:56 PM

Quote:

Originally posted by hive
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?
You make a good point of that. The server that has Active Links 0, is only Apache/PHP But the server that has Active Links 1 was just moved from another server. And they might have done a master-slave setup to do that, but I'm not 100% sure about that.

jDoG

JDog 09-03-2004 05:58 PM

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

hive 09-03-2004 06:12 PM

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.

JDog 09-03-2004 06:15 PM

Quote:

Originally posted by hive
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.

The thing is, I've never set this up, and the real tech is gone til Sun or Mon, so I don't know exactly where to start, and don't know exactly what he has setup.

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