Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: October 31, 2010 02:36AM

I have 3 sites set up in my www folder. Each site has it's own folder within www. 2 sites which are joomla sites and one is a site which I had a developer build for me... I'm able to pull the joomla sites using localhost, but when I copy the contents of my public_html (from the site built by developers) folder into the folder inside of www, I'm not able to pull up my sight using localhost. It pulls up a page that says "Sorry, we can't find "www.localhost" . FYI- when I'm not typing in "www" before the "localhost". I'm trying to access the site by going to the wampserver homepage. I tried to turn on the rewrite module in apache to see if that would change anything, but I'm still having the same issues. I set up the sql databases to match the database from my live site. I used the same user name and passwords as from the live site. I tried to see if there were any errors in the apache log, but I didn't see anything.. I"m still new to this any help would be greatly appreciated. I looked through the forums to see if anyone else had this problem, and I didn't see anything. It's possible I didn't see anything because I had the wrong terminology. Below is a screenshot of the last the last few thing in my apache error log.

[Sat Oct 30 18:36:55 2010] [notice] Parent: Child process exited successfully.
[Sat Oct 30 18:37:02 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sat Oct 30 18:37:02 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 30 18:37:02 2010] [notice] Parent: Created child process 5580
[Sat Oct 30 18:37:02 2010] [notice] Child 5580: Child process is running
[Sat Oct 30 18:37:02 2010] [notice] Child 5580: Acquired the start mutex.
[Sat Oct 30 18:37:02 2010] [notice] Child 5580: Starting 64 worker threads.
[Sat Oct 30 18:37:02 2010] [notice] Child 5580: Starting thread to listen on port 80.
[Sat Oct 30 20:59:47 2010] [warn] pid file C:/wamp/bin/apache/Apache2.2.11/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 30 20:59:47 2010] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Sat Oct 30 20:59:47 2010] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 30 20:59:47 2010] [notice] Parent: Created child process 5676
[Sat Oct 30 20:59:48 2010] [notice] Child 5676: Child process is running
[Sat Oct 30 20:59:48 2010] [notice] Child 5676: Acquired the start mutex.
[Sat Oct 30 20:59:48 2010] [notice] Child 5676: Starting 64 worker threads.
[Sat Oct 30 20:59:48 2010] [notice] Child 5676: Starting thread to listen on port 80.


Thanks in advance for any help!

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: October 31, 2010 06:26AM

u need to look at the access log and not the error log.

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: October 31, 2010 06:59AM

Thanks for the quick response. Below I've posted the access log.. Not sure what it means..


