Page 1 of 1

Need help with PHP setup

PostPosted: 07. January 2005 10:26
by Toby B.
I am using XAMMP (not the latest version). I need to find out how to setup PHP so that I can use PHP in html pages.

This is what I was told from a friend:
yes you have to add a handler in your php.ini file or in an htaccess file.

looks like this.

AddHandler application/x-httpd-php .html
I would like to use the AddHandler option versus the .htaccess option. But I don't know where the php.ini file is. When setting up the stand alone version of php you copy the php.ini-DIST (or something like that) to php.ini and place it in a designated area....

Did I confuse you yet?

Thanks in advance..

PostPosted: 07. January 2005 12:25
by Wiedmann
I am using XAMMP (not the latest version). I need to find out how to setup PHP so that I can use PHP in html pages.

In XAMPP, all things are ready to use. PHP inclusive. So, why do you want to setup PHP?

PostPosted: 07. January 2005 17:42
by taustin
I think he's looking to have .html files treated as .php files, which is only dangerous if you don't know what you're doing.

You do that in the http.conf file. Look for:

AddType application/x-httpd-php .php .php4 .php3 .phtml

and add .html at the end.

I don't think you need to change anything in the php.ini file, but if you do, it's in xampp\apache\bin\ (you can always find the php.ini being used by checking phpinfo(). You can find it in the xampp control panel, or just put the following in a php file and navigate to it in your browser:

<?
echo phpinfo();
?>

PostPosted: 09. January 2005 05:32
by Toby B.
thanks for the help. I did manage to get it solved... :wink: