Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8530101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:10:59+00:00 2026-06-11T09:10:59+00:00

I’m stuck here, in wamp I run everything and works fine, however, when I

  • 0

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.

I dont know what else to do!

Even the say/hello example fails…

Is there any specification of the apache requirements to handle restler?

Any ideas?, it is kind of urgent

say.php:

<?php
class Say {
    function hello($to='world') {
        return "Hello $to!";
    }
}

index.php

<?php
    require_once 'restler/restler.php';
    require_once 'say.php';

    $r = new Restler();
    $r->addAPIClass('Say');

    $r->setSupportedFormats('jsonpformat', 'jsonformat', 'xmlformat', 'yamlformat');
    $r->handle();

.htaccess

DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule mod_php5.c>
    php_flag display_errors On
</IfModule>

error:

Not Found
The requested URL /mylocation/say/hello was not found on this server.

Thats basically all my code, if you guys think that jsonpformat might be steping in my way I could paste that code here.

When I type the url like this: http://myhost/mylocation/ I get a json error:

{
  "error": {
    "code": 404,
    "message": "Not Found"
  }
}

If I type http://myhost/mylocation/say/hello then I get the not found error, its like .htaccess isn’t working.

[EDIT]

It seems to work if I add “index.php” to the url like this: http://myhost/mylocation/index.php/say/hello, but I can’t leave it like this…

I got this from: Restler returns 404 status code if index.php is not included in URL

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:11:00+00:00Added an answer on June 11, 2026 at 9:11 am

    Ok, I found the problem, thanks everyone for your help.

    The solution was to set the AllowOverride variable of the httpd.conf file to All instead of None. As soon as I tried that it worked 🙂

    Besides the mod_rewrite of apache, I didn’t find another requirement to run restler, if I do, I’ll edit this and put it here.

    I found that this is a common issue with restler and it might be good to mention it in the documentation, hope this can help you.

    PD: I must say that is very annoying to be voted down while editing my question when it didn’t even passed a minute since I posted it, however I did as fast as I could. You might say “why did yout posted it then?” Because of the restler requirements part, it doesn’t require much detail to answer that…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an XML file, the creators of it stuck in a bunch social
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I used javascript for loading a picture on my website depending on which small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.