Page 1 of 1

Cannot access websites through localhost

PostPosted: 04. February 2013 12:39
by kokas
Hello

I am able to access only a specific website through my localhost.

I tried making a copy of it, create new ones, but whenever I type localhost/mysite I get an ´object not found´ error.

I get the same error if I type localhost/xampp.

What is the cause of this? Is there a restriction set somewhere by apache?

Re: Cannot access websites through localhost

PostPosted: 04. February 2013 14:12
by Altrea
Hi kokas,

kokas wrote:What is the cause of this?

We can't say that without knowing your \xampp\apache\conf\httpd.conf and your \xampp\apache\conf\extra\httpd-vhosts.conf.

best wishes,
Altrea

Re: Cannot access websites through localhost

PostPosted: 04. February 2013 16:26
by kokas
Hi Altrea,

since then i tried upgrading to xampp 1.8.1....after reinstalling on the same xampp folder as the previous installation, I noticed that the apache 2.2 service was still running, same as the mysql service. I am not very experienced with such problems...so I wondered why those services were still running, so I unistalled and reinstalled the latest xampp. Still the same, then I disabled the apache service and executed a command on the cmd to get rid of the mysql service....it seems to work fine now, but i´m not sure whether I have messed up my system or not...

Re: Cannot access websites through localhost

PostPosted: 04. February 2013 16:27
by kokas
Now I get this error message when trying to view an application

Fatal error: Cannot redeclare xtc_image() (previously declared in C:\Users\Ivan\Downloads\xampp-win32-1.7.7-VC9\xampp\htdocs\xtcModified-1.05\inc\xtc_image.inc.php:21) in D:\xampp\htdocs\homsym2013\inc\xtc_image.inc.php on line 63

My xampp installation is at D:\xampp, why is apache looking at this file in c: drive?

Re: Cannot access websites through localhost

PostPosted: 04. February 2013 17:21
by Altrea
kokas wrote:Fatal error: Cannot redeclare xtc_image() (previously declared in C:\Users\Ivan\Downloads\xampp-win32-1.7.7-VC9\xampp\htdocs\xtcModified-1.05\inc\xtc_image.inc.php:21) in D:\xampp\htdocs\homsym2013\inc\xtc_image.inc.php on line 63

This error message occurs if a function is included/required twice. PHP can't adress two functions named the same in the same scope.
Why the file in C: is loaded is very application specific. Either you have absolute paths in your application or defined include_paths to that directory.