Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am assuming that you have set up slim to run the php application that receives the javascript calls from backbone.js?</p> <p>Reference - <a href="https://github.com/ccoenraets/backbone-directory/blob/master/api/index.php" rel="nofollow">https://github.com/ccoenraets/backbone-directory/blob/master/api/index.php</a></p> <p>The API directory contains a file named <code>index.php</code>. For the php slim framework (http://www.slimframework.com/) in this application, it should contain your database IP, username and password.</p> <p>Lines 148 onwards in the <code>index.php</code> file.</p> <pre><code>function getConnection() { $dbhost="127.0.0.1"; $dbuser="root"; $dbpass=""; $dbname="directory"; $dbh = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass); $dbh-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $dbh; } </code></pre> <p>Your server location - 98.214.131.200 - does not matter if you have set this php application on that server itself. <code>127.0.0.1</code> refers to the server localhost itself.</p> <p>What you need to configure is the <code>$dbuser</code> and <code>$dbpass</code> (your <code>$dbname</code> is obviously correct since you mentioned that that's the MySQL db you created by running the provided sql script) which corresponds to the MySQL database you have set up for this demo app.</p> <p>If you are using <code>apache</code> to run slim, make sure <code>mod_rewrite</code> is enabled and configure your apache virtualhost to be something like:-</p> <pre><code>&lt;Directory "C:\Path\To\Your\slimphp"&gt; Allow From All AllowOverride All &lt;/Directory&gt; &lt;VirtualHost *:80&gt; ServerName "slim.php" DocumentRoot "C:\Path\To\Your\slimphp" &lt;/VirtualHost&gt; </code></pre> <p>Ah, if using IIS as @vicvicvic has pointed out, use ModRewrite - <a href="http://www.micronovae.com/ModRewrite/ModRewrite.html" rel="nofollow">http://www.micronovae.com/ModRewrite/ModRewrite.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload