Running php file asks for download instead of executing in apache 2.5? -
i have windows7 64bit, tried run php , ie browser asking me download file instead of executing it. told me download apache, downoaded wamp2.5-32bit version, installed well, , chose firefox default wamp. still when double click php files in www directory of wamp, firefox asks me download instead of running it.
i have tried adding these lines in httpd.conf no change;
loadmodule php5_module "c:/wamp/bin/php/php5.5.12/php5apache2_4.dll" #phpinidir c:/wamp/bin/php/php5.5.12 addtype application/x-httpd-php .php addtype application/x-httpd-php-source .phps addtype text/html .php loadmodule php5_module modules/mod_php55.so
this wamp option seems tag of war, going around editting notepad files , lots of hours gone. there option?
matt,
if through httpd.conf
find of lines have added exist in there proper place already.
assuming have done other changes have forgotten or not mentioned suggest uninstall wampserver (using standard windows uninstall mechanism )
then manually delete c:\wamp
files have edited not removed uninstall.
now reinstall wampserver.
once have fresh install , wampserver's wampmanager icon green enter in browser.
http://localhost
if see wampserver homepage php working, page written in php.
now double clicking
filename in \wamp\www
folder, assume mean using explorer
, double clicking filename! dont that launch file in browser not run file through apache. method ok if have html & javascript page, not compile , run php script.
to php script run must run page through apache can spot <?php
tag. apache knows pass script through php can interpreted , executed.
so make happen enter url browsers address bar launch stackoverflow page :-
localhost/project1/text.php
Comments
Post a Comment