Help setting up WAMP Server

Asked

Viewed 473 times

2

I’m having a problem with the WAMP server, where I can’t access my project from Localhost when I click directly on the project name, just type "localhost/project name".

Does anyone have any hint to set up?

1 answer

1


Inside wamp’s WWW folder, you will find a file called index.php, open it.

On line 338 you will find the following

$projectContents .= '<li><a href="'.($suppress_localhost ? '//' : '').$file.'">'.$file.'</a></li>';

If you can’t find a search for $projectContents in the editor of your preference to find the right line, because depending on the version you can change the line.

To correct this problem we should add the front of HTTP://the word localhost, because this line is responsible for mounting the url in the browser, because the way wamp is mounting the url only with the name of your project for example, and this way will not open our file, showing missing page error.

So in order to solve this problem we must leave this line that way:

$projectContents .= '<li><a href="'.($suppress_localhost ? '//localhost/' : '').$file.'">'.$file.'</a></li>';

Ready, your localhost should already be accessing your work by clicking the folder.

Now in the wamp/scripts/ folder we have a file called refresh.php, open it and in the 651 line you will find the following command:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "// '.$projectContents[$i].'/"; Glyph: 5';

To correct, we must do the same in front of // this way:

$myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "//localhost/'.$projectContents[$i].'/"; Glyph: 5 ';

Restart wamp services just as a guarantee, and if all goes well, your projects can be accessed via localhost.

  • What is the problem that is giving when you try to access the project?

  • I was a little different but I got it. I got it right. Thank you

  • In need we are here :D

Browser other questions tagged

You are not signed in. Login or sign up in order to post.