Results 1 to 12 of 12
Thread: PHP Problems, please help.
-
12-09-2005, 11:06 AM #1Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
PHP Problems, please help.
I am trying to install Apache/PHP on my windows machine at home so I can work offline. I got Apache installed, and I tried to install PHP (CGI binary) but I ran into a problem. The problem wasn't apparent until after the install. After the install was complete, I made a file called phpinfo.php and placed the following code inside of the file to make sure php was working correctly.
PHP Code:<?php>
phpinfo();
?>
This is the last few lines of my httpd.conf file.PHP Code:...
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
#ScriptAlias /php/ "c:/php/"
#AddType application/x-httpd-php .php
#Action application/x-httpd-php "/php/php-cgi.exe"
-
12-09-2005, 11:13 AM #2Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
1)
<?php
phpinfo();
?>
2)
Uncomment (remove the #'s) from those lines in your httpd.conf file and restart Apache.RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
12-09-2005, 11:22 AM #3Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
I removed the the #'s on the last three lines, making it look like:
PHP Code:...
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
Thanks for the help by the way.
-
12-09-2005, 11:31 AM #4Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
Originally Posted by mwalker
ScriptAlias /php/ "c:/php/""
AddType application/x-httpd-php .php
Action application/x-httpd-php /php/php.exe or (php-cgi.exe if it's not php.exe)RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
12-09-2005, 11:37 AM #5Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
Now I get a "The requested opperation has failed" error. It only will start If I revert back to what I had before.
-
12-09-2005, 11:39 AM #6Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
Originally Posted by mwalkerRACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
12-09-2005, 11:41 AM #7Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
No, everything is in c:\Server
So PHP would be in c:\Server\PHP while Apache would be in c:\Server\Apache2
-
12-09-2005, 11:45 AM #8Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
ScriptAlias /php/ "c:/Server/PHP/""
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
Make sure the paths are corrrect, or you could install it as a module:
http://www.zend.com/manual/install.windows.apache2.phpRACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
12-09-2005, 11:51 AM #9Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
Every path is correct, and yet I still get that annoying "The requested operation has failed!" error.
To install it as a module, am I going to need to uninstall php first? To uninstall php, do I just delete the directory and the php.ini file in my WINDOWS folder?
-
12-09-2005, 11:53 AM #10Web Hosting Master
- Join Date
- Mar 2003
- Location
- Canada
- Posts
- 9,072
I'm not sure about that one, with Windows. If you installed PHP and have the .dll specified in the URL above then you should be able to go ahead and install it as a module.
RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca
www.HostingSecList.com - Security Notices for the Hosting Community.
-
12-09-2005, 11:55 AM #11Newbie
- Join Date
- Aug 2005
- Location
- Indiana, USA
- Posts
- 20
Alrighty then, thanks for all the help Pat.
-
12-09-2005, 12:01 PM #12Banned
- Join Date
- Nov 2005
- Posts
- 137
you don't want to use the CGI
download the complete tarball not the auto installer
proceed as installing a module, not CGI
http://www.php.net/manual/en/install.windows.php