Jump to content
The Uniform Server Community

Problem changing ports


temporary
 Share

Recommended Posts

I'm using uniserver on a PC that already has a webserver and mysql server installed. So in order for me to use uniserver, I had to reconfigure the ports.

 

I browsed through all the files and succeeded in changing the apache port to 800 and mysql port to 33060. I also updated the mysql default port in the PHP config file to connect to port 33060. But it seems like it still doesn't work.

 

Looking at the php config file again, it says

; Default port number for mysql_connect().  If unset, mysql_connect() will use

; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the

; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look

; at MYSQL_PORT.

mysql.default_port = 33060

Does that mean the default port is hardcoded into php.exe?

 

I downgraded the php module to version 4.

 

Thanks in advance.

Link to comment
Share on other sites

WB AlleyKat.. :(

 

Just like AlleyKat said, or it may be because there is a PHP.ini in the C:/Windows folder or the C:/ folder.

 

Hope the other installation is not the normal PHP install?

Link to comment
Share on other sites

I had it changed in my-small.cnf, that's how I succeeded in making apache and mysql to listen to a different port as mentioned in first post. :( But I think there was one other file I had to edit to make it listen on 33060 as editing the my-small.cnf didn't work.

 

# The MySQL server

[mysqld]

 

port=33060

 

Here's the error from the phpMyAdmin that comes installed with uniserver. I hope it helps:

MySQL said: Documentation

#1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

 

And here's the connection info in phpMyAdmin's config file.

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address

$cfg['Servers'][$i]['port']          = '33060';          // MySQL port - leave blank for default port

$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket

$cfg['Servers'][$i]['connect_type']  = 'tcp';      // How to connect to MySQL server ('tcp' or 'socket')

$cfg['Servers'][$i]['extension']    = 'mysql';    // The php MySQL extension to use ('mysql' or 'mysqli')

Link to comment
Share on other sites

WB AlleyKat.. :(

 

Just like AlleyKat said, or it may be because there is a PHP.ini in the C:/Windows folder or the C:/ folder.

 

Hope the other installation is not the normal PHP install?

1373[/snapback]

 

I found a php.ini file sitting in c:\windows, it was from an old installation. I had it deleted, restarted uniserver, still the same problem. ( T-T)

Link to comment
Share on other sites

k, i want you to check that you do not have SINGLE installations of PHP, MySQL, or Apache Installed. If you do and they have written to the registry it will cause problems because all this programs check the registry for info before startup. Though the Uniform Server does not use registry, if they find a registry info they will go along with it.

 

Check to make sure there is no my.cnf or my.ini or anything relating in C:/ and also C:/Windows also.

 

What type of other installations of them did you say you had here:

 

I'm using uniserver on a PC that already has a webserver and mysql server installed. So in order for me to use uniserver, I had to reconfigure the ports

Link to comment
Share on other sites

I'm not familiar with the windows registry but I'll try to run a search on the words php and mysql.

 

There are 2 PCs that I use. At work, the PC here has no PHP/Apache/MySQL/IIS. They were uninstalled and I have checked all the folders for any remaining config files that weren't deleted and removed them.

 

At home, the PC I use has IIS6, PHP4, MySQL installed and running. I have yet to run uniserver on this PC because I'm still unable to reconfigure uniserver to run well on a PC without those software.

Link to comment
Share on other sites

On the computer at work, it seems like the server starts, but does not connect to MySQL with the new port. All we have to do is find what we are missing.

 

Did you check the C:/, C:/Windows for any file named my.ini or my.cnf or related namings like my-large, my-small?

 

Also check C:/Windows and C:/Windows/System32 for LIBMYSQL.DLL, the file is always left behind by PHP and MySQL single installations.

Link to comment
Share on other sites

Checked and double checked even hidden files, no such files remain.

 

I'm pretty sure that the mysql port has been hardcoded into the PHP binary which makes it ignore any changes in the settings file.

 

; Default port number for mysql_connect().  If unset, mysql_connect() will use

; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the

; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look

; at MYSQL_PORT.

mysql.default_port = 33060

 

I bolded the text in case someone missed it, and I'm on a Windows OS for both PCs.

Link to comment
Share on other sites

Thats shouldn't be.... We may be missing something.. another PHP.ini file... another my.ini or cfn file... or something that may have been left behind by single installations...

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...