A number in the range of 500065534

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’ve installed an apmsetup package about 10 years ago.
it is installed on WINDOW in my room.

these days it often(1 out of 10 during page loading) fails in mySQL connection saying “Can’t connect to MySQL server on ‘localhost’ (10048)”

after some googling, I found the solution above at https://blogsandip.wordpress.com/2008/02/19/error-2003-cant-connect-to-mysql-server-on-localhost-10048/

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.

If you installed it 10 years ago it will be well out-of-date by now. You probably need to install a current version.

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)

I can’t say I understand it either. A “range” means a number between a start number and an end number, so

in the range of 500065534

doesn’t mean much at all.

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

there is db connection code in the line 34

$dbHost=‘localhost’; $dbUser=‘root’; $dbPw=‘************’;
$dbConnect=mysql_connect($dbHost, $dbUser, $dbPw);
mysql_select_db($dbName, $dbConnect); mysql_query(“set names utf8”);
die(‘could not connect:’.mysql_error());}

$dbConnect=mysql_connect($dbHost, $dbUser, $dbPw); in the above is the 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 would make sense.

Which one should I type?

(1) 5000 - 65534
(2) 5000
(3) 65534
(4) 10000

(1) is range
(2) is the beginning number
(3) is the ending number
(4) is between the beginning number and the ending number

I prefer, I am still afraid, (1) and (4).

I’ll do this on your Own risk after some preparation.

a number in the range, so (2), (3), or (4)

I’d go with (4) I think, just in case the range is exclusive and you’re not supposed to use the highest and lowest values.

1 Like

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.

Even a 5 year old stack is going to be severely out of date. Get current. Most likely you will not be having a problem once you do.

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.

1 Like

And if I were going to put it on a difficulty scale of those three things that @Mittineague listed, it would be something along the lines of…


I chose Scallio’s selection, i.e. type “10000” about 10 hours ago.
So far so good,

Thanks to all.

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.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.