PHP is not working on Apache 2 on Windows -


i have installed apache 2.4.9 windows 7 64 , php 5.5.10 (also 64 bit), used articles step step detailed manual installation. cannot open php files in browser reason. have checked other threads similar problems on different websites , made sure httpd.conf has necessary lines included or uncommented.

apache starts , stops after enter httpd -k start/stop. when enter httpd -t says 'syntax ok'. when enter localhost/phpinfo.php in address bar in browser 'not found on server'. when try in command line 'php phpinfo.php' 'could not open input file'.

i don't know else check, answers found in forum threads give same hints , include same elements of configuration file must included in httpd.conf, including root directory, engine = on, display errors = on, load module, addtype , used .

i appreciate or suggestions. if not - go through installation once again.

troubleshooting: check files stored in right directory (generally htdocs apache)

look line in apache config (httpd.conf) files:

# documentroot: directory out of serve documents. documentroot "d:/myproject/apache/htdocs" 

also check file permissions sure apache can access them. permissions should set apache or on computer.

here example of httpd.conf (this centos, summary , helps without being long) taken here: apache downloading php files instead of displaying them

#         # php html-embedded scripting language attempts make                                              # easy developers write dynamically generated webpages.                                                   # <ifmodule prefork.c>   loadmodule php5_module modules/libphp5.so </ifmodule> <ifmodule worker.c>   loadmodule php5_module modules/libphp5-zts.so </ifmodule>  # # cause php interpreter handle files .php extension. # addhandler php5-script .php addtype text/html .php  # # add index.php list of files served directory # indexes. # directoryindex index.php  # # uncomment following line allow php pretty-print .phps # files php source code: # #addtype application/x-httpd-php-source .phps 

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -