Restler icon indicating copy to clipboard operation
Restler copied to clipboard

Restler 3.0.0rc3 on Godaddy Shared Hosting

Open swbullis opened this issue 13 years ago • 3 comments

I'm not sure where to place this but am posting it here so that you may find a home for it.

In order to get Restler 3.0.0rc3 working on Godaddy Hosting, you must first (Change to php 5.3 from the hosting control panel takes 7 - 10 minutes) then modify the .htaccess to

Options -MultiViews +ExecCGI
DirectoryIndex index.php

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

Adding the +EexecCGI Flag on the first line as Well as a Rewrite Base (Based on the url) Example api.example.com/ would be / but api.example.com/content/ would be /content/

And then finally modifying your php5.ini to include

cgi.fix_pathinfo = 1

And thats should do it. Hope this helps someone

swbullis avatar Dec 20 '12 05:12 swbullis

@swbullis thanks for contributing to Restler 3 :+1: to continue that spirit let me share my experience as well!

The shared hosting I tried it on defaults to PHP 5.2 and requires us to add

AddHandler application/x-httpd-php53 .php

to .htaccess file

And did not have any direct option to change that in the control panel

Since I had so many apis hosted as individual examples I wanted to avoid changing many .htaccess files and maintain them

I resolved it by setting the apache hander as shown below in the control panel

Screen Shot 2013-01-04 at 11 12 07 AM

Arul- avatar Jan 04 '13 03:01 Arul-

After rereading I see my instructions are a little fogged on how to change the php version. It can be done By going to the Hosting Control Panel. Scrolling down the Options and Settings screen to "Settings", and then opening Programming Languages from there you should be able to toggle what PHP Version you want. If 5.3 is not an options you may need to switch to 5.2 first.

Screenshot 1

swbullis avatar Jan 04 '13 07:01 swbullis

Added a Link back to here on the Wiki Page as well.

swbullis avatar Jan 04 '13 07:01 swbullis