circle.ch weblog by Urs Gehrig

 Search
A weblog about libre software, law, technology, politics and the like.
Academic, Android, Apache, Apple, Art, Best Of, Biotech, Civil Society, Content Management, Cooking, Copyright, Creative Commons, Crosspost, Culture, Database, Deutsch, DRM, Economy, Education, Event, Gadget, General, Geodata, Government, Health, Howto, Humor, Innovation, Intellectual Property, Java, Language, LaTeX, Law, Linux, Media, Moblog, Mozilla, Music, Office, Open Content, Open Source, P2P, PHP, Podcast, Politics, Privacy, Projects, Random Thought, Rant, Science, Search, Social Network, Software, Sport, Talks, Technology, Technology Transfer, Travelling, Weblog, Wiki, Wireless and Mobile, XML

01. June 2007

Liip is hiring - again, again, more and more
@ 14:55:21

Watch out Liip AG on www.liip.ch - they are hiring Flash/Java Multimedia Developers, JavaScript Developers, PHP/XSLT Web Developers and offer Interns in Web Development and Publishing [1]. They are going to become real big. And they have really interesting projects.

As a small sidenote - if you get hired by Liip, just mention to them to send that iPod to Basel ;)

[1] http://blog.liip.ch/archive/2007/05/23/liip-is-hiring-yet-again.html

Comments (0) Permalink del.icio.us

02. March 2007

adfinis is hiring
@ 21:37:33

adfinis GmbH in Bern is looking for a web developer
Zur Unterstützung unseres jungen Teams bei Neuprojekten und Wartung/Erweiterung von bestehenden Lösungen suchen wir per sofort eine/n PHP Entwickler/in mit Pensum nach Vereinbarung, ca. 80-100%.
More details can be found on their blog [1].

[1] http://www.adfinis.com/node/177

Comments (0) Permalink del.icio.us

12. July 2006

zlyfe - Blogs, Bilder, Community et.al.
@ 13:46:33

Der Slogan tönt so:
zlyfe is the place where you can tell others about the most memorable, astonishing, or funniest moments in your life.
Grundsätzlich kann man das und vieles mehr auch auf anderen Plattformen. zlyfe [1] pflegt aber einen besonderen Bezug zur Schweiz - sprich - die Technologie kommt aus Bern [2].

[1] http://www.zlyfe.net
[2] http://www.adfinis.com/node/176

Comments (0) Permalink del.icio.us

01. September 2005

Open Office Dokument des Hanbuchs zu PHP und MySQL
@ 21:08:31

Zu meiner letztlich publizierten PDF Version meines Einführungsscripts zu PHP und MySQL [1] aus dem Jahr 2003 ist nun auch das Open Office Dokument hinzugekommen und steht zum Download bereit. Allfällige Rückmeldungen oder Ergänzungen nehme ich gerne entgegen. Korrekturen etc. können aber auch direkt im Wiki eingetragen werden.

[1] http://circle.ch/wiki/?page=HandbuchPHP

Comments (0) Permalink del.icio.us

30. August 2005

Freetag - a tagging and folksonomy system
@ 23:08:58

Or more detailed:
Freetag [1] is a module that implements a simple, fairly robust beginning of a tagging and folksonomy system. It works with PHP4 and MySQL 3.23 so far, and i imagine that if it gets popular, it should be easy to port to additional databases and/or languages.
Maybe a way to build up its own tagging repository. Acutally I haven't tried, but according to the docs it is promising. As to feed the database, one could use his own tags or category names first.

There are probably at least two ways to tag a blog post. Either tags selected by hand at the time of writing or as a self-tagging system (algorithm), that takes e.g. the content of a blog post, analyzes it and applys the tags to the post.

Some more thoughts on tagging and retagging at overstated.net [2].

[1] http://getluky.net/freetag/
[2] http://overstated.net/04/10/09-migrating-to-delicious

Comments (0) Permalink del.icio.us

29. August 2005

Get Tags with Yahoo! Term Extraction
@ 21:54:35

This is a start:
The Term Extraction service provides a list of significant words or phrases extracted from a larger content.
It can be implemented by making use of the Yahoo! API [1]. One might then need to sort out the result set a bit and use them as "tags". Since this blog has no cache and the API only lets me have a limited number [2] of requests a day, I will not dive into it yet ;) For those using PHP, there is a so called yahoolib availabe.

[1] http://developer.yahoo.net/search/content/V1/termExtraction.html
[2] http://developer.yahoo.net/search/rate.html
[3] http://sourceforge.net/projects/yahoolib

Comments (0) Permalink del.icio.us

28. August 2005

Related posts on b2/cafelog
@ 23:46:54

To get the related posts, there was only to apply the FULLTEXT feature to the the b2posts table.
ALTER TABLE b2posts ADD FULLTEXT post_related ( post_title, post_content )
A typical SQL query looks like:
SELECT ID, post_title, post_content,
MATCH ( post_title, post_content )
AGAINST ( 'make zip files' ) AS score
FROM b2posts
WHERE MATCH ( post_title, post_content )
AGAINST ( 'make zip files') AND ( ID != '910' )
ORDER BY score DESC
LIMIT 5
The you only need to handle the results and format it with a little bit of HTML. Thats it.

Comments (0) Permalink del.icio.us

An unexpected T_PAAMAYIM_NEKUDOTAYIM
@ 22:58:57

It is said, that this PHP parse error is pointing out, that there is a problem with two colons [1]. Further it is said, that this is Hebrew. Programming can make fun.

[1] http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

TagCloud to analyze my blog
@ 18:21:50

TagCloud (beta) is an automated Folksonomy tool. It analyzes RSS feeds and comes up with a cloud of related items [1]. Even though items like "http" and "htm" do not make that much sense, it might e.g. help giving an idea on what topics certain blog is talking about.

I guess either with MySQL FULLTEXT search [2] or Bayesian classification [3] one could handle out something similar on his own blog.

[1] http://www.tagcloud.com/User/index.php?TC_Cloud_ID=5920
[2] http://dev.mysql.com/doc/mysql/en/fulltext-search.html
[3] http://www.xhtml.net/php/PHPNaiveBayesianFilter

Comments (2) Permalink del.icio.us

03. August 2005

PHP Developers for blog.ch
@ 10:55:09

blog.ch is seeking PHP developers to turn the projectlist into reality [1]. Matthias has some good ideas and is eager to fulfil them.

[1] http://blog.ch/blog/?p=148

Comments (0) Permalink del.icio.us

18. July 2005

Einführung in PHP
@ 23:44:42

Im Jahr 2003 verfasste ich für Unterrichtszwecke eine Einführung in PHP. Das Dokument steht nun unter HandbuchPHP zum Download zur Verfügung [1]. Nebst PHP wird auch MySQL und Apache HTTPD, mehrheitlich für Windows, thematisiert. Das Dokument ist unter einer Creative Commons Lizenz lizenziert. Anregungen, Änderungen und Aktualisierungen sind natürlich willkommen.

[1] http://www.circle.ch/wiki/HandbuchPHP

QR Code for your mobile phone.
Comments (1) Permalink del.icio.us

08. June 2005

Not 1, 2, 3, 4, 5, 6, 7, 8, 9 but 10 years of PHP
@ 21:52:46

[via chregu, 1] Just to have it said. It is said that PHP exists for 10 years today [2].

[1] http://blog.bitflux.ch/archive/2005/06/07/a-decade-of-php.html
[2] http://groups.google.ch/groups?selm=3r7pgp%24aa1%40ionews.io.org

Comments (0) Permalink del.icio.us

05. April 2005

Access to Desktop Search results
@ 22:16:07

Today I run across DNKA [1]:
DNKA is a search tool for remote computers. It acts as a web server by interacting as a layer between Google Desktop Search (GDS) and the user. It allows other users to search, view and download your files, emails, chats and web history.
Basically it is wonderful; you get a full search access to the indexed content of a remote computer. IMHO this application should be filed under "As long as You know what You are doing.". I tried it out in an intranet and got full access to the root drive C:\.

Then later on I found Baagle [2]. The principle is similar to the above but the tools are different. Baagle is a set of Perl scripts wrapped around the search engine Swish-e. Baagle provides a standalone webserver and an indexer. But compared to GDS it is up to you to configure and restrict the indexing to the data directories of your desire.

If you like to figure out a similar solution with PHP have a look at the earlier mentioned nanoweb or nanoserv webserver built with PHP [3] and a Swish-e wrapper written in PHP [4]. Once decided to go for Swish-e (on Windows) you need a couple of tools to handle various file mime types, among others pdftotext, ps2ascii, antiword and one that I found today to convert Excel files to text, called xlhtml. Just search.ch for them ;)

Well, now the only thing I could not find is a few lines of code to get a configurable search field to be integrated in the Windows task bar as we know it from GDS. Anyone up with a solution?

[1] http://dnka.com
[2] http://floatingsheep.com/baagle.html
[3] http://nanoweb.si.kz
[4] http://www.neokraft.net/articles/swish-e/

Comments (0) Permalink del.icio.us

23. March 2005

Multiuser Worpress evolved
@ 16:05:11

As talked about multiuser-Wordpress earlier, I was wondering what is going on with it. So here is a refresh pointing to some sites of interest:

- http://blogs.linux.ie/xeer/2005/03/15/wpmu-snapshot-2/
- http://blogs.linux.ie/download/wpmu/ChangeLog-wpmu.txt
- http://www.proyectoisla.com/planetawp/?cat=10
- http://incsub.org/blog/?p=266

Most coding seems to be done by donncha.

Comments (0) Permalink del.icio.us

15. March 2005

Maguma Open Studio
@ 22:12:13

Stumbled over that piece of information today:
A PHP IDE that includes features for class browsing, ftp support, snippets, debugging and project management. The Open Source version of Maguma Studio.
[1] http://sourceforge.net/projects/openstudio/

Comments (0) Permalink del.icio.us

10. February 2005

Bug #2415 - No UTF-8 decoding of header
@ 21:48:19

Bug #2415 "No UTF-8 decoding of header" [1] which I reported quite some time ago got reedited today. The problem is described even more complex. But jazfresh proposes some additional fixes.

[1] http://pear.php.net/bugs/bug.php?id=2415

Comments (0) Permalink del.icio.us

27. January 2005

ffmpeg - The upcoming tool for video conversion
@ 11:16:19

ffmpeg [1] is the tool I have used locally for some time now [1]. It allows conversions of various video formats and video to image conversions. Over the last few months I started a collection of links to some helpful articles and discussions [2]. Recently, there has been started the development of a PHP extension [3]. I could imagine, that ffmpeg would be quite an interesting PHP5 standard extension ;) I haven't checked the license for compatibility though.

Grabbing a frame out of a video is as simple as follows. It took me quite some time to figure out the appropriate options, since the web and the documentation did not yet satisfy my needs:
$ ffmpeg -i test.3gp -f singlejpeg -img jpeg -y test.jpg
Input #0, mov, from 'test.3gp':
Duration: 00:00:04.8, bitrate: 80 kb/s
Stream #0.0: Video: h263, 128x96, 10.00 fps
Stream #0.1: Audio: 0x726d6173, 8000 Hz, mono
Output #0, singlejpeg, to 'test.jpg':
Stream #0.0: Video: mjpeg, 128x96, 10.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
frame= 48 q=4.0 size= 117kB time=4.8 bitrate= 200.0kbits/s
I am sure this will boost video blogging enormously [4]. I first was heading for mplayer, but mplayer is IMHO kind of related to X and we do not really want X to be installed on a production server, do we?

Finally, I would like to talk about animated GIF files and provide an example. As with a combination of Imagemagick and ffmpeg, it is a matter of two command lines evtl. one (I am not a pipe specialist ;). As shown below, ffmpeg generates a set of 10 images and Imagemagick converts them to an animated GIF:
$ ffmpeg -i test.3gp -f image -img gif -t 1.0 test%03d.gif
Input #0, mov, from 'test.3gp':
Duration: 00:00:04.8, bitrate: 80 kb/s
Stream #0.0: Video: h263, 128x96, 10.00 fps
Stream #0.1: Audio: 0x726d6173, 8000 Hz, mono
Output #0, image, to 'test%03d.gif':
Stream #0.0: Video: rawvideo, pal8, 128x96, 10.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
frame= 10 q=0.0 size= 0kB time=1.0 bitrate= 0.0kbits/s

$ convert -delay 20 -loop 0 test*.gif animated.gif
Feeback always welcome ;)

[1] http://ffmpeg.sourceforge.net
[2] http://www.circle.ch/wiki/MpegToJpeg
[3] http://ffmpeg-php.sourceforge.net
[4] http://www.circle.ch/wiki/3gpVideo

Comments (6) Permalink del.icio.us

24. January 2005

s9y podcast plugin by Hannes
@ 11:09:31

Hannes [1] hacked a PodCasting plugin for s9y and has it up and running on his test blog [2]. There are on the other hand some good arguments, why PodCasting is not always cool [3].

[1] http://hannes.kaywa.com
[2] http://s9y.lebureau.mediagonal.ch/archives/200501.html
[3] http://blog.koehntopp.de/archives/649-Warum-podcasting-nervt.html

Comments (0) Permalink del.icio.us

30. December 2004

JPEG image problem with PHP GD
@ 23:15:04

I wrote a PHP script based on imagecopyresampled() to resize images coming from mobile phones. Some phone models seem to produce corrupt JPEG files. As on calling imagecreatefromjpeg() a message gets produced looking like: "Corrupt JPEG data: 164 extraneous bytes before marker 0xd9".

Imagemagick handles such problems in some - to me unknown - way and resizes the image properly, regardless of the problem pointed out. But there is currently only GD available and with that few lines of code I get a black resized thumbnail.

The message pointed out above gets printed out when calling imagecreatefromjpeg(). A random thought was to rewrite a function from scratch in PHP that creates a valid image resource [1] in spite of the corrupt JPEG format. But as we have 23p.m. now, I am just too tired now ;) So I am stuck. A corrupt image can be found here [2].

[1] http://lxr.php.net/source/php-src/ext/gd/libgd/gd_jpeg.c#238
[2] http://circle.ch/blog/media/bild015.jpg

Update: Problem-walk-around, as I got imagemagick support on the server ;)

Comments (2) Permalink del.icio.us

14. December 2004

PECL Bit Torrent
@ 09:42:14

Just came along http://pecl.php.net/File_Bittorrent ;)

Comments (0) Permalink del.icio.us

03. December 2004

Standalone PHP script viewer for Win32
@ 09:51:13

Daaron Dwyer writes:
You blogged about my ScriptViewer (PHP without a dedicated web server) app many many moons ago, and I have updated it recently.
Oh, I am a "moons away" blogger. So here we go [1].

[1] http://www.angorasoftware.com/scriptviewer.html

Comments (0) Permalink del.icio.us

25. November 2004

Atom enabled Weblog in PHP
@ 18:05:31

Yoan Blanc has worked out a fully functional Atom based weblog tool [1].
This project is a school essay about dealing with atom format, HTTP request and XSL transformation.
The code is available under the GPL license. Let's hope this will ignite some further implementations.

Yoan also has a short presentation available [2].

[1] http://atom.dosimple.ch
[2] http://atom.dosimple.ch/docs/pres/

Comments (0) Permalink del.icio.us

18. November 2004

Gmail photo album
@ 15:21:14

Yet another gmail [1] application, which is called goollery:
Goollery is a GMail based photo gallery. You can upload pictures from a website. The pictures will automatically be stored in your gmail accout.
Via David Duret [2]

[1] http://www.wirzm.ch/goollery/about/about.php
[2] http://pilgrim.maleo.net/archives/2004/11/18/gmail-antispam-en-ligne/

Comments (0) Permalink del.icio.us

07. November 2004

PHP5 on OSX
@ 21:46:29

Marc [1] is doing a great job to get PHP5 as easy as possible on OSX.

[1] http://www.entropy.ch/home/000012.html

Comments (0) Permalink del.icio.us

05. November 2004

Bitflux is hiring
@ 10:09:49

chregu [1] of Bitflux GmbH is looking for a developer with strong skills in XSLT and PHP. Bitflux has strong competences in realizing custom client projects while mostly using their own Bitflux CMS (BxCMS). An other interesting product is their Bitflux Editor, a Wysiwyg XML Editor. Most if not all of their tools are Open Source.

[1] http://blog.bitflux.ch/archive/work-at-bitflux.html

Comments (0) Permalink del.icio.us

20. October 2004

Cropping, rotating and resizing images in Wordpress
@ 12:42:41

Some month ago I implemented a PHP script [1] to handle images that I integrated into the "Manage" respectively "Edit" menu in Wordpress. The script allows images located in a certain directory to be rotated, resized and cropped. The cropping is based on a library provided by Walter Zorn, whom I mentioned earlier this year already. A PHP script building a cropping interface around that library can be found at amunts.com [3]. The script discussed here is an updated version (added cropping) of what I posted in March [4]. Use it or leave it! ;-)

[1] http://www.circle.ch/php/files/edit-images.phps
[2] http://www.walterzorn.com/dragdrop/dragdrop_e.htm
[3] http://php.amnuts.com/index.php?do=view&id=12
[4] http://www.circle.ch/blog/p1371.html

Comments (0) Permalink del.icio.us

19. October 2004

Outlook to iCal export
@ 10:17:27

phpicalendar [1] is a PHP tool that parses ics files. Norm Jones [2,3] wrote a script that converts Outlook calendar items to iCal files which are easy to spread among a group with phpicalendar:
The outlook2ical utility is a VB macro that can be used to export a set of appointments from an Outlook Calendar to the iCal format. The end result is a *.ics file. My motivation for developing this macro is that I am not happy with the "Save As Web Page" option in Outlook. The main problem is that it saves all appointments associated with an Outlook calendar. I would like to only export appointments of a selected category or categories. I also wanted to be able to view the exported calendar using PHP-iCalendar, which has a far superior appearance when viewed on the web.
[1] http://phpicalendar.sf.net
[2] http://www2.et.byu.edu/~njones/share/outlook2ical/
[3] http://phpicalendar.net/forums/viewtopic.php?t=492

Update: Have a look at other tools: http://circle.ch/wiki/CalendarTools

Comments (4) Permalink del.icio.us

18. October 2004

W3C link checker
@ 21:17:14

(Re)found a comfy tool to check an HTML file for valid links [1]. Thanks to W3C who offers it as an online service. I am wondering, if there is a comparable PHP implementation to work locally since I am not sure, if the PEAR HTTP_Client_LinkChecker is effectively is an equivalent or at least a starting point [2].

[1] http://validator.w3.org/checklink
[2] http://www.phpkitchen.com/viewableCode/linkchecker.phps

Comments (0) Permalink del.icio.us

17. October 2004

Rewrite of captcha-like feature
@ 20:31:27

The captcha-like [1] feature on behalf of the blog comments for this weblog has been rewritten. If it does not work for you as expected, please let me know. The feature is based on a completely homegrown implementation written in PHP and adopted to b2/cafelog. If you like something similar then you might like to have a look at the PEAR captcha package [2].

[1] http://en.wikipedia.org/wiki/Captcha
[2] http://pear.php.net/pepr/pepr-proposal-show.php?id=80

Comments (0) Permalink del.icio.us

12. September 2004

Gmail as a blog engine
@ 17:09:09

Jonathan Hernandez [1] wrote a PHP application that converts Gmail messages to blog entries, where the messages are signed with a star. Replies to conversations are converted to blog comments. The scripts are licensed under GPL. Some more Gmail related projects are linked in my wiki under GmailFS.

[1] http://ion.gluch.org.mx/files/Hacks/gallina/

Comments (2) Permalink del.icio.us

15. August 2004

Designing labels with SVG and convert them to PDF with PHP
@ 13:36:20

Alan Knowles [1] described the process of designing labels with SVG and the conversion to PDF with PHP last December. There he points to an SVG editor called Sodipodi [2]. Inkscape [3] is yet another SVG editor running on various platforms [3]. Designing labes with SVG seems a reasonable approach. As Alan states correctly, the
FPDF [http://fpdf.org ] is quite a nice library for creating PDFs, however, the thought of hardcoding up all the locations in PHP, for all the text on both applications horrified me.
That is how we implemented our label printing system for LOTS 2004. Positioning a few lines of text and an image is easily done with FDPF for "design once, use many" labels.

[1] http://blog.akbkhome.com/blog/archives/26_PHP_SVG_and_PDFs.html
[2] http://www.sodipodi.com
[3] http://www.circle.ch/blog/p1396.html

Comments (0) Permalink del.icio.us

09. August 2004

Minimalistic CMS
@ 14:40:13

Edit This Page PHP [1] is a PHP script that can be uploaded to any webhost that supports PHP. It allows for the HTML content of a page to be edited by a link on that page. Only two files are required: the core PHP script (editthispage.php) and a data file for each page. The core file can support as many pages as desired. Get more background information on that lightweight Wiki from Christopher Allen [2], one of its authors.

[1] http://editthispagephp.sourceforge.net
[2] http://www.lifewithalacrity.com/2003/12/editthispagephp.html

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

30. July 2004

Fulltext search in PHP files on Windows
@ 15:49:11

Mark [1] pointed out a way to let the standard Windows search engine search through php files; for those not using find, grep et. al. ;-)

[1] http://weblogtoolscollection.com/?p=464

Comments (0) Permalink del.icio.us

26. July 2004

PHP on Symbian?
@ 23:13:33

The question has been asked already [1] but what I can see has been left un-answered. Has there anyone some news on that topic?

[1] http://groups.google.ch/groups?selm=b4g8vt%24jbq%241%40FreeBSD.csie.NCTU.edu.tw

Comments (1) Permalink del.icio.us

07. July 2004

Livesearch - let's talk about usability
@ 21:27:17

With some Javascript and PHP Chregu Stocker implemented a feature to his blog search that I have only seen on the X1 search engine [1] for Windows so far; he calls it Livesearch [2]. While typing a word into the form field, a list of results refined by each letter gets displayed below. Really uebergeil.

[1] http://www.x1.com
[2] http://blog.bitflux.ch/p1736.html

Comments (0) Permalink del.icio.us

06. June 2004

Single-file PHP Auth class
@ 22:03:06

I got an email from Lucas Carlson, the author of PHP Auth [1], asking me to blog something about this class. The authentication class viewed from its usage looks quite similar to the PEAR Auth class. Lucas' class is focused on database containers as far as I can see. What I first saw at Paul M. Jones DB_Table class, is now also to be used in this class; defining a table directly in the PHP code. It looks kind of complex at first sight but is actually very simple to handle from my point of view.

http://phpauth.sourceforge.net

Comments (0) Permalink del.icio.us

02. June 2004

PEAR XML_FOAF package
@ 22:25:09

Daniel O'Conner [1] pointed out in a comment [2] on this blog, that PEAR now has a FOAF package to offer [3].

[1] http://my.opera.com/CloCkWeRX/journal/39
[2] http://www.circle.ch/blog/p909.html
[3] http://pear.php.net/package/XML_FOAF/

Comments (0) Permalink del.icio.us

19. May 2004

PHP Layers Menu - dynamic menu trees
@ 09:57:01

PHP Layers Menu [1] is a Javascript-based hierarchical dynamic menu system to rapidly choose among the items.It provides also JavaScript-based tree menus, whose nodes can be expanded and collapsed on sufficiently DOM-compliant browsers. Probably good news for those, seeking a navigation for a structured CMS.

[1] http://phplayersmenu.sourceforge.net

Update: Just found another DHTML menu on sourceforge: http://xmenu-xlayer.sourceforge.net

Comments (0) Permalink del.icio.us

10. May 2004

DB_Table - working differently with Tables and Forms
@ 17:15:22

I recently decided to dive into Paul M. Jones' DB_Table class [1] - now officially available through PEAR - to get a clear view on what this is about. The most odd thing for me was the fact, that you do no longer create tables directly e.g. MySQL but define colums, indexes and - pretty cool - selects in advance, which means, directly within your PHP script.

What it does; it creates a defined table at first run if there is no such table yet in the database. Paul explains in small steps how you could build a guestbook with it. One of the nice parts of DB_Table is the ready-to-use QuickForm configuration. While defining a column for the table you give additional QuickForm information to that regarding that certain field. Building forms is therefore quite easy.

ThanQ Paul for those contributions.

[1] http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table

Comments (0) Permalink del.icio.us

27. March 2004

De- and encoding Base64, UUEncoding, XXEncoding and Yenc files with PHP
@ 13:55:07

Stéphane Degré and Renaud Hager [1] have implemented an encoder and decoder extension for PHP to handle Base64, UUEncoding, XXEncoding and Yenc encoding.

[1] http://php-attcodec.sourceforge.net

Comments (0) Permalink del.icio.us

24. March 2004

Apache2 with PHP5 CGI and PHP4 module on OS X
@ 15:15:30

Looking at the configuration now looks like it was a job at ease; but it took me some hours to work properly. PHP is now working in two versions in parallel on Apache2 on OS X 10.3.3. I will show you the configurations for the compilation first. Firstly, there is the configuration for PHP 4.3.4:
#:~/src/php-4.3.4 urs$ ./configure \
--disable-cgi \
--disable-pdo \
--enable-force-cgi-redirect \
--prefix=/usr/local/php \
--with-zlib \
--with-iconv=/sw/ \
--without-bundle-libxml \
--with-dom=/sw/ \
--with-libxml-dir=/sw/ \
--with-xsl=/sw/ \
--disable-pear \
--with-gd \
--with-freetype-dir=/sw/lib/freetype2/ \
--with-jpeg-dir=/sw/ \
--with-png-dir=/sw/ \
--enable-sockets \
--enable-pcntl \
--enable-shmop \
--enable-sysvshm \
--enable-sysvsem \
--with-mysql=/usr/local/mysql/ \
--enable-debug \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php \
--with-config-file=/usr/local/php/php.ini
As below, this is what you can type to get PHP 5.0.0 RC1:
#:~/src/php-5.0.0RC1 urs$ ./configure \
--enable-force-cgi-redirect \
--prefix=/usr/local/php5-cgi \
--with-zlib \
--with-iconv=/sw/ \
--without-bundle-libxml \
--with-dom=/sw/ \
--with-libxml-dir=/sw/ \
--with-xsl=/sw/ \
--disable-pear \
--with-gd \
--with-freetype-dir=/sw/lib/freetype2/ \
--with-jpeg-dir=/sw/ \
--with-png-dir=/sw/ \
--with-mysql=/usr/local/mysql/ \
--enable-debug \
--with-config-file-path=/usr/local/php5-cgi \
--with-config-file=/usr/local/php5-cgi/php.ini
I have chose specific configuration paths for each version. As far as I can see, you need to give the path and the filename as well. Especially for the CGI version, you should specify the option --enable-force-cgi-redirect.

Now the tricky part was to get a working configuration for the virtual hosts. The idea behind is to have a PHP 4 module installed as default and a per-virtual-host-configuration for other versions of PHP; that might be PHP 5 or 3. So on port 86 php scripts will be processed by PHP 5.0.0 RC1.

Listen 86
<VirtualHost _default_:86>
ServerName localhost

ScriptAlias /php5 /usr/local/php5-cgi/bin/
<Directory /usr/local/php5-cgi/bin/>
Options +ExecCGI +FollowSymLinks
AllowOverride None
</Directory>

DocumentRoot /Library/Webserver/Documents/project-a
<Directory /Library/Webserver/Documents/project-a>
DirectoryIndex index.php
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride None Options FileInfo
Action php5-cgi /php5/php
AddHandler php5-cgi .php .php5
</Directory>

ErrorLog logs/default_86-error_log
CustomLog logs/default_86-access_log combined
</VirtualHost>

<VirtualHost *>
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DocumentRoot /Library/Webserver/
<Directory /Library/Webserver/>
DirectoryIndex index.php
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride None Options FileInfo
</Directory>
</VirtualHost>
I collected various links and jotted down some eventually interesting information in the (Wiki/PHP5).

Comments (2) Permalink del.icio.us

22. March 2004

Image cropping with PHP and Javascript
@ 11:39:51

Image Handler
By far, this is some of the most valuable javascript code I have seen for a while. Walter Zorn has written various libraries to drag & drop [1] layers and also to draw graphics [2] with javascript. At least the jsgraphics library is published under GPL; for the others I would propose to visit the website of Walter and ask himself regarding license question.

The image above show the result of an implementation of one library together with some PHP image handling which was done by Andrew Collington [3]. It was very easy to implement it into my Wordpress Image Handler.

[1] http://www.walterzorn.com/dragdrop/dragdrop_e.htm
[2] http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm
[3] http://www.zend.com/codex.php?id=1340&single=1

Comments (5) Permalink del.icio.us

21. March 2004

PHP5 CGI parallel to PHP4 module on Windows
@ 15:38:05

I was looking for a way to have both PHP4 and PHP5 running on Windows. So there was a bit of adaption of the note made by seric [1] to the Windows environment (Installation/PHP5). PHP4 still works as Apache module while PHP5 runs as CGI on a port-based virtual host:

Listen 83
<Virtualhost _default_:83>
ServerName localhost
ServerAdmin me@localhost
DirectoryIndex index.html index.php
ErrorLog logs/error.log
# http://httpd.apache.org/docs-2.1/mod/core.html.en#limit
<Location />
<Limit CONNECT>
Order allow,deny
Allow from all
</Limit>
</Location>
DocumentRoot "C:/www/project-a/"
ScriptAlias /cgi-bin/ "C:/php5/"
Action php5-script /cgi-bin/php-cgi.exe
AddHandler php5-script .php .html
</Virtualhost>
The downloaded PHP 5.0.0RC1 zip package has been unpacked to c:\php5. Then I renamed the php.ini-dist to php.ini and restarted Apache.

[1] http://seric.cowiki.org/17.html

Comments (0) Permalink del.icio.us

16. March 2004

Just no win-win situation
@ 21:24:46

Yesterday I moved a PHP project from Windows to OS X. For reasons of laziness I often code something like:
if (stristr(PHP_OS, "WIN")) {
echo "Do something Windows-related here...";
}
This worked usually perfect for scripts moved between Windows and Linux based systems. But one has to be more precise for scripts to run additionally on OS X. Since OS X comes with a PHP_OS string consisting of "Darwin". If you are wondering, why your scripts do not work on Mac try this:
if (stristr(PHP_OS, "Windows")) {
echo "Do something Windows-related here...";
}

Comments (0) Permalink del.icio.us

A Wiki Blog joint-venture by Elke
@ 00:23:27

Elke Engel [1] showed up a working demo [2] of an interoperable Wiki-Blog the other day. The system is based on the Kaywa blog and uses the PEAR class by Paul M. Jones [3] to handle the Wiki syntax. Good look with finishing up your thesis ;)

[1] http://purplegreen.abstrakt.ch/blog/archives/000214.html
[2] http://engelwiki.var.cc
[3] http://wiki.ciaweb.net/view.php?wiki=Text_Wiki

Comments (1) Permalink del.icio.us

14. March 2004

Image Handler for Wordpress
@ 17:05:58

Image Handler
The other day I was just fed up using the ftp client to clean up a mal-orientated image. So here is a basically stand-alone script [1] to treat (rotate, resize, delete) images used e.g. with Wordpress [2]. The PHP based script requires either the GD 2.0, Imagemagick or PHP ext/imagick to be installed. PEAR Image_Transform is an option as well, but not necessary. The script has been tested on Windows as on Debian. You can copy it to wp-admin and configure your base directory where you keep your images.

[1] http://www.circle.ch/php/files/edit-images.php.html
[2] http://www.wordpress.org

Comments (0) Permalink del.icio.us

11. March 2004

How to walk back N directories
@ 02:23:27

While scanning a directory tree I run into the following situation; Consider you have the following three paths:

- /home/project/user/www/ (web root folder )
- /home/project/user/www/images (folder for images )
- /home/project/user/www/include/dummy/script.php (script to handle images )

The problem was, that the function to scan the images folder (tree) in script.php did not handle absolute path properly (access rights?). So I was looking for a solution to give the relative path from the working directory of script.php back to the absolute path. The following few lines in PHP did it quite well:
$p1 = substr_count(realpath(ABSPATH), DIRECTORY_SEPARATOR);
$p2 = substr_count(realpath(dirname(__FILE__)), DIRECTORY_SEPARATOR);
for($j=0;$j< ($p2-$p1);$j++) $ret .= "../";
echo $relative_path = $ret . ltrim($image_base_dir, DIRECTORY_SEPARATOR);
A possible result would be "../../images", while $image_base_dir is set to "images". Eventually I missed a simple function this topic easier, if so, let me know ;-)

Comments (0) Permalink del.icio.us

06. March 2004

HTMLarea with enhanced Image Handler
@ 14:28:44

HTMLarea has an enhanced Image Handler written by Wei Zhuo [1]. It is based on PHP and uses GD or Imagemagick. It is not quite clear under which license the code is published; The HTMLarea itself is available under a BSD-like license.

The Image Handler allows to upload and treat images such as rotating, resizing etc. It runs as well under Mozilla as IE. A modified version is available for Coldfusion [2].

[1] http://www.zhuo.org/htmlarea/?view=flat
[2] http://huizen.ddsw.nl/bewoners/slopera/projects/projects.htm

Comments (0) Permalink del.icio.us

04. March 2004

Japha - expandable implementation of Java in PHP
@ 10:37:34

Java to be used within PHP often is painful. So, Japha [1] is an attempt to bring the main classes in the Java 1.4.1 (soon to be 1.4.2, time allowing) to PHP for use in everyday programs. Japha refers to PHP 5. This allows us to easily implement interface, abstract classes, and more inheritance capabilities, not to mention excellent error handling and the ability to better conform with user-created data types.

[1] http://japha.xzon.net

Comments (2) Permalink del.icio.us

foresite PRS - a GPL Project Reporting System
@ 09:53:42

foresite Systems [1] has released its first package under GPL. The foresite PRS is a PHP based Project Reporting System. On OS X you have to give as well to give some rights:
mojito:~/foresitePRS urs$ chmod 0777 config/prs.ini
mojito:~/foresitePRS urs$ chmod 0777 lang/lang_cache.txt
mojito:~/foresitePRS urs$ sudo find . -name "init.sql"
./config/init.sql
You will be pointed to an installation routine. The installation process indicated that the init.sql could not be found. If this is the case just upload the init.sql from the config/ folder with e.g. phpMyAdmin. Nice work of the foresite Programmers.

[1] http://foresite.ch/Download.html

Comments (1) Permalink del.icio.us

27. February 2004

[RT] Handling SQLite remote files with PHP
@ 10:38:28

First I have to clarify the [RT]; Bertrand Delacrétaz [1] mentioned at LOTS, that he indicates "random thoughts" in mailinglists as "[RT]". I like that idea, because the title to this blog post does not mean to be a new feature in the PECL sqlite extension but generally a random thought of mine. I started a new project on sourceforge called wikita [2]. It is a common playground for me to set up a simple wiki based on PEAR classes where ever possible. Since I have started the PEAR sqlite DB wrapper earlier, it needed some more testing. Wikita from that point of view is also a testbed for this wrapper.

Just the other day I checked in some code into the CVS of sourceforge. The code is not much more than a hack for now. Anyway. To come to the point of this post: SF does not yet support the sqlite extension. So the title here suggests that there could/should be a way to handle sqlite remote database files. PHP does allow to handle remote files but IMHO the sqlite extension does not. If this is secure or not is to discuss afterwards. PHP5 will generally offer sqlite support. Nevertheless I ask myself if there are any applications that would make sense to have sqlite databases handled remotely. Maybe for portable devices such as mobile phones or handhelds, if they ever offer PHP support (some actually _do_ offer already Python [3]). Since they offer limited storage space, it could be a solution. Contradictions, comments?

[1] http://codeconsult.ch/bertrand/
[2] http://sourceforge.net/projects/wikita
[3] http://www.mobilewhack.com/programming/python/python_on_nokia_screenshots.html

Comments (1) Permalink del.icio.us

26. February 2004

Sleepycat DB XML 1.2.1 with PHP API
@ 13:40:50

The new DB XML offers now a PHP API:
Sleepycat Software is pleased to announce the release of Berkeley DB XML
version 1.2.1! DB XML 1.2.1 is a maintenance/bug fix release.

New Features

A PHP API has been added to the distribution. This is a
preliminary release of this functionality. For details please
see the src/php4/README file contained in the distribution.

[1] http://www.merrells.com/john/dbxml/archives/cat_release_history.html#000229

QR Code for your mobile phone.
Related tags(s):
Comments (0) Permalink del.icio.us

24. February 2004

Andi Gutmans on the PHP5 final release schedule
@ 00:21:11

Regarding the scheduled release of PHP5 final Andi said:
Rob: How much time we looking at between RC1 and a final release?
Andi: I'd guesstimate a couple of months, around May.
Guess-timate; I always wondered how they scheduled releases... ;-P

[1] http://marc.theaimsgroup.com/?l=php-cvs&m=107752000920056&w=2

Comments (0) Permalink del.icio.us

28. January 2004

SqliteManager for your Browser
@ 01:00:42

SQLiteManager [1] is what I was looking for; a phpMyAdmin-like administration tool for the browser. It basically works out of the box. Thanks to Frédéric Henninot.

[1] http://sqlitemanager.sourceforge.net

Update: There are some fixes I had to add to make it running on OS X:
Changed the file: common.lib.php, function SQLIteCheckOk()

if($SQL_SERVER_OS == "LIN" OR $SQL_SERVER_OS == "DAR") $extName = "sqlite.so";
Furthermore the folder and its files did not have the correct owner which generated the following message:
Warning: sqlite_query(): unable to open database file in
/Library/WebServer/Documents/SQLiteManager-0.9.1/include/SQLiteDbConnect.class.php
on line 122
So changing the owner fixed that problem too:
#:/Library/WebServer/Documents me$ sudo chown -R www:www SQLiteManager-0.9.1/
Update: Just found another SQLite web manager. This one requires PHP5: http://www.phpro.org/sqlite/

Comments (0) Permalink del.icio.us

06. January 2004

PHP and Web Standards Conference UK 2004
@ 08:16:47

he PHP and Web Standards (PaWS) Conference [1] is designed to cater to long-suffering UK PHP and Web developers, who until now have had to travel abroad to learn in person. With the help of Mark Leavy and the input of many members of the PHP community, we're bringing some of the finest talents in PHP and Web standards right here to Manchester.

[1] http://pawscon.com

Comments (0) Permalink del.icio.us

11. December 2003

Wiki parser in PEAR
@ 20:08:10

Paul M Jones [1] finally comes up with a Wiki parser in PEAR [2] parsing from the default markup style (combined from WikkiTikkiTavi and coWiki) to render into XHTML.

[1] http://ciaweb.net/free/textwiki.php
[2] http://pear.php.net/package/Text_Wiki

Comments (0) Permalink del.icio.us

23. October 2003

SMS package for PEAR
@ 10:40:49

Tobias Schlitt [1] proposed a new packe for PEAR. It allows to handle SMS (short message service) with a PHP CLI interface through a connected mobile phone.

As seen at the ITU Swisscom offers now a new Outlook plugin called "Desktop SMS" [2]. Since they shut down the free SMS service on gomobile.ch one needs to pay for each message now.

[1] news.php.net
[2] http://www.swisscom-mobile.ch/sp/UEOAAAAA-de.html

Comments (1) Permalink del.icio.us

17. October 2003

Bayesian Filtering of Spam
@ 07:54:23

The hit rate of this blog is now about 3 per day: I am talking about comment spam. This is no fun at all. I intended to turn off the back-channels like comments and trackback eventually pingback too. But that is no fun. So I started to look around for spam blocking solutions. Beside blacklists - mentioned earlier here - BayesianClassification caught my eyes. So I added a new wiki page to have some starting point. Also most solutions are intended to fight email spam there could be a combination with blacklists I guess.

There is currently no PHP implementation so I started to convert the C implementation of Paul Graham's "A Plan for Spam" [1] by Craig Morrison [2]. Unfortunately I got stuck because the PECL sqlite extension does not yet include the sqlite_compile and sqlite_step functions which are used in Craig's version to do some fun stuff with SQLite:
sqlite_compile() is used as a precursor to sqlite_step(). It takes an
SQL statement and "compiles" it into a VM (virtual machine) that sqlite
uses for each successive call to sqlite_step().

What it does is allow me to query a database without using a callback
function. Each call to sqlite_step() returns the next row in the result
set from the initial sqlite_compile() call.

I needed to do that, because I have to do lookups in the same database
and I could not do those lookups recursively inside the callback which
would be needed when using sqlite_exec(). The use of the virtual
machines allows me to maintain a seperate state for each lookup that I
need to do.
Craig was answering me via email as I asked him if there is a possible workaround to come along without the mentioned functions. Thanks to Craig.

[1] http://www.paulgraham.com/spam.html
[2] http://sourceforge.net/projects/bayesiancfilter

Comments (0) Permalink del.icio.us

09. October 2003

MozPHP - running PHP in Mozilla
@ 10:05:09

MozPHP [1] is a Mozilla PHP integration package. With MozPHP you can execute PHP scripts in Mozilla directly without the need for a local HTTP server.

Currently the integration is one way, i.e. it is not possible to access Mozilla internals from PHP scripts. This may change in the future but there are no concrete plans for this.
This reminds me of an earlier server-less approach by Scriptviewer [2] dated back to 2001. As far as I can see MozPHP only installs on Windows and Linux but not yet on Mac OS X. A full crossplatform integration would probably be nescessary to make MozPHP interesting for CD-ROM distributions of PHP applications. MozPHP and Sqlite would make a nice couple too, especially for distributable but offline use.

[1] http://www.thomas-schilz.de/MozPHP/
[2] http://www.angorasoftware.com/phpviewer.html

Comments (0) Permalink del.icio.us

24. September 2003

Smarty Tidy Output Filter
@ 09:56:35

John Coggeshall runs all his pages through his Smarty Tidy Output Filter [1]. Since Smarty does some caching this should not be a speed drawback. I just wonder if it does not break minutiously designed sites using CSS e.g. for positioning instead of images like with spacer.gif. But this is eventually no problem if tidy i only applied on the (inner) site content rather than on the site's main design.

[1] http://coggeshall.org/show_source.php?filename=outputfilter.tidyrepairhtml.php

Comments (0) Permalink del.icio.us

17. September 2003

Disable functions per directory in PHP 4.3.3
@ 11:54:58

Tvrtko A. Uršulin [1] provided an interesting patch for PHP that only touches two files (main/main.c and sapi/apache/mod_php4.c ), which will allow to disable PHP functions per virtual directory. Interesting feature for service providers and Universities.

[1] http://www.zend.com/lists/php-dev/200309/msg00120.html

Comments (0) Permalink del.icio.us

16. September 2003

PECL Tidy extension for Windows
@ 00:36:19

Frank Kromann [1] was kind enough to build the Tidy PECL extension [2] for PHP. He will make the dll available online with the next build cycle. The first step into Tidy used via PHP could be the following:
<?php
// 1. http://kromann.info/php4-pear/php_tidy.dll
// 2. libtidy.dll to c:\winnt\system32; get it from http://htmltrim.sf.net
// 3. php.ini: extension=php_tidy.dll
// 4. Start with:
// - http://cvs.php.net/cvs.php/pecl/tidy/tests
// - http://coggeshall.org/show_source.php?filename=cleanhtml.php

print_r(get_extension_funcs('tidy'));
?>
This produces the currently available functions in this extension:
Array
(
 [0] => tidy_create
 [1] => tidy_setopt
 [2] => tidy_getopt
 [3] => tidy_parse_string
 [4] => tidy_parse_file
 [5] => tidy_get_output
 [6] => tidy_get_error_buffer
 [7] => tidy_clean_repair
 [8] => tidy_diagnose
 [9] => tidy_get_release
 [10] => tidy_get_status
 [11] => tidy_get_html_ver
 [12] => tidy_is_xhtml
 [13] => tidy_is_xml
 [14] => tidy_error_count
 [15] => tidy_warning_count
 [16] => tidy_access_count
 [17] => tidy_config_count
 [18] => tidy_load_config
 [19] => tidy_load_config_enc
 [20] => tidy_set_encoding
 [21] => tidy_save_config
)
Credits to John [3] for implementing Tidy.

[1] http://kromann.info/pear-pecl.php
[2] http://pear.php.net/package-info.php?package=tidy
[3] http://coggeshall.org

Comments (0) Permalink del.icio.us

11. September 2003

Serendipity presented by coWiki
@ 12:55:00

Well, Serendipity [1], a Smarty-based blog tool, is now being presented on a tool called coWiki [2], which is based on PHP5.

[1] http://www.s9y.org
[2] http://www.develnet.org

Comments (3) Permalink del.icio.us

Using PEAR to cache cafelog/b2
@ 02:00:48

Hacking cafelog/b2 can be a pain. I tried to add some caching based on PEAR::Cache while adding it to the code of b2. There was no reasonable way to do so within an acceptable amount of time. But the pages went slow on the blog and there was something to do about it.

So I think there is a way to handle it; at least it looks like. The caching now done is based on the idea, that I take an application and say something like "start caching" at the very beginning of the script and "stop it" at the very end. A way to control such mechanism is done by the Apache directive php_value, where one can reconfigure the Apache server configuration. Therefore the parameters auto_prepend_file and auto_append_file have been used. They allow exactly a handling of such a start-stop mechanism. What follows is some lines of code of PHP, split up into two files, the prepend.php and the append.php.

This solution is probably suboptimal but it improved the accessability of the blog posts at least subjectively but hopefully not only. Any improvements are welcome.

Lots of good discussions about caching can be found on Simons blog [1].


01  <?php
02  
// $Id: prepend.php,v 1.1 2003-09-11 01:31:17+02 urs Exp urs $
03  
04  /**
05  * Quick & dirty way of caching a blog.
06  * Put this into your .htaccess file:
07  *   php_value auto_prepend_file /home/example.com/htdocs/prepend.php
08  *   php_value auto_append_file  /home/example.com/htdocs/append.php
09  *
10  * References:
11  * - http://ch.php.net/manual/de/ref.outcontrol.php
12  * - http://www.onlamp.com/lpt/a/1227
13  * - http://www.ulf-wendel.de/php/show_source.php?file=cache_dem_file
14  * - http://iamcal.com/publish/articles/php/processing_html/
15  */
16  
17  // Include the package
18  
require_once 'Cache/Output.php';
19  
20  
// Set some variables
21  
$cache_path = array(
22                    
'cache_dir'       => "/home/example.com/cache/",  
23                    
'filename_prefix' => "cache_"
24                
);
25  
26  
// Create a Cache object
27  
$objCache = &new Cache_Output('file', $cache_path );
28  
29  
// Compute unique cache identifier for the page
30  
$cache_params = array(
31                      
'url'       => $_SERVER['REQUEST_URI'],
32                      
'post'      => $_POST,
33                      
'cookies'   => $_COOKIE
34                  
);
35  
36  
$urltest = parse_url("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] );
37  if(
preg_match('#([cmp]+)([0-9]{1,}).html#', $urltest['path'] , $match )  
38      OR (
trim($urltest['path'], "/") == "blog") ) {
39      
40      
// Set an ID for this cache
41      
$cache_id = $objCache->generateID($cache_params );
42  
43      
// Query the cache
44      
if ( $content = $objCache->start($cache_id )  ) {
45      
46          
// Cache Hit
47          
echo $content;
48          exit(
"[Cache hit]");
49      }
50  }
51  
52  
?>

 

01  <?php
02  
// $Id: append.php,v 1.1 2003-09-11 01:29:08+02 urs Exp urs $
03  
04  /**
05  * Test if there is any cached data. If not obtain it,
06  * save and display it.
07  *
08  */
09  
if( strlen($objCache->start($cache_id)) < 1 ) {
10      
// This should not be here either, but it is obviously required.
11      // Tell me if You know any better...
12      
ob_end_clean();
13  
14      
// Cache pages starting with pXXX.html, cXXX.html and mXXX.html. The main
15      // page http://example.com/blog/ is being cached using a parse_url trick.
16      
if( preg_match('#([cmp]+)([0-9]{1,}).html#', $urltest['path'] , $match )
17              OR (
trim($urltest['path'], "/") == "blog") ) {
18          
// Store page into cache
19          
echo $objCache->end(3600);
20      }
21  }
22  
?>

[1] http://simon.incutio.com/archive/2003/06/21/

Comments (0) Permalink del.icio.us

06. September 2003

IP to Country - PHP implementation update
@ 14:38:16

Mika Tuupola [1] has updated the PHP implementation of the IP to Country conversion based on the database provided by Directi [2]. There has recently been a brought up a new ip-to-country database format.

[1] http://www.appelsiini.net/~tuupola/archives/110/
[2] http://ip-to-country.directi.com

Comments (0) Permalink del.icio.us

02. September 2003

PHP to IL compiler
@ 14:22:18

Reading Urs Müllers weblog today, he asks if noone ever thought of writing a PHP to IL - also known as Microsoft Intermediate Language (MSIL) [1]. I liked to go further on that idea and did some look-around, after having read today, that Novell bought Ximian. Anyway, the one mostly dealing with mono and PHP is probably Sterling Hughes [2] and that is where I found some more on PHP to IL.

It does not yet seem to have a completed solution around, but if one gets stuck, he or she might like to try the ASM to IL compiler [3] as a last possibility.

[1] http://www.compisoft.ch/BLog/Default.aspx?EntryId=e4c6ab78-1e70-4dff-b568-71900c08c4d9
[2] http://www.edwardbear.org/blog/archives/000216.html
[3] http://home.worldonline.dk/viksoe/asmil.htm

Comments (0) Permalink del.icio.us

15. August 2003

Error page 404 and RSS autodiscovery
@ 16:23:48

Had a real laugh at Marks 404 error page [1]. The correct URL would be this [2]. Actually I was looking for his ideas on the RSS autodiscovery feature [3]. The aim is to not give a specific RSS location but simply the site address. His autodiscovery script will detect the RSS source link:
<link rel="alternate" type="application/rss+xml" title="RSS" href="http://circle.ch/blog/b2rss.php">
Unless you have that link tag in your (x)html source, the result of autorss.py is the passed URL.

[1] http://diveintomark.org/archives/2002/08/15/ultraliberal_rs
[2] http://diveintomark.org/archives/2002/08/15/ultraliberal_rss_locator.html
[3] http://diveintomark.org/archives/2002/05/31/rss_autodiscovery_in_python

Comments (0) Permalink del.icio.us

11. August 2003

Tidy into PECL
@ 08:53:40

John Coggeshall moved tidy [1] into PECL [2]. There is still some work to do for the Windows dll; more to come hopefully soon. From my point of view, this should not be an extension but part of the default function set in PHP. Having proper XHTML output is something to go for.
HTML Tidy, including both TidyLib and the command line utility, uses the W3C license:
That sounds not too bad and finally:
The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products.
From the legal side it should be possible to have tidy compiled into PHP. Please notify me if you have a different point of view.

[1] http://tidy.sf.net
[2] http://pear.php.net/package-info.php?package=tidy

Comments (0) Permalink del.icio.us

09. July 2003

IP to country conversion
@ 23:07:52

Today I found that IP Address Locator, which returns localized information based on the client's IP address [1]. A non-commersial version based on PHP is written by Mika Tuupola [2] and is easy installable via PEAR:
pear install http://www.appelsiini.net/~tuupola/php/download/I18N_IP2Country-0.2.0.tgz
The relation between the IP and the country is constructed via information [3] put into a database:
CREATE TABLE ip2country (
ipfrom INTEGER UNSIGNED,
ipto INTEGER UNSIGNED,
code CHAR(2),
country VARCHAR(64)
);


[1] http://www.geobytes.com/IpLocator.htm?GetLocation
[2] http://www.appelsiini.net/~tuupola/php/I18N_IP2Country/docs/
[3] http://www.ip-to-country.directi.com/latest/ip-to-country.csv.zip

Comments (1) Permalink del.icio.us

Fancy PHP debugging
@ 14:47:20

There is a new tutorial about debugging PHP with the help of Javascript on Zend [1] and via a usercomment I came across just another similar implementation [2].

[1] http://www.zend.com/zend/tut/tutorial-DebugLib.php
[2] http://dev.izibox.isa-geek.org/NiceDebug/

Comments (0) Permalink del.icio.us

DOM Abstraction Classes for PHP
@ 10:15:16

Matt Kynaston [1] proposed a package to PEAR that handles DOM with PHP 4.3.x like the upcoming PHP5.
require_once("DOM_Document.php");
$dom =& DOM_Document::factory('domxml');
$dom->load('tests/article.001.xml');

$node =& $dom->createTextNode("Hello World!");
$root =& $dom->documentElement();
$root->appendChild($node);

$xmlstr = $dom->saveXML();

echo "xml: $xmlstr";
Why should this be of any use? Since one can work with an abstraction of DOM it will be much easier to upgrade the written applications from PHP4 to PHP5.

Update:
The installation should work like:
pear install http://matt.online-canarias.com/dom/DOM.tar.gz


[1] http://matt.online-canarias.com/dom/

Comments (2) Permalink del.icio.us

07. July 2003

SQLite documentation on Zend
@ 23:33:18

Zend [1] already has a documentation of the PECL implementation of SQLite on the web. I passed by at www.php.net but there is nothing comparable around. Seems that Zend pushes SQLite for PHP5 somewhat.

[1] http://www.zend.com/manual/ref.sqlite.php

Comments (1) Permalink del.icio.us

29. June 2003

PHP 5.0.0 Beta 1
@ 21:12:48

[via Sterling, 0] The PHP development community is proud to announce the release of PHP 5 Beta 1. Both source packages and a Win32 build are available, you can find these packages at http://www.php.net/downloads.php . For a complete list of changes, please refer to http://www.php.net/ChangeLog-5.php .

Some of the more major changes include:

- PHP5 features the Zend Engine 2. For a list of Zend Engine 2
changes, please visit http://www.php.net/zend-engine-2.php

- XML support has been completely redone in PHP5, all extensions
are now focused around the excellent libxml2 library
(http://www.xmlsoft.org/ ).

- SQLite has been bundled with PHP. For more information on SQLite,
please visit their website, http://www.hwaci.com/sw/sqlite/

- Streams have been greatly improved, including the ability to access
low-level socket operations on streams.

- Due to issues surrounding the MySQL 4.0 license, the MySQL libraries
are no longer bundled with PHP. For more information on these
licensing changes please see the MySQL licensing policy [1]

Note: This is a beta version. It should not be used in production or even semi-production web sites. There are known bugs in it, and in addition, some of the features may change (based on feedback). We encourage you to download and play with it (and report bugs[2] if you find any!), but please do not replace your production installations of PHP 4 at this time.

[0] http://marc.theaimsgroup.com/?l=php-general&m=105691130207273&w=2
[1] http://www.mysql.com/products/licensing.html
[2] http://bugs.php.net/

Comments (0) Permalink del.icio.us

26. June 2003

Parsing FOAF with PHP
@ 10:00:56

The article [1] by Ian Davis is a guide to using PHP to parse FOAF documents. FOAF stands for Friend-of-a-Friend and is a fun application of RDF that describes people and their relationships to one another.

[1] http://www.semanticplanet.com/2003/05/parsingFOAFWithPHP.html

Comments (1) Permalink del.icio.us

Turck MMCache for PHP on Windows
@ 08:37:13

Turck MMCache [1] is a free open source PHP accelerator, optimizer, encoder and dynamic content cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. The files are also available as binary on Sourceforge [2].
The installation in the php.ini is pretty straight forward and well documented in the README:
zend_extension_ts="c:\php\extensions\mmcache.dll"
mmcache.shm_size="16"
mmcache.cache_dir="c:\tmp\mmcache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
[1] http://www.turcksoft.com/en/e_mmc.htm
[2] http://sourceforge.net/project/showfiles.php?group_id=69426

Comments (0) Permalink del.icio.us

25. June 2003

Having SQLite per default in PHP5?
@ 01:28:59

Sterling started a thread [1] to have the sqlite extension, which is currently available as a PECL module, being enabled by default with the upcoming PHP5. Rasmus wrote down some of his thought, what PHP is and always was and will be [2]. Follow the thread in gmane [3].

On the other hand there was a thread on disabling MySQL by default [4] and a request for enabling PostgreSQL instead [5].

[1] http://news.php.net/article.php?group=php.internals&article=2563
[2] http://news.php.net/article.php?group=php.internals&article=2715
[3] http://article.gmane.org/gmane.comp.php.devel/15705
[4] http://article.gmane.org/gmane.comp.php.devel/15621
[5] http://article.gmane.org/gmane.comp.php.devel/15826

Comments (0) Permalink del.icio.us

23. June 2003

PHPTAL - PHP Template Attribute Language
@ 12:37:42

PHPTAL [1] is an implementation of the excellent Zope Page Template (ZPT) system for PHP. PHPTAL supports TAL, METAL, I18N namespaces.

PHPTALES is the equivalent of TALES, the Template Attribute Language Expression Syntax, it defines how are handled xml attribute values. XML/HTML templates exists to separate logic from presentation in web services. This separation brings more than one benefits in its luggage.

* better application design
* easier task repartition
* better maintainability
* web skins

I came across that implementation while reading about Simon's own work [2].

[1] http://phptal.sourceforge.net
[2] http://simon.incutio.com/archive/2003/06/17/theHolyGrail

Comments (0) Permalink del.icio.us

PEAR version 1.2 RC1 released
@ 11:37:34

PEAR comes with some updates, news and fixes:
Version: 1.2RC1-stable (2003-06-23 08:45:00)
* Changed license from PHP 2.02 to 3.0
* Added support for optional dependencies
* pear makerpm, now works and generates a better system independant spec file
* pear install|build pecl-package, now exposes the compilation progress
* Added new pear bundle command, which downloads and uncompress a pecl-package
The main purpose of this command is for easily adding extensions to the PHP sources
before compiling it.
and Tomas V.V. Cox worked out a new DB release too
Version: 1.5.0RC1-stable (2003-06-23 01:09:00)
New Features:
- Added $dbh->freePrepared(), for explicitily free a prepared result
- Test suite enhanced
- Added new experimental driver for SQLite

Bugs fixed:
- Fixed memory leaks with methods that did automatic prepare/execute
- ibase: better error handling and various bugfixes
- mssql: added port setting to connect and enhancements to the error hanlder
- mysql: $db->createSequence(); $db->nextID(); now returns 1 and other minor fixes
- odbc: added native quote() function, better error handling, and other bugfixes
- pgsql: minor bugfixes

Special thanks for those persons who sent patches and bug reports. This release
is done for public testing before the final release in sync with the
upcomming PHP 4.3.3 version.


[1] http://pear.php.net

Comments (0) Permalink del.icio.us

16. June 2003

Sun will support PHP in Java
@ 12:52:07

Sun will support - among other languages - PHP technology within Java. Therefore Sun, Zend, Oracle and Macromedia founded the JCP (Java Community Prozess) [1].

[1] http://www.computerwoche.de/index.cfm?pageid=254&artid=49919

Comments (0) Permalink del.icio.us

15. June 2003

Micropayment - PHP and Paypal
@ 18:40:03

Zend offers a Tutorial discussing a Paypal based micropayment solution with PHP [1].

[1] http://www.zend.com/zend/tut/tutorial-paypal.php

Comments (0) Permalink del.icio.us

12. June 2003

Fanmail for Rasmus
@ 08:43:05

[via Sterling, 1] Rasmus got a "fanmail" [2] where someone is not only discrediting the OpenSource movement but Rasmus himself. This reminds me to a similar mail from a "fan" to chregu [3].

[1] http://www.edwardbear.org/blog/archives/000201.html
[2] http://lerdorf.com/fanmail.txt
[3] http://trash.chregu.tv/instructions.txt

Comments (0) Permalink del.icio.us

YAML for PHP
@ 08:29:35

YAML is a new language for data. A readable, friendly language for storing lists, dictionaries, text, numerics and more. Earlier this year, YAML entered "Last Call" status. It's time to start using YAML [1][2]. The YAML cookbook is a good starting point [3].

[1] http://www.yaml.org
[2] http://whytheluckystiff.net/syck/
[3] http://yaml4r.sourceforge.net/cookbook/

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

11. June 2003

RAP - RDF API for PHP
@ 18:05:59

[via http://whump.com ] RDF API for PHP is a pure PHP software package for parsing, manipulating and serializing RDF models [1].

[1] http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/index.html

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

27. May 2003

SQLite wrapper for PEAR:DB
@ 19:11:40

I have been working on a wrapper class around SQLite for PEAR:DB [1]. The main difference between SQLite and other known databases is probably, that it does not run as a server but a commandline executable, which is also available via an API. So the DSN is a bit abused to something like "sqlite:///c:/temp/database.db". The wrapper is not yet placed in PEAR. But you can simply move the file "sqlite.php" to "PEAR/DB/sqlite.php".

[1] http://www.circle.ch/php/files/DB_sqlite/

Comments (1) Permalink del.icio.us

22. May 2003

Themes for PHP-GTK on Windows
@ 10:01:45

Christiain Weiske [1] offers a package with some theme generators for PHP-GTK on Windows.

[1] http://www.cweiske.de/phpgtk_themes.htm

Comments (0) Permalink del.icio.us

PHP a threat for ASP .NET?
@ 08:46:33

Jesus Castagnietto [1] pointed an article on infoworld [2] where it is rumoured, that "[..] certain Microsofties consider the open-source scripting language PHP to be the biggest threat to its own ASP .Net [..]"; you might also read Microsofts own comparison [3]. Sterling already commented that one [4].

[1] http://www.castagnetto.org
[2] http://www.infoworld.com/article/03/05/09/19OPcringely_1.html
[3] http://msdn.microsoft.com/library/en-us/dnaspp/html/phpvsaspnet.asp
[4] http://www.edwardbear.org/blog/archives/000180.html

Comments (0) Permalink del.icio.us

20. May 2003

OpenOffice Impress (*.sxi) docs to pres2
@ 23:42:18

As mentioned the recent work [1] by Sterling, giving it a try to convert OpenOffice Impress documents to the PHP presentation (pres2) [2] format, I tried to come along with another approach using XSLT [3] instead of expat. The xsl is just too simple yet but it works for OOo slides with a title and a text; did not try more [4].
Just uncompress the *pres.sxi to a folder tmp and use xsltproc.exe to run the XSLT. It should work.

Some discussion on what a basic sxi file needs to look like can be found on a OOo mailinglist [5] or at Raymond Yee's site [6].

[1] http://circle.ch/blog/p802.html
[2] http://cvs.php.net/cvs.php/pres2
[3] http://circle.ch/pdf/gehrig_030521_OOo2pres.pdf
[4] http://circle.ch/pdf/gehrig_030521_OOo2pres.sxi
[5] http://xml.openoffice.org/servlets/ReadMsg?msgId=645904&listName=dev
[6] http://iu.berkeley.edu/rdhyee/discuss/msgReader$755

Update: Forgot to mention "OpenOffice.org XML transformation to HTML/WML/PALM HTML 3.2" [7].

[7] http://xml.openoffice.org/sx2ml/

Comments (2) Permalink del.icio.us

HttpAuthPlus for PHP
@ 22:41:00

HttpAuthPlus [1] is a php class for HTTP Authentication against a database, or a ASCII file. It further provides user administration methods for adding, updating, deleting users from both database and ASCII file authentication methods. It is requires PEAR:DB.

I did not try it out; the user handling was just to mention here.

[1] http://sourceforge.net/projects/httpauthplus/

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

18. May 2003

Apache-PHP-Horde-Win32 installation
@ 17:59:55

This document by Mike Cochrane [1] guides you through the installation of the Horde Framework, and it's prerequisites on the Windows 2000 platform. The goal is a working webmail system using an existing imap server and a Windows 2000 webserver. This document covers the installation of Apache, PHP, Mysql, Horde, IMP, Turba, Nag, Mnemo, Kronolith.

[1] http://www.graftonhall.co.nz/mikes/Apache-Mysql-Php-Horde/

Comments (0) Permalink del.icio.us

17. May 2003

OpenOffice slides to PHP pres2
@ 14:11:20

Sterling [1] has been working out a converter for OpenOffice slides to the PHP presentation framework pres2. You'll need PHP5.

[1] http://www.edwardbear.org/blog/archives/000179.html

Comments (1) Permalink del.icio.us

14. May 2003

Flat file database supporting SQL
@ 21:31:55

PHP Text DB API is a flat file database supporting SQL and is already available from c-worker [1].

[1] http://www.c-worker.ch/txtdbapi/index_eng.php

Comments (1) Permalink del.icio.us

13. May 2003

Undocumented feature in trim()
@ 19:43:37

There is a kind of an undocumented feature in PHPs trim function. One may set an argument to be trimmed by something:
<?php
$path = "/this/goes/to/the/path/";
echo trim($path, '/');
?>
this/goes/to/the/path
I found that in a script of Rasmus.

Comments (3) Permalink del.icio.us

12. May 2003

PECL SQLite installation
@ 13:08:46

Did a PECL install on SQLite:
# pear install SQLite-0.9.tgz
38 source files, building
running: phpize
PHP Api Version : 20020918
Zend Module Api No : 20020429
Zend Extension Api No : 90021012
building in /var/tmp/pear-build-root/SQLite-0.9
running: /tmp/tmpJcmmYM/SQLite-0.9/configure
running: make
sqlite.so copied to /tmp/tmpJcmmYM/SQLite-0.9/sqlite.so
install ok: SQLite 0.9

Comments (1) Permalink del.icio.us

09. May 2003

Perl embedded in PHP
@ 15:23:26

Johannes Schlueter has written a PHP Extension to embed a perl interpreter to PHP. It is far from complete, but worth having a look at it and keeping it in mind I guess [1][2]. Ohh... just found out, that this is idea is not at all that new [3].

[1] http://www.schlueters.de/perl-pre0.1.tar.bz2
[2] http://news.php.net/article.php?group=php.pear.dev&article=15811
[3] http://msalem.translator.cx/perlinphp.php

And there is one more:
Thies [4]: you may want to look at

http://www.apache.org/~dougm/php-perl.tar.gz

which is something Doug MacEachern has written some time ago.

[4] http://news.php.net/article.php?group=php.pear.dev&article=16066

Comments (0) Permalink del.icio.us

08. May 2003

PHP embedded in Mysql
@ 10:42:24

David Sklar has a talk tomorrow [1] on his implementation of embedded PHP in MySQL. This look e.g. like this:
mysql> SELECT php('','hello, world!');
+-------------------------+
| php('','hello,world!')   |
+-------------------------+
| hello, world!              |
+-------------------------+
1 row in set (0.36 sec)
The source files are available at his site [2].
[1] http://talks.php.net/show/myphp/
[2] http://www.sklar.com/page/article/myphp

Comments (1) Permalink del.icio.us

phpize uses automake
@ 09:46:48

There was missing automake, when I got these messages:
#:/usr/local/src/SQLite-0.9# phpize
/usr/local/bin/phpize: line 41: aclocal: command not found
configure.in:20: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:72: error: possibly undefined macro: AC_PROG_LIBTOOL
configure:2327: error: possibly undefined macro: AC_DEFINE
You should add the contents of `/usr/share/aclocal/libtool.m4' to `aclocal.m4'.
Configuring for:
PHP Api Version: 20020918
Zend Module Api No: 20020429
Zend Extension Api No: 90021012
So an "# apt-get install automake" did the job. It had nothing to do with locales.

QR Code for your mobile phone.
Related post(s):
Related tags(s):
Comments (0) Permalink del.icio.us

06. May 2003

PECL binaries for Windows
@ 08:41:02

To summarize, there are currently the following sources of PECL binaries available:

Comments (1) Permalink del.icio.us

05. May 2003

Handling JPEG metadata with PHP
@ 18:35:12

Sebastian Delmont has written a new class to handle JPEG metadata including EXIF and IPTC [1].
require_once 'Image/JPEG.php';

$jpeg =& new JPEGInfo('images/photos001.jpg');

echo $jpeg->getExifField("ApertureValue");
echo $jpeg->getIPTCField("Caption");

$jpeg->setIPTCField("Byline", "Sebastian Delmont");
$jpeg->save("images/photos001-bis.jpg");

$info = $jpeg->getBasicInfo();
echo $info['Width'] . "x" . $info['Height'];
A similar package found already its way into PEAR lately [2].

[1] http://www.zonageek.com/tmp/JPEG.php.txt
[2] http://cvs.php.net/cvs.php/pear/Image_IPTC/

Comments (0) Permalink del.icio.us

Securing PHP on Debian Linux
@ 16:59:03

pookey [1] found a way securing PHP on Debian using binfmt.

[1] http://www.pookey.co.uk/php-secure.php

Comments (0) Permalink del.icio.us

SQLite via ODBC
@ 12:49:54

Found an ODBC driver [1] for SQLite today. It works perfectly with PHP.
<?php
// via ODBC
$db = odbc_connect("DSN=SQLite.1;UID=;PWD=", "", "", SQL_CUR_USE_DRIVER);
$result = odbc_exec($db, "SELECT * from tbl1;") or die("Error: " . odbc_errormsg());
if (odbc_fetch_row($result))
{
for($i=1; $i<=odbc_num_fields($result); $i++)
{
$key = odbc_field_name($result, $i);
$val = odbc_result($result, $key);
$stack[$i-1] = array($key => $val);
}
}
print_r($stack);
?>
This could be used alternatively to the new PECL extension [2] reported earlier:
<?php
// via PECL SQLite extension
$database = "./var/testdb";
$db = sqlite_open($database);
$r = sqlite_query("SELECT * from tbl1;", $db);
$stack = sqlite_fetch_array($r, SQLITE_NUM);
sqlite_close($GLOBALS['db']);
print_r($stack);
?>
[1] http://www.ch-werner.de/sqliteodbc/
[2] http://pear.php.net/package-info.php?pacid=193

Comments (0) Permalink del.icio.us

30. April 2003

PHP bcompiler
@ 09:54:52

Alan pointed me today to his slides talking about the PHP bytecompiler on Windows [1]. Sources and examples can be found in the PHP CVS [2]. The dll is available through snaps [3].

[1] http://devel.akbkhome.com/talks/gtk_exe/ (22 slides)
[2] http://cvs.php.net/cvs.php/pear/PECL/bcompiler
[3] http://snaps.php.net/win32/PECL_4_3/

QR Code for your mobile phone.
Comments (1) Permalink del.icio.us

29. April 2003

How to add GD 2 support to PHP
@ 11:27:51

Found that howto on rasmus' page [1]:
GD-2.0.1 and PHP

0. Make sure you have libjpeg and libpng installed
1. Grab GD-2.0.1 from [2]
2. tar zxvf gd-2.0.1.tar.gz
3. cd gd-2.0.1
4. Edit the Makefile and change the LIBS line to be:
LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm
5. make libgd.a (don't need to do a make install)
6. Now build PHP using these flags:
--with-gd=/home/<you>/gd-2.0.1
--with-freetype-dir=/usr
--enable-gd-native-ttf (for PHP 4.0.6 leave off trailing 'f')
--enable-gd-imgstrttf
--with-jpeg-dir=/usr
--with-png-dir=/usr
--with-zlib

[1] http://www.php.net/~rasmus/gd.html
[2] http://www.boutell.com/gd/http/gd-2.0.1.tar.gz

Comments (1) Permalink del.icio.us

28. April 2003

PECL dll files for Windows
@ 19:10:57

Additionally to the compilations of Frank Kromann [1], there are now also some of the PECL builds available for Windows from the PHP site [2].

[1] http://kromann.info/pear-pecl.php
[2] http://snaps.php.net/win32/PECL_4_3

Comments (0) Permalink del.icio.us

23. April 2003

PECL extension for SQLite database
@ 09:23:37

SQLite is an Embeddable SQL Database Engine [1]. Even if it has some limitations, there are at least already Subselects available. Earlier work [2] has been taken over by Wez and Tal. Since that night we have a woking PECL extension running on Windows too [3]; you might want to test my (unofficial) windows dll - provided without any warranty [4].

[1] http://www.hwaci.com/sw/sqlite
[2] http://sf.net/projects/sqlite-php
[3] http://pear.php.net/package-info.php?pacid=193
[4] http://circle.ch/php/files/php_sqlite.zip

Comments (0) Permalink del.icio.us

22. April 2003

Another view on PEAR
@ 17:15:22

Davey is working on a new PEAR package that gives a normalized view on - basically - the header information of existing packages in PEAR [1].

[1] http://www.pixelated-dreams.com/~davey/PEAR/pear_info.php

Comments (0) Permalink del.icio.us

14. April 2003

PHP5 and namespaces
@ 20:14:34

Currently, there is being generated quite some traffic regarding PHP5 and namespaces. You could e.g. start here [1].

[1] http://news.php.net/article.php?group=php.version5.dev&article=429

Comments (0) Permalink del.icio.us

11. April 2003

PHPope - content management
@ 00:06:26

PHPope [1] is a webbased content management application providing full functionality for use with websites, intra- and extranets.The system is designed for high flexibility, it's modular structure allows individual adjustments to needs.

[1] http://www.phpope.org

Comments (0) Permalink del.icio.us

09. April 2003

Parsing EXIF data with a PHP class
@ 14:10:08

Jake Olefsky has written a class to extract EXIF data with PHP withouth the need of the exif extension [1]. It is said to work for a wide range of digital cameras.

[1] http://www.offsky.com/software/exif/

Comments (0) Permalink del.icio.us

03. April 2003

IPTC parsing with PHP
@ 13:25:48

Patrick O'Lone [1] proposed a package to PEAR that handles IPTC parsing and abstracts the iptcparse() and iptcembed() functions.

The class abstracts the retrieving and setting of IPTC field tags. It
supports multi-tagged values, such as those found in the 'keywords'
section of an IPTC header. The class basically works like this:

<?php

$oIPTC =& new Image_IPTC("test.jpg");

echo "The original caption was: ";
echo $oIPTC->getTag(IMAGE_IPTC_CAPTION);
echo "<br />";

$oIPTC->setTag(IMAGE_IPTC_CAPTION, "An example caption.");
$oIPTC->setTag(IMAGE_IPTC_KEYWORDS, "Keyword 1", 0);
$oIPTC->setTag(IMAGE_IPTC_KEYWORDS, "Keyword 2", 1);
$oIPTC->save("output.jpg");

print_r($oIPTC->getAllTags());
?>


This leads me back to the "old" idea, embedding exif-rdf'd data into the images itself [2] using PHP functions.

[1] http://www.townnews.com/contrib/IPTC.html
[2] http://www.w3.org/TR/photo-rdf/

Comments (0) Permalink del.icio.us

28. March 2003

Work on go-pear for Windows
@ 17:02:10

There has been some work and hopefully improvment on go-pear today. You might want to try it out:

C:\php>cli\php -n -r "include 'http://circle.ch/go-pear';"

This should install PEAR [1] on your Windows machine. There are still problems with other drives than C.

[1] http://pear.php.net

Comments (0) Permalink del.icio.us

27. March 2003

A PHP5 preview documentation
@ 14:06:57

[via http://dwp.cx ] There is a good documenation on PHP5 at Eide.org by HÃ¥vard Eide [1].

[1] http://www.phpvolcano.com/eide/php5.php?page=front

Comments (0) Permalink del.icio.us

nanoFTPd - ftp daemon written in php
@ 11:12:16

nanoFTPd [1] is an ftp daemon written in php. As of version 4.2.0, php supports the command-line interface (stable since 4.3.0), which nanoFTPd relies on. nanoFTPd is modular, so it's easy to add custom modules and other stuff, like different database interfaces (currently supports mysql and postgresql). nanoFTPd's other advantage is, that it's not so robust as other ftp daemons written in a different programming language.

[1] http://nanoftpd.sourceforge.net

Comments (0) Permalink del.icio.us

26. March 2003

HTTP Server WebDAV mailinglist
@ 12:29:45

Christian started a new mailinglist for HTTP Server WebDAV [1].

[1] http://lists.bitflux.ch/pipermail/php-dav/2003-March/

Comments (0) Permalink del.icio.us

25. March 2003

PEAR installation on Windows continued
@ 16:39:51

There are still problems with the installation of PEAR under Windows [1], even marked critical. Hope we will come across a solution soon [2]. Latest tryout:

C:\>\php\cli\php -n -r "include 'http://pear.php.net/~mj/go-pear';"

[1] http://bugs.php.net/21619
[2] http://bugs.php.net/17516

Comments (0) Permalink del.icio.us

13. March 2003

Zend and Extending PHP
@ 15:29:14

I just came across Derick Rethans [1] talk on "Zend and Extending PHP" dated back to December 10, 2002; quite a recent reference on a fast emerging technology.

[1] http://www.derickrethans.nl/ze-ext/talk.html

Comments (1) Permalink del.icio.us

12. March 2003

PHPUG Switzerland with Blog
@ 17:14:10

PHP Usergroupd just got installed a new blogging/news system [1].

[1] http://phpug.ch

QR Code for your mobile phone.
Related post(s):
Comments (0) Permalink del.icio.us

04. March 2003

Understanding LDAP
@ 08:22:58

There is an article on how LDAP works on Devshed [1], which gives some basic information on the Lightweight Directory Access Protocol [2].

[1] http://www.devshed.com/Server_Side/Administration/LDAP/LDAP1/print_html
[2] http://www.ietf.org/rfc/rfc2251.txt

Comments (0) Permalink del.icio.us

09. February 2003

PHP work for mono improved
@ 23:35:47

Sterling has improved his work on the PHP mono extension [1].

[1] http://www.php.net/~sterling/mono/

Comments (1) Permalink del.icio.us

08. February 2003

Build instructions for PHP5 on Windows
@ 09:55:37

Frank Kromann [1] added some build instructions for PHP5. There is also an official download of binaries at PHP [2].

[1] http://kromann.info/php5.php
[2] http://snaps.php.net

Comments (0) Permalink del.icio.us

02. February 2003

Mapping PHP and Mono
@ 19:09:16

Sterling Hughes announced [1] his intention to map PHP to mono [2].

[1] http://lists.ximian.com/archives/public/mono-list/2003-February/011767.html
[2] http://go-mono.com

Comments (0) Permalink del.icio.us

01. February 2003

PHP5 binaries for Windows
@ 11:08:17

Frank Kromann [1] has already PHP5 binaries for Windows. Wow! There are also PECL dll files on his site.

[1] http://kromann.info/php5.php

Comments (2) Permalink del.icio.us

27. January 2003

Running PHP in commandline
@ 10:04:11

Running some short scripts of PHP in commandline [1] is quite easy, once you got the trick.


C:\>cli
<?php echo md5("whatever"); ?> [Enter]
^Z [F6][Enter]
008c5926ca861023c1d2a36653fd88e2

or you can do:

C:\>cli -a
<?php echo md5("whatever"); ?> [Enter]
008c5926ca861023c1d2a36653fd88e2

cli is a shorcut to c:\php\cli\php.exe.

[1] http://ch.php.net/manual/en/features.commandline.php

Comments (0) Permalink del.icio.us

23. January 2003

Turck MMCache for PHP
@ 12:42:05

[via dwp.cx] Turck MMCache[1] is a opcode cache for PHP. It increases performance of PHP scripts by caching them in compiled state, so that the overhead of compiling is almost completely eliminated. Also it uses some optimizations for speed up of PHP scripts execution. Turck MMCache typically reduces server load and increases the speed of your PHP code by 1-10 times.

[1] http://www.turcksoft.com/en/e_mmc.htm

QR Code for your mobile phone.
Related post(s):
Related tags(s):
Comments (0) Permalink del.icio.us

19. January 2003

PEAR 1.0 is released!
@ 20:39:31

As of PHP 4.3.0, PEAR is an officially supported part of PHP. From this release, the PEAR installer with all its prerequisites is installed by default on Unix-style systems (Windows will follow in 4.3.1). It has been a long pregnancy [1].

[1] http://pear.php.net/weeklynews.php

Comments (0) Permalink del.icio.us

PHP-Gipfeltreffen 2003 in the Alps
@ 16:30:08

There are plans for a "PHP-Gipfeltreffen", a meeting in the alps that will take part around the 23. to 25. May 2003 [1].

[1] http://www.php-gipfeltreffen.ch

Comments (0) Permalink del.icio.us

09. January 2003

PEAR installation on Windows from scratch
@ 12:00:00

It occurred, that there were some difficulties installing PEAR on Windows, since it is no longer in the distro.

That is what I did [PHP 4.3.0]:


1) open a command window
2) c:\php\cli\php.exe -n -r "include 'http://go-pear.org/';"
3) run through the install dialog
4) modify locations if you need to
5) after finishing you should have a ".tmppear" and maybe a "pear.old_bat" in "c:\php". if not, search for them.
6) put ".tmppear" to c:\php
7) open a new "pear.bat" and write into it:
c:\php\cli\php.exe -n c:\php\.tmppear -- %1 %2 %3 %4 %5 %6 %7 %8 %9
8) make sure, "c:\php\cli" is in your environment variables. so now you should be able to reach "pear.bat" from everywhere.
9) run "c:\>pear config-show"
10) modify e.g. "c:\>pear config-set php_bin c:\php\cli\php.exe" etc. etc.


... hope that helps. Another way is by using the tool provided by Christian Dickmann [1].

[1] http://dickmann.homeunix.org/pear/go-pear.html

Comments (2) Permalink del.icio.us

28. October 2002

Filemaker and PHP by FX.php
@ 12:00:00

Chris Hansen offers FX.php to get access from PHP to Filemaker [1]. There is some documentation around, covering this topic [2][3].

[1] http://www.iviking.org/?page=FX.php
[2] http://www.moyergroup.com/publish.php?sub=whitepaper
[3] http://www.filemakerprofis.de/modules.php?op=modload&name=tutorial&file=details&func=chapter&nr=1

QR Code for your mobile phone.
Comments (0) Permalink del.icio.us

21. October 2002

nanoweb - new PHP webserver release 1.8.3
@ 12:00:00

Nanoweb, a webserver written in PHP, came out with a new release. Version 1.8.3 installs and runs now also perfectly on Windows [1]. If you like to run it as an NT service, you can download a service tool from here [2].
http://nanoweb.si.kz


[1] http://nanoweb.si.kz
[2] http://circle.ch/debug/ntservice.zip

Comments (0) Permalink del.icio.us

11. October 2002

WebDAV - PHP client and server implementations
@ 12:00:00

WebDAV [1] stands for "Web-based Distributed Authoring and Versioning". It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers.

There are client [2][3] and server [4] implementations in PHP.

[1] http://webdav.org
[2] http://www.azzit.de/phpwebdav
[3] http://lwest.free.fr/doc/php/lib
[4] http://bitflux.ch/developer

Comments (0) Permalink del.icio.us

Slide System - PHP Ming and Flash Bitmaps
@ 12:00:00

Navneet Behal has written a tutorial demonstration a kind of slide system with the PHP ming extension and some actionsscripts [1].

[1] http://www.productbeta.com/tutorials/

Comments (0) Permalink del.icio.us

13. December 2001

Scripts
@ 21:09:37

PHP - scripts {most of them introduced on zend.com}

  • [2001-12-10] updated! automatically created
    image gallery


  • create dynamic button images


  • [2001-03-16] updated! a dynamically cascading
    menu with buttons


  • file upload for WIN32


  • an upload class for your database. currently, images and texts are checked.
    but there are no limits. extend to your own needs!


  • Having contributed code to the PHP PEAR repository, you can download an
    upload script, which is based on the "official" PEAR HTML Form class. Upload
    a single, or multiple files.


  • [2001-06-06] updated! A drag&drop-shop draft
    project from my early PHP days in 2000 ;)


  • [2001-03-10] updated! a filebased guestbook with administrator-mode


  • [2001-01-24] updated! a news management tool
    based on files. use "test" for login and password on my testsite. or see,
    how one implements the web front-end: list
    all news
    . I added an RDF/RSS format compliant file export of the data.
    Read about RDF/RSS at netscape.com.
    The tool features now WAP/WML export!



THIS SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Comments (2) Permalink del.icio.us

05. January 2001

Deutschsprachiges PHP Forum auf php3-forum.de
@ 12:00:00

Ein ergänzedes deutschsprachiges PHP Forum ist auf http://www.php3-forum.de zu finden.

Comments (0) Permalink del.icio.us

29. November 2000

PHP im Eiltempo mit Ulf Wendel/Johann-Peter Hartmann
@ 12:00:00

Ulf Wendel und Johann-Peter Hartmann haben einen Online-Kurs für PHP Fans - und solche die es werden wollen - geschrieben. Ein Muss für Deutschsprachige!

Gege zur PHP Schulung...

Comments (0) Permalink del.icio.us

01. November 2000

PHP-Center ::: PHP inside
@ 12:00:00

Einige interessante Neuigkeiten und Randnoten zu PHP lesen sie auf:

http://php-center.de/phpinside/

Comments (0) Permalink del.icio.us

20. October 2000

de.comp.lang.php FAQ
@ 12:00:00

Eine äusserst umfangreiche FAQ zu PHP ist zu finden unter:

http://www.koehntopp.de/php/

Geführt wird diese von Kristian Köhntopp und Tobias Ratschiller.

Comments (0) Permalink del.icio.us

18. October 2000

Artikel zu PHP von Urs Gehrig
@ 12:00:00

Anlässlich des 1. deutschsprachigen PHP Kongresses in Köln habe ich einen kurzen Einführungsartikel über PHP geschrieben:

http://circle.ch/dl/php-artikel.pdf

Comments (0) Permalink del.icio.us

29. August 2000

PHPLib Template Tutorial
@ 12:00:00

Ich habe zur Template Klasse der PHPLib ein kurzes Tutorial mit Beispielfiles geschrieben. Zu finden auf dynamic-webpages.de.

Gerade soeben hab ich noch ein anderes Tutorial zu PHPLib gefunden. Das kann ganz gut zu meinem eigenen als Ergänzung gelesen werden werden.
phpbuilder.com

Comments (0) Permalink del.icio.us


Werbung:

Beitrge von Dritten:

Nachfolgende Titel verweisen auf von mir gelesene Weblogs.

Feeds:

Blog Content
Blog Comments

WikiAgenda:

Comments:

Good question, but...
Hi, thank you very...
Unter http://www.s...
Ich weiss mir nich...
ThanQ matthias. Th...
in case you just w...
ich liebe dir, urs...
hi there, sorry i...
Hoi Leo. I haven'...
Do you know the si...

Archives:

Blog stack:

Bill Humphries
monorom
Wendy M. Seltzer
Christian Stocker
Roger Fischer
Sandro Zic
Wez Furlong
Ben Hammersley
George Schlossnagle
Joichi Ito
Lawrence Lessig
Derek Slater
Karl-Friedrich Lenz
John Palfrey
Bernhard A.M. Seefeld
Gregor J. Rothfuss
Rainer Langenhan
Elke Engel
Sebastian Bergmann
Simon Willison
Jeremy Zwaodny
Udo Vetter
Axel A. Horns
Miguel de Icaza
Andreas Halter
Silvan Zurbrügg
Hannes Gassert
Markus Koller


$Date: 2005/11/05 11:14:30 $