configure php & apache on windows
Moderator: General Moderators
configure php & apache on windows
Hi, I'm new to php. I running php on windows and using apache as web server. In php.ini, I set my doc_root = myPhp. I can view the phpinfo.php if the phpinfo file is place in myPhp folder. However, if I create subfolder, eg:admin in the myphp folder and I placed file phpinfo.php in the admin folder, when I try to view the phpinfo using web browser http://localhost/admin/phpinfo.php, I get an error the page cannot be found. Why I cannot browse my file in the subfolder of the root folder. Anyone can please help. Thanks
Ok, it sounds like the problem is in your httpd.conf. If I understand you correctly, Apache is not using the PHP module to parse files outside the root document directory. What this might mean is that you have put your loadmodule statements inside the <directory ...> xml tag for the root folder. Open up your apache.conf and find the lines that look like:You should have put these in the file when you installed PHP. Make sure that they are not inside any tag that looks like And let me know if this helped.
Code: Select all
LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php .phtmlCode: Select all
<directory ...>
...
</directory>