IceWarp Server User to User Forum IceWarp Server User to User Forum

Forums  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

Webmail use PDO connection by Mysql

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [IceWarp Product Configuration] >> IceWarp Integrated Webmail Server >> Webmail use PDO connection by Mysql Page: [1]
Login
Message << Older Topic   Newer Topic >>
Webmail use PDO connection by Mysql - 7/25/2008 8:36:34 AM   
sirimit

 

Posts: 1
Score: 0
Joined: 7/14/2008
Status: offline
Hello,
I can't use PDO connection by Mysql
I already setup Mysql , Database , ODBC
I used below in PDO Connection
mysql:host=localhost;dbname=webmail
user : root
pass : password
and uncomment  extension=php_pdo_mysql.dll in php.ini
copy libmysql.dll from your MySQL's /bin directory and place it in the /merak/php folder
but i still can't login to webmail and it didn't create any table in my database

please suggest me
Post #: 1
RE: Webmail use PDO connection by Mysql - 7/26/2008 12:06:35 AM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Hi,

Did you create the datasource? Check http://esupport.icewarp.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=93

regards,
Marcio

(in reply to sirimit)
Post #: 2
RE: Webmail use PDO connection by Mysql - 7/28/2008 11:09:02 AM   
choiland

 

Posts: 16
Score: 0
Joined: 5/1/2008
From: Minnesota
Status: offline
We are having the same problem as well. For some reason it appears that the mail software keeps defaulting back to the sql lite connection. We have tried a new database, checked user permissions on the DB, and the ODBC connection always tests to be able to connect. When i checked our old pdo table it says it hasn't updated since may 2008.  i have followed all the steps in the KB article. I remember in the old forum, the pdo connection string was wrong in the case of host vs dbhost. i have tried both and had no success. right now i am thoroughly perplexed. anybody else seeing anything like this at all?

(in reply to marciohumpris)
Post #: 3
RE: Webmail use PDO connection by Mysql - 7/29/2008 3:10:29 AM   
techaware

 

Posts: 15
Score: 0
Joined: 5/8/2008
Status: offline
Hey there...... are you by any chance using shared configs? (like in a load balanced environment?). If so, I ran into something odd the other day setting up a new machine, where the config sharing was set up, but it was still pulling information from the local \config\_webmail\server.xml file. It took mew quite some time to figure this out, as It hadn't happened to me before. (I'm still trying to figure out what I haven't done right to get it to pull the information properly). So, you might want to check that out, and see if it is pulling from the right place. Oh, and the proper way to set up the PDO is localhost;webmail  that works. so:IPofMySQLServer;nameofdatabase no need to do the mysql:host=localhost;dbname=webmail  thingy...

(in reply to choiland)
Post #: 4
RE: Webmail use PDO connection by Mysql - 7/29/2008 7:08:25 AM   
choiland

 

Posts: 16
Score: 0
Joined: 5/1/2008
From: Minnesota
Status: offline
I just figured out the same thing last night. We are using a shared config and the server.xml file in _webmail locally was overriding the shared settings. do you know what would happen if we were to delete the _webmail folder from the local machine? will the software look towards the shared config then? Anyhow, good to know other people are seeing the same issues, and glad it is finally working.

(in reply to techaware)
Post #: 5
RE: Webmail use PDO connection by Mysql - 8/1/2008 6:14:55 PM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Hi, guys

Strange, I use  LB setup (via hardware) and dont see problems with reading server.xml, it reads from my file server, where I have the config folder centralized.

Choiland, the _webmail folder has the default settings for users (settings.xml), server.xml (SMTP host, POP host, login full email or username), spellchecker.xml...  and folders with domains if they have their own settings.xml.

So you can merge the directories or rename the local one, in worse case you can rename it back to figure it out, but you should have no problems.

regards,
Marcio

(in reply to choiland)
Post #: 6
RE: Webmail use PDO connection by Mysql - 8/4/2008 5:03:04 PM   
ericgearhart

 

Posts: 31
Score: 0
Joined: 6/9/2008
From: Tucson, AZ
Status: offline
I've gotten WebMail PDO with MySQL working - follow their HOWTO exactly and it should work OK. I can see cache tables being created in the 'webmail' database I added to mysql and everything

(in reply to marciohumpris)
Post #: 7
RE: Webmail use PDO connection by Mysql - 8/4/2008 5:03:49 PM   
ericgearhart

 

Posts: 31
Score: 0
Joined: 6/9/2008
From: Tucson, AZ
Status: offline
Just to be clear - as marcio says follow http://esupport.icewarp.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=93 precisely and it should work OK

(in reply to marciohumpris)
Post #: 8
RE: Webmail use PDO connection by Mysql - 8/9/2008 5:07:32 AM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Guys,

The only bad thing I see about using MySQL or SQL is that its harder to clean users cache if needed, I cant just delete the cache.db file like in SQLite, Id have to use some query to select that user and delete his cache?

regards,
Marcio

(in reply to ericgearhart)
Post #: 9
RE: Webmail use PDO connection by Mysql - 8/11/2008 12:03:14 PM   
ericgearhart

 

Posts: 31
Score: 0
Joined: 6/9/2008
From: Tucson, AZ
Status: offline
Marcio,
To get the same effect as "clearing the users cache" you could just do EMPTY statements on the three tables that get created - I dunno if that's supported but I imagine it would have the same effect.

There are some nice features to getting PDO going to the mySQL DB - for example I can count all the users that have logged into the "upgraded" WebMail:

use webmail;
SELECT count(distinct `account_id`) FROM `folder`;


counts all the webmail users - something I didn't have with the SQLite DB file

(in reply to marciohumpris)
Post #: 10
RE: Webmail use PDO connection by Mysql - 8/12/2008 7:07:03 AM   
choiland

 

Posts: 16
Score: 0
Joined: 5/1/2008
From: Minnesota
Status: offline
Are any of you guys 9.3.1? if so are you seeing anything where certain users are unable to login to webmail? We have a handful of customers who hang at the loading screen. when this login happens there is a entry in the php error log that specifies errors with the pdo. I have opened a ticket with support, but was just wondering if anybody else had seen this in the new version.

(in reply to ericgearhart)
Post #: 11
RE: Webmail use PDO connection by Mysql - 8/13/2008 8:44:54 AM   
egarrison

 

Posts: 12
Score: 0
Joined: 7/30/2008
Status: offline
I am having the locking up issue on Webmail also.  Has anyone tried these 2 things?
1) Using Microsoft SQL server for Webmail.  I have the rest of IceWarp using MS SQL.  I am worried about putting MySQL on here.  We have much better backup and redundnacy infrastructure in place for MS SQL vs.  MySQL. 

2) Taking a Virgin Windows 2003 server and installing only WebMail Pro on that server.  Instead of having the webmail users hit the one server, they get their own box.  Does this help Webmail be more reliable?  Anything special on this setup?


(in reply to sirimit)
Post #: 12
RE: Webmail use PDO connection by Mysql - 8/13/2008 3:08:45 PM   
ericgearhart

 

Posts: 31
Score: 0
Joined: 6/9/2008
From: Tucson, AZ
Status: offline
I've got ~6,000 users on Merak 9.3.1 on a MySQL DB, with MySQL PDO turned on, and it's stable.

After upping the max_connections of MySQL from 100 (the default) to 1,000 we haven't had any problems

(in reply to egarrison)
Post #: 13
RE: Webmail use PDO connection by Mysql - 8/14/2008 5:16:08 AM   
choiland

 

Posts: 16
Score: 0
Joined: 5/1/2008
From: Minnesota
Status: offline
well, we have heard nothing back from support yet, although i guess what we found was along with what gary at support had found has been sent to the developers for analysis. It pains me to say this (cause i hate sqlite) but we reverted back to a sqlite connection yesterday at around noon, and have yet to have an issue with webmail hanging. The performance isn't as good, but i guess i would rather have it work slowly, than have intermittent customers hang when logging into webmail. Marcio, i think you were right, maybe the sqlite is easier. hopefully this issue with the pdo gets resolved soon, as i would rather be cahing headers to a db vs a file. just thought i would throw our work around out there.

Chris

(in reply to egarrison)
Post #: 14
RE: Webmail use PDO connection by Mysql - 8/15/2008 12:49:07 PM   
egarrison

 

Posts: 12
Score: 0
Joined: 7/30/2008
Status: offline
I upgraded PDO to use MS SQL 2005.  The initial login from users seemed a little slow, but after that, it was much faster.  Searching is very fast.  People with tons of messages in their inbox, still are not fast and can timeout.  It is an improvement over the basic PDO setting.

For those, like me, who are wondering on the documentation.  Basically setup the MS SQL database, Create an ODBC connection called "webmail" then point that to the SQL Server. Under WebMail>PDO setting. Pull down to ODBC: Webmail.  It will create 3 tables on the fly and start using SQL server.  When users login, it then inserts list of folders and objects into the tables. 

Interesting Fact.  Now I can run a Select distinct(account_id) from folder in that database and see who is using it.

It is friday afternoon and I only have 33 users in webmail, to it is hard to tell how much faster it is.  Come monday, we will have a better idea.

Eric

(in reply to ericgearhart)
Post #: 15
RE: Webmail use PDO connection by Mysql - 8/15/2008 5:48:48 PM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Thanks, Eric, I imagined something as such could be made but didnt dig to it, a bit afraid of damaging the DB, but if that happens I can restore a backup.

