FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Importing mbox file with maillist.php fails with mysql error
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Importing mbox file with maillist.php fails with mysql error [message #14479] Sat, 15 November 2003 02:11 Go to next message
hari is currently offline  hari   United States
Messages: 23
Registered: November 2003
Location: Los Angeles, California, ...
Karma: 0
Junior Member
I'm trying to import mail messages in mbox format using maillist.php and I get the following error:

$ cat msg1 | /usr/bin/php /home/hari/FUDforum/scripts/maillist.php 1
Content-type: text/html
X-Powered-By: PHP/4.3.4

<br />
<b>Warning</b>: mysql_connect(): Can't connect to local MySQL server through socket '/var/tmp/mysql.sock' (2) in <b>/home/hari/FUDforum/include/theme/default/db.inc</b> on line <b>66</b><br />
<br />
<b>Warning</b>: mysql_error(): supplied argument is not a valid MySQL-Link resource in <b>/home/hari/FUDforum/include/theme/default/db.inc</b> on line <b>66</b><br />
<br />
<b>Warning</b>: mysql_errno(): supplied argument is not a valid MySQL-Link resource in <b>/home/hari/FUDforum/include/theme/default/db.inc</b> on line <b>66</b><br />
(maillist.php:342
) : <br />
Query: Initiating mysql_connect<br />
Server Version: Unknown<br />


Is there anything obvious that I'm not doing? Otherwise is there an easier way to import mail files?

Thanks,
Hari Nair

Re: Importing mbox file with maillist.php fails with mysql error [message #14484 is a reply to message #14479] Sat, 15 November 2003 17:11 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I suspect you have not unlocked the forum before attempting to import messages from the mailing list.

FUDforum Core Developer
Re: Importing mbox file with maillist.php fails with mysql error [message #14485 is a reply to message #14484] Sat, 15 November 2003 17:37 Go to previous messageGo to next message
hari is currently offline  hari   United States
Messages: 23
Registered: November 2003
Location: Los Angeles, California, ...
Karma: 0
Junior Member
The forum is unlocked, and the files are accessible through the shell.

In the global set up, I left the database server entry empty, and everything works. I think the mysql socket is at /var/lib/mysql/mysql.sock (which is a symlink to /tmp/mysql.sock), but running maillist.php from the command line seems to look for /var/tmp/mysql.sock which does not exist.

This is my ISP account, so I do not have root access.

I know very little about mysql. Is there an environment variable or an option I can pass to php to look at the proper socket?

Thanks,
Hari Nair
Re: Importing mbox file with maillist.php fails with mysql error [message #14486 is a reply to message #14485] Sat, 15 November 2003 17:43 Go to previous message
hari is currently offline  hari   United States
Messages: 23
Registered: November 2003
Location: Los Angeles, California, ...
Karma: 0
Junior Member
Never mind - I fixed the problem!

I set the database server path to :/var/lib/mysql/mysql.sock in the administration panel and now the mail import works.

Thanks for a great product.

Hari Nair
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to "lock" threads (no reply allowed)?
Next Topic: where are the messages stored
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 00:02:55 GMT 2024

Total time taken to generate the page: 0.02250 seconds