keefe007 Posted November 21, 2007 Share Posted November 21, 2007 I moved a new site to my server that uses the php virtual() function. I'm running apache2 and php5 on this server. For some reason none of the virtual() calls are working. Here's the error from a sample call: Warning: virtual() [function.virtual]: Unable to include '/virtual/include/header/'' - request execution failed in /home/haymasters/domains/domain.com/public_html/index2.php on line 6 I've narrowed the problem down to this: <?php virtual("/test/"); ?> - doesn't work <?php virtual("/test/index.html"); ?> - works fine I have another server running Apache 1.3 and PHP 4.x and both of these work fine on that server. Why isn't apache2/php5 able to fine the index file and include it? Thanks! Quote Link to comment Share on other sites More sharing options...
keefe007 Posted November 21, 2007 Author Share Posted November 21, 2007 I've actually narrowed this down a bit more. I think its an apache2 issue now. <!--#include virtual="/test/"--> - doesn't work <!--#include virtual="/test/index.html"--> - works fine any ideas? Quote Link to comment Share on other sites More sharing options...
redarrow Posted November 21, 2007 Share Posted November 21, 2007 have you read this page mate http://uk3.php.net/function.virtual Quote Link to comment Share on other sites More sharing options...
keefe007 Posted November 21, 2007 Author Share Posted November 21, 2007 I did, however, I didn't see anything there to solve the problem. Quote Link to comment Share on other sites More sharing options...
DyslexicDog Posted November 21, 2007 Share Posted November 21, 2007 Virtual is like include() or require(). I think you need to supply a specific file not an entire directory. Quote Link to comment Share on other sites More sharing options...
keefe007 Posted November 22, 2007 Author Share Posted November 22, 2007 Virtual sends the request to apache just like #include virtual in HTML. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.