Results 1 to 2 of 2

Thread: CRON.PHP returns "Unable to select database"

  1. #1
    rapesco-dm is offline Junior Member
    Join Date
    Apr 2010
    Posts
    3

    Default CRON.PHP returns "Unable to select database"

    I have used the 5.5.1 stack installer to install the Community edition on a Windows 2000 server.
    This server is also running an intranet site that uses IIS and is using mySQL v6 databases so I set the http port in the stack installer to 81 and the mySQL port to 3307.

    Everything appeared to be working fine - everybody could access the system without errors and perform their normal on-line tasks. I even sent a test email from a campaign successfully (although the unsubscribe link tried to take the recipient to "127.0.0.1:81" which would obviously only work on the server.

    The problem came when I setup a batch file to run cron.php via task scheduler to send out "live" emails.
    Whenever cron.php runs, it's saying "Unable to select database: Unknown database 'sugarcrm'".
    It appears that cron.php is ignoring the mySQL port setting of 3307 and connecting using the default port 3306, thereby connecting to the mySQL6 server running on the same machine. (I have proved this by creating an empty database called sugarcrm on the mySQL6 server).

    How can I get cron.php to connect on port 3307???

  2. #2
    rapesco-dm is offline Junior Member
    Join Date
    Apr 2010
    Posts
    3

    Default Re: CRON.PHP returns "Unable to select database"

    OK, I've worked round this now by copying the database to the mySQL v6 server, disabling the "sugarMySQL" service and setting the php.ini to use port 3306.

    This is fine and no longer gives the "Unable to select database" error and the web interface is still working - so far so good.

    Now running cron.php, I'm getting:-
    "PHP Fatal error: Call to undefined function imap_search() in ....\InboundEmail.php on line 4509"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. "Unable to select database" error during installation
    By mimb in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2008-08-04, 10:55 PM
  2. "Unable to select database" issue.
    By hanjayac in forum Help
    Replies: 2
    Last Post: 2008-05-16, 03:29 PM
  3. Replies: 4
    Last Post: 2008-04-07, 05:21 PM
  4. Replies: 7
    Last Post: 2006-11-28, 07:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •