![]() ![]() Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Users/webdev/custom/php5/bin/php-cgi php-cgi -v Verify your new PHP is the default one: # which php-cgi The easiest way for changes to take effect is to log out and log back in (or you can use source command).Ĭongratulations, you now have a custom php installation! If you wish to use other PHP just comment your changes to. Then open Terminal and enter command: cat newpath.txt >. If you don't know how to edit profile from the command line, just create a plain text file in TextEdit containing those 2 lines and save it in your home folder (~/Users/webdev) as newpath.txt. profile file: PATH=~/custom/php5/bin:$PATH Add something like this to the end of your. When configure is completed, run make installĮdit your profile (~/.profile) to add new php path before existing one. with-mysql=/usr/local/mysql -without-pear with-iodbc=/usr -with-curl=/usr -with-config-file-path=/etc -sysconfdir=/private/etc enable-mbstring -with-xml -enable-exif -enable-mbregex -enable-dbx -enable-sockets configure -prefix=/Users/webdev/custom/php5 -disable-cli -enable-cgi -enable-trans-sid ![]() configure that should produce PHP with all common options and CLI disabled. You will get both binaries but you will need to use php-cgi in wxWebServer. You don't need option "-disable-cli", you can replace it with "-enable-cli" if you plan to use this PHP for something more. Modify paths and options to reflect your preferences. configure with CLI disabled if you are planning to use this private PHP build only for CGI. Go back to that Terminal window, you should still be in ~/Temp/php-5.2.3. This document will assume it's custom folder under your home folder, for example if user name is webdev it's /Users/webdev/custom/php5Ĭreate that folder (in Finder or in Terminal with "mkdir ~/custom mkdir ~/custom/php5") Open terminal window (shell) and go to folder where you unpacked files: cd ~/Temp/php-5.2.3ĭecide where you want to install this custom PHP build and create folder. Unpack downloaded archive somewhere, for example ~/Temp/php-5.2.3 Instructions here are for PHP 5.2.3 but should work for PHP 4 as well. Here is the procedure, step by step:ĭownload the complete source code for the latest PHP version from php.net. It's simple, it takes only 15 minutes and you will be proud of yourself for having a "personal" build of the PHP. In order to use PHP with the wxWebServer (or any other CGI application), you will need to build your own PHP binaries with CGI SAPI. More details about this is available here. Output will probably be something like this:ĬLI does not output any headers and output is plain text by default. You can check this by running "php -v" from the shell. By default, PHP version 4.3 and higher is built with "-enable-cli" option so default interface is CLI (Command Line Interface). If you wish to use PHP CGI on Mac OS X you will need PHP build with the CGI enabled. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |