Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Where and how do you specify the mysql.sock location  (Read 13726 times)

0 Members and 1 Guest are viewing this topic.

tonyofpureevil

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 12
Where and how do you specify the mysql.sock location
« on: October 13, 2019, 08:34:31 pm »

My installation is purely local on a laptop.
This means web server, mysql (mariadb), and php are all installed locally.
mysql is configured to not use networking, so socket communication is necessary.
the webserver is chrooted so I need to configure the socket in cpg1.6.06 as seen by the webserver
I have already configured phpMyAdmin and WordPress to work this way with no problem
None of the configuration tricks used by those applications work for Coppermine.
I can find no Coppermine documentation that shows how to do this.

help
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Where and how do you specify the mysql.sock location
« Reply #1 on: October 13, 2019, 11:45:36 pm »

Just "localhost" doesn't work?
Logged

tonyofpureevil

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: Where and how do you specify the mysql.sock location
« Reply #2 on: October 14, 2019, 02:39:02 am »

localhost does not work as mysql is configured with NO network access allowed.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Where and how do you specify the mysql.sock location
« Reply #3 on: October 14, 2019, 02:58:40 am »

Use of 'localhost' with mysqli should open a UNIX socket.

https://www.php.net/manual/en/mysqli.quickstart.connections.php
Logged

tonyofpureevil

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: Where and how do you specify the mysql.sock location
« Reply #4 on: October 14, 2019, 03:23:13 am »

Yes, but in the wrong location. Re-read OP
Logged

tonyofpureevil

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: Where and how do you specify the mysql.sock location
« Reply #5 on: October 14, 2019, 03:26:16 am »

Oops! Replied too fast. The link in your post has the answer.  Will try and then report the result.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Where and how do you specify the mysql.sock location
« Reply #6 on: October 14, 2019, 03:32:38 am »

Of course a default socket needs be set in PHP

Logged

tonyofpureevil

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 12
Re: Where and how do you specify the mysql.sock location
« Reply #7 on: October 14, 2019, 03:50:00 am »

Success!

edit /etc/php-7.3.ini
find the [MYSQLi] section and change default_host to localhost and default_socket to /your/path/to/mysql.sock
save the file and restart php73_fpm

In the Coppermine installer, blank the host field and enter your database username and password

Of course, this only works if you just have one application that uses the default values.
Fortunately, my other applications let me specify the socket location!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.