mamp

Laravel Pass Parameter from Route to Filter

旧街凉风 提交于 2019-12-02 21:51:06
I am using the laravel framework. If I have the following route: Route::get('/test/{param}', array('before'=>'test_filter', 'SomeController@anyAction')); And this filter: Route::filter('test_filter', function() { $param = [Get the parameter from the url]; return "The value is $param"; }); How can I pass parameters to the filter so that when visiting /test/foobar I would get a page saying: "The value is foobar"? Filters can be passed parameters, like the Route object or the Request: Specifying Filter Parameters Route::filter('age', function($route, $request, $value) { // }); Above example is

Apache Server Won't Start in MAMP

纵饮孤独 提交于 2019-12-02 21:23:57
Apache server won't start when in MAMP. Here are the error logs: [Wed Aug 01 21:07:34 2012] [notice] Digest: generating secret for digest authentication ... [Wed Aug 01 21:07:34 2012] [notice] Digest: done [Wed Aug 01 21:07:34 2012] [notice] Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 configured -- resuming normal operations [Wed Aug 01 21:08:00 2012] [notice] caught SIGTERM, shutting down [Wed Aug 01 21:08:01 2012] [notice] Digest: generating secret for digest authentication ... [Wed Aug 01 21:08:01 2012] [notice] Digest: done [Wed Aug 01 21:08:01 2012] [notice] Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2

Where does Sequel Pro / MAMP store local databases?

心不动则不痛 提交于 2019-12-02 20:30:58
I had a few databases created on my computer via Sequel Pro & MAMP, and was running localhost to view them. However, I did a fresh install of Mac OS Lion, and I forgot to backup the databases to .sql files. I do backup my files regularly, and have a copy of the computer pre-install. Does anyone know the path to the db files? Are they stored in a format that I could rebuild, so I could import into Sequel Pro? Brendan Underwood Brian W's answer didn't really help with me using MAMP Pro (v2.1.4), but luckily someone else did. Location for mine were: /Library/Application Support/appsolute/MAMP PRO

Resolved: MAMP Php can't exec ('convert') after Homebrew ImageMagick install

这一生的挚爱 提交于 2019-12-02 18:23:21
I installed Imagemagick using Homebrew on Lion, everything is fine except that it doesn't work at all when being called from php. Console: $ convert -version Version: ImageMagick 6.7.1-1 2011-07-29 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC Features: OpenMP $ which convert /usr/local/bin/convert PHP: echo exec ('convert -version'); or exec('convert -version', $output); var_dump($output); Produces nothing (or an empty array). exec ('/usr/local/bin/convert') // works, but exec ('which convert') // doesn't I need to test this locally to make sure I

How to install Image Magick for MAMP (Pro) on Mountain Lion (10.8.2)

拈花ヽ惹草 提交于 2019-12-02 18:19:39
I've been searching for a way to install Image Magick on my Mountain Lion setup (where I use MAMP Pro). I did find this article , but it isn't specific to ML. Also found a couple other similar questions here on SO but they were too specific I think. Doesn't help that I'm not great at this sort of thing. Can anyone point me to a good resource? erwinheiser Make sure you check out Joel Farris' answer if you're using an up-to-date version of MAMP I finally managed to get it installed properly using Homebrew and the instructions here: http://egoco.de/post/23167969231/installing-imagemagick-for-php

Running Pow & MAMP Pro Simultaneously

南笙酒味 提交于 2019-12-02 16:53:36
I just switched from using Passenger to using POW because I didn't have to run the Apache server to run rails apps on POW. But I'm not having luck running MAMP Pro and POW simultaneously. Anyone have any luck running both MAMP Pro and POW? There is another way that I prefer. You don't have to mess with scripts or anything —much. The downside is, you need to have MAMP Pro running to access your Pow apps. First, if you have Pow installed (which, in your case, you do), uninstall it with curl get.pow.cx/uninstall.sh | sh . Not to worry, all settings and applications will be preserved. Then, you

MAMP not processing PHP

眉间皱痕 提交于 2019-12-02 16:24:41
问题 So I was working with MAMP on my Macbook Pro (running OS X 10.10) and it was working fine, but now MAMP wont process PHP at all. I have a file named 'index.php' in /MAMP/htdocs/ It contains only one line (minus the first space before the opening ?): < ?php echo "hello"; ?> MAMP runs just fine, but when I load the file it just outputs the code directly http://imgur.com/a/Ay6km#1 If I include some simple HTML in the index.php, like this: <!DOCTYPE html> <html lang="en"> <head> <meta charset=

php edits not displayed immediately when using MAMP in OSX and PHP Version 5.5.3

半腔热情 提交于 2019-12-02 15:23:30
问题 After changing php file and refreshing browser, the change is not displayed immediately, but refreshing after 15 seconds shows the change. However, changes display immediately for PHP Version 5.2.17, but not PHP Version 5.5.3. phpinfo reports HTTP Response Headers has expires for php version 5.2.17, but not for php version 5.5.3. Is this a known issue, and is there a fix in later version of php? http.conf has: LoadModule expires_module modules/mod_expires.so ExpiresActive On ExpiresDefault

Apache not starting in MAMP (but MySQL working) in OSX

放肆的年华 提交于 2019-12-02 15:04:01
I've had MAMP working for a few months and recently installed PostgreSQL. It recommended installing Apache as well, which I did to make sure PostgreSQL worked. I then uninstalled PostgreSQL and the apache build and tried to restart MAMP. It fired up the MySQL database (green light) but Apache didn't start. I uninstalled and reinstalled MAMP only to face the same problem. Apache doesn't seem to be logging any errors in the MAMP folder, so without any errors to report I'm struggling with where to begin fixing it. I'm hoping its to do with the fact that I installed another version (and deleted it

MAMP not processing PHP

我与影子孤独终老i 提交于 2019-12-02 12:44:47
So I was working with MAMP on my Macbook Pro (running OS X 10.10) and it was working fine, but now MAMP wont process PHP at all. I have a file named 'index.php' in /MAMP/htdocs/ It contains only one line (minus the first space before the opening ?): < ?php echo "hello"; ?> MAMP runs just fine, but when I load the file it just outputs the code directly http://imgur.com/a/Ay6km#1 If I include some simple HTML in the index.php, like this: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <?php echo "hello"; ?> </body> </html> Then it simply adds