Note that there are some explanatory texts on larger screens.

plurals
  1. PORestler always returns not found
    primarykey
    data
    text
    <p>I'm stuck here, in wamp I run everything and works fine, however, when I tried to install my api in a centos box, I always get a "Not Found" error.</p> <p>I dont know what else to do!</p> <p>Even the say/hello example fails...</p> <p>Is there any specification of the apache requirements to handle restler?</p> <p>Any ideas?, it is kind of urgent</p> <p>say.php:</p> <pre><code>&lt;?php class Say { function hello($to='world') { return "Hello $to!"; } } </code></pre> <p>index.php</p> <pre><code>&lt;?php require_once 'restler/restler.php'; require_once 'say.php'; $r = new Restler(); $r-&gt;addAPIClass('Say'); $r-&gt;setSupportedFormats('jsonpformat', 'jsonformat', 'xmlformat', 'yamlformat'); $r-&gt;handle(); </code></pre> <p>.htaccess</p> <pre><code>DirectoryIndex index.php &lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteRule ^$ index.php [QSA,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L] &lt;/IfModule&gt; &lt;IfModule mod_php5.c&gt; php_flag display_errors On &lt;/IfModule&gt; </code></pre> <p>error:</p> <p><strong>Not Found</strong> The requested URL /mylocation/say/hello was not found on this server.</p> <p>Thats basically all my code, if you guys think that jsonpformat might be steping in my way I could paste that code here.</p> <p>When I type the url like this: <code>http://myhost/mylocation/</code> I get a json error:</p> <pre><code>{ "error": { "code": 404, "message": "Not Found" } } </code></pre> <p>If I type <code>http://myhost/mylocation/say/hello</code> then I get the <strong>not found</strong> error, its like .htaccess isn't working.</p> <p><strong>[EDIT]</strong></p> <p>It seems to work if I add "index.php" to the url like this: <code>http://myhost/mylocation/index.php/say/hello</code>, but I can't leave it like this...</p> <p>I got this from: <a href="https://stackoverflow.com/questions/8796479/restler-returns-404-status-code-if-index-php-is-not-included-in-url?rq=1">Restler returns 404 status code if index.php is not included in URL</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    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