Jump to content

Using named pipes in Windows - Install.php changes


Greenhorn
 Share

Recommended Posts

Hi, I have just installed the product and my MySQL setup is using Named Pipes.  I found that the install.php had a bit of an issue with this so I made some changes.  Hope these'll help somebody and maybe make it into the product.  Other than the install script, the rest seemed to work fine with the named pipe.

Line 218:
has:  if(!isset($values['dbPass'])) $values['dbPass'] = ini_get("mysqli.default_pw");
added:  if(!isset($values['dbSocket'])) $values['dbSocket'] = ini_get("mysqli.default_socket");
 
line 233:
has:  $this->input('dbPort', 'DB Port', $values['dbPort'], true);
added:  $this->input('dbSocket', 'DB Socket', $values['dbSocket'], true);
 
line 275:
was:   $fields = array('dbUser', 'dbName', 'dbPass', 'dbHost', 'dbPort'); 
became:   $fields = array('dbUser', 'dbName', 'dbPass', 'dbHost', 'dbPort', 'dbSocket');

line 283:
was:   if(!$values['dbUser'] || !$values['dbName'] || !$values['dbPort']) {
became:   if(!$values['dbUser'] || !$values['dbName'] || !( $values['dbPort'] || $values['dbSocket']) ) {

line 289:
was:   $mysqli = new mysqli($values['dbHost'], $values['dbUser'], $values['dbPass'], $values['dbName'], $values['dbPort']);
became:   $mysqli = new mysqli($values['dbHost'], $values['dbUser'], $values['dbPass'], $values['dbName'], $values['dbPort'], $values['dbSocket']);

line 336:
had:    "\n\$config->dbPort = '$values[dbPort]';" .
added:   "\n\$config->dbSocket = '" . addslashes($values['dbSocket']) ."';" .
 

This seemed to do the trick for me.

Hope it helps somebody.

-g
 

  • Like 1
Link to comment
Share on other sites

  • 10 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...