Hey fellow Cakers,

I've been developing on CakePHP for a bit and decided to have a
localhost version on MAMP so that I could demo my app to people
without being dependent on an Internet connection.

Ran into a few issues ofcourse and hoping someone can give some
insight:

1) I have several sites under the /Sites/ folder and I pointed MAMP's
Apache document root there. For example /Sites/project1/ is where the
Cake app sites.  It finds the /project1/ site fine (after some
htaccess mods) but there are issues with relative links. Any link that
is manually coded and not using $html->link uses /Sites/ instead of /
Sites/project1/ as the base. This is for images and any Ajax calls
from jQuery. (css and js files are fine). The images I can bare, but
the site is unusable without Ajax.

Temp solution: changed the document root to /Sites/project1/. This is
not ideal, but I'd like to know if you guys have a fix so I don't have
to change the document root all the time for previewing different
projects.

2) We have a lot of complex MySQL queries being made, using $this-
>query('SELECT...'). We've placed these in the appropriate models
within a function. Hence from the Controller we'll have something like
$this->Users->getMeSomething($variable), that goes to the user.php
model and runs that function. This works fine on our live and dev
sites, but for some reason on MAMP I'm getting the error:

Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '__getUsersForUsers' at line 1 [CORE/cake/
libs/model/datasources/dbo_source.php, line 525]

The context:
======
DboSource::showQuery() - CORE/cake/libs/model/datasources/
dbo_source.php, line 525
DboSource::execute() - CORE/cake/libs/model/datasources/
dbo_source.php, line 201
DboSource::fetchAll() - CORE/cake/libs/model/datasources/
dbo_source.php, line 336
DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php,
line 297
Model::call__() - CORE/cake/libs/model/model.php, line 441
Overloadable::__call() - CORE/cake/libs/overloadable_php5.php, line 52
AppModel::__getUsersForUsers() - [internal], line ??
UsersController::view() - APP/controllers/users_controller.php, line
401
Object::dispatchMethod() - CORE/cake/libs/object.php, line 118
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
[main] - APP/webroot/index.php, line 88
======
Line 88 on webroot is this: $Dispatcher->dispatch($url);

Thanks for any help

Fahd

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to