Tag Archives: php

PHP: Fatal error: call to undefined function iconv()

Make sure it’s enabled in php.ini. I also had to restart Apache.

PHP doesn’t execute scripts

Neither using CLI (with -f or a shebang) nor through Apache. It was just dumping the script to stdout, and that means short PHP tags (<? … ?>) are disabled. Nothing serious, fixed in php.ini. But then it just did nothing. No output, no errors, no warnings. Turned out this particular version of PHP can’t [...]

Batch image resizing

My php script no longer works, it breaks on gd functions somehow. So I use this Gimp script instead.

A PHP script to resize all images in a directory

This is a crude hack to resize images in a directory. The script is invoked as: shrink <new_x> <new_y> <file> <file> <file> … You’ll need PHP with the GD library. That’s php5-gd on FreeBSD. #!/usr/local/bin/php # The output is JPEG, quality 88. <?php // Fuction to resize images, originally by D. Weimer. // Code reformatting [...]

RDF to iCal converter (PHP script)

…which can easily be adapted to, say, RSS or shit. I wrote this with a particular RDF feed in mind, so you might have to tweak it, if you want to use it. Also, see the TODOs. <?php // GPLv3. // Parsing part copied over from PHP manual. // Also used RFC2445: http://www.ietf.org/rfc/rfc2445.txt // Distributed [...]

Follow

Get every new post delivered to your Inbox.