Welcome Guest, Not a member yet? Register   Sign In
Cron execution error
#1

Hi, 
I am new with CodeIgniter (amazing framework i love it thanks) , so sorry for newbie question !
I have a correct piece of code in my controller. If i run it in cron i get error:

COMMAND:
/usr/local/bin/php  /home/XXXXXXXXXXXXX/public_html/gestionale/index.php Calendar appuntamenti

A PHP Error was encountered

Severity:    Warning
Message:     mysqli::real_connect(): (HY000/2002): No such file or directory
Filename:    /home/XXXXXXXXXXXX/public_html/gestionale/system/database/drivers/mysqli/mysqli_driver.php
Line Number: 203

Backtrace:
        File: /home/XXXXXXXXXXX/public_html/gestionale/index.php
        Line: 315
        Function: require_once


Database error: A Database Error Occurred

        Unable to connect to your database server using the provided settings.
        Filename: core/CodeIgniter.php
        Line Number: 518

any help please ? thanks
Reply
#2

Did you setup ./application/database.php for your database settings?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Hi,
in your config/database.php, try to change hostname from localhost to 127.0.0.1
Reply
#4

yessss 127.0.0.1 did the magic ! thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB