<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://uname.pingveno.net/blog/index.php/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title># uname -a - Mot-clé - compiled</title>
    <link>https://uname.pingveno.net/blog/index.php/</link>
    <atom:link href="https://uname.pingveno.net/blog/index.php/feed/tag/compiled/rss2" rel="self" type="application/rss+xml" />
    <description>Le blog de uname.pingveno.net</description>
    <language>fr</language>
    <pubDate>Tue, 18 Aug 2026 13:46:21 +0200</pubDate>
    <copyright>Mathieu Pellegrin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>&quot;SQLSTATE[HY000] [2002] No such file or directory&quot; for compiled PHP</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2016/04/19/SQLSTATE%5BHY000%5D-%5B2002%5D-No-such-file-or-directory-for-compiled-PHP</link>
        <guid isPermaLink="false">urn:md5:fe7ea9121022705600cf591fb8363708</guid>
        <pubDate>Tue, 19 Apr 2016 22:52:00 +0200</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>compiled</category>
                  <category>debian</category>
                  <category>mysql</category>
                  <category>php</category>
                <description>          &lt;p&gt;Let's say you connect to MySQL using &quot;localhost&quot;&lt;/p&gt;

&lt;p&gt;Let's say you compiled PHP&lt;/p&gt;

&lt;p&gt;Let's say you didn't specify the --with-mysql-sock= parameter in your configure command when you built mysql&lt;/p&gt;

&lt;p&gt;And let's suppose you cannot connect to MySQL using PHP. CLI works fine, but not CGI.&lt;/p&gt;

&lt;p&gt;Solution : fix the default sockets in php.ini (use your own working socket paths) :&lt;/p&gt;

&lt;pre&gt;
pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock
mysqli.default_socket = /var/run/mysqld/mysqld.sock

# You shouldn't use mysql_ extension, but if you did:
mysql.default_socket = /var/run/mysqld/mysqld.sock&lt;/pre&gt;

&lt;p&gt;I suppose that automatically converting &quot;localhost&quot; to an unix socket is done for performance reason on unix systems.&lt;/p&gt;</description>
        
              </item>
      </channel>
</rss>