127.0.0.1 - - [31/Oct/2010:01:22:20 -0400] "GET /tonysworld HTTP/1.1" 301 237
127.0.0.1 - - [31/Oct/2010:01:22:21 -0400] "GET /tonysworld/ HTTP/1.1" 301 229
127.0.0.1 - - [31/Oct/2010:01:36:45 -0400] "GET /phpmyadmin/server_privileges.php?token=decea734f5342029a1c3cab6d86a631e HTTP/1.1" 200 13191
127.0.0.1 - - [31/Oct/2010:01:36:46 -0400] "GET /phpmyadmin/themes/original/img/b_usrlist.png HTTP/1.1" 200 401
127.0.0.1 - - [31/Oct/2010:01:36:46 -0400] "GET /phpmyadmin/themes/original/img/b_usrdrop.png HTTP/1.1" 200 438
127.0.0.1 - - [31/Oct/2010:01:36:52 -0400] "GET /phpmyadmin/server_privileges.php?token=decea734f5342029a1c3cab6d86a631e&adduser=1 HTTP/1.1" 200 22691
127.0.0.1 - - [31/Oct/2010:01:38:37 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&server=1&token=decea734f5342029a1c3cab6d86a631e&checkprivs=tonyswo_newtony&viewing_mode=db HTTP/1.1" 200 12288
127.0.0.1 - - [31/Oct/2010:01:38:37 -0400] "GET /phpmyadmin/navigation.php?server=1&token=decea734f5342029a1c3cab6d86a631e&db=tonyswo_newtony&table=&lang=en-utf-8&collation_connection=utf8_general_ci HTTP/1.1" 200 15197
127.0.0.1 - - [31/Oct/2010:01:38:44 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&server=1&token=decea734f5342029a1c3cab6d86a631e&checkprivs=tonyswo_newtony&viewing_mode=db HTTP/1.1" 200 12288
127.0.0.1 - - [31/Oct/2010:01:38:46 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&server=1&token=decea734f5342029a1c3cab6d86a631e&checkprivs=tonyswo_newtony&viewing_mode=db HTTP/1.1" 200 12288
127.0.0.1 - - [31/Oct/2010:01:38:49 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&server=1&token=decea734f5342029a1c3cab6d86a631e&checkprivs=tonyswo_newtony&viewing_mode=db HTTP/1.1" 200 12288
127.0.0.1 - - [31/Oct/2010:01:38:55 -0400] "GET /phpmyadmin/db_structure.php?db=tonyswo_newtony&token=decea734f5342029a1c3cab6d86a631e HTTP/1.1" 200 66327
127.0.0.1 - - [31/Oct/2010:01:39:00 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&server=1&token=decea734f5342029a1c3cab6d86a631e&checkprivs=tonyswo_newtony&viewing_mode=db HTTP/1.1" 200 12288
127.0.0.1 - - [31/Oct/2010:01:39:03 -0400] "GET /phpmyadmin/server_privileges.php?db=tonyswo_newtony&token=decea734f5342029a1c3cab6d86a631e&goto=db_operations.php&adduser=1&dbname=tonyswo_newtony HTTP/1.1" 200 22976
127.0.0.1 - - [31/Oct/2010:01:39:03 -0400] "GET /phpmyadmin/navigation.php?server=1&token=decea734f5342029a1c3cab6d86a631e&db=&table=&lang=en-utf-8&collation_connection=utf8_general_ci HTTP/1.1" 200 4352
127.0.0.1 - - [31/Oct/2010:01:39:33 -0400] "POST /phpmyadmin/server_privileges.php HTTP/1.1" 200 18908

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: October 31, 2010 07:11AM

check a config file in this folder.. it must have www.localhost in it...


otherwise check

c:/windows/system32/drivers/etc

open hosts


make sure it has

127.0.0.1 localhost

and make sure it does not have

::1 loclahost

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: October 31, 2010 05:01PM

I'm not seeing "www.localhost" in my config file. I've opened up my editor, but I'm not sure what and where to put the "www.localhost" in the config file. This is what my config.php looks like.

<?php
session_start();
ini_set('include_path', '.');

//error_reporting(E_ALL);

define('caching', 1);

define('summarize_mysql', 1);


define("mnmpath", dirname(__FILE__).'/');
define("mnminclude", dirname(__FILE__).'/libs/');
define("mnmmodules", dirname(__FILE__).'/modules/');

define("MAINFILE", '/index.tpl');
define("POPUPPAGE", '/popup.tpl');
include_once 'settings.php';
include_once mnminclude.'function.php';
define('my_base_url', $my_base_url);
define('my_pligg_base', $my_pligg_base);



define('urlmethod', $URLMethod);
if(isset($_COOKIE['template'])){
$thetemp = $_COOKIE['template'];
}
else
{

$thetemp="default";


}

// template check

$file = dirname(__FILE__) . '/templates/' . $thetemp .MAINFILE;
if (!file_exists($file)) { $errors[]='You may have typed the template name wrong or "'. $thetemp . '" does not exist. Click <a href = "admin_config.php?page=Template">here</a> to fix it.'; }

define('The_Template', $thetemp);


// Don't touch behind this
$local_configuration = $_SERVER['SERVER_NAME'].'-local.php';
@include($local_configuration);



//
// start summarization and caching of mysql data
//

// added to replace 55 redundant queries with 1
// used with the following functions in /lib/link.php
// function category_name() {
// function category_safe_name() {
// cache the data if caching is enabled

if(caching == 1){
$db->cache_dir = mnmpath.'cache';
$db->use_disk_cache = true;
$db->cache_queries = true;
}

// if this query changes, be sure to change the 'clear the cache' code in admin_categories.php


$db->cache_queries = false;

// a simple cache type system for the users table
// used in the read() function of /libs/user.php
$cached_users = array();

// a simple cache type system for the totals table
// functions related to this are in /libs/html1.php
$cached_totals = array();

$cached_votes = array();

$cached_links = array();
//
// end summarization and caching of mysql data
//

ob_start();
include_once mnminclude.'db.php';
include mnminclude.'utils.php';

?>

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: November 05, 2010 02:44AM

Can anyone tell me where to put the "www.localhost" in my config file?

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: November 05, 2010 01:55PM

Can someone please see the config file above that I pasted in this email. I'm just learning php, so I'm not sure really if this is the file that Stevemartin99 was referring to when he told me to ad localhost to the config.php file. Yes this is my config.php file, but my question is, shouldn't the config.php file show database information? I'm not seeing that information. Also, can someone tell me the correct tags that I would need to put localhost in to my config.php file?

The original problem that I have and still have, is when I try to access my live site which I've copied to wamp, it brings me to a webpage that says "Sorry, we can't find "www.localhost". I copied my dabtabase, user, pass from the live site to the localhost, but I still have the same issue. I've tried to use apache rewrite to see if that would make a difference, but it didn't. I know I can't be the only one experiencing this problem. Any help would be greatly appreciated. I've been trying to get this working for weeks.

Thanks!

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: yfastud (Moderator)
Date: November 05, 2010 10:50PM

In folder C:\WINDOWS\System32\drivers\etc, open file hosts and delete anything in this file and have only this line below and nothing else

127.0.0.1 localhost

Actually, I dont really think that it has anthing to do w/ config.php file but most likely rewrite rules in htaccess file or firewall/antivirus which both would reroute or auto add www to url, so check these 2 htaccess file and firewall/antivirus including Zonealarm if using

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: November 12, 2010 04:16AM

I'm not showing anything as far as my firewall/antivirus.. I'm able to use wamp on other websites, but just having issues with this one. Below I'm pasting my .htaccess file. I'm not sure what I should be looking at..

IndexIgnore *.swf *.jpg
<Files error.html>
order allow,deny
allow from all
Options +ExecCGI -Indexes
DirectoryIndex index.html index.htm index.php

</Files>

Options +FollowSymlinks
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^$

<Files ~ (\.pl)>
Options ExecCGI FollowSymLinks
</Files>


##ErrorDocument 404$ [www.website.com]
RewriteRule ^page_not_found.html$ page_not_found.php

RewriteCond %{HTTP_HOST} !^www\.

RewriteRule ^index.html$ index.php
RewriteRule ^about_us.html$ about_us.php
RewriteRule ^most_active.html$ most_active.php
RewriteRule ^text_us.html$ text_us.php
RewriteRule ^mail_us.html$ mail_us.php
RewriteRule ^terms.html$ terms.php
RewriteRule ^blog.html$ blog.php
RewriteRule ^contactus.html$ contactus.php
RewriteRule ^offline.html$ offline.php
RewriteRule ^register.html$ register.php
RewriteRule ^search.html$ search.php
RewriteRule ^forget_password.html$ forget_password.php
RewriteRule ^login.html$ login.php
RewriteRule ^myaccount.html$ myaccount.php
RewriteRule ^editprofile.html$ editprofile.php
RewriteRule ^deleteprofile.html$ deleteprofile.php
RewriteRule ^changepassword.html$ changepassword.php
RewriteRule ^logout.html$ logout.php
RewriteRule ^description/([0-9]+).html$ description.php?id=$1
RewriteRule ^text_from_areacode/([0-9]+).html$ text_from_areacode.php?id=$1
RewriteRule ^([a-zA-Z0-9_-æ-]+)$ member_detail.php?todo=$1
RewriteRule ^best/([a-zA-Z-]+)$ index.php?order=best&suborder=$1
RewriteRule ^worst/([a-zA-Z-]+)$ index.php?order=worst&suborder=$1
RewriteRule ^terms.html$ terms.php
RewriteRule ^validate/([a-zA-Z0-9=_-]+)/([a-zA-Z0-9=_-]+).html$ validate_email.php?task=validate&email=$1&temp=$2 [L]
RewriteRule ^category/([a-zA-Z0-9=_-]+).html$ category.php?id=$1
RewriteRule ^haters-pass.html$ haters-pass.php
RewriteRule ^mysettings.html$ mysettings.php
RewriteRule ^archieve.html$ archieve.php

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: yfastud (Moderator)
Date: November 12, 2010 05:18PM

As mentioned, it's really your rewrite caused the error
RewriteCond %{HTTP_HOST} !^www\.
Based on Apache's website about rewrite rules
Quote

Canonical Hostnames

Description:
The goal of this rule is to force the use of a particular hostname, in preference to other hostnames which may be used to reach the same site. For example, if you wish to force the use of www.example.com instead of example.com, you might use a variant of the following recipe.
Solution:

# For sites running on a port other than 80
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*) [www.example.com]:%{SERVER_PORT}/$1 [L,R]

# And for a site running on port 80
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) [www.example.com] [L,R]
So you force every url to have www

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Issues with getting website to display
Posted by: Rigg (---.hsd1.ga.comcast.net)
Date: November 16, 2010 10:55PM

So I tried to replace "RewriteCond %{HTTP_HOST} !^www\." with one of the rewrite conditions below, and I didn't see any change.. Is that what your were asking me to do? Forgive me if it's a dumb question, but I'm truly trying to figure this out.


RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) [www.example.com] [L,R]

Options: ReplyQuote


Sorry, only registered users may post in this forum.