I have been using phpdev on my Win XP system at home for a couple of years as a development system. But it is occasionaly a little "flakey" so I decided to try Xampp (1.5.1). I Installed it and it seems to work fine except one thing...I can't get my php includes to work. I get the following:
Warning: include() [function.include]: Failed opening '/includes/docHead.php' for inclusion (include_path='.;\xampp\php\pear\;\aaa') in E:\aaa\index.php on line 1
FYI: To match my existing system, after installing xampp I changed http.conf:
and php.ini (the one in apache/bin): include_path = ".;\xampp\php\pear\;\aaa"
This is how the includes look in my php files: <?php include ($DOCUMENT_ROOT."/includes/docHead.php"); ?>
I do of course have a \aaa\includes directory with all the include files in it. If I strip the preceeding "/" from the include, it works. But the preceeding slash is necessary because the include won't work on the production server (commercial web host) without it.
Please note that phpdev had no problem with the preceeding slash. I can't figure out why it is causing a problem under Xampp.
Anyone have any ideas about a solution...other than remove the preceeding slash from the include statement? I
Thank you Wiedmann. I changed the include statements on one page and ran a test on my PC under xampp and on the production server. Obviously it worked fine.
Funny thing though, the syntax I was using has worked fine on both the production server and on my PC under phpdev for 2 years or so. It's been so long I can't remember where I got that syntax from nor do I know why it works on both systems, but it does.