I am on the way of touching WINDOW registry.
Since I face some difficulty in mySQL connection, I’ve read the following
You must type a number in the range of 500065534 (decimal). Setting this parameter to a value outside of the valid range causes the nearest valid value to be used (5000 or 65534).
Click OK.
I’ve select decimal between decimal or hexadecimal.
and I am ready to click OK.
But I am afraid because I don’t understand it clear.
What does that mean by type a number in the range of 500065534(decimal)?
Should I type “500065334”?
or Should I type “5000”. “5001”, “65533”, or “65534”?
Please do not experiment with the registry. Making a mistake could make matters worse including up to trashing the OS to the point of needing to wipe it clean and starting over from scratch. Fun, not.
Please explain your situation in more detail. How you’ve installed the server, PHP, MySQL, and what you’ve done to hook things together etc.
I like to bet believing him(Sandip) because I am frustrated for some days.
but I don’t clearly understand the meaning of “type a number in the range of 500065534 (decimal)” since I am not a native speaker of English.
I remember I reinstalled it with a new one about 5 years ago.
I think I can’t install a current version at the moment for my own reason.
Since Window has restore function, I like to bet touching the registry because the solutions above, I think, make sense.
Till the step 4 and the initial of the step 5 of the solution above, it was fine but at the end of the step 5, I don’t clearly know the meaning of the following.
You must type a number in the range of 500065534 (decimal).
Setting this parameter to a value outside of the valid range causes the nearest valid value to be used (5000 or 65534)
To be clear. the server is working. i.e. when you open a browser to http://localhost you get an index page. And PHP is working. i.e. if you open a browser to a http://localhost/{{some-php-page-here}}.php page the script runs OK. And it is only connecting to MySQL that is giving you trouble?
php page without SQL is always well loaded.
but php page with SQL is often failed on the way of loading, saying “Can’t connect to MySQL server on ‘localhost’ (10048)”
Can’t connect to MySQL server on ‘localhost’ (10048) in C:\myAapm.…db_.php on line 34
I’m fairly certain there is a hyphen missing there: in the range of 5000 - 65534, so a number that is larger than or equal to 5000 and smaller than or equal to 65534.
That blog page suggests that if a number out of range is entered, then it will assume either the lower or higher number of the range, so entering either of those numbers is probably not a problem. I’m not sure I’d 100% trust a web page that misses out something as fundamental as a hyphen when quoting a range - what other typo has not been noticed before publishing it?
OP might be better of abandoning the no-longer-supported mysql functions and using PDO or mysqli to connect to the database, to see if that brings any improvement. Or post in the server configuration board as this doesn’t seem to be related to PHP.
IMHO, if I were to put these three in order of skill level - installing an *AMP package - installing Apache, PHP and MySQL separately - modifying registry keys - they would be in that order.
In other words, modifying registry keys requires a more advanced skill level. Not exactly apples to apples, but just the same you would be much better off either installing a more up to date *AMP package or better yet, installing them separately.
In any case, because of the “sometimes it’s OK, sometimes it’s not”, I suspect the problem does not involve the registry key as much as it does MySQL running as a service. Try to find out if it is running as a service when it’s OK and when it isn’t to confirm this theory.
I’ve long ago given up installing anything from the *AMP stack on my host. Everything is running either in Docker, or in Virtual Machines provisioned using Ansible so I can destroy and rebuild them at any time when anything goes wrong.
It takes a while to set up correctly, but it’s really freeing once it is.