idontgetphp Posted March 17, 2009 Share Posted March 17, 2009 I have a final due tomorrow.... OK I've changed the httpd.conf so that instead of looking like this: ServerRoot "c:/wamp/bin/Apache/apache2.2.11" it looks like this: ServerRoot "c:/wamp/bin/Apache/apache2.2.11/htdocs" i cant seem to figure out why i cant connect to my database. i get 404 error messages and on my laptop its saying that getting a connection but ive got a good connection Help please Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/ Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 This is your server root ServerRoot "c:/wamp/bin/Apache/apache2.2.11" and THIS is your DocumentRoot ServerRoot "c:/wamp/bin/Apache/apache2.2.11/htdocs" Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786385 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 DocumentRoot "c:/wamp/bin/Apache/apache2.2.11" is not in the file httpd.conf the document root is this: DocumentRoot "c:/wamp/www/" do i need to change it so that it says: c:/wamp/bin/Apache/apache2.2.11 Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786391 Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 well it should be there should be near the top....below LoadModules DocumentRoot "E:/xampp/htdocs" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None Order deny,allow Deny from all # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks Includes ExecCGI # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride All # # Controls who can get stuff from this server. # Order allow,deny Allow from all Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786395 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 i found the DocumentRoot it says: DocumentRoot "c:/wamp/www/" do i need to change it to: DocumentRoot "c:/wamp/bin/apache/apache2.2.11/htdocs" Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786400 Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 DocumentRoot is the ROOT folder of your localhost anything in this folder is what will come up when people type your IP address/domain into the address bar.. ServerRoot is the ROOT folder of your webserver itself.....AKA Aoache people do not see the contents of this folder....it is solely the backbone of Apache.....although you can route folders from it to a VirtualHost...which IS accessible by the public. Just set accordingly. Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786401 Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 i found the DocumentRoot it says: DocumentRoot "c:/wamp/www/" do i need to change it to: DocumentRoot "c:/wamp/bin/apache/apache2.2.11/htdocs" yes you do.... Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786402 Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 DocumentRoot "c:/wamp/bin/Apache/apache2.2.11" is not in the file httpd.conf the document root is this: DocumentRoot "c:/wamp/www/" do i need to change it so that it says: c:/wamp/bin/Apache/apache2.2.11 if your webfiles are in the c:/wamp/www/ directory it should work. if the files are in any other directory you should change your DocumentRoot Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786409 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 changed everything but im still getting errors. current one say HTTP Error 403 Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786417 Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 when and where are you getting these errors.... if you are getting any kind of HTTP error, then Apache is doing its job. i.e. 403 404 501 ..etc etc etc.. unless you have IIS installed and running too...then that would be your problem also...this is Apache installation....not PHP I'll move this for you Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786420 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 when i try to run my file, a simple connection file, i get the HTTP errors 403 and 404 Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786421 Share on other sites More sharing options...
Zane Posted March 17, 2009 Share Posted March 17, 2009 404 means that the file your are trying to access does not exist maybe you mispelled it or it is in the wrong folder. Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786422 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 ok heres my files: File name : login.php <?php $db_host='localhost'; $db_database='racebpalmer'; $db_username='root'; $db_password=''; ?> the other file is: test.php <?php include('login.php'); $connection = mysql_connect($db_host, $db_username, $db_password); if (!$connection){ die ("Could not connect: <br />." mysql_error()); ?> i dont have a password set for phpMyAdmin or for the MySQL consol Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786430 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 any ideas guys??? Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786446 Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 are the permissions ok? try changing permissions to allow everyone to see the files. only do it if the server is local btw, not recommendable for public servers:P Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786454 Share on other sites More sharing options...
idontgetphp Posted March 17, 2009 Author Share Posted March 17, 2009 i have 2 hosts : 127.0.0.1 and localhost both have all privileges Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786462 Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 those are not users, those are ur ip adresses. i meant to make sure that your "System user" is able to access the directory. under windows xp you can do something like this. make sure u have Simple File Sharing NOT CHECKED under folder options. right click the document root map that u have the files in, and goto properties. then goto the security tab, and make sure the system user has access to this folder and all the underlying folders and files.(if you are running apache as another user, this user needs access instead of system i think) not sure how this works with vista though. hope this helps Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786469 Share on other sites More sharing options...
Silverado_NL Posted March 17, 2009 Share Posted March 17, 2009 oh forgot something. First test apache with a simple HTML file instead of php file so u know if its running ok. then try a php file, so u are sure php is working or not before you check any permissions. Quote Link to comment https://forums.phpfreaks.com/topic/149757-wampserver-not-running-files/#findComment-786471 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.