User Tools

Site Tools


eg-259:practicals:3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:practicals:3 [2012/03/14 10:25] – [Configure deploy.sh for Linux/Unix] eechriseg-259:practicals:3 [2012/03/14 10:34] (current) – [Trouble Shooting] eechris
Line 75: Line 75:
 ===== Trouble Shooting ===== ===== Trouble Shooting =====
  
-If any of the demos fails, the most likely reason will be file permissions. Check that the resource ''$SERVER_ROOT/cgi-bin/echo_params.cgi'' is executable by the web server and also that the "hash-bang" line is correctly set to the full path of your installed Perl interpreter. The example PHP scripts with ''beer.php'' and ''echo_params.php'' need only to be readable by the web server.+If any of the demos fails, the most likely reason will be file permissions. Check that the resource ''$CGI_BIN/echo_params.cgi'' is executable by the web server and also that the "hash-bang" line is correctly set to the full path of your installed Perl interpreter. The example PHP scripts with ''beer.php'' and ''echo_params.php'' need only to be readable by the web server.
  
-If these tips don't help, it would be worth noting the error message returned by the web server and looking into the server error log ''$SERVER_ROOT/apache/logs/error_log'' for a hint about what might be wrong.+Another possible problem, especially on Unix-based operating systems (Linux/Mac) may be due to line endings. Ubuntu provides a package that provides tools to correct this: 
 +<cli> 
 +$ sudo apt-get install tofrodos 
 +$ cd /usr/bin 
 +$ sudo ln -s fromdos dos2unix 
 +$ sudo ln -s todos unix2dos 
 +</cli> 
 + 
 +Then change the line endings of the cgi-script: 
 +<cli> 
 +$ cd $CGI_BIN/cgi-bin 
 +$ sudo dos2unix echo_params.cgi 
 +</cli> 
 + 
 +If these tips don't help, it would be worth noting the error message returned by the web server and looking into the server error log ''sudo tail /var/log/apache2/error.log'' for a hint about what might be wrong.
  
 ===== References ===== ===== References =====
eg-259/practicals/3.1331720704.txt.gz · Last modified: 2012/03/14 10:25 by eechris