Syslog message from app running on my Mac Mini server:
[quote][Fri Jan 29 15:57:11.872796 2016] [cgi:error] [pid 37461] [client 127.0.0.1:61038] AH01215: Can’t use an undefined value as a symbol reference at /Library/Server/Web/Data/Sites/Default/bin-cgi/RVCWS2233/RVCWS2233.cgi line 118.: /Library/Server/Web/Data/Sites/Default/bin-cgi/RVCWS2233/RVCWS2233.cgi
[Fri Jan 29 15:57:11.873507 2016] [cgi:error] [pid 37461] [client 127.0.0.1:61038] End of script output before headers: RVCWS2233.cgi[/quote]
Line 118: print $sock $body;
This app is a web server app, which can add records or return a list of records from a MySQL DB.
The desktop app, which call the web app, receives the following error message:
[quote]
500 Internal Server Error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator at
admin@example.com to inform them of the time this error occurred,
and the actions you performed just before this error.
More information about this error may be available
in the server error log.
Apache Server at jimasmith.com Port 80
[/quote]
Running the web app in a debug mode it runs as expected, using the same DB.
I didn’t know if maybe the apache error log had more details or anything.
“Can’t use an undefined value as a symbol reference” in relation to print $sock might mean a MySQL connection error.
Yeah, 500 Internal Server Error is what I was getting when MySQL was inexplicably off while I was testing everything locally with my new toolkit (trying so hard not to make a plug because I’m switching servers right now and it’s embarrassing lol.)
Just started having this issue too. Works fine in the IDE but when deployed to Apache2, I get these 2 errors repeatedly (thousands) logged to /var/log/apache2/site-error.log
[Sat Jan 30 13:31:54.987127 2016] [cgi:error] [pid 14526] [client 10.10.0.82:64678] AH01215: Can’t use an undefined value as a symbol reference at /mnt/data/www/site/cgi-bin/app/app.cgi line 118., referer: https://site/cgi-bin/app/app.cgi
[Sat Jan 30 13:31:54.987269 2016] [cgi:error] [pid 14526] [client 10.10.0.82:64678] End of script output before headers: app.cgi, referer: https://site/cgi-bin/app/app.cgi
Line #118: print $sock $body;
No additional information in Apache’s error.log
I have
successfully connected to MySQL from the web server using the credentials app.cgi is configured to use (and pulled data from the DB)
zipped up the build files in a tar ball, used FileZilla (in Active mode) to copy the files to the server
verified permission and ownership of all files and directories
copied files/directories to the server using just FileZilla (in Active mode) – This is normally the method I use to update the files and haven’t had any issues in the past
I have a few other Xojo cgi apps running just fine on the same server. They also connect to the same MySQL server.
It’s not ActiveRecord. Have routine that uses Prepared Statements, (not using ActiveRecord), and it also has error.
I think it has something to do with MySQL user/password/location.
I have other app that use MySQL that are working ok. The difference is the app connecting to the DB. The one running on the server get an error. The ones not running on the server works ok.
I’m not using ActiveRecord. The app is successfully establishing a connection to the MySQL server as noted in the app’s log file. The app is rapidly respawning with the “undefined value” messages I noted above.
{"timestamp":1454189041,"num":0,"desc":"Database","msg":"Attempting to establish connection to SQL Server..."}
{"timestamp":1454189041,"num":0,"desc":"Database","msg":"Connection successful"}
[quote=244244:@Greg O’Lone]It sounds like the app is crashing. The “End of Script Output before headers” error means that the script didn’t get a response from the app itself.
I’d try putting some code in the App.UnhandledException event and write the stack and error info from the exception object with System.DebugLog.[/quote]
From the other topic https://forum.xojo.com/conversation/post/244244
I think the root problem is with my Apple Server, which run on a Mac Mini. There was a recent update to the Server software from Apple.
Problem:
Browser on the server can no longer connect to my site using using my url. As an example: “www.jimasmith.com/test.php” I have to use “localhost/test.php”