Welcome Guest, Not a member yet? Register   Sign In
Date string encoding, Config Issue?
#1

[eluser]novice32[/eluser]
Hello,

This works in localhost (XAMPP / Windows) but not in production (CentOS Linux).

In the application GUI I enter "04/09/2010" which is sent via POST as string "ItemFoundDate=04/09/2010". However, in the controller the below assignment throws an 500 error.
Code:
$ItemFoundDate =  date("Y-m-d", strtotime($this->input->post('ItemFoundDate')));
I was pre-formatting for a MySQL insert. Anyhow, just to ensure "strtotime" has nothing to do with the issue, I tried the below this still causes an error.
Code:
$ItemFoundDate =  $this->input->post('ItemFoundDate');

Could this be a config setting?

Please advise.
Novice32
#2

[eluser]novice32[/eluser]
I'm really baffled by this one because I have another controller method ( the "Add" record version), which has the same line of code and works fine...
Code:
$ItemFoundDate =  date("Y-m-d", strtotime($this->input->post('ItemFoundDate')));
#3

[eluser]novice32[/eluser]
Don't worry.. please IGNORE thread.. I found the issue. I needed to enable write access to my logs directory




Theme © iAndrew 2016 - Forum software by © MyBB