Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 12:38 am
Ok, I just set up my computer with Apache, MySQL, PHP, phpMyAdmin & Zend Optimizer, and I have a few question/problems. When I go to
http://localhost/ I get:
Index of /
Thumbs.db
apache_pb.gif
apache_pb.png
apache_pb22.gif
apache_pb22.png
apache_pb22_ani.gif
index.php
How do I fix it to show index.php.
Also if I click on index.php it gives me a 403 error page. Why? I added:
ScriptAlias /php/ "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
to the httpd.conf file.
THANKS!
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 1:37 am
yes, and I just tried it again and no luck
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Jul 18, 2006 1:41 am
My httpd.conf has this line in it...
Code: Select all
DirectoryIndex index.php index.html index.htm index.html.var
And this as well
Code: Select all
ScriptAlias /php/ "c:/php5/"
#Zend# AddType application/x-httpd-php .php
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 1:47 am
ok thanks. now I am getting:
Forbidden
You don't have permission to access /php/php-cgi.exe/index.php on this server.
Any ideas to fix that?
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Jul 18, 2006 2:03 am
From my httpd.conf
Code: Select all
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Jul 18, 2006 2:20 am
Make the server lower case and make sure you put the index.php file in the htdocs folder. Run it again and see what it does.
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 2:23 am
OK, I did and I still get a HTTP 403 Error[/quote]
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Jul 18, 2006 2:25 am
The only thing I can think of is that the server is not set up with approriate permissions execute the page. Not sure about this though.
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 2:27 am
I checked the error log and it has:
[Tue Jul 18 03:26:02 2006] [error] [client 127.0.0.1] client denied by server configuration: C:/SERVER/PHP/php-cgi.exe
for everytime I requested the page. If I do an image file that was already in htdocs from when I installed Apache it comes up fine.
Benjamin
Site Administrator
Posts: 6935 Joined: Sun May 19, 2002 10:24 pm
Post
by Benjamin » Tue Jul 18, 2006 2:30 am
When you changed your document root did you change your apache config file to reflect the new path and restart the server? Is the path correct?
tecktalkcm0391
DevNet Resident
Posts: 1030 Joined: Fri May 26, 2006 9:25 am
Location: Florida
Post
by tecktalkcm0391 » Tue Jul 18, 2006 2:34 am
I had it set to that root from the beginning in setup. I was following:
http://www.webmasterstop.com/48.html
My setup right now is:
Code: Select all
ScriptAlias /php/ "c:/server/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
#PHPIniDir "C:/WINDOWS"