Koozali.org: home of the SME Server

Web mail errors

Darrell May

Web mail errors
« on: November 26, 2000, 02:28:06 AM »
I have installed and been testing Horde/IMP as per Dan Brown's instructions.  When using web mail I receive the following errors frequently.  Is this something I have done wrong?

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Cannot add header information - headers already sent by (output started at /home/e-smith/files/primary/horde-phplib/db_mysql.inc:73) in /home/e-smith/files/primary/html/horde/imp/folders.php3 on line 38

Dan Brown

RE: Web mail errors
« Reply #1 on: November 26, 2000, 03:10:32 AM »
The problem is probably that you haven't installed the e-smith-php4 RPM (it's now up to version 0.3).  Download and install it, then restart apache, and this should fix the problem.

Eric Womack

RE: Web mail errors
« Reply #2 on: November 26, 2000, 03:46:18 AM »
I did install all the files needed (in fact I installed and removed 4 times) including the PHP ones and I get the same error.  At one point I even downloaded a fresh set of the files in case they were corrupted but that did not help.  Any other ideas?

Eric

Dan Brown

RE: Web mail errors
« Reply #3 on: November 26, 2000, 04:13:34 AM »
OK, a few ideas.  First, create a page that contains only this:

   

...and take a look at it.  Near the top, "Configuration file (php.ini) path" should be set to "/etc/httpd/conf".  If it doesn't, you can't have installed my latest RPMs (build date should be Nov. 10, 2000).

If that's correct, go to /etc/httpd/conf and take a look at php.ini.  You're looking for a line that says:

mysql.default_socket = /var/lib/mysql/mysql.sock ; default socket name for local MySQL connects. If empty, uses the built-in

If that line isn't there, or is there with an empty value, that's your problem.  If php.ini isn't there at all, that's an even bigger problem, but either problem is most likely caused by a missing or incorrect installation of e-smith-php4.

Next, take a look at /etc/e-smith/templates/etc/httpd/conf/php.ini/80ModuleSettings.  If this file (or directory) doesn't exist, you have not installed e-smith-php4-0.3-1 (or -0.2-2), which are required.  If the file's there, look for the same mysql.default_socket line I quoted above.  There shouldn't be anything editing this file, so this line ought to be there.

If the template file checks out, do /sbin/e-smith/expand-template /etc/httpd/conf/php.ini and then do service httpd restart.  Check out the phpinfo page again; it should say that mysql.default_socket is set to /var/lib/mysql/mysql.sock.

If none of this works, post the results of rpm -q e-smith-php4, rpm -q apache, and rpm -q php, and what else you've found, and we'll see what else might be going on.

Barry Nesbit

RE: Web mail errors
« Reply #4 on: November 26, 2000, 09:50:19 PM »
I've been having the same problem and nothing described in the previous message fixed it. Here are the rpm queries:

[root@cr772910-a RPMS]# rpm -q e-smith-php4
e-smith-php4-0.3-1
[root@cr772910-a RPMS]# rpm -q apache      
apache-1.3.12-2
[root@cr772910-a RPMS]# rpm -q php  
php-4.0.3pl1-4
[root@cr772910-a RPMS]#

Darrell

RE: Web mail errors
« Reply #5 on: November 26, 2000, 10:36:37 PM »
e-smith-php4-0.3-1
apache-1.3.12-2
php-4.0.3pl1-4

I've got the same versions as Barry reports.  Just for more feedback, sometimes I find IMP works without errors.  Other times you will be inside and running IMP and when you go to select a new function (any function) it crashes with the previously noted errors.  Usually I can simply revisit the IMP login page, login again and continue.

I also performed a complete fresh install of e-smith, loading only the required web mail rpm's just to make sure it was not a conflict from any other upgrade.

Regards,

Darrell

Dan Brown

RE: Web mail errors
« Reply #6 on: November 26, 2000, 11:10:56 PM »
This is getting stranger and stranger.  Barry and Darrell, was php.ini there?  Did it have the line about mysql.sock?  Was the configuration file path on the phpinfo() page set to /etc/httpd/conf?  If all three of these are positive, I can't think what else could be causing this.

Darrell

RE: Web mail errors
« Reply #7 on: November 26, 2000, 11:26:34 PM »
Dan Brown wrote:

> This is getting stranger and stranger.  Barry and Darrell, was
> php.ini there?  Did it have the line about mysql.sock?  Was the
> configuration file path on the phpinfo() page set to
> /etc/httpd/conf?  If all three of these are positive, I can't
> think what else could be causing this.

Sorry Dan, I'm a newbie and did not understand what you meant with the phpinfo() page.  If this is important please walk me through exactly what you want me to do.

I did check all the files/dir you requested and everything was there and the mysql entries were correct.  What is really strange of course is why does it work sometimes and not others?  When it errors why does a simple revisit to the IMP login page allow you to continue?

Dan Brown

RE: Web mail errors
« Reply #8 on: November 27, 2000, 12:16:46 AM »
You're right, that is really strange.  I can't think of any reason that would be happening other than some kind of PHP bug--maybe something got hosed with IMP, but that seems unlikely.

For the phpinfo page, you'll need to create a file, somewhere that apache can read it, which contains only one line:

 

This file can be called anything with a .php extension.  Then browse to this file using a web browser.  It will give you lots of information.  Near the top, it will list the configuration file path, which should be /etc/httpd/conf.  There will also be a listing under a heading for mysql which will indicate the default socket; this should be set to /var/lib/mysql/mysql.sock.

The other "fix" (which is only a band-aid) is to do 'ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock'.

Alec Norek

RE: Web mail errors
« Reply #9 on: November 27, 2000, 11:48:50 AM »
Thanks for the fix.

> The other "fix" (which is only a band-aid) is to do 'ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock'.

I couldn't help myself after downloading the webmail RPMs.  I was only going to use the Mysql & PHP components for evaluation of Phorum, but just had to try webmail and got the errors previously listed.

Alec Norek

RE: Web mail errors
« Reply #10 on: November 27, 2000, 12:40:32 PM »
Silly question time.  When designing a web page, what is the correct URL to use to give access to webmail on your server.?  I can't improve on http://webmail.mydomain.com/horde, and then I have to click on the IMP button.  That sounds too longwinded.

Barry Nesbit

RE: Web mail errors
« Reply #11 on: November 27, 2000, 05:20:25 PM »
Hi Dan,

Thanks for the fix, everything is working fine now.

Barry

Darrell May

RE: Web mail errors
« Reply #12 on: November 28, 2000, 04:42:16 AM »
Dan Brown wrote:

> The other "fix" (which is only a band-aid) is to do
> 'ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock'.

Thanks for the fix Dan :-)

Dave Reinhardt

RE: Web mail errors
« Reply #13 on: November 29, 2000, 05:27:27 AM »
I had the same problem.
Made all of the checks suggested by Dan
The last one mysql.default_socket= "no value"
I ran:
/sbin/e-smith/expand-template /etc/httpd/conf/php.ini
and service httpd restart and mysql.default_socket NOW = "/var/lib/mysql/mysql.sock"

BUT still have the same problem at:
httpd://www.myserver.com/horde and click on IMP
Is the:'ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock' the answer?

Dave Reinhardt

RE: Web mail errors
« Reply #14 on: November 29, 2000, 05:32:15 AM »
I want to also add that I thought my problem was because I installed from ?root/tmp

Dave Reinhardt

RE: Web mail errors
« Reply #15 on: November 29, 2000, 05:36:06 AM »
Guess what?
I restarted the httpd again for the third time and now IMP gets me to the login screen without the the:'ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

Thanks for the help...
Dave

Dave Reinhardt

RE: Web mail errors
« Reply #16 on: November 29, 2000, 05:38:44 AM »
As soon as I click on the (New User Introduction)
I got: (see below)
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in
/home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in
/home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in
/home/e-smith/files/primary/horde-phplib/db_mysql.inc on line 73

Warning: Cannot add header information - headers already sent by (output started at
/home/e-smith/files/primary/horde-phplib/db_mysql.inc:73) in /home/e-smith/files/primary/html/horde/imp/templates/doctype.inc on line 8

BUT the page did come up after the above..

Darrell

RE: Web mail errors
« Reply #17 on: November 29, 2000, 05:51:02 AM »
Have you tried Dan's band-aid "fix"

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

It seems to be the only solution for now.

Darrell

Doyle Glaze

RE: Web mail errors
« Reply #18 on: December 13, 2000, 05:10:38 AM »
Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/e-smith/files/primary/html/mainfile.php on line 23
Unable to select database

I been having the same problem for about 2 months. I have been running imp for about 3 months and php nuke that also uses the mysql in the same way imp does. I updated all the patches and hardware and been getting this error for almost 2 months. I have been looking for a fix. I have tried the link to the temp directory about 1 and 1/2 months ago and it worked for a short time. I have found that the more calls to the database the faster the problem comes back. I would to get this fixed. I will be happy to open a telnet port and login for you to see and if you check the web site dglaze.yi.org and check it out it will show up. I also found that the memory gets used up and does not release.

HELP...PLEASE...!

Thanks Doyle