I've installed Apache and PHP many times and haven't had a problem getting t both working in the past, but now I'm confused, because I'm trying to set up Apache and PHP on a new machine, but when I try to load a PHP page in a web browser, Apache just sends the PHP file's text rather than actually executin the PHP page.
Hi all -
I've installed Apache and PHP many times and haven't had a problem getting t both working in the past, but now I'm confused, because I'm trying to set up Apache and PHP on a new machine, but when I try to load a PHP page in a web browser, Apache just sends the PHP file's text rather than actually executin the PHP page.
It's a Windows XP setup (32-bit), and I'm trying to set up Apache 2.2.17 and PHP 5.3.6. I've tried manually setting up PHP with the .zip file, but no lu I also tried installing PHP via the .msi installer, selecting the Apache 2.2 module option, but no luck there either. I've also tried copying the Apache and PHP .ini files from a working setup, but still no luck with that either.
I've also tried un-installing both Apache and PHP, deleting their directorie and installed both from scratch, but even that didn't work.
What might I be missing? I've done this on Windows many times before, and normally I can just install Apache, install PHP with the Apache 2.2 module option, and it just works.. I'm confused.
Nightfox
You should tell Apache what to load. My example shows
<IfModule dir_module>
#DirectoryIndex index.html
# XAMPP
DirectoryIndex index.html index.html.var index.php home.php index.php3 index.php4 index.ti index.shtml index.cfm
</IfModule>
Nightfox, you shlould see if in the apache.conf file exists the proper confi sentence.
You should see something like this:
"LoadModule php4_module C:phpsapiphp4apache2.dll
AddType application/x-httpd-php .php"
Re: Apache PHP not working
By: Lord_Zoo to Nightfox on Mon Mar 28 2011 09:22:50
Nightfox, you shlould see if in the apache.conf file exists the proper co sentence.
You should see something like this:
"LoadModule php4_module C:phpsapiphp4apache2.dll
AddType application/x-httpd-php .php"
Shouldn't the PHP installer set up all it needs in the Apache config file? know it adds files at the end to tell Apache to load the PHP DLL..
Nightfox
Re: Apache PHP not working
By: Nightfox to All on Sun Mar 27 2011 23:00:10
I somehow got past my first issue but am having another issue with PHP. It doesn't recognize the mysql or mysqli functions, even though I do have those PHP extensions installed and enabled. I've checked my Apache config for the correct PHP path, and it looks right, and my PHP ini file looks to have the mysql and mysqli extensions set up correctly. I'm not sure what the issue might be.
Have you confirmed the extentions are loaded by echo'ing out php_info() ?
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 93 |
Nodes: | 16 (0 / 16) |
Uptime: | 04:12:34 |
Calls: | 5,156 |
Calls today: | 1 |
Files: | 8,491 |
Messages: | 352,737 |