Search code examples
phpapachelamp

php virtual function causes blank page


the following code produces a blank page, and no error in the error logs:

<?php virtual('/inc/doctype.html'); ?>

I have checked that the file exists and is reachable.


Solution

  • If I recall, this is what I ended up doing to fix it:

    I have done this plenty of times before, I must have just overlooked it this time. I had to make two changes to my apache2 site configuration file and run "a2enmod include" and I think that was it.

    Config changes

    Includes added to Options directive and addoutputfilter for includes in php file, as seen below.

    <VirtualHost *:80>
        *** Irrelivent elements removed ***
      <Directory /usr/local/www/e/eisenhowerimaging/www/public>
        Options Indexes FollowSymLinks MultiViews Includes
        *** Irrelivent elements removed ***
        AddOutputFilter INCLUDES .php
      </Directory>
        *** Irrelivent elements removed ***
    </VirtualHost>