Jump to content

Setup And Installation


ShadowMage

Recommended Posts

Thought for sure you had it there but it doesn't appear to have done anything. :) I allowed full access for mysqld.exe but I still get those errors.
What AntiVirus do you use? Does it also contain a firewall? If you have more than one firewall, you need to either turn off all but one of the firewalls, or add this exception to all firewalls.
Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply
What AntiVirus do you use? Does it also contain a firewall? If you have more than one firewall, you need to either turn off all but one of the firewalls, or add this exception to all firewalls.
I'm using McAfee AV with their firewall. Windows firewall is turned off. I also tried adding an exception for port 3306 but that didn't work either.
Link to comment
Share on other sites

Do you have MySQL Workbench already? If not, get it (a must have tool anyway). Can you connect from it?(I'm just wondering if the MySQL Server is actually running to begin with, as well as if the problem is PHP specific)

Link to comment
Share on other sites

OK! instead of connecting through localhost, try 127.0.0.1 instead, this may be a IPv6 support issue.fixes that may helpto change to use 127.0.0.1 $cfg['Servers'][$i]['host'] = 'localhost';to$cfg['Servers'][$i]['host'] = '127.0.0.1'; to solve this and to continue using localhost change the hosts files on windows vista or windows 7C:/Windows/System32/drivers/etcuncomment the # 127.0.0.1 localhostwill see like this:127.0.0.1 localhost

Link to comment
Share on other sites

Let's try for the last time to make sure it's not a Firewall issue... Turn off McAfee's Firewall... leave no Firewall on. Can you connect to MySQL then? If you can, then this is a Firewall issue of some kind, though it has nothing to do with the stuff that is currently an exception.

Link to comment
Share on other sites

Let's try for the last time to make sure it's not a Firewall issue... Turn off McAfee's Firewall... leave no Firewall on. Can you connect to MySQL then? If you can, then this is a Firewall issue of some kind, though it has nothing to do with the stuff that is currently an exception.
Yep, I already tried that last night. It didn't work either. It's not a firewall issue.@dsonesukI think you might be on to something there. I had issues with IPv6 when we ran tests with Win7 on the domain at work. I just disabled IPv6 to solve those issues. Think that would work? I'm not at home now so I can't try it, but that sounds like a much simpler solution than what you're proposing. :)
Link to comment
Share on other sites

I just realized something. There are two different mysql connect functions: mysql_connect() and mysqli_connect()I'm pretty sure that the extension I have installed with PHP is for mysqli, but in my code I think I'm calling mysql_connect. Could that be the issue?

Link to comment
Share on other sites

Think that would be a big yes!, there are conversion tools around, but depends if you have a large amount of pages to convert, or just a few would it be really worth using them.
What's the difference between the two? The functions seem to be identical (except that one has an i in it). For every mysql_something() I've looked up there is an identical mysqli_something() function.
Link to comment
Share on other sites

I think mysqli acts as a more advanced API with more features and capabilities. Or at the very least they are improved from a performance context. http://www.php.net/manual/en/mysqli.overview.php(about half-way down)

Link to comment
Share on other sites

I think mysqli acts as a more advanced API with more features and capabilities. Or at the very least they are improved from a performance context. http://www.php.net/manual/en/mysqli.overview.php(about half-way down)
I see. Thanks, scientist!I'm betting that this is my problem then. I'll try it when I get home and let you know what happens. :)
Link to comment
Share on other sites

I'm betting that this is my problem then. I'll try it when I get home and let you know what happens. :)
:)And I thought I had it....turns out I still get the same errors. Although I do have both mysql and mysqli extensions enabled in the php.ini file. Should I disable one of them?I'm going to try boen_robot's suggestion and disable all my firewalls to see if that helps. EDIT: Nope that doesn't work, either.
Link to comment
Share on other sites

And I thought I had it....turns out I still get the same errors. Although I do have both mysql and mysqli extensions enabled in the php.ini file. Should I disable one of them?
I hereby give you permission to disable one of them, preferably mysql, as you had chosen mysqli on setup, but this will mean you would have to test it using mysqli functions.Go forth and conquer.
Link to comment
Share on other sites

If the problem was using an extension that's not enabled (e.g. using mysql when only mysqli is enabled), the error message shoud've said something among the lines of "No such function". A time out error could mean that the server is not running or is not reachable for whatever reason (usually due to a firewall).That's why I wanted you to connect with Workbench... in it, and the administrative part to be more precise, you can check out if it says the server is running or not. If it is, then the only other possibility is that PHP can't reach MySQL... in most cases, that would be due to a firewall problem, but I'm running our of ideas as to what else could be it.Once you turn off your firewalls, try to use ShieldsUP and see what you get when you scan "All Service Ports". If you have indeed disabled all Firewalls, assuming you aren't behind a router, you should see blue and red squared (closed and open port status, respectively). If even one Firewall is running, you should see green squares (silent) instead.

Link to comment
Share on other sites

If the problem was using an extension that's not enabled (e.g. using mysql when only mysqli is enabled), the error message shoud've said something among the lines of "No such function". A time out error could mean that the server is not running or is not reachable for whatever reason (usually due to a firewall).That's why I wanted you to connect with Workbench... in it, and the administrative part to be more precise, you can check out if it says the server is running or not. If it is, then the only other possibility is that PHP can't reach MySQL... in most cases, that would be due to a firewall problem, but I'm running our of ideas as to what else could be it.
Is it possible it's a configuration error in PHP? When I installed PHP, I installed support for both the mysql extension and the mysqli extension. So from my understanding I should be able to use either one, correct? Are there any other entries in php.ini that need to be made? (other than the extension=...)Is there a specific version of MySQL I should install? I'm using 5.1.4 (I think, whatever the latest one is) but is there a specific version that works with mysql and one for mysqli?
...assuming you aren't behind a router,...
The computer is connected to a router yes, but if PHP and MySQL are both on the local machine that shouldn't matter, should it? I'll give ShieldsUP a shot when I get home though. See what it brings up. EDIT: Upon reading about ShieldsUP I think you meant that ShieldsUP would not work if I am behind a router.
Link to comment
Share on other sites

Yes, I meant that ShieldsUP wouldn't work if you're behind a router. It tries to probe the ports you have opened, but a home router acts as a hardware firewall - it is silent on all ports unless explicitly forwarded to a certain private IP. A computer from within the local network (including "localhost") doesn't reach the router, so that's not related to MySQL not working.The only other directive that could've been a problem is "extension_dir". It should be "ext", or ".\ext", and if you want to be safe, you can specify the full path to PHP's folder plus "ext". But again, if the problem was using an extension that's not enabled, the message should've read something like... wait... [searching...]... "Call to undefined function [insert function name here]" - that would've been the message if the MySQL or MySQLi extension was not loaded.I would've suggested that you also add PHP to the exceptions list, since it is the one to make an outgoing connection, but if turning off all of your firewalls didn't helped, doing that won't help either.I still think you might be missing a firewall... Do you have another computer behind the router? If so, try to again disable all of your firewalls (that you know of...), install a port scanner on that other computer such as Advanced Port Scanner, and probe your current computer (the one with the MySQL server on it). If the port scanner doesn't detect port 3306 as "opened", you haven't turned all of your Firewalls. If it explicitly says it's "closed", it means MySQL is not running.

Link to comment
Share on other sites

I still think you might be missing a firewall... Do you have another computer behind the router? If so, try to again disable all of your firewalls (that you know of...), install a port scanner on that other computer such as Advanced Port Scanner, and probe your current computer (the one with the MySQL server on it). If the port scanner doesn't detect port 3306 as "opened", you haven't turned all of your Firewalls. If it explicitly says it's "closed", it means MySQL is not running.
I'm not too network savvy, so I'm not entirely sure what behind a router means exactly. I have another computer on the network (well actually not on the network yet, that's another mystery I have yet to solve :)) but it connects to an access point which then connects to the router. It can connect to the intranet site I have set up though.Can I use the port scanner from localhost? Or does it have to be from another computer?
Link to comment
Share on other sites

A port scanner could be used from the same computer, but the results may not be conclusive enough. The only way to be absolutely sure is to let another computer probe it. It needs to be another computer from within the local network, so that it could reach your computer.If you're "behind a router", it means that your computer can't be reached directly from the internet. If your computer's IP address (as seen from your computer's network settings; You know, "Network and Sharing Center" > "Local Area Network" (or similar) > Support) is 192.168.xxx.xxx, chances are you're behind a router. The term is "behind a router", because your computer could be reached from the internet if computers on the internet look for your router. The router can be configured to let the connection go through to one of the computers on the local network, or not... think of it as a bunch of big bodyguards standing in around you and your family (you're all behind each of them). You could explicitly tell one of them that if a friend of yours comes, they may let him talk to you (had any shivers imagining that yet? I know I did...).

Link to comment
Share on other sites

A port scanner could be used from the same computer, but the results may not be conclusive enough. The only way to be absolutely sure is to let another computer probe it. It needs to be another computer from within the local network, so that it could reach your computer.If you're "behind a router", it means that your computer can't be reached directly from the internet. If your computer's IP address (as seen from your computer's network settings) is 192.168.xxx.xxx, chances are you're behind a router. The term is "behind a router", because your computer could be reached from the internet if computers on the internet look for your router. The router can be configured to let the connection go through to one of the computers on the local network, or not... think of it as a bunch of big bodyguards standing in around you and your family (you're all behind each of them). You could explicitly tell one of them that if a friend of yours comes, they may let him talk to you (had any shivers imagining that yet? I know I did...).
So is my other computer behind the router then? It's not a connection from the internet and it has the same subnet, and the same gateway so I assume it would be then right?I'll give it a shot with a port scanner and see what I can come up with.BTW, nice picture you painted for me with the body guards! :)
Link to comment
Share on other sites

Same subnet and gateway? Well, you're on the same network, that's for sure. So yeah... probe away. Behind a router or not, a probe from that other computer will work.

Link to comment
Share on other sites

Same subnet and gateway? Well, you're on the same network, that's for sure. So yeah... probe away. Behind a router or not, a probe from that other computer will work.
Ok, I'll give it whirl tonight and let you know what I turn up.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...