title: No way to make it work with Slim framework
body: <p>I have a raspberry with Apache2.</p>
  
  <p>In /var/www/ I have these files :</p>
  
  <pre><code>/myprojet
       /public_html
           index.php
           .htaccess
       /lib
           Slim
  </code></pre>
  
  <p>In index.php I have : </p>
  
  <pre><code>&lt;?php
  
  $app = new \Slim\Slim();
  
  $app-&gt;get('/alertes.json', 'getalertes');
  
  $app-&gt;run();
  
  function getalertes() {
      $sql = "select * FROM T_ALERT ORDER BY name";
      try {
          $db = getConnection();
          $stmt = $db-&gt;query($sql);  
          $alertes = $stmt-&gt;fetchAll(PDO::FETCH_OBJ);
          $db = null;
          echo '{"alerte": ' . json_encode($alertes) . '}';
      } catch(PDOException $e) {
          echo '{"error":{"text":'. $e-&gt;getMessage() .'}}'; 
      }
  }
  
  function getConnection() {
      $dbhost="127.0.0.1";
      $dbuser="root";
      $dbpass="root";
      $dbname="db";
      $dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);  
      $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      return $dbh;
  }
  
  ?&gt;
  </code></pre>
  
  <p>In .htaccess I have : </p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [QSA,L]
  </code></pre>
  
  <p>In /etc/apache2/sites-enabled/000-default I have : </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin webmaster@localhost
          DocumentRoot "/var/www/myproject/public_html"
  
          ErrorLog "/var/www/logs/error.log"
  
          &lt;Directory "/var/www/myproject/public_html"&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  Order allow,deny
                  Allow from all
          &lt;/Directory&gt;
  
          ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
          &lt;Directory "/usr/lib/cgi-bin"&gt;
                  AllowOverride None
                  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                  Order allow,deny
                  Allow from all
          &lt;/Directory&gt;
  
          # Possible values include: debug, info, notice, warn, error, crit,
          # alert, emerg.
          LogLevel debug
  
          CustomLog /var/www/logs/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>When I go on the url :</p>
  
  <pre><code>http://192.168.1.99/myproject/alertes.json
  </code></pre>
  
  <p>I've got nothing, a blank page.
  Did I miss something ?</p>
  
  <p>Thanks</p>