Tag Info

Hot answers tagged

15

Edit /private/etc/apache2/httpd.conf Find the line that says LoadModule php5_module libexec/apache2/libphp5.so and uncomment it by editing out the # at the beginning of the line. (Then save the file, obviously.) Go to Terminal and type sudo apachectl graceful at the console:


10

/etc/php.ini.default serves only as a reference and is not read out by PHP at all. The built-in PHP installation will look for the file /etc/php.ini instead. This file is not present by default, but you can copy /etc/php.ini.default to /etc/php.ini and make your modifications in there. You could also just create an empty file and only add any directives you ...


10

I'd say unified GUI integration. With MAMP, you've got a single window to manage Apache, PHP, and MySQL. Whereas with the built-in stack, you have to active PHP manually and have another interface for MySQL (with no easy way to turn it on or off)


7

php -i from the command line; $ php -i phpinfo() PHP Version => 5.3.3 System => Darwin jsalaz-mac.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 Build Date => Aug 22 2010 19:27:08 Configure Command => '/var/tmp/apache_mod_php/apache_mod_php-53.3.1~2/php/configure' ...


6

Instead of guessing which php.ini you need to alter, run this command to locate the file: php -r 'phpinfo();' | grep 'php.ini' Even though I use MAMP PRO, by default my command-line PHP commands are not executed using their copy of PHP. In my case it says the file is found at /etc/php.ini Once you have located the file, follow the instructions on all of ...


5

Apache is the process that needs to have appropriate permissions to access /var/www. Apache is typically user _www of group _www on MacOS. Verify this with: grep -e '^Group\|^User' /etc/apache2/httpd.conf Two lines should be printed. My output looks like: User _www Group _www This means that on my system, Apache processes run as user _www with ...


5

The disadvantage is that you're installing stuff that you already have installed. This can cause problems when - for example - you want to use PHP using the command-line. This will trigger the built-in PHP version by default instead of the one bundled with MAMP. If these are different the results can be unexpected. I would recommend using the default OSX ...


4

As has been pointed out already, unless you are specifically forwarding http traffic from your router to your machine, your locally hosted stuff will only be available to you and the other computers on your local network. To answer your question on restricting access to your webserver to just your machine. You can do this a couple of ways. Remember, ...


4

From http://drupal.org/node/66187 (drupal may be irrelevant for your needs, but their site had a good explanaton - wanted to source it for you, and give credit to them) By default, MAMP has the memory limit that a script can use set at 8MB, which is the PHP default. Looking at PHP's php.ini-recommended file, this memory limit is normally set at 128MB. To ...


4

Actually, the #1 advantage to using MAMP is tremendous: Each time you upgrade your system, your environment won't break! There were a couple of Snow Leopard updates (or maybe it was Leopard to Snow Leopard, I can't remember) that broke Mysql. One was by moving the mysql.socket file. There was another update the broke PHP. In both cases I had to hunt around ...


3

There really isn't a good reason to run your web server as root. It opens you up to all kinds of potential abuse. OS X defaults to running the service as a severely under privileged user to protect you. Don't make these changes unless you're absolutely certain you know what you're doing! The httpd.conf file for the default Apache2 installation that comes ...


3

I strongly suggest you use the package installer or use a full stack of configuration options when compiling, including the --prefix option so you know where the binary gets installed to. I can only guess PHP 5.4 installed itself into /usr/local/bin or somewhere else and didn't just overwrite the default binary in /usr/bin. And you seem to have not modified ...


3

Briefly; no there is no easy way to update them. (Assuming that compiling from source is not considered easy) I would strongly caution against modifying the system installed versions as you're likely to have your updated versions broken when Apple issues an update that updates them. (Usually Security Updates and has bitten some users/sysadmins when Perl has ...


2

It seems as you did not add the new path to your $PATH. Citing the FAQ of the website that you have posted: Why does php -v on the command line still show my old version? php-osx doesn't overwrite the php binaries installed by Apple, but installs everyting in /usr/local/php5. The new php binary is therefore in /usr/local/php5/bin/php. You can ...


2

Yes, this should be possible using Automator. I haven't worked with php from the command line, so I'm unsure exactly how that works, but this is a general instruction. Open Automator (It's in the Applications folder). Choose to create an Application. Select Utilities under Library and choose Run Shell Script and drag it to the area on the right. In the ...


2

For me, I did the following: Edit the /Applications/MAMP/conf/php5.4.4/php.ini and php.ini.temp to be: memory_limit = 128M ; Maximum amount of memory a script may consume (8MB) Then in finder simply make the php.ini and php.ini.temp read only for all users. This way, MAMP cannot overwrite it with default files. Restart the server and check your ...


2

You can do what you ask, but it requires a Mailbox > Rebuild operation. That asks Mail to scan the ~/Library/Mail directory you found and rebuild its email header database from the files it finds there. I doubt you'd find that acceptable. I'm afraid Gerry's comment above is the right way to go about this: set up a test email account somewhere, use one of ...


2

Yes, Apache and PHP already come by default with a Mac OS X installation, and you can download an installer for MySQL on their website. For a configuration guide, have a look at this related answer: How to turn Mac OS X Lion into a web server? The linked answer also applies to Mac OS X Snow Leopard. Another popular (and imo superior) way of running ...


2

Not sure if you solved this, but you need to make sure the PEAR Mail extension is installed. Open your Terminal and enter: pear install Mail


2

To show installed php extensions from port, try port installed | grep php53- or instead of port list.


2

On OS X you'll have following : The base PATH used is located in /etc/paths. It is used to set $PATH. By default, the file contains : /usr/bin /bin /usr/sbin /sbin /usr/local/bin It will also load the paths located in /etc/path.d/. When opening the terminal I will load : ~/.bash_profile ~/.bash_login, (if .bash_profile doesn't exist) ...


2

I'm assuming that the deployment/install script was put at /usr/local/packager/packager.py when it was installed. Apparently, you can use this script to list the packages that are installed: /usr/local/packager/packager.py list Unfortunately, the script that you used to install PHP doesn't appear to have an uninstall feature. However, you should be able ...


1

I solved the problem by updating Xcode to the latest version.


1

You can't undo what you did, unless you can recover the files from a Time Machine backup. PHP probably stopped running because you removed files it needs.


1

Symlink libpq.5.3 to libpq.5: sudo ln -s /usr/lib/libpq.5.3.dylib /usr/lib/libpq.5.dylib Make a backup first.


1

Under preferences, go into variables and update (or create) TM_PHP to point to your desired executable. E.g. I have /opt/local/bin/php because I'm using MacPorts.


1

If your Mac is 64 bit, the 64-bit version would be preferred. If you are on a 32-bit system, you'll have no choice but to go with the 32-bit version. See the How to tell if your Intel-based Mac has a 32-bit or 64-bit processor to determine what you are running.


1

See http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/ (a lengthy text explaining how to patch & build gnupg from source)


1

Managed to find the problem. Remove the previous installation and then: --with-mysqli : I used the native MySql driver ( omitted the folder path ) So when you forget to add a module to your initial compilation and you are stuck with some kind a freaky error delete the old instance that successfully installed and do the ./configure ; make clean ; make ; ...


1

Have you modified the post_max_size too ? post_max_size = 20M upload_max_filesize = 20M Check "PHP post_max_size overrides upload_max_filesize" here : http://stackoverflow.com/questions/7754133/php-post-max-size-overrides-upload-max-filesize



Only top voted, non community-wiki answers of a minimum length are eligible