I have done the procedure below given in http://www.ricocheting.com/server/php.html for installing PHP and Apache. When I start the Apache server, it is displaying "invalid command PHPIniDir". How can I fix this problem?
I wanted to learn PHP. When I started installing I came with this problem.
Editing Apache Conf File
Using Notepad open httpd.conf (should be start-menu shortcut "Apache HTTP Server 2.2 > Configure Apache Server > Edit the Apache httpd.conf Configuration File"). Either at the very beginning or end of the file add the following lines: (NOTE: be sure to change BOTH C:/php parts to the directory you installed PHP to)
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"
-
I would recommend you using XAMPP. It is a complete package of Apache, PHP, MySQL and so on... You don't have to configure and you can easily stop the processes so that you don't have an open webserver running on your computer all the time which can be risky if accessible over the Internet.
Try: XAMPP
-
I vaguely remember having this problem as well. If I remember correctly you might need to add a trailing / to the PHPIniDir
PHPIniDir "C:/php/"
From Luke -
The only other alternative that I know of to XAMPP is to install WAMP. I've used WAMP many times but I haven't tried XAMPP. They are full LAMP stacks (well WAMP stacks) that contain Apache, MySQL and PHP.
From kovert -
As an alternative, drop the
PHPIniDir
command and place the php.ini in the same directory as the Apache.exe application.From Jordan S. Jones -
I created a new file called
php.conf
. In that file I placed the following:php.conf
Loadfile "C:\php\php5ts.dll" LoadModule php5_module "C:\php\php5apache2_2.dll" PHPIniDir "C:\php" AddHandler application/x-httpd-php .php AddHandler application/x-httpd-php-source .phps
Then I went to my
httpd.conf
file and included thephp.conf
file:httpd.conf
Include conf/extra/php.conf
I included the line above, right before these lines in my
httpd.conf
file, where all the other include lines are.<IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule>
From Tomaszewski -
installation of both php and server,,, problems? Try this link on how to install php & apache web server through the use of xampp,, Here is a detailed instruction on how to install-> http://www.laruymuna.blogspot.com
From rafiel
0 comments:
Post a Comment