PHP


Error Apache PHP Suexec FastCGI session_start open O_RDWR Permission Denied

Note to self: Fix this Error in Apache PHP Suexec FastCGI session_start open O_RDWR Permission Denied Warning: session_start(): open(path-to-tmp-dir, O_RDWR) failed: Permission denied(13) The solution was simple, but in most of my PHP scripts it didn’t even show this error. The fix: Go to your /var/tmp directory. (or wherever you […]


Zend Framework 2 Global Database Adapter Object and Config Variables

I wrote this up on Stackoverflow.com too as an answer to my own question. (links below) So basically , I want some config variables available app-wide in my Zend Framework 2 apps. I also want a database adapter object available and connection. Controllers don’t have preDispatch by default now.  I […]


Make dynamic amount of columns with PHP

Below is a demonstration of how I created variable amount of columns in a table listing.  In this example I was creating a picture gallery and using template files, so you can see even more than the dynamic columns, but anyway… The only bit of important info here are these […]


Compile PHP 5.1 with JPEG support on Debian

Ok, here’s my configure command: ./configure –with-apxs2=/path/to/httpd/bin/apxs –with-mysql=/path/to/mysql –with-mysql-sock=/tmp/mysql.sock –prefix=/path/to/httpd/php –with-config-file-path=/path/to/httpd/php –enable-force-cgi-redirect –disable-cgi –with-zlib –with-gettext –with-gdbm –with-gd –with-png –with-png-dir=/usr/lib –with-jpeg –with-jpeg-dir=/usr/lib –with-pdo-mysql –with-mysqli I ran into errors trying to run the function imagecreatefromjpeg and imagesx and imagesy. And the system could not find the jpeg libs. On Debian Sarge, you […]