Loading will have a section titled “memcached” if the module loaded successfully. You can check by making a file called phpinfo.php in your root that contains ““. Restart the Apache service via the MAMP console and you should be good to go. Mine is located at /Applications/MAMP/bin/php/php5.3.6/conf/php.ini.Įxtension="/usr/local/Cellar/memcached-php/2.0.1/memcached.so Next we need to install the extension in MAMP, so copy the following into the section labeled “ Extensions” in your php.ini file. memcached -dĪlternatively you can start memcached up every time you log in by running these commands. You can memcached manually as a daemon by running the following. The rest of the process is actually spelled out in the brew output. usr/local/Cellar/memcached-php/2.0.1: 4 files, 100K, built in 6 seconds * If you see it, you have been successful! * Load it in a browser and look for the info on the memcached module. * Write a PHP page that calls "phpinfo() " * Add the following line to /usr/local/etc/php.ini:Įxtension="/usr/local/Cellar/memcached-php/2.0.1/memcached.so" configure -prefix=/usr/local/Cellar/memcached-php/2.0.1 -with-libmemcached-dir=/usr/local/Cellar/libmemcached/1.0.4 usr/local/Cellar/libmemcached/1.0.4: 224 files, 3.1M, built in 33 seconds configure -prefix=/usr/local/Cellar/libmemcached/1.0.4 => Installing memcached-php dependency: libmemcached usr/local/Cellar/memcached/1.4.13: 9 files, 168K, built in 5 seconds MAMP PRO (Windows) Documentation > Servers and Services > SMTP Servers and Services > SMTP Sometimes you may need to send an email using PHP, to do so you have to configure and start SMTP. Launchctl unload -w ~/Library/LaunchAgents/ This method is obviously not gonna work with Gmail/GoogleApps and other popular mail service that requires advanced SSL authentication. If this is an upgrade and you already have the loaded: After hours of browsing and trying, I was finally able to understand how to get it working. Launchctl load -w ~/Library/LaunchAgents/ You can enable memcached to automatically load on login with:Ĭp /usr/local/Cellar/memcached/1.4.13/ ~/Library/LaunchAgents/ configure -prefix=/usr/local/Cellar/memcached/1.4.13 => Installing memcached-php dependency: memcached Now we can access the memcached-php with “brew install memcached-php” First we need to access the proper repository with “brew tap josegonzalez/php”Ĭloning into /usr/local/Library/Taps/josegonzalez-php. ![]() We ultimately want to install memcached-php, and since libmemcached and memcached are both dependencies for it we can get them all at once. I am testing this by calling sendmail on the command line with the -t param like so sendmail -t Edit Template > main.Requires that you have brew installed which is pretty easy, info here, but run: I also looked at address rewriting and read this blog post Postfix: catch outgoing mail and redirect - THis looked ok, but updating the transport did not do squat for me. ![]() Mail sent through Sendmail does not seem to use this setting. Postfix on development server, allow mail to be sent to only one domain - This looks good and is what I have implemented so far, but the comment on the first answer is correct. I found a few questions that do a little of what I require So, as an extra safe option, I'd like to ensure that all mail sent from my dev machine is either rejected based on domain or forwarded to myself. So a few times now I've been caught out by clients receiving mail sent from the development server because I didn't sanitize the db.
0 Comments
Leave a Reply. |