Page 1 of 2
Newly Set up Apache, MySQL, PHP, Zend Opt.
Posted: Tue Jul 18, 2006 12:38 am
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!
Posted: Tue Jul 18, 2006 1:31 am
by RobertGonzalez
Did you restart apache?
Posted: Tue Jul 18, 2006 1:37 am
by tecktalkcm0391
yes, and I just tried it again and no luck
Posted: Tue Jul 18, 2006 1:41 am
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"
Posted: Tue Jul 18, 2006 1:47 am
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?
Posted: Tue Jul 18, 2006 1:49 am
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\.
Posted: Tue Jul 18, 2006 1:51 am
by tecktalkcm0391
my server root is at c:/server/
Posted: Tue Jul 18, 2006 2:03 am
by RobertGonzalez
From my httpd.conf
Code: Select all
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
Posted: Tue Jul 18, 2006 2:05 am
by tecktalkcm0391
Posted: Tue Jul 18, 2006 2:20 am
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.
Posted: Tue Jul 18, 2006 2:23 am
by tecktalkcm0391
OK, I did and I still get a HTTP 403 Error[/quote]
Posted: Tue Jul 18, 2006 2:25 am
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.
Posted: Tue Jul 18, 2006 2:27 am
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.
Posted: Tue Jul 18, 2006 2:30 am
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?
Posted: Tue Jul 18, 2006 2:34 am
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"