Note that there are some explanatory texts on larger screens.

plurals
  1. POSlim PHP Framework causing 'Fail to open page'
    text
    copied!<p>I have set up a REST API using the Slim PHP framework, which works perfectly when using requests i.e <a href="http://mysite.com/class/id" rel="nofollow">http://mysite.com/class/id</a>. </p> <p>But when I navigate to <a href="http://mysite.com/" rel="nofollow">http://mysite.com/</a>, I get the following error in Safari: </p> <blockquote> <p>Safari can’t open the page “http://mysite.com/”.</p> <p>The error is: “cannot decode raw data” (NSURLErrorDomain:-1015)</p> <p>Please choose Safari &gt; Report Bugs to Apple, note the error number, and describe what you did before you saw this message.</p> </blockquote> <p>Please can you tell me where I am going wrong?</p> <pre><code>include_once('config.php'); require 'Slim/Slim.php'; $app = new Slim(); $app-&gt;post('/user/create', 'create_user'); $app-&gt;get('/user/:id', 'info_user'); $app-&gt;post('/user/:id', 'update_user'); $app-&gt;delete('/user/:id', 'delete_user'); $app-&gt;post('/user/validate', 'validate_user'); $app-&gt;get('/user/:id/venues', 'venues_user'); $app-&gt;get('/user/:id/queues', 'queues_user'); $app-&gt;post('/venue', 'create_venue'); $app-&gt;post('/venue/:id', 'update_venue'); $app-&gt;delete('/venue/:id', 'delete_venue'); $app-&gt;get('/venue/:id', 'info_venue'); $app-&gt;get('/venue/:id/queues', 'queues_venue'); $app-&gt;post('/queue', 'create_queue'); $app-&gt;post('/queue/:id', 'update_queue'); $app-&gt;delete('/queue/:id', 'delete_queue'); $app-&gt;get('/queue/:id', 'info_queue'); $app-&gt;run(); </code></pre>
 

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