didnt have time yet to experiment with other DBs, using the default SQLite. Thanks a lot for the tips, I will attempt move to SQL or MySQL. I wonder which is faster.

Egarrison, if you separate webmail in another box you need a setup similar to load balanced, centralizing the storage/emails... Not sure if a separate server just for webmail can help that much (and you would need 1 more license), depends of # of accounts, your current HW, etc... A load balanced setup for sure is nice to distribute the load.

regards,
Marcio

(in reply to ericgearhart)
Post #: 16
RE: Webmail use PDO connection by Mysql - 8/17/2008 4:58:59 AM   
egarrison

 

Posts: 12
Score: 0
Joined: 7/30/2008
Status: offline
I just setup a second server to eventually put behind Load Balancer. I took a virgin Win2003 machine, installed 9.3.1. I was able to attach to hit webmail. Then Changed webmail PDO setting to same as 1st server. Webmail gave error that it all logins were incorrect. So i went to load balancer and database setting and made those all. I pointed the mail direcotry to \\machinename1\UNC share, logs did the same. All account info and PDO for webmail are in 2 databases on MS SQL.

I am able to attach to the SMTP via telnet and outlook. But Webmail will not serve a single page. Both machines have same settings and the Merak program directory is the same c:\program files\merak (default location).

Any ideas? Event Viewer and Webmail log show nothing and service shows running.

(in reply to marciohumpris)
Post #: 17
RE: Webmail use PDO connection by Mysql - 8/18/2008 4:29:57 AM   
egarrison

 

Posts: 12
Score: 0
Joined: 7/30/2008
Status: offline
I will post my own answer here.  The problem is that the services all need to start as DOMAIN Admin per instructions.  I am not in a domain in our datacenter, the machines are all Workgroup. I synced the admin accounts on both server so they have the same password, then made the SMTP service would not run under admin.  Also, I cannot send via new mail server.  Doesn't like passwords for any users. I cannot telnet to the port, so SMTP is running, just not passing authentication.  Any ideas?

(in reply to egarrison)
Post #: 18
RE: Webmail use PDO connection by Mysql - 8/23/2008 3:51:56 AM   
marciohumpris

 

Posts: 274
Score: 0
Joined: 5/1/2008
Status: offline
Hi, Garrison

If you want, PM me, I have a PDF IceWarp support send me about both hardware and software load balancing.

Yes, both Meraks have to run in Windows services under a common admin user that has same pwd in both machines and you have to use UNC for the centralized paths like /config. Temp folder and Webmail should run locally on each machine.

I havent tested PDO SQL and MySQL with LB, but I plan to. For the cache DB I use SQLite, so you might want to try that.

Tell me how it goes, I can try to help as I have the HW LB setup working fine. And you can always try to contact support with some remote access or so.

Best regards,
Marcio

(in reply to egarrison)
Post #: 19
RE: Webmail use PDO connection by Mysql - 8/23/2008 8:10:49 AM   
ericgearhart

 

Posts: 31
Score: 0
Joined: 6/9/2008
From: Tucson, AZ
Status: offline
As marcio said you have to run the IceWarp services as an account that has access to the UNC share - the accounts themselves can be different on each server (for security reasons) but whatever you run the service as has to have read/write on that shared UNC path (e.g. \\sharedconfigserver\merak\config)

(in reply to marciohumpris)
Post #: 20
RE: Webmail use PDO connection by Mysql - 9/2/2008 5:26:15 PM   
cwismer

 

Posts: 2
Score: 0
Joined: 7/7/2008
From: South Dakota
Status: offline
Is it true that an ODBC connection needs to be set up in the data sources for MySQL, or is that a typo in the setup document linked below?  Why would the SQL username and password need to be specified in Merak if it is already specified in the ODBC connection?  Isn't the ODBC connection for MS SQL, not My SQL?

http://esupport.icewarp.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=93

(in reply to ericgearhart)
Post #: 21
RE: Webmail use PDO connection by Mysql - 9/3/2008 3:43:56 AM   
corinthian

 

Posts: 24
Score: 0
Joined: 5/16/2008
Status: offline
quote:

Are any of you guys 9.3.1? if so are you seeing anything where certain users are unable to login to webmail? We have a handful of customers who hang at the loading screen. when this login happens there is a entry in the php error log that specifies errors with the pdo.


choiland, with 9.x.x with the exception of 9.3.x (haven't tested yet).  I have found that users with a large number (?) of folders and/or messages in their store will hang after logging in and then get bumped back to a blank login.

In my case this has only been replicated with users with a large number of folders and/or messages in their store. In each case the user has several hundred messages in the inbox and a number of folders with hundreds more.  I don't know what this break point is.  Users with small stores and single inbox folders (or just one or two folders) have been able to authenticate fine.

The logs indicate that the db.php file is the source of the error, and it appears that the system opens several hundred SQL connections prior to the error.  The number is apparently too high for the functions of db.php to handle.

After the service ran for a while, the affected users were able to log in. Can't explain this at all??? They worked just fine.  (I was happy, hey it worked.)  I restart all services every 60 - 90 days (I don't give windows too much credit) and I found that after the restart, the users were not able to log in again.  So back to the drawing board.

Issue was reported to support but got a response along the lines of there is no db.php file.  So I have not been able to get anywhere with that.

Corin

(in reply to choiland)
Post #: 22
RE: Webmail use PDO connection by Mysql - 9/3/2008 8:22:12 AM   
IWAdmin DanG

 

Posts: 47
Score: 0
Joined: 5/1/2008
Status: offline
quote:

ORIGINAL: corinthian


Issue was reported to support but got a response along the lines of there is no db.php file.  So I have not been able to get anywhere with that.

Corin
 Can you PM me a ticket number that goes along with this issue? I can have them follow up on it more.

(in reply to corinthian)
Post #: 23
RE: Webmail use PDO connection by Mysql - 9/12/2008 7:25:36 PM   
egarrison

 

Posts: 12
Score: 0
Joined: 7/30/2008
Status: offline
I have tested mysql and mssql running the PDO database. Both seem to be OK and MSSQL seems to be a little faster.

We have a few users who have many thousands of messages. One has +30,000 in folders. Only about 1500 in inbox. When this account tries to open via webmail, it never opens with PDO to SQL or MYSQL.

Any ideas how this user can open via webmail...besides delete about 29,000 messages.

(in reply to IWAdmin DanG)
Post #: 24
RE: Webmail use PDO connection by Mysql - 9/24/2008 5:36:05 AM   
jsherwood

 

Posts: 7
Score: 0
Joined: 5/6/2008
Status: offline
Hello,

I am having the same problem. We use Mysql 5.0.45 and 2 out of 9500 users cannot log in(Just get the spinning wheel).  Support says there is a bug in Mysql.

If I restart the services, they can log in, then a short while after they cannot.  There is no errors or anything.

They want me to switch back to cache.db(sqlite) but we are pop3 not imap as we dont allow pop access to the server so doing this will reset everyone's read/unread.

Anyone have any ideas on this?

Thanks,
--James

(in reply to sirimit)
Post #: 25
RE: Webmail use PDO connection by Mysql - 9/26/2008 7:03:00 AM   
api

 

Posts: 4
Score: 0
Joined: 6/5/2008
Status: offline
I just changed PDO to use our MSSQL2005 database - same database+ODBC our Merak server is using.  Some users can log in fine, but some are getting stuck with a blank screen that says "loading" and nothing ever comes back!!

The PHP error log shows errors, pointing to bugs in SQL and PHP code:


[26-Sep-2008 12:14:20] PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY010]: Function sequence error: 0 [Microsoft][ODBC Driver Manager] Function sequence error (SQLExecute[0] at ext\pdo_odbc\odbc_stmt.c:133)' in D:\Merak\html\webmail\server\inc\cache\cache.php:36
Stack trace:
#0 D:\Merak\html\webmail\server\inc\cache\cache.php(36): PDOStatement->execute(Array)
#1 D:\Merak\html\webmail\server\inc\cache\cache.php(35): Cache->create('item', Array, Array)
#2 D:\Merak\html\webmail\server\inc\cache\folder.php(2): Cache->createItem(Array, Array)
#3 D:\Merak\html\webmail\server\inc\imap\folder.php(2): CacheFolder->sync('IMAPItem', Array, Object(IMAPFolder))
#4 D:\Merak\html\webmail\server\inc\webmailiqaccounts.php(2): IMAPFolder->sync(Object(WebmailIqAccounts))
#5 D:\Merak\html\webmail\server\inc\webmailiqaccounts.php(2): WebmailIqAccounts->exeInputXML()
#6 D:\Merak\html\webmail\server\inc\xmlrequest.php(2): WebmailIqAccounts->__construct(Object(DOMElement), Object(XML), Array)
#7 D:\Merak\html\webmail\server\inc\xmlrequest.php in D:\Merak\html\webmail\server\inc\cache\cache.php on line 36

< Message edited by api -- 9/26/2008 8:03:47 AM >

(in reply to choiland)
Post #: 26
Page:   [1]
All Forums >> [IceWarp Product Configuration] >> IceWarp Integrated Webmail Server >> Webmail use PDO connection by Mysql Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


2001 - 2008 © IceWarp