Author Topic: not sure where to post this - DSN syntax help?  (Read 4259 times)

Offline joeljoel

  • Newbie
  • *
  • Posts: 1
not sure where to post this - DSN syntax help?
« on: December 11, 2007, 09:48:27 PM »
i'm trying to get RC installed on an icdsoft.com hosting account ... they support mysql connectivity like this (posted from the control panel):

  MySQL 5 Connection Settings:
  Local (web applications): Host: localhost | Socket: /tmp/mysql5.sock
  Note: Most PHP applications/scripts will accept the following syntax:
  MySQL Host: localhost:/tmp/mysql5.sock
  Remote (MySQL clients): Host: mysql5.mywebsite.com | Port: 3307
  When using "mysql5.mywebsite.com" as a MySQL Host, you need to enable "Remote Connections" for your MySQL user. (more info)
  DB Master Username: xxxxx. User xxxxx has 3 of 10 maximum allowed DBs.
  You can manipulate your DBs with phpMyAdmin (log in)

considering the above, i believe the connection string in the config file should be this:

$rcmail_config['db_dsnw'] = 'mysql://uname:pw@localhost:/tmp/mysql5.sock/xxxxx_rcmail';

but it doesnt work ... error log points to line 105 in rcube_db.inc
ive tried enabling remote client support and have also tried a variety of combinations including:

mysql://uname:pw@localhost:3306/xxxxx_rcmail
mysql://uname:pw@localhost:3307/xxxxx_rcmail
mysql://uname:pw@localhost/xxxxx_rcmail
mysql://uname:pw@localhost:3306/xxxxx_rcmail
mysql://uname:pw@mysql5.mywebsite.com:3307/xxxxx_rcmail
mysql://uname:pw@localhost:3307/xxxxx_rcmail

i have also looked at the call to the PEAR db connect function in /program/include/rcube_db.inc
but so far have decided against a direct mod to that include file

my other 2 databases being connected from PHP work fine, but neither use the DSN-style connection syntax

SO ------- any ideas? oversight on my part? a fix?

thanks in advance
joel


Offline jeremyr

  • Newbie
  • *
  • Posts: 6
Re: not sure where to post this - DSN syntax help?
« Reply #1 on: December 13, 2007, 01:16:03 AM »
No clue, but does the error log say anything more than what line the error occurs?

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: not sure where to post this - DSN syntax help?
« Reply #2 on: December 17, 2007, 03:56:14 PM »
Try removing the "/tmp/mysql.sock" stuff... I think that may be mucking up the PEAR db stuff. Try it just as:

mysql://user:pass@localhost/database