Abyss, mentioned in Larry Ullman's Newsletter.

Post new topic   Reply to topic    Aprelium Forum Index -> Off Topic Discussions
View previous topic :: View next topic  
Author Message

Joined: 29 Oct 2003
Posts: 3719
Location: USA, GA

PostPosted: Fri Jan 18, 2008 3:48 am    Post subject: Abyss, mentioned in Larry Ullman's Newsletter. Reply with quote

Author Larry Ullman (the author of my PHP books), mentioned about Abyss in his Newsletter today. He shows you how he installed the unreleased version of PHP 6 on it, and he also shows you how he compiled PHP 6 for the Mac. This is awesome! ;-)

Q & A => How do you install PHP 6 when it hasn't been released?

An astute reader asked me about this when they noticed that parts of my new book, "PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide", requires PHP 6 but that it hasn't been formally released yet. In fact, even in the appendix I had to demonstrate installation using PHP 5. That's because the book shows how to install PHP using pre-compiled installers, which are much more fool-proof than doing it manually, and none of these installers support PHP 6 yet, either. In order to test on PHP 6, I manually installed it on both Windows and Mac OS X. I'll sketch out what that entailed.

The first step in manually installing PHP 6 was to decide what Web server application to use. I went with Abyss, which another reader had recommended to me. It's arguably not as powerful as Apache, but sometimes that's a good thing. It's small, easy to use, and works pretty well. More importantly, by installing PHP 6 with Abyss, I wouldn't mess up my existing PHP installations that ran using Apache. If I wanted to test PHP 6 then, I might end up using the URL http://localhost:8080. To test a live site I'm developing for a client or myself, I'd use PHP 5 by going through http://localhost. The port number at the end of the address indicated which Web server, and therefore, which version of PHP, would be used.

To then install PHP 6 on Windows was rather simple. First, I downloaded the latest Windows version from http://snaps.php.net. You expand the downloaded ZIP file and copy everything to a folder on the computer (I used C:php6). Then, you follow the Abyss documentation for how to enable PHP support. Basically this is a matter of using a Web-based configuration tool to associate files with an extension of .php with the PHP executable. Instead of choosing the PHP 5 executable, I used the new PHP 6 one, and that was that.

Installing PHP 6 on my Mac was slightly more complicated as I had to "build" PHP myself from the source code. This is common on all Unix/Linux computers (the Mac operating system is a version of Unix). To do that, I downloaded the source code from http://snaps.php.net. Then you expand the downloaded file so that you have a folder full of stuff. You also have to download the latest version of ICU (International Components for Unicode), which is what PHP uses to support Unicode, a major feature of PHP 6. Expand that downloaded file and then open the Terminal, so you have command-line access.

Building software from the source on Unix is simple in theory. You use the command-line and normally execute three commands: "configure", "make", and "make install". One snag is that you need to use the proper configuration settings and the second snag is that if a problem occurs, it can take quite a lot of searching to find the answer. But for building PHP 6 on my Mac, I ran these commands in the Terminal:

1. cd /path/to/icu/directory
2. ./configure --disable-threads --enable-extras --enable-icuio --enable-layout
3. make
4. sudo make install
5. cd /path/to/php6/directory
6. ./configure --prefix=/usr/local/php6 --with-config-file-path=/etc/php6 --with-mysqli=/usr/local/mysql/bin/mysql_config --with-icu-dir=/usr/local/lib/icu/3.8/
7. make
8. sudo make install

The "cd" commands change the current directory (you have to replace "/path/to/*/directory" with the actual path to the directory; to get that, you can just type "cd", followed by a space, then drag the folder from the Finder into the Terminal window). Then "configure" tells the software how it should be configured. With PHP, for example, the "prefix" indicates where it should be installed, the "config-file-path" says where the php.ini file should go (I want PHP and the php.ini to be in different directories than the standard PHP installation), "with-mysqli" includes support for the Improved MySQL functions, and "with-icu-dir" includes support for ICU. The "configure" command has to be preceded by "./", which means "run the 'configure' command in this current directory. You don't have to use "./" for the other commands as they are all universal commands (i.e., they should be in your path). The "make" command builds the software. If that works, you can then install it. If it doesn't work, you'll see errors, which you need to fix before going on. Also note that "make" normally takes some time, like some minutes to a couple of hours, depending upon the complexity of the software and the speed of your computer. The "make install" command actually installs the software. I preface this with "sudo" to run the installation as a super user (because the software will be installed in a directory that I don't otherwise have access to). And that's it for building the software. Then I go into Abyss' Web-based administration window and associate files with an extension of .php with the PHP executable that was installed in /usr/local/php6/bin. This executable is called just "php" ("bin", by the way, is short for "binary", and is where executable files are normally found for software that you build).

So installation of PHP 6 wasn't really too hard and it's kind of interesting to know how to do it. Just be prepared the first time to do a few searches to figure out why you might be seeing certain errors, because you will see some errors!

You can find it on his website too: http://dmcinsights.com/newsletter.php#qa
Computer Programmer & Networking Specialist

Back to top View user's profile Send private message Visit poster's website MSN Messenger

Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jan 18, 2008 5:00 pm    Post subject: Re: Abyss, mentioned in Larry Ullman's Newsletter. Reply with quote

TRUSTAbyss wrote:
I went with Abyss, which another reader had recommended to me.

We thank the mysterious reader who has recommended Abyss to Larry. ;-)
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Off Topic Discussions All times are GMT + 1 Hour
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB phpBB Group