sudo apt-get install vim #vim for terminal editing
sudo apt-get install apache2 #apache
Following change required to run perl script using apache
sudo vi /etc/apache2/sites-enabled/000-default.conf
<Files ~ "\.(pl|cgi)$">
SetHandler perl-script
PerlResponseHandler ModPerl::PerlRun
Options +ExecCGI
PerlSendHeader On
</Files>
sudo vi /etc/apache2/apache2.conf
<Directory /var/www/cgi-bin/>
AddHandler cgi-script .cgi .pl
Options FollowSymLinks ExecCGI
AllowOverride None
</Directory>
sudo apt-get install mysql-server
set password when prompted
mysql -u root -p
enter password and start working!
sudo apt-get install php
sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} && sudo apt-get install libapache2-mod-php -y
sudo aptitude install libapache2-mod-perl2
sudo apt-get install libdbi-perl
sudo apt-get install libdbd-mysql-perl
- restart the server
sudo apache2ctl restart
- write pl, cgi scripts in /var/www/html
- change permission 755
- run in browser at port 8080 (default) by entering file name
Use below code in php to show php errors in browser
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Reference
@naveenrajm7