Restler Autoloader Error

30 views
Skip to first unread message

Jonathan Lam

unread,
May 13, 2015, 10:16:24 AM5/13/15
to emer...@googlegroups.com
Hello, we are facing a small problem when trying to retrieve the data from restler, data is returned but the following WARNING messages are return too. We tried to stop displaying those messages by using our .htaccess file, it does not work, but when we tried the same .htaccess file from another machine where Emerginov platform is not hosted, we did not get that error.
Can you please help us in removing these WARNING messages.
Thanks

Access the API + Errors
















Our .htaccess file:

Options -MultiViews
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 Off
</IfModule>

Arnaud MORIN

unread,
May 14, 2015, 11:46:36 AM5/14/15
to jlkc1992, emer...@googlegroups.com

Hi,
Did you try to set "php_flag display_errors Off" out of the ifmodule statement? We do not use the module mod_php5. We use the fastcgi mechanism.

If this does not work either, you can also try to set display errors to off directly in the php.ini file located in /var/www/projects-conf/prototype/php_conf/php.ini.

Let us know the result.

Cheers,
Arnaud

Nundran Kevin

unread,
May 15, 2015, 7:04:59 AM5/15/15
to emer...@googlegroups.com
Hello, we were able to overcome the problem, the API is now working as it should be; we are able to request data from the server by using the Emerginov platform (projects.emerginov.utm.mu/prototype/rest/public/gsa/point/findpoints?api_key={APIKEY}).
The problem was the RESTler version which was old, so we've changed it to the latest one. Below are the configurations we had to make:

1. Download the latest RESTler
2. Import the API to the "public" folder
    -When we tried to access the API, we encountered the following problem: Fatal Error: Allowed memory size of ....... bytes exhausted.........
    -We solved the problem by inserting the following line: ini_set("memory_limit", "5120M"); in vendor/Luracast/Routes.php
3. When testing the API, we got another error which concerned the AccessControl, so we've inserted the following codes:
    public function __getWWWAuthenticateString(){
          return 1;
    }
4. Test the API, and everything is working

Thank you very much for your kind consideration, and help :)

Morgan Richomme

unread,
May 16, 2015, 7:22:02 AM5/16/15
to Nundran Kevin, emer...@googlegroups.com, con...@breizhinnov.fr

Cool
Well done!
next step,  put the API behind the nursery. ... then commit to trunk:)

Morgan

Reply all
Reply to author
Forward
0 new messages