You are here: Re: Make localhost (file socket) -> mysql.host.com (network socket) « PHP Programming Language « IT news, forums, messages
Re: Make localhost (file socket) -> mysql.host.com (network socket)

Posted by janvdberg on 04/26/06 14:29

Hi Erwin and Colin,

thanks for the responses! And you're right maybe this should have been
posted in a different group but none-the-less I have found a solution
(lovely people at php.pecl@efnet) that I'd like to share (maybe it will
be useful to someone else googling for it)

For php 4.4.2 on Linux in the sourcefile: ext/mysql/php_mysql.c add
this to line 643:

if (!strcmp(host, "localhost")) {
if (free_host) {
efree(host);
}
free_host = 0;
host = "mysql.host.com";
}

This will make the php/mysql interface interpretet localhost as a
network socket. For now it does the trick. But I will be sure to
test/test/test it (since it's php/mysql specfic Im guessing/testing it
will not effect other PHP functions).

Thanks.

Jan

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация