To checkout the code, execute the following two lines after each other. As of version 0.7 (which will be released later today Jan 12, 2004), PHP-IDN can be made externaly from the PHP sources. Just check it out (or unpack the distribution tarball, see below) in a directory of your choice.
cvs -d :pserver:anonymous@cvs.bayour.com:/var/cvs login cvs -d :pserver:anonymous@cvs.bayour.com:/var/cvs co idnJust press the ENTER key when asked for a password. To view the CVS repository through the web browser, turn it to the CVS repository for the IDN PHP API.
To update your CVS directory, execute the following command from within the code directory:
cvs -d :pserver:anonymous@cvs.bayour.com:/var/cvs update -P -r REL_1_2bPlease note that the CVS version can break at any time!. The latest version is currently 1.2b, and is availible as a tar ball or as a BZip'ed tar ball and the CVS tag is REL_1_2b.
When the PHP-IDN module code is checked out, you will have to phpize the source directory. This is done by executing the command
phpizeinside the PHP-IDN code directory.
./configureAfter this is done, it's time to build the module by executing the command
make
Update 20061124:
Update 20061121:
Update 20060105:
Update 20041218:
Update 20040426:
Update 20040204: Thanx to Thomas Jacob for sending patches that fixes some more memory management issues still left from 0.8.
Update 20040130: Thanx to Sascha Kettler for sending patches that fixes PHP threading error(s) and memory leaks. Thease patches are included in the current version - version 0.8.
Update 20040113: It is now possible to compile the PHP-IDN module separate from the PHP source tree. This is possible using phpize (distibuted and built from the PHP source). Also, since 0.7, there's also a Debian GNU/Linux package. Currently, only the i386 package exists prebuilt, but you can download the source files, and rebuild your own (using dpkg-source and debuild commands).
Update 20031111:
Lost's of bugfixes - mostly memory problems. Don't segfault etc as much, but really
works (every time! :). This is version 0.5.
Update 20031109:
The API have been finalized. It's quite different from version 0.2 above, so make sure you don't use that. Here's
version 0.4. Look at the included test script in 'tests/idn.php' on how to use it
(the IDNA converter referenced above always use the very latest API).
The 0.4 version also includes the rudimentary framework for an API reference. The idea is to have PHP-IDN included
in PHP, so hoppfully this API reference will be located at the php.net site...
To check that the module is loaded, use THIS code (not the one above!)
if(function_exists("idn_to_ascii")) { echo "idn exists"; }
Update 20031107:
Have been testing and updating the module during the day, now it works almost perfect! I still have some
memory leeks. Or if it's the combination of Apache and PHP as described on the following URL's:
http://bugs.debian.org/206414 and bugs.debian.org/205592. I don't know at the moment, but I'll try to find out...
I have a preliminary tarball for you to test out. See above to get it compiled...
Also have a look at MY version of the IDNA converter. If it can't
convert the value (you get an error) or you don't get a reply in a timely manner, try reloading the page a
couple of times (Apache probably crashed).
Note that my IDNA converter is very limited because all functionality haven't been tested, but I'm working on it...
Update 20031106: The module compiled just niceley (after discovering that I had to use options to the --with-idn parameter). Some simple test code verified that the module was loaded and worked.
if(function_exists("idn_unicode_to_ascii")) { echo "idn exists"; }I will now start testing it and see if it does the conversion it's supposed to...
Update 20031031: Code was written and commited into CVS yesterday. I'm now in the process of testing the module. I don't expect it to work (it was quite a quick hack), but with a little optimization it should work. The basics are there, now I just need to fine tune the code :).