<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
Maybe if you trust DNS resolution names to make the connection to the
Database servers could be a problem. Did you try to use IP addresses
directly in the code?<br>
<br>
Regards,<br>
<br>
<br>
Peter Farrell escribió:
<blockquote
 cite="mid:edb3d60f0806090303o32485e57t689f47c5e8210d6@mail.gmail.com"
 type="cite">
  <pre wrap="">If it's a table listing check your MySQL settings. How have you set up
my.cnf? What does your slow query log tell you?
Have you logged into your MySQL server from another machine and ran
queries from there? Have you enabled verbose logging for PHP and
Apache? Are you tailing all 3 while you run the query from phpadmin?
One of them will say something interesting.

I think your issue smells like something in how you compiled PHP  or a
setting in php.ini itself.

Put a  test.php in the doc-root and see what it tells you it's using.
(re; mysql & the php version & the location of the php.ini)
I've done installs where I had conflicting libs from both PHP and
MySQL. Also I get stupid locations for php.ini all the time and have
to manaully move that file to the correct location.

[root@altair htdocs]# cat test.php
<?php
phpinfo();
?>
<?
var_dump($GLOBALS['_PHPA']);
?>

I generally compile everything when I do a similar install - and give
explicit declarations to where the apxs is for PHP as well as the root
mysql libraries. Check that everything is where you think it is.

*from recent installation of vtiger: (for example)

APACHE 2
====================
--prefix=/data/CRM/apache2 --with-mpm=prefork --enable-ssl
--enable-setenvif --enable-proxy --enable-proxy-http --enable-so
--disable-charset-lite --disable-include --disable-env
--disable-status --disable-autoindex --disable-asis
--disable-negotiation --disable-actions --disable-userdir
--disable-alias
make
make install

PHP 5.2.5
====================
--prefix=/data/CRM/php-5.2.5 --with-zlib-dir=/data/CRM/src/rrdbuild/lb
--with-gd --with-png-dir=/data/CRM/src/rrdbuild/lb
--with-freetype-dir=/data/CRM/src/rrdbuild/lb
--with-jpeg-dir=/data/CRM/src/rrdbuild/lb
--with-imap=/data/CRM/src/rrdbuild/lb
--with-mysql=/usr/local/include/mysql
--with-apxs2=/data/CRM/apache2/bin/apxs
make
make test
make install

=====================================================================

XCACHE (this is the PHP accelerator we're using)

*you'll have to force it to see the non-standard install locations we're using.
===============
Make a build directory:
mkdir xcache-build
cd src/xcache-build/
phpize --clean && phpize
env CPPFLAGS="-I/data/CRM/php-5.2.5/include
-I/data/CRM/apache2/include" LDFLAGS="-L/data/CRM/php-5.2.5/lib
-I/data/CRM/apache2/lib" CFLAGS="-O3 -fPIC" ../xcache-1.2.2/configure
--prefix=/data/CRM/ --enable-xcache
make
make install

*You must re-install each time you upgrade or re-compile PHP
make distclean && phpize --clean && phpize
(now continue w/ original instructions)


Locate a php.ini and copy it to /data/CRM/php-5.2.5/lib/php.ini
Append the xcache options to this file:
cd ../xcache-1.2.2
cat xcache.ini >> /etc/php.ini

Edit the php.ini to comply with the vtiger installation notes:

;Your php.ini must configured with the following parameters:

;    * safe_mode = Off
;    * display_errors = On            *this is stupid. Turn it off
after you tweak vtiger to how you like it.
;    * file_uploads = On
;    * register_globals = Off
;    * max_execution_time = 600
;    * output_buffering= On
;    * memory_limit = 32M             *is 128 by default - ignore
;    * error_reporting = E_WARNING & ~E_NOTICE
;    * allow_call_time_reference = On
;    * log_errors = Off                *again, stupid - ignore
;    * short_open_tag= On            *again, why the code is a bit
crap in vtiger that we'd need to enable this.
;    * extension=php_gd2.dll            *ignore - it's for windows
;    * extension=php_imap.dll            *ignore - it's for windows
;    * extension=php_mysql.dll            *ignore - it's for windows
;    * extension=php_mysqli.dll            *ignore - it's for windows

===========================================================


-Peter







2008/6/9 Pro Green European <a class="moz-txt-link-rfc2396E" href="mailto:pro_green_european@yahoo.com"><pro_green_european@yahoo.com></a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi.

    </pre>
    <blockquote type="cite">
      <pre wrap="">Have you tried other protocols? Is it really only http
transfers that are slow?
      </pre>
    </blockquote>
    <pre wrap="">Yes. Ftp works perfectly, and regular http with cgi/perl connections to the same database server works perfectly. Also rendering of standard HTML works as it should. It is only when a scripted site uses PHP/Mysql the connection to the server takes forever.

    </pre>
    <blockquote type="cite">
      <pre wrap="">Have you tried pinging 100 times and see if you get dropped
packets?
      </pre>
    </blockquote>
    <pre wrap="">0% packet loss

    </pre>
    <blockquote type="cite">
      <pre wrap="">Are there any errors from the netcards showing up in log
files?
      </pre>
    </blockquote>
    <pre wrap="">None.

I am really baffeled with this problem. I have no idea what to do next. Have enabled server-status in Apache and when the scripted site is being access the cpu load is around 2.5%.


Regards,
/mysteron


--- On Mon, 6/9/08, Bent Terp <a class="moz-txt-link-rfc2396E" href="mailto:bent@nagstrup.dk"><bent@nagstrup.dk></a> wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">From: Bent Terp <a class="moz-txt-link-rfc2396E" href="mailto:bent@nagstrup.dk"><bent@nagstrup.dk></a>
Subject: Re: [CentOS] Help, PHP/Mysql connections are so slow.
To: "CentOS mailing list" <a class="moz-txt-link-rfc2396E" href="mailto:centos@centos.org"><centos@centos.org></a>
Date: Monday, June 9, 2008, 10:42 AM
      </pre>
      <blockquote type="cite">
        <pre wrap="">communicate with MySQL5. On this server, PHP/Mysql
        </pre>
      </blockquote>
      <pre wrap="">connections are dead
      </pre>
      <blockquote type="cite">
        <pre wrap="">slow and unresponsive. It takes sometimes up to a
        </pre>
      </blockquote>
      <pre wrap="">minute to list tables
      </pre>
      <blockquote type="cite">
        <pre wrap="">in phpmyadmin for example.
        </pre>
      </blockquote>
      <pre wrap="">Have you tried other protocols? Is it really only http
transfers that are slow?

Have you tried pinging 100 times and see if you get dropped
packets?

Are there any errors from the netcards showing up in log
files?

BR Bent
_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>
      </pre>
    </blockquote>
    <pre wrap="">

_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->_______________________________________________
CentOS mailing list
<a class="moz-txt-link-abbreviated" href="mailto:CentOS@centos.org">CentOS@centos.org</a>
<a class="moz-txt-link-freetext" href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a>

  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 



Lorenzo Martínez Rodríguez
Consultor de seguridad informática
 
</pre>
</body>
</html>