Setting up a Debian box for development: making a LAMP: php5

Now P for PHP 5:   # apt-get install php5 php-pear php5-suhosin   # nano /etc/php5/apache2/php.ini   max_execution_time = 30 memory_limit = 64M error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR display_errors = Off log_errors = On error_log = /var/log/php.log register_globals = Off   Add mysql support. # apt-get install php5-mysql      

PHP 5: Mass Virtual Hosting points $_SERVER[‘DOCUMENT_ROOT’] to wrong folder

When I set up mass virtual hosting for my servers, it seems PHP won’t get the right $_SERVER[‘DOCUMENT_ROOT’] Here’s the solution I found: 1.Edit your php.ini (the file location depends onĀ  how you have PHP setup) 2. Edit this section ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file auto_prepend_file… Continue reading