Hi Ralf

Thanks for your reply Ralf.

Based on your comments I tried a number of tests.


I tried an .lc  file with no calls to RevIgniter.

/home/myapp/sites/api.myapp.com/mylctest.lc

I get the same error as when my application calls the api using RevIgniter. So 
that means it is an issue with the server not RevIgniter.

lscgid: execve():/home/myapp/sites/api.myapp.com/cgi-bin/livecode-server: No 
such file or directory


To see if I could access a file in the directory I then created a plain html 
page and put it in the same cgi-bin directory as the livecode-server file

/home/myapp/sites/api.myapp.com/cgi-bin/mytest.html

that gave an error

lscgid: 
execve():/home/videolinkwell/sites/api.videolinkwell.ca/cgi-bin/mytest.html: 
Permission denied

I then tried the two tests on my existing server that I am migrating my site 
from.  Both the mylctest.lc file in the top level of the api.mysite.com and 
plain mytest.htmlfile in the cgi-bin folder loaded as without error.   So I 
have something wrong in the set up of the cgi-bin folder of the new server I am 
migrating my site to.

I then tried a couple of other things.

I copied the .htaccess from my old site and that had no effect.

I then looked at the permissions of all the files.
myapp.com 0750
        cgi-bin 755
                livecode-server 0755
                drivers 0755
                        dbmysql.so 0644
                        (and other drivers…) 0644
                externals 0755
                        revdb.so 0644
                        (and other drivers…) 0644
                        
This is the same as my existing server except for the myapp.com directory which 
is 0750.  On the existing server it is 0755 so I changed it and tried again and 
I got the same errors.
It seems like a permissions/access issue but I am not sure what else could 
control that. I am sure it is something simple Any ideas?

Thanks again

Martin



> On Feb 18, 2020, at 1:56 PM, Ralf Bitter via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi Martin,
> 
> don’t know if the issue is somehow related
> to the new server environment as I am not
> familiar with LiteSpeed Web Server. The
> permissions (644) for the files in drivers and externals
> should be OK (just check that the permissions
> for these folders are set to 755).
> Did you try to load a simple lc file without 
> revIgniter being involved?
> 
> 
> Ralf
> 
> 
>> On 10. Feb 2020, at 19:18, Martin Koob via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I use LiveCode Server for a REST api for a LiveCode application and I am 
>> migrating an installation of the api to a new server with a new domain.
>> The API uses Ralf Bitter's wonderful Revigniter framework. 
>> https://revigniter.com <https://revigniter.com/> <https://revigniter.com/ 
>> <https://revigniter.com/>>
>> 
>> To to the transfer the site I copied all the files to the new server.
>> 
>> Then I changed all references to the domain the new domain in the API and 
>> the App.
>> 
>> When I tried to call the API from the App I got 'HTTP response code 500 
>> returned from server’ but with a different error message
>> lscgid: execve():/home/myapp/sites/api.myapp.com/cgi-bin/livecode-server: 
>> <http://api.myapp.com/cgi-bin/livecode-server:> Permission denied
>> 
>> I looked at the livecode-server executable in the path above and it had 
>> permissions set at 644. So I set the executable bit for all so permissions 
>> for livecode-server were 755. (The files in Drivers and External directories 
>> are still 644. Should they be changed to 755 too?)
>> 
>> Now I still get 'HTTP response code 500 returned from server’ but with a 
>> different error message:
>> - lscgid: execve():/home/mysite/sites/api.myapp.com/cgi-bin/livecode-server: 
>> <http://api.myapp.com/cgi-bin/livecode-server:> No such file or directory
>> 
>> The API is using a REST approach.  
>> 
>> An example of how the App uses the api is to get LC Server to return a list 
>> of projects it is posting the session id as authentication to the URL 
>> https://api.myapp.com/myapp_db/listProjects 
>> <https://api.myapp.com/myapp_db/listProjects>
>> 
>> Using RevIgniter command rigFetchSegment(n) The API takes the first segment 
>> of the url ‘myapp_db’ as the name of the database and the the second segment 
>> of the URL 'listProjects' is the command being called in the API.
>> 
>> From the error being called it appears that the server is actually taking 
>> the path https://api.example.com/myappDB/listProjectsliterally 
>> <https://api.example.com/myappDB/listProjectsliterally>, i.e. looks for that 
>> directory which does not exist and returns the error.
>> 
>> So since I copied the site to the new server I think I may have not have 
>> copied a config file correctly or there is a server setting I need to change 
>> so the REST URLs are dealt with correctly.
>> 
>> Does anyone have any ideas of how to resolve this?
>> 
>> Thanks in advance.
>> 
>> Martin Koob
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to