LC Server returns 'lscgid: execve():/home/myapp/sites/api.myapp.com/cgi-bin/livecode-server: No such file or Directory

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Sun May 27, 2007 8:19 pm

LC Server returns 'lscgid: execve():/home/myapp/sites/api.myapp.com/cgi-bin/livecode-server: No such file or Directory

Post by Martin Koob » Sun Feb 09, 2020 6:58 pm

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

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: 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: 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

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/listProjects literally, 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

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 362
Joined: Tue Apr 10, 2012 9:18 am

Re: LC Server returns 'lscgid: execve():/home/myapp/sites/api.myapp.com/cgi-bin/livecode-server: No such file or Directo

Post by ghettocottage » Sun Feb 09, 2020 8:24 pm

did you:
chmod +x /home/myapp/sites/api.myapp.com/cgi-bin/livecode-server

Who is the new server with? Is it shared hosting or a VPS?

Post Reply

Return to “CGIs and the Server”