Welcome Guest, Not a member yet? Register   Sign In
database connection via comand line problem
#1

[eluser]ggoforth[/eluser]
Hello All! I'm trying to set up CI to run via the command line to set up a cron job. I've actually got CI up and running via the command line but I'm having issue connecting to the database. This is fresh install of codeigniter, just autoloading the database lib. CI is generating the "Database Error Occured" error page. Any known issues connecting to the database via the command line, when it's not apache running the file?

Thanks!

Greg
#2

[eluser]ggoforth[/eluser]
So I'm almost positive I need to connect to the database using the DSN option. Is this correct? Anyone ever do it this way? Because I'm using command line there is no "localhost" (I believe), so I think I need another way to connect to the database. Any pointers here would be GREATLY appreciated. Been at this for hours and no solution just yet.

Thanks to anyone that can give me a pointer!

Greg
#3

[eluser]ggoforth[/eluser]
Never mind, I squashed it. It was my own error. That is what programming at 4:30 am will do to you.
#4

[eluser]TheFuzzy0ne[/eluser]
It seems you're missing out on one of the most important tools for a PHP programmer - Coffee!




Theme © iAndrew 2016 - Forum software by © MyBB