Running php scripts on apache in your Ubuntu desktop won’t be sweat at first. You might notice that php scripts start downloading when you start accessing them via browser. This is mainly because of small configuration issues that we can find on machine. If you have enabled userdir module (http://localhost/~yourusername), it contains a line to disable php values as follows in /etc/apache2/mods-enabled/php5.conf :
php_admin_value engine Off
All that you have to do is to disable the above line and restart apache to get php working.
Editing /etc/php.ini, or enabling few options via LxAdmin might not get work in LxAdmin servers. I faced this problem while trying to enable error logging. Whlie I was digging for the reasons, I found that each domain is provided with a separate php.ini under /home/httpd/domainname.com folder (replace domainname.com with domain’s name). php.ini found under this file needs to be edited in order to make the changes required for error logging etc.
If you use phpinfo() in a test php file, you can see that /home/user/__processed_stats/domainame.com.phplog file is quoted as the php error_log file. If you;re using suphp, ensure that this file is owned by the account user. If you use mod_php you might have to change this to apache.apache or permissions should be given for others to write into this file.
I wanted to change the log_error value for all accounts on the server. I accomplished the task by writing the following one liner.
for i in `find /home/httpd -name php.ini`; do replace “log_errors = off” “log_errors = on” — $i; done
I had dedicated few days of past few weeks for Debian in search of stable, secure and reliable solutions. With Debian, I ended up finding robust solutions for lots of questions which we had while setting up LAN resources.
Debian net install CD which weighed around 160MB was more than enough to get started. I could setup RAID1 for disks to ensure quick and easy data recovery incase of disk failures. Installed Apache, PHP, Mysql for Intranet, NIS for centralized network authentication, NFS for network mounts and centralized home directories for users, Quota to ensure we don’t run out of disk space etc. It was fast and yet stable. I could find the solutions for various issues which I faced during the installation very quickly (there were very few issues though). Extensive documentation found on the internet made it easy for me and my collegues to get on with complex configurations. We could easily integrate debian into our heterogenious OS environment and network.
I will be adding articles related to Debian to my blog in coming days. That should make it much more easier for you all to find solutions for your questions. Do comment and let me know if you have any unanswered questions with debian. I would be happy to dig deep into those issues and update you.