PHP on Local Host

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
I can't get Apache parse PHP on local host. When I run phpinfo() function, it shows up blank. I am using the automatic PHP installer 5.2, a MySQL server 5.x and Apache 2.2.10 on a Windows Vista 64 bit system, whats wrong? :dunno:
 

cursedpsp

New Member
Messages
237
Reaction score
0
Points
0
What installer did you use?

If i were you i would install WAMP or XAMPP

And also
You say you were using phpinfo(),
Are you echoing it? Because if you didnt have PHP installed it would be prompting you for a download.

Try
echo phpinfo()
 

Scoochi2

New Member
Messages
185
Reaction score
0
Points
0
Are you echoing it? Because if you didnt have PHP installed it would be prompting you for a download.

Try
echo phpinfo()
Actually...
If you are echoing it, DON'T.
To run phpinfo:
PHP:
<?php
phpinfo();
?>
If you get a blank page, I think PHP is working, but you're doing something wrong. If it wasn't working, you would see the PHP code outputting as it is not being parsed. If you get a blank page then *something* is outputting a blank page.
 
Last edited:

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
I used the installer from php.net. Which installs PHP 5.2.6 only. I think it is being parsed, because it is not showing up as text. As for what I did wrong, how could I go wrong with an installer, I don't know. The mime types are apparently kept in a different file in Apache 2.2.10, so when I use the addtype declaration for PHP, the server refuses to start. I'm using 64 bit, is that a problem?

Im mad.
Edit:
Nope, it shows up blank. It must be parsing it because it is not showing up as text, just a blank page. I used the PHP 5.2.6 installer from php.net. Don't know how an installer could make a mistake? I have a 64 it system, is that a problem?

I know that the type declaration was put in the mime type file, instead of using the addtype declaration, when I use it Apache refuses to start.
 
Last edited:

supermix

New Member
Messages
30
Reaction score
0
Points
0
If you have the time uninstall apache first and reinstall. or I don't know if it has the option of repairing installation to enable php. but if you are in to tweaking ini files I think all you need is to add this line in your httpd.conf.

AddType application/x-httpd-php .php

look for similar lines and just add this there. now if it is there but is commented out then just remove the '#' before the line.

after that you have to restart your apache server.
Edit:
I didn't notice the last statement about the 64 bit system. There are no official 64 bit apache and php for windows, only mysql has a 64bit edition for windows.

I googled this and it might help you but it will be your own risk...

http://www.elxis.org/guides/developers-guides/64bit-apache-php-mysql-windows.html
 
Last edited:

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
I did add that line to the http.config file, it causes Apache to crash. The installer does not use that statement, and instead places the mine types in mime type configuration file. I reinstalled Apache several times with no success.

Thanks for the info, I'll try it!
 
Last edited:

tttony

Member
Messages
147
Reaction score
0
Points
16
I dont recommend install PHP with the installer, its better yourself install PHP manually, thats isnt hard to install I have a tutorial but its in Spanish xD
 
Top