Link to "Your Projects" does not work on WAMP server

I am on windows 8, I downloaded the wamp server and I have my index.php saved in the "www" folder in a subfolder called websites. When I visit the localhost page, it displays a subfolder under Your Projects, but when I click on it, it takes me here.

http://www.dnsrsearch.com/index.php?origURL=http%3A//websites/&r=http%3A//localhost/

and he says

“Why am I here? You entered an unknown web address that was used to provide site suggestions that you might find useful. Clicking on any of these suggestions gives you search results that may include relevant sponsored links.

If this service is not suitable for you, please go to the settings page to opt out. At any time you can return to the service by visiting the settings page.

If you have any other questions about this service, please visit our FAQ. "

Basically, this takes me to a search engine and tries to show some suggestions for what I might want, but I'm not trying to go to the site. I am trying to access and display my test site to start practicing PHP. It was very frustrating just starting with this because I ran into all these different ways to do php and different problems and so far using this wampserver seems like the best option, but I'm stuck. Please, please, please help. It drives me crazy!

Summary: I have installed a WAMP server, I have my index.php saved in my www folder with its assigned www subfolder (wamp \ www \ Websites \ index.php), it shows on localhost under my projects, but the link to display it. Don't work.

Any answers?

NEXT YEAR AFTER

I appreciate the answers I received. What I ended up doing was to get the ball rolling (I went on a hiatus from web development to chase other things) and to make things a lot easier to work with, I set up a LAMP server instead and that made the installation process easier and from there I have there was no problem creating virtual hosts and working with my websites and everything interacts as it should. If you're stuck where I've been, setting up and using WAMP on windows is much more attractive and touching than setting up on a Linux system. On a linux system, you won't get a dedicated gui program like WAMP, but you will have everything running your operating system to handle it and basically turns your computer into a local web server with php / sql support and everything else you would like to add to it.I am using kali linux and it works fine for me. If you just want to dive into php without having to go through the huge hurdle on Windows virtual hosts, I highly recommend just doing your research and setting it up on a Linux system. If you have an additional hard drive, install Linux on it. If you don't, set up a dual boot configuration on your disk so you have windows and linux. It helped me learn a ton by learning how to do things in the backend by referencing each other the way I wanted, and also having a much better understanding of it as I went. All you need to install is apache, mysql and php, and once configured, it should all work fine on your local machine. Learning Linux may seem daunting at first, but the process is much more straightforward and straightforward.than using it on windows.

+3


source to share


4 answers


I believe this is the best and simplest solution:

Open index.php in www folder and install

change line 30: $suppress_localhost = true;



to $suppress_localhost = false;

This will ensure the project is prefixed with localhost IP / name

+11


source


Just change the value in line wamp / www / index.php # 338.

Change this:

FROM



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

      

to

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

      

+10


source


Start Wamp server, start apachee and enter url as

http://localhost/websites/index.php

      

+1


source


There is a document on the WAMPServer forum HERE there is a link documenting the amendment you can make to revert the project links to Pre 2.5 mechanisms

Find the section titled Revert WAMPServer 2.5 "Your Projects" links to pre 2.5 mechanism

Here is the amendment: -

Return WAMPServer 2.5 "Your projects" links to pre 2.5 engine

It looks like some WAMPServer users cannot handle creating virtual hosts for each of their sites / projects.

This is the code that will be in the next version of WAMPServer, so if you want the "Your Projects" menu to provide links in the form "localhost / folder_name" rather than "folder_name" so you don't need to create a simple virtual host definition, here's how it must be done.

I would stress that this is not a recommended mechanism. The only GOOD solution is to use the virtual host mechanism

However, making these changes will not damage WampServer, and you can always set suppressLocalhost = "yes" to preserve the WAMPServer2.5 engine.

  • Modify wamp / wampmanager.conf

In the [main] section, add this line:

suppressLocalhost = "no"

      

Save the file

If this parameter is set to "no", your project references will look like localhost/folder_name

, i.e. path to WAMPServer 2.5. If this parameter is set to yes, your Project links will be shaped folder_name

and require the definition of virtual hosts.

  • Edit \ wamp \ www \ index.php

Find this line

$suppress_localhost = true;

      

and comment it like this:

//$suppress_localhost = true;

      

  • Find this line

    $ wampserverVersion = str_replace ('' ',' ', $ result 1 ); ajouter / add

and after this line add this code

//[modif oto] - On récupère la valeur de suppressLocalhost
preg_match('|suppressLocalhost = "(.*)"|',$wampConfFileContents,$result);
if($result[1] != "yes" )
    $suppress_localhost = false;
else
    $suppress_localhost = true;

      

Save this file

  • Edit /wamp/scripts/config.inc.php

Find this line

$c_editor = $wampConf['editor']; ajouter/add :

      

and after this line add

//[modif oto] Ajout variable suppressLocalhost
if($wampConf['suppressLocalhost'] != "yes" )
    $c_suppressLocalhost = false;
else
    $c_suppressLocalhost = true;

      

Save the file

  • Edit /wamp/scripts/refresh.php

Find this line

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

      

and REPLACE it with

    { //[modif oto] Support de suppressLocalhost dans wampmanager.conf
        $myreplacesubmenuProjects .= 'Type: item; Caption: "'.$projectContents[$i].'"; Action: run; FileName: "'.$c_navigator.'"; Parameters: "'.($c_suppressLocalhost ? "["]; : 'http://localhost/').$projectContents[$i].'/"; Glyph: 5

      

Save this file.

The changes are now complete.

Now restart WAMPServer

0


source







All Articles