<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: MySQL, Apache, and PHP aren't talking, but they should already be talking</title>
	<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking/</link>
	<description>Comments on Ask MetaFilter post MySQL, Apache, and PHP aren't talking, but they should already be talking</description>
	<pubDate>Mon, 15 Nov 2004 14:38:54 -0800</pubDate>
	<lastBuildDate>Mon, 15 Nov 2004 14:38:54 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: MySQL, Apache, and PHP aren&apos;t talking, but they should already be talking</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking</link>	
		<description>MySQL, Apache, and PHP:&lt;br&gt;
I can pull a phpinfo and it says that both mysql and dbx functions are compiled in and enabled, but when I run mysql_connect or dbx_connect, it can&apos;t connect. Apache and PHP work together and I can get into MySQL and do stuff via client. How can I make them talk when everything else I have says that they should already be talking? &lt;br /&gt;&lt;br /&gt; I installed and updated everything via Fedora Core 3&apos;s yum command, so it should all be configured with the right stuff in the right places.  &lt;br&gt;
It&apos;s driving me nuts -- it all *looks* like it should work, but it doesn&apos;t.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2004:site.11796</guid>
		<pubDate>Mon, 15 Nov 2004 14:34:06 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
		
			<category>apache</category>
		
			<category>phpinfo</category>
		
			<category>dbx</category>
		
			<category>mysql</category>
		
			<category>php</category>
		
	</item> <item>
		<title>By: Danelope</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206473</link>	
		<description>What error is &lt;tt&gt;mysql_connect()&lt;/tt&gt; throwing when you attempt to connect?  If it&apos;s not very informative, try &lt;a href=&quot;http://www.php.net/mysql_error&quot;&gt;&lt;tt&gt;echo mysql_error();&lt;/tt&gt;&lt;/a&gt; immediately after the connection attempt.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206473</guid>
		<pubDate>Mon, 15 Nov 2004 14:38:54 -0800</pubDate>
		<dc:creator>Danelope</dc:creator>
	</item><item>
		<title>By: cyrusdogstar</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206480</link>	
		<description>What Danelope said.&lt;br&gt;
&lt;br&gt;
Also: if the mysql command line client works and PHP doesn&apos;t, PHP is probably looking in the wrong place, or MySQL isn&apos;t making itself available correctly (not recalling exactly how the MySQL client itself operates, I know that the MySQL server will either listen on a network port, or use a UNIX socket file, usually in /var or /tmp).&lt;br&gt;
&lt;br&gt;
For example, MySQL may be using the UNIX sockets, but PHP is looking on the network port (3306 I think), or vice versa.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206480</guid>
		<pubDate>Mon, 15 Nov 2004 14:46:31 -0800</pubDate>
		<dc:creator>cyrusdogstar</dc:creator>
	</item><item>
		<title>By: Caviar</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206481</link>	
		<description>Have you installed the &lt;a href=&quot;http://www.rpmfind.net/linux/rpm2html/search.php?query=php-mysql&amp;submit=Search+...&quot;&gt;php-mysql rpm&lt;/a&gt;?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206481</guid>
		<pubDate>Mon, 15 Nov 2004 14:47:16 -0800</pubDate>
		<dc:creator>Caviar</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206482</link>	
		<description>It&apos;s not returning *any* errors except for the &quot;false&quot; from the connection function, danelope. That&apos;s the problem, it&apos;s not even talking to MySQL to give me a &quot;bad password&quot; or something else.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206482</guid>
		<pubDate>Mon, 15 Nov 2004 14:48:57 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206484</link>	
		<description>I have the php-mysql rpm installed, installed everything at the same time ... phpinfo() looks fine to me. &lt;br&gt;
&lt;br&gt;
It&apos;s connecting via unix socket, or at least it&apos;s supposed to, and both phpinfo() and mysql think the socket should be in /var/lib/mysql/mysql.sock ... which is where it is. &lt;br&gt;
&lt;br&gt;
I&apos;ve already tried all the usual things, I&apos;ve been using PHP/MySQl/Apache for about three years. I&apos;ve just always compiled the whole shootin&apos; match myself on Slackware... I&apos;ve never used this  newfangled RPM thing that all the kids these days are using.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206484</guid>
		<pubDate>Mon, 15 Nov 2004 14:52:17 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206489</link>	
		<description>Oh, and versions are 3.23.58 (yes, old, but ... that&apos;s what most distros are releasing, and all of my existing projects use) and PHP is 4.3.9 in case that matters.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206489</guid>
		<pubDate>Mon, 15 Nov 2004 14:56:49 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: Voivod</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206513</link>	
		<description>So what did mysql_error() display?  Anything?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206513</guid>
		<pubDate>Mon, 15 Nov 2004 15:33:28 -0800</pubDate>
		<dc:creator>Voivod</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206532</link>	
		<description>mysql_error didn&apos;t return anything, but in the apache error logs php threw an error that just didn&apos;t print to screen. It was the usual &quot;cannot connect via mysql socket&quot; error, but everything seems to be in the right spot for it to connect and the code itself is good&lt;br&gt;
&lt;br&gt;
The only thing I&apos;ve noticed that&apos;s weird is that mysqld is running as user # 27 with no info in /etc/passwd for user # 27. However, all other information in the /var/lib/mysql directories is chown&apos;d to user 27 and the databases work fine with the mysql client.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206532</guid>
		<pubDate>Mon, 15 Nov 2004 15:56:39 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: boaz</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206574</link>	
		<description>Perhaps your webserver doesn&apos;t have permission to open the socket?  Make sure that &apos;other&apos; users have read and write permission (i.e. chmod o+rw) on the socket and execute permission on all its parent directories (i.e chmod o+x).</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206574</guid>
		<pubDate>Mon, 15 Nov 2004 17:43:03 -0800</pubDate>
		<dc:creator>boaz</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206585</link>	
		<description>Yeah, the socket and parent directories were 777. &lt;br&gt;
Apparently this is a common problem among noobs. On the fedora irc channel, there were three of us who couldn&apos;t get it to work. The devs all had it working, so they blew us off as n00bs. I hate being blown off that way; I&apos;ve been using linux since 2.x kernels were a New Big Thing and have compiled more apps myself than most fedora devs have had diapers changed. I was looking to use a &quot;modern&quot; distro with robust and centralized package management because it&apos;s tough to admin more than a few of my trusted Slack servers unless you have a full-time sysadmin, so I&apos;ll look at Debian next. &lt;br&gt;
&lt;br&gt;
I&apos;m a PHB now, so I naturally take on some of the attributes of a newbie, but it still rankles that I couldn&apos;t get something this simple working, and that the fedora devs are so willing to blow off so many people that have a common problem.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206585</guid>
		<pubDate>Mon, 15 Nov 2004 18:24:31 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: yerfatma</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206596</link>	
		<description>I&apos;ve been having decent luck with Mandrake, but I really am a n00b.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206596</guid>
		<pubDate>Mon, 15 Nov 2004 18:55:55 -0800</pubDate>
		<dc:creator>yerfatma</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206615</link>	
		<description>Yeah, but unfortunately Mandrake isn&apos;t very appropriate for a server environment. :-P</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206615</guid>
		<pubDate>Mon, 15 Nov 2004 19:25:50 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: boaz</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206663</link>	
		<description>What host are you passing to the mysql_connect() function?  Try passing in a couple of different strings for the server, like &quot;127.0.0.1:3306&quot; (to test the TCP/IP socket) or &quot;:/var/lib/mysql/mysql.sock&quot; (to test explicitly setting the socket path) and see if either of those work.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206663</guid>
		<pubDate>Mon, 15 Nov 2004 20:57:55 -0800</pubDate>
		<dc:creator>boaz</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206688</link>	
		<description>the socket path is explicitly set in the php.ini file... but yeah, either accessing it from the loopback interface via tcp/ip or via the socket borks. My guess is that it&apos;s something in the php-mysql binary that&apos;s distributed with the FC3 distro that&apos;s borked.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206688</guid>
		<pubDate>Mon, 15 Nov 2004 21:46:07 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: SpecialK</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206690</link>	
		<description>(And I&apos;d do a workaround or build my own rpm to get around that, but the whole purpose of the exercise of using a &apos;modern&apos; distro like fc3 instead of my usual cro-magnon, rock-solid slackware was the package management and the ease of managing updates across several servers. Until I can afford to hire a linux sysadmin, I&apos;m going to be managing my server closet myself.)</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206690</guid>
		<pubDate>Mon, 15 Nov 2004 21:47:25 -0800</pubDate>
		<dc:creator>SpecialK</dc:creator>
	</item><item>
		<title>By: yerfatma</title>
		<link>http://ask.metafilter.com/11796/MySQL-Apache-and-PHP-arent-talking-but-they-should-already-be-talking#206726</link>	
		<description>&lt;em&gt;unfortunately Mandrake isn&apos;t very appropriate for a server environment&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
How come?</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2004:site.11796-206726</guid>
		<pubDate>Tue, 16 Nov 2004 04:05:17 -0800</pubDate>
		<dc:creator>yerfatma</dc:creator>
	</item>
	</channel>
</rss>
