DBMarcos99
DBMarcos99

Reputation: 465

Cakephp - array indexes show numbers instead of the Model name

I've got cake applications that work ok on my home server, and also worked ok on the production server. However since the host provider changed the php version 5.3.13 to 5.3.21, things have come askew. The main failing is that the array indexes show numbers instead of the Model name (in this case Article).
For example:

array( (int) 0 => array( 'id' => '12', 'title_eng' => 'News Snippets Spain: 19 February',

instead of

array( 'Article' => array( 'id' => '12', 'title_eng' => 'News Snippets Spain: 19 February',

I have got the host provider to reinstall pdo_mysql.so but that hasn't helped.

Upvotes: 1

Views: 361

Answers (1)

Dave
Dave

Reputation: 29131

My guess is, this is similar to the issue I was having.

Answer:

According to our server guy, "There are two ways to load PDO. The first is by using easyapache to install the PDO php extension. The second is by installing the PDO via PECL. It appears that the modules in question are different."

Apparently, this server had PECL on it instead of the normal easyapache PDO. When he removed that, and restarted/reset it with the easyapache PDO, everything worked great.

So - sounds like CakePHP requires the "normal" PDO.

Mystery solved.

(I posted it here instead of calling it a duplicate, since it's not really a duplicate question - I just think it has the same answer)

Upvotes: 3

Related Questions