DeathfireD Posted December 4, 2006 Share Posted December 4, 2006 Hello, I've been trying to get apache to run on my windows 2000 server and for some reason no matter what I do I cannot visit any sites within my web root folder. I've tryed using Apache 2.0, the old Apache and Xamp and I get all the same results.From reading Apache's faq the error means that its somthing to do with permissions. So my only guess is that I have to set permissions for each folder?So I'm here asking if anyone knows what I really need to do before I go ripping my windows security settings to hell.Much thanks in advanced. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/ Share on other sites More sharing options...
wildteen88 Posted December 4, 2006 Share Posted December 4, 2006 What error message do you get? Windows doesn't haven any permissions. So I expect its your Apache configuration that could be the problem. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-134961 Share on other sites More sharing options...
DeathfireD Posted December 4, 2006 Author Share Posted December 4, 2006 The message I get isForbiddenYou don't have permission to access / on this server.:( Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135019 Share on other sites More sharing options...
steviewdr Posted December 4, 2006 Share Posted December 4, 2006 Have you a html page or file in that folder?Apache might not give a Directory/Folder listing.Therefore you will have to go:http://ipaddress/index.html instead of simply:http://ipaddressThis is only 1 of many many possible problems.If you post your httpd.conf here we might be able to spot a problem.Rgds,Steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135025 Share on other sites More sharing options...
DeathfireD Posted December 4, 2006 Author Share Posted December 4, 2006 Well I tryed pointing it to a folder that had index.php ( I added it to the config) and I ended up getting a new error.ForbiddenYou don't have permission to access /php/php-5.1.2-Win32/php-cgi.exe/sitename/index.php on this server.So I guess we are getting closer. Here is my config file.http://www.freefileupload.net/file.php?file=files/041206/1165269920/https.conf Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135089 Share on other sites More sharing options...
the_oliver Posted December 4, 2006 Share Posted December 4, 2006 will it run a plain .html file? Or possibly even some funky fire wall problem? possibly allowing only one way trafic? Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135154 Share on other sites More sharing options...
DeathfireD Posted December 4, 2006 Author Share Posted December 4, 2006 hmm interesting enough after I restarted it and the computer server 5 times I now see everything thats in the root web folder. Yes, it does run a plain html/htm file. However any page that needs php it gives off [b]ForbiddenYou don't have permission to access /php/php-5.1.2-Win32/php-cgi.exe/sitename/index.php on this server.[/b]Any ideas now? If you open my config file thats attached and search for php-5.1.2-Win32 you should find where I tried to add it. I'm not sure if I did it right though.Also on a side note how would I add aliases? Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135185 Share on other sites More sharing options...
steviewdr Posted December 5, 2006 Share Posted December 5, 2006 OK - I have taken a look at your httpd.conf.Now I could be wrong, (ive apache2 here) but I dont think you have php tied in correctly with apache.I think you need to Load a php module:LoadModule php5_module c:/php5/php5apache2.dllThis loads php cli version.From your config - you are using the cgi version. The cgi version is different and runs with apache configurations and has different permissions IMO.You are going: AddType application/x-httpd-php .php .php5 Action application/x-httpd-php "/php/php-5.1.2-Win32/php-cgi.exe" SetEnv PHPRC "c:/php/php-5.1.2-Win32"Your above lines maybe correct - but obviously it aint working.Also - you need to look in your apache ERROR.LOG !!!!!!!!!!!!This will tell you whats wrong.As for alias:Alias /name/ "C:/name/"You are doing it: Alias /otservnews "C:/Dans/otservnews"but I think your forgetting the final slash.Check the error logs. Make sure you have php tied in correctly with apache. The php-cli version is better than the php-cgi version IMO.-steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135377 Share on other sites More sharing options...
the_oliver Posted December 5, 2006 Share Posted December 5, 2006 The fact that it runs plain .html files but not php files would suport the theiory above! It does look like the php moduls are not tied in propaly. If this is not the case then you probably need to rebuild the php moduals.Good Luck! Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135420 Share on other sites More sharing options...
DeathfireD Posted December 5, 2006 Author Share Posted December 5, 2006 error log is fulled with "client denied by server configuration C:/php/php-5.1.2-Win32/php-5.1.2-Win32, referer: http://mysite:5122 "This is weird since in the config I don't have php-5.1.2-Win32 back to back like that. Anyway what do you guys suggest I do? change it from the cgi version to just php.exe? The only reason I used cgi was due to other web server software in the past that required me to use it. I wasn't sure what one to use on apache.Also on a side note when I try and load the dll file apache wont start. I get service starting and then an error saying apache service could not be started. So when I comment out the load module apache starts fine. Here the load module line.LoadModule php5_module c:/php/php-5.1.2-Win32/php5apache2.dll Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135733 Share on other sites More sharing options...
the_oliver Posted December 5, 2006 Share Posted December 5, 2006 So there would definatly seem to be somthing funky going on with in the config. Swapping out the cgi part to see what happens could posibly provide some usefull explinations. Do you need cgi for anything specific? or forsee needing it again? it could be that the php stuff is corupt (something went wrong from install, faulty download etc) and it might be worth trying to replace this from a diffrent source.[code] I don't have php-5.1.2-Win32 back to back like that[/code]To be honest it might be best in the long run just to start the config file again from new. Or perhaps see if someone has put an example of a working vertion on the web. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135766 Share on other sites More sharing options...
DeathfireD Posted December 5, 2006 Author Share Posted December 5, 2006 Hmm well php isn't corrupt since it works fine on any other server software I run. I didn't use an installer for it.I tried changing the cgi to just php.exe and I get a page is missing (not the exact error).Like I said in the first post i've tried several different versions of apache all with their own config and they all do the same thing. They either don't allow me to few contents in folders or they give off that php error as posted above. So I have started with a fresh config file before.Any other ideas? This is frustrating as hell lol. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135772 Share on other sites More sharing options...
the_oliver Posted December 5, 2006 Share Posted December 5, 2006 Im out of ideas then! Sorry! Could go to the extreem and wipe the whole box and start affresh! Alternitivly just drop it out a window and claim on insurance! Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135779 Share on other sites More sharing options...
DeathfireD Posted December 6, 2006 Author Share Posted December 6, 2006 damn it i've tryed everything and still get errors or apache wont start. It dosnt seem to be abail to find the module anywhere I put it :(.When I comment out the module and just run it and then visit a php file I get this error:Not FoundThe requested URL /mysite/index.php was not found on this server. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-135813 Share on other sites More sharing options...
steviewdr Posted December 6, 2006 Share Posted December 6, 2006 Download wamp server etc. if you cant install php correctly; it will do it for you. Installing php on windows *is* tricky.0steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136035 Share on other sites More sharing options...
DeathfireD Posted December 6, 2006 Author Share Posted December 6, 2006 I already said I tried that along with xamp. I get the same problems, with wamp I get white pages or errors saying permission denied. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136041 Share on other sites More sharing options...
steviewdr Posted December 6, 2006 Share Posted December 6, 2006 Ah! - apologies. Well - either look at the README for installing php with apache correctly, or get another lamp installation package e.g. xampp etc.-steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136075 Share on other sites More sharing options...
Zane Posted December 6, 2006 Share Posted December 6, 2006 are you connecting usinghttp://localhostor are you using your computer name/domain nameyou may be disallowing anything but localhost in your http.conf file Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136098 Share on other sites More sharing options...
DeathfireD Posted December 6, 2006 Author Share Posted December 6, 2006 hmm ive been connecting to it via my DNS name myname:5122 when I do that I still get access to html files and whatnot its just php thats not loading. So are you saying in the settings I have php set to only run for local use? If so can you check my config file (its attacked to one of my posts before this one). Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136529 Share on other sites More sharing options...
Zane Posted December 7, 2006 Share Posted December 7, 2006 I don't know if it's there for a reason but if it isn't---------look under this line[quote]DocumentRoot "C:/Dans"[/quote].........you'll see this[quote]<Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all [b]Satisfy[/b] all</Directory>[/quote] but perhaps Satisfy is keeping you from getting inchange the word "Satisfy" to "Allow from"and then secondly....your httpd.conf file is called http[b]s[/b].confnever worked with one of those before don't even know if they exist Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136563 Share on other sites More sharing options...
DeathfireD Posted December 7, 2006 Author Share Posted December 7, 2006 that was there when I downloaded apache.As for the name of the config file. Sorry I changed the name when I was uploading it. It really is httpd.conf on my server too.I made the change and still got the error "missing file".Can someone send me a fresh apache2 httpd.conf with php 5 installed in it correctly. Have it so php is located in the c:/php/php folder and the module is located in the same php folder. Make sure php5 works on your server then just attack the config here. Much thanks in advanced. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136742 Share on other sites More sharing options...
steviewdr Posted December 7, 2006 Share Posted December 7, 2006 Im afraid my httpd.conf on windows here is changed a lot with ssl stuff etc in it.I suggest you get/borrow/work on another computer yourself - and get the xampp download. It *does* do everything for you.-steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-136779 Share on other sites More sharing options...
wildteen88 Posted December 7, 2006 Share Posted December 7, 2006 [quote author=steviewdr link=topic=117256.msg479642#msg479642 date=1165396244]Download wamp server etc. if you cant install php correctly; it will do it for you. Installing php on windows *is* tricky.0steve[/quote]Is not tricky... Dont know why other people find it hard. I get setup alright. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-137030 Share on other sites More sharing options...
steviewdr Posted December 7, 2006 Share Posted December 7, 2006 wildteen - if its not tricky - why is this thread so long?! Also - can you easily explain the 2 versions of php there? cgi and cli - like whats all that to a noob?!! (of course I know). Setting up php can be tricky, and I wont even mention setting it up with IIS!-steve Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-137084 Share on other sites More sharing options...
DeathfireD Posted December 7, 2006 Author Share Posted December 7, 2006 well i'm no noob to installing php to IIS or any other windows server software its just for some reason php5 does not want to work with apache2 for me. Even when I install Wamp or Xamp like I've already mentioned. This is kinda why I made the thread since the config file makes perfect sense, its just not working.As for php cgi and php cli. Its true I'm not exactly sure what each one is for. I'm guessing from the looks of it the cgi one is used to treat php files as programs (ie. #! in linux) and the php.exe is used to just read it as a script. If I'm wrong someone please correct me and explain.Right now I plan to do as steviewdr said and try installing a fresh copy of apache2 and php5 on my laptop to see how that goes. If it works then theirs definitely something wrong with my windows 2k server. Quote Link to comment https://forums.phpfreaks.com/topic/29360-access-denied-when-trying-to-view-web-pages/#findComment-137106 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.