Newly Set up Apache, MySQL, PHP, Zend Opt.

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

User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Newly Set up Apache, MySQL, PHP, Zend Opt.

Post by tecktalkcm0391 »

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!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Did you restart apache?
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

yes, and I just tried it again and no luck
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

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"
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

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?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Your server root is not setup right. Restart apache, then load http://localhost/index.php. Also, try http://127.0.0.1/ and see what that does. Your server root should be serving from C:\Program Files\Apache Group\Apache (maybe 2)\htdocs\.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

my server root is at c:/server/
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

From my httpd.conf

Code: Select all

DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Code: Select all

DocumentRoot "C:/SERVER/htdocs"
is what mine says...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

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.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

OK, I did and I still get a HTTP 403 Error[/quote]
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

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.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

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.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

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?
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

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"
Post Reply