I am running php on apache. I have setup multiple virtual-hosts on apache and managed to get php scripts working on a test website, but I am having trouble getting apache files to run on all my virtual hosts.
In my php.ini file at the bottom I have added
doc_root = "c:\test"
extension_dir = "C:\php\ext"
extension=php_mysqli.dll.
So when I go to http://lc.test.com/, it successfully runs my php test script in the browser.
However... when I go to my other virtualhost site http://lc.informativesolutions.com/, it actually runs the same script from c:\test, when my index.php file in the informativesolutions directory is a completley different file. Is that normal?
Anyway I want to set up php for all my sites so do I add doc_root and extension dir per virtual host like this:
doc_root = "c:\test"
extension_dir = "C:\php\ext"
extension=php_mysqli.dll.
doc_root = "c:\apple"
extension_dir = "C:\php\ext"
extension=php_mysqli.dll.
doc_root = "c:\tango"
extension_dir = "C:\php\ext"
extension=php_mysqli.dll.
Or do I need to specifiy the name of the virtualhost along with it? Or put php access to virtual hosts somewhere else?
Also in my apache's httpd.conf file I have:
DocumentRoot "C:/test"
<Directory "C:/test">
and Include conf\virtual-hosts.conf where I have setup my virtual hosts.
I am not sure if the docroot and dir entries in the httpd conf is why it isnt working, same as in the php file I am not sure if I should add more entries for each host or if there should only be one.
when viewing normal html files, each virtualhost site displays the correct files for that individual website so I am positive that my virtualhosts directory setup is correct and different for each virtualhost. It is only when viewing php file that it seems to leap from my virtualhost to the test directory.