Wamp Server

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by paul-holmes83, Sep 21, 2011.

  1. paul-holmes83

    paul-holmes83 New Member

    Does anybody know how to configure Wamp server running on Vista and using firefox.

    I cannot access PHPmyAdmin.

    When I first installed it when I tried to go to PHPmyAdmin I just got a blank white page, after some digging around on the internet I found that my Hosts file needed to have localhost added.

    After I added the above line I now get an error page as below.

    Welcome to phpMyAdmin


    MySQL said: Documentation
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

    I have not been able to find any info on this.

    Not sure if it makes a difference but I keep my hosts file as read only.
  2. essellar

    essellar Community Advocate Community Support

    Make sure you don't have any other web servers running locally (so no using WampServer while trying to test ASP.NET development locally using IIS) and that MySQL is listed as allowed for local access in whatever firewall software you're using (you'll probably need to be an admin to make the change if you usually run as a restricted user). The default MySQL port is 3306.
  3. paul-holmes83

    paul-holmes83 New Member

    I have looked at the services and I do not see either ASP.NET or IIS in the list so I don't think it is them.

    I see Mysql.exe listed in the allowed aplications of my firewall, it says any local port and any remote port, I use Bullgaurd if that makes a difference.
  4. essellar

    essellar Community Advocate Community Support

    Odd, that -- WampServer has always been plug-and-play for me. It comes properly configured out of the box (usually). Is MySQL running when you start the server (check your task list)?
  5. paul-holmes83

    paul-holmes83 New Member

    It appears to be I see in the services section of task manager

    wampapache (pid5972) running
    wampmysqld (pid5160) running

    A suggestion made in the wampserver forum said that the hosts file should contain only the line localhost

    mine included some other lines so I made a copy then I deleted all lines except the above.

    I have a spare PC here that just needs an HD and a mouse, I think I will rebuild that and try it on that one, only problem there is I have no spare space on my router:frown:
  6. misson

    misson Community Paragon Community Support

    One tool that may help is TCPView, which you can use to see which programs have what ports opened.

    Check the connection settings in the MySQL and PHP configuration files to see what ports or named pipe each uses, and make sure they are the same. With PHP, you can use phpinfo instead of checking php.ini; XAMPP should make it available at http://localhost/phpinfo.php.

    Check whether other MySQL clients (such as the command-line client or MySQL Workbench) can connect. This may help you narrow down the problem to PHP or MySQL.

    As for the firewall, disable it temporarily while testing. Don't leave it off for long, but a short period shouldn't hurt.
    Last edited: Sep 23, 2011
  7. paul-holmes83

    paul-holmes83 New Member

    Can I deal with your sugestions 1 at a time

    I have downloaded TCPView and run it the entries tat look like they belong to Wamp are

    httpd.exe (pid, 4164) (Protocol, TCP) (Local Port, http) (remote Port, 0) (State, Listening)
    mysqld.exe (pid, 968) (Protocol, TCP) (Local Port, 3306) (Remote Port, 0) (State, Listening)
    mysqld.exe (pid, 968) (Protocol, TCPV6) (Local Port, 3306) (remote Port, 0) (state, Listening)

    the mysqld pid is supposed to be 968 , don't know where the smiley came from

    there does not seem to be anything else using the local Ports.

    phpinfo says (if I am looking at the correct parts!)

    In the Apache2Handler section entry for hostname:port = localhost:80
    In the php Variables Section entry for _SERVER["HTTP_HOST"] = localhost
    In the php Variables Section entry for _SERVER["SERVER_PORT"] = 80

    I disabled my firewall before starting the Wamp server, but it made no difference.

    on the command line client following the example given in the link, but leaving out password, I have not set one
    I got the following output ERROR 2003 (HY000): Can't connect to MySQL sever on 'localhost' (10060)

    I have downloaded MySQL Workbench, but I am unsure how to use it?
    Last edited by a moderator: Sep 25, 2011
  8. essellar

    essellar Community Advocate Community Support

    Not to answer the question, 'cuz it's baffling and oh, so wrong...

    The smiley comes from putting an eight and a close parenthesis right side-by-each. Graphic emoticons must die!
  9. misson

    misson Community Paragon Community Support

    From this, you know which ports the MySQL server is listening on. If a MySQL client is using one of these ports and can't connect, that tells you something is blocking the connection.

    That isn't the relevant information. Since you need to check how PHP is configured to connect to MySQL, you should be looking at the MySQL configuration. phpMyAdmin before 3.4 defaulted to the outdated mysql extension. Starting with 3.4, phpMyAdmin defaults to mysqli. Check the settings for whichever extension phpMyAdmin is using on your install.

    Make sure you leave the firewall disabled while testing, not just when starting the server. PHP connects to MySQL when it handles a request, not when Apache starts.

    This is the most useful information so far. A web search for the exact error message will turn up many pages, including the manual page for MySQL error 2003 (10060).

    If this error is caused by network connectivity problems, one resolution is to use named pipes, bypassing networking altogether.

    MySQL workbench is a graphical alternative to the command line utilities. You don't need both (though you may find MWB useful for other things).

    The advanced post editor has a "Disable smilies in text" in the "Additional Options" section.
  10. paul-holmes83

    paul-holmes83 New Member

    I will look at this shortly to see if I can make sense of it.

    I will just say that I downloaded Wamp from the same place onto a friends PC who is using the same version of Vista, but different Anti Virus software and it run straight out of the box with no problems at all, so it is my PC configaration that is causing the problem somewhere.

    ---------- Post added at 09:16 PM ---------- Previous post was at 09:09 PM ----------

    What I meant was that I disabled the firewall before starting the Wamp sever, then I tested it with the firewall still off.

    Sorry for not being clear

    ---------- Post added at 11:26 PM ---------- Previous post was at 09:16 PM ----------

    Just a further note I shut down my antivirus completly to test it, but it made no difference.

    ---------- Post added at 11:33 PM ---------- Previous post was at 11:26 PM ----------

    Although Wamp is on the local machine could the router be causing the problem.

    ---------- Post added at 11:45 PM ---------- Previous post was at 11:33 PM ----------

    Looking at the Tcpview window there is nothing else using this port.

    Sorry I do not understand what information you needed from phpinfo, but I can tell you what the version numbers are.
    Apache 2.2.17
    PHP 5.3.5
    MySQL 5.5.8

    Sorry I did not understand the information in that link:frown:

    Again this went right over my head.:frown:
  11. misson

    misson Community Paragon Community Support

    Good. It seemed you might have done this; I just wanted to be explicit.

    Are there any other applications that filter network communications? The Windows firewall, for example, if enabled may interfere.

    If PHP is configured to connect to localhost, the packets won't be transmitted on the network, so the router won't be involved (unless you've got something odd in your hosts file).

    There couldn't be. Only one process can bind a port for listening, otherwise it would defeat the whole point of ports (the network stack wouldn't be able to route the packets to the correct process). The point of using TCPView is it shows you that MySQL Server is running and is bound to the default port. If either weren't the case, it would cause the error you're getting.

    PHP is having problems connecting to MySQL, so you need to check its MySQL connection settings (or mysqli connection settings). In particular, check the hostname and port PHP is using.

    Then you should turn to your friend Google.
    Last edited: Sep 24, 2011
  12. paul-holmes83

    paul-holmes83 New Member

    I don't use the Windows Firewall, just the one that comes with my antivirus, I've just checked to make sure the Windows firewall is turned off. I don't know of any other applications that may be filtering Network communications.

    MySQL Support enabled
    Active Persistent Links 0
    Active Links 0
    Client API version mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $

    Directive Local Value Master Value
    mysql.allow_local_infile On On
    mysql.allow_persistent On On
    mysql.connect_timeout 60 60
    mysql.default_host localhost localhost
    mysql.default_password no value no value
    mysql.default_port 3306 3306
    mysql.default_socket no value no value
    mysql.default_user no value no value
    mysql.max_links Unlimited Unlimited
    mysql.max_persistent Unlimited Unlimited
    mysql.trace_mode Off Off

    MysqlI Support enabled
    Client API library version mysqlnd 5.0.7-dev - 091210 - $Revision: 304625 $
    Active Persistent Links 0
    Inactive Persistent Links 0
    Active Links 0

    Directive Local Value Master Value
    mysqli.allow_local_infile On On
    mysqli.allow_persistent On On
    mysqli.default_host localhost localhost
    mysqli.default_port 3306 3306
    mysqli.default_pw no value no value
    mysqli.default_socket no value no value
    mysqli.default_user no value no value
    mysqli.max_links Unlimited Unlimited
    mysqli.max_persistent Unlimited Unlimited
    mysqli.reconnect Off Off

    In both cases host and port were not set, I changed them localhost and 3306 is that correct?

    My hosts file as only 1 line in it localhost

    Then you should turn to your friend Google.[/QUOTE]
  13. Dead-i

    Dead-i x10Hosting Support Staff Community Support

    I have no idea about this stuff so don't trust me, but I think this is your problem:

    -- AND --
    Last edited: Sep 25, 2011
  14. misson

    misson Community Paragon Community Support

    @Paul: the relevant info is the host name and port (the connection settings), both of which are correct. This means the problem doesn't lie with PHP. Something else on your computer is preventing PHP from connecting. Read up on MySQL error 2003 and named pipes (a potential fix).

    @Dead-i: take a closer look at the posts. 968 is the process ID, not the port.
  15. callumacrae

    callumacrae not alex mac Community Support

    "Disable smilies in text" ;-)

    8) 8)
  16. essellar

    essellar Community Advocate Community Support

    Who the heck wants to "Go Advanced" to turn off something that should be an opt-in? Making the "picture people" do the extra work rather than sabotaging plain text is a much, much saner approach. (There is no emoticon for how I feel about the Eternal September.)
  17. misson

    misson Community Paragon Community Support

    Only because Unicode doesn't include elder signs, not even in the private use area. You could always call forth Zalgo.

    Last edited: Sep 25, 2011
  18. essellar

    essellar Community Advocate Community Support

    Invoking Chthulhu? Here? That's a "like".
  19. paul-holmes83

    paul-holmes83 New Member

    Well I have finally got it working to an extent.

    I have looked at everything that I fond on the web, but none of the fixes worked, so I completly uninstalled it, deleted its folder, deleted everything I could find in the registry, did a full search of the computer and deleted all tucked away files.

    Then I reinstalled a slightly older version 2.0i as against 2.2a the older version worked straight away so I am guessing there is a bug somewhere in the newer version.

    The only problem that I have now is changing the default password.
  20. misson

    misson Community Paragon Community Support

    Or the default settings may have been more restrictive. One of the earlier documents I linked to outlined a situation where MySQL server settings would result in the error you were getting.

    The manual is your friend: "Resetting the Root Password: Windows Systems".
    Last edited: Oct 2, 2011

Share This Page