PHP on Linux (Ubuntu 11.04 – Natty Narwhal)

These are some of the codes that helped me getting started in using Apache server on Ubuntu 11.04 (Natty Narwhal) Finding out the user group <?php // outputs the username that owns the running php/httpd process // (on a system with the “whoami” executable in the path) echo exec(‘whoami’); ?> (often it is www-data ) source : http://php.net/manual/en/function.exec.php Check you have the permission. If not change the pormissions for the var/www folder on Linux (in …

Installing GD image manipulation capabilities in PHP on Ubuntu 11.04

I wanted to enable the image manipulation functions using Php. It was documented that the that GD library is included in Php versions 4.3 and above. I had PHP version 5.3.5 on my Ubuntu 11.04. I tested the GD support using the code: [php] < ?php echo "GD Info : “; var_dump(gd_info()); if (imagetypes() & …