title: PDO Sphinx connection user rights (SELINUX issue)
body: <p>I have an issue that is most probably a user rights issue.</p>
  
  <p>I have a php script that connects using PDO to a sphinx db.</p>
  
  <pre><code>$sp = new PDO('mysql:host=127.0.0.1;port=9306;dname=', '', '');
  </code></pre>
  
  <p>When I run it from terminal using root account it works fine. But,
  when I attempt to run it through browser as user apache I get the following error:</p>
  
  <pre><code>[Thu Mar 20 11:22:51 2014] [error] [client 98.12.26.274] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)' in /var/www/html/surveys/test.php:3\nStack trace:\n#0 /var/www/html/surveys/test.php(3): PDO-&gt;__construct('mysql:host=127....', '', '')\n#1 {main}\n  thrown in /var/www/html/surveys/test.php on line 3
  </code></pre>
  
  <p>There has to be something that is missing the propoer user rights but I have no clue what files I need to give rights to for this to work.</p>
  
  <p>UPDATE:
  I realized that selinux was blocking the port. How do I enable that port for apache using selinux?</p>