Archive for the ‘PHP’ Category

Make text PHP safe

Have you ever copied and pasted some text from somewhere for use in a PHP string? You have? Well, you know that there can be some problems if the text contains single or double quotes. That’s where this little tool will come in handy:
PHP String Quoter
Just enter your text, and it will [...]

Enabling GD library for PHP 4.4.4 on Mac OS X

For some reason, GD is not enabled in the default Mac OS X build of PHP 4.4.4. Here’s an easy way to install. Make sure you have the following fink packages installed:

libpng3
libjpeg

1. Download the source code for PHP 4.4.4
PHP 4.4.4 source
2. Unpack the source
tar jxvf php-4.4.4.tar.bz2
cd php-4.4.4
3. Compile and install the GD extension

cd [...]

PHP syntax check on Save

John Gruber has produced a nice little AppleScript to check your PHP documents for syntax errors. I have found that you can use this as a nice safety net so not to save any PHP documents with errors by attaching the script to the Save option in the File menu:
1. Install the AppleScript into [...]