OK, so recently I decided to upgrade my server. I downloaded apache 2.4.7 "httpd-2.4.7-win32-VC11.zip" and extracted all the files, configured them for my use and
I am not sure what solved it. But this is all I DID
-Did a fresh install of win 7 64 bits from scratch
-Installed Visual Redistributed x86 and x64
-Installed Apache 2.4.7 and php 5.5.5
-made sure to save php file with .php ending and saved it in ANSI or UTF-8 Encoding ..not unicode (I think this was the problem ... :D stupid me )
And voilà ...its working
When you say that you can see the code, you mean the browser prompts you to download the .php file right? Or does it display it onscreen? If its prompting to download the file, usually that means there's an Apache Handler issue. Try moving your AddType
rule in between the mime_module
conditional tags
<IfModule mime_module>
TypesConfig conf/mime.types
# comment lines not shown
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
</IfModule>
Make sur you have full PHP tags.
or set in your php configuration file, short_open_tag = On
libphp7.so
file /etc/httpd/modules
httpd.conf
file and paste this
LoadModule php7_module modules/libphp7.so
From what I understand, the default new config for apache 2.4 doesn't include PHP module. Make sure you add
LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
to your httpd.conf. I also had to manually re-enable a lot of modules that were commented out by default in the new default config.
Also make sure to prevent threaded MPM as PHP does not like it (http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2).
To use previous MPM config change http.conf to
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_event_module modules/mod_mpm_event.so