Hi Fahd!

I can advise you on the first question, but not the second. I had been
using MAMP but decided to take it off and go with a stock approach. It
took a little bit, but works solidly now. What makes it very easy is
to use a cheap product called VirtualHostX. You can find it at
http://www.macupdate.com/info.php/id/25689/virtualhostx. The price
recently went up it appears, but it is so worth it to not be
frustrated while developing multiple sites. VirtualHostX is MAMP-
friendly.

I use it to have a sandbox site where I'm testing code and integration
before moving that code over to the development site. Both can be up
at the same time, obviously with different databases, but it could be
the same one. Hmmm...

Anyway, I am also using a product called ModelBaker from http://widgetpress.com
that also is MAMP-friendly and removes the need to use a command line
when baking. All the database design is visual and the configuration
of Cake is a snap. It is a RAP (rapid application prototype) tool that
does a great job at generating 80% of the Cake code so you can focus
on the 20% that is unique to your application. Plus it can generate an
iPhone-aware web application. That's like getting a two-for-one deal!
Very promising product.

I hope some of this helps.

On Sep 24, 3:10 pm, fahd <fahd...@gmail.com> wrote:
> 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