Interestingly enough, I copied and pasted your sample into my own test.lc file and it works fine.
The only difference between lc server for linux vs the version for osx is that they were built for each os. The underlying functionality is identical.
If you wish to test your copy to make sure it is working you can do something simple. Place a copy of your index.lc file in cgi-bin next to the livecode-server executable. Then switch to the cgi-bin directory (the one in MAMP) and execute the following line.
./livecode-server index.lc
It should output (line breaks may differ)
<html><head><title>Test</title></head>
<body>
Hello.<br>
<center>This should be seen.</center>
</body>
</html>
IF not you will probably see some type of error that might give a clue. Since it is merely a unix type command line executable it should run fine from a terminal shell and take a filename as input.
Also, while i'm sure this is not the case, you are hitting
http://localhost not just hitting the file itself directly right?
As for osx installed apache, and MAMP apache, the only real difference is that the setup files are in different locations. In fact on my system they are in SEVERAL locations.
/etc/httpd
since I have MAMP now, /Applications/MAMP/conf/apache
also one in /Applications/MAMP PRO..../MAMP PRO.app/Contesnts/Resources/
/Library/Server/Migrated/private/etc/apache2/httpd.conf
/Library/Server/Migrated/private/etc/apache2/original/httpd.conf
/Library/Server/Web/Config/Apache2 -- this is the one used for mountain lion server
/private/etc/apache2/httpd.conf
/private/etc/apache2/original/httpd.conf
Now, some of those are links to each other, but for lion server I used the files on /Library/Server/Web/Config/Apache2 . And the file in question for lion server is NOT httpd.conf. (things are set up different) For MAMP I used /Applications/MAMP/conf/apache/httpd.conf
I don't know anything about MAMP pro, its possible that something done with it has overridden the location the conf is read from. If thats the case you might look at the one in the app package as well as read up on mamp pro. I was going to test with the mamp pro stuff to see if I could get it working that way but the fresh download that isn't supposed to expire yet, seems to think that it is.
The 2 most likely things that could cause your issue are a) the permissions on the executable and its folders are wrong (but there should be some type of error in that case) or b) the file being edited is wrong. (or possibly the servers are not being properly shutdown and restarted between configuration file edits)
Also noticed that the mamp control panel itself lets you specify the port so you hopefully don't have to edit the listen directive of the conf file directly. Just tell mamp which ports you want before startup.
kavemaniac wrote:Interesting the slight changes from the previous instructions. Am having same results, however. Have dispensed with MAMP Pro for now and am just utilizing MAMP. I am getting no entries in error_log file for what follows.
Code (file=index.lc):
Code: Select all
<html><head><title>Test</title></head>
<body>
Hello.<br>
<?lc
put "<center>This should be seen.</center>"
?>
</body>
</html>
Results:
Hello.
This should be seen." ?>
If I do a show source I am shown the code as above. If I remove the <center> tags the result is merely the 'Hello.' line. So that would indicate to me that something is happening somewhere in there, just not the right stuff.
Am interested in the distinction between Linux and OS X LiveCode Server. Does it make a difference when installing the OS X version of it whether you're installing it for the OS X installed Apache versus the MAMP version of Apache?
Is there a command line call that I can make in terminal to determine that LiveCode Server is actually working? Is there an error_log file somewhere for LiveCode Server?
Thank you very much for your help on this.
Kevin