Go to content Go to navigation Go to search

People

Businesses

A leetle issue 6 December 2007

So I recently figured out why I’ve had problems in the past using the findBy… dynamically created method in cakePHP’s model class. I was updating podi-notes, a podiatry website I’ve been working on, and noticed that when I uploaded it to the server, the $this->User->findByOpenidUrl() command I was using stopped working.

The field for the user’s OpenID is called “openid_url” in the users table in the database. Now, on my machine, that capitalized “U” in the middle of the dynamically created method is interpreted as “_u”. So why was the production machine interpreting it as “u”?

So if I were to set the server’s version of the call to $this->User->findByOpenid_Url(), it would work just fine and dandy. So I did this. I suspected something, looked, and sure enough, the server was set to use php4. So I changed it to php5 and what happened? That statement I’d edited started to interpret the field as “openid__url” (two underscores).

I left the server on php5, switched back to the original manner of calling the findBy — $this->User->findByOpenidUrl() — and it went back to humming along.

Apparently this is because of an issue building the dynamic function in php4. Find all the nasty details here: https://trac.cakephp.org/ticket/3079

Sphere: Related Content

Comments

  1. Got something here…

    Walker Hamilton    Dec 14, 11:37 AM    #
     

Leave a Comment