apache - php doc_root in php.ini and DocumentRoot in httpd.conf -


i wanted learn more php , apache decided install them manually. don't understand how 2 files work (or if go hand in hand in situation). whenever load localhost webpage, location of php files directed specify in httpd.conf file. i've made 2 root folders sake of testing, c:/users/alex/test , c:\users\alex\my websites. apache not use location specified in php.ini (doc_root = "c:\users\alex\my websites"), instead uses location specified in httpd.conf (documentroot "c:/users/alex/test" ). can please explain when root useful in php.ini?

most you're running mod_php inside of apache (this common way run php under apache). means php environment controlled entirely apache (in unix environments apache has own user well). can reconfigure use fast cgi (which way run php under other web servers nginx) , setting matter under type of setup.

here's manual entry setting

php's "root directory" on server. used if non-empty. if php configured safe mode, no files outside directory served. if php not compiled force_redirect, should set doc_root if running php cgi under web server (other iis). alternative use cgi.force_redirect configuration below.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -