Home Account

Tag :: php

apc crashes when no file is uploaded

2012-04-09 19:55 dennis iversen

Tags: php apc ubuntu

Fixing APC upload bug when no file is given in upload field. Complies to PHP 5.3.5-1ubuntu7.7 on Ubuntu 11.04

auth plain smtp

2012-06-07 14:18 dennis iversen

Tags: php smtp

This short piece of PHP code generates valid AUTH PLAIN for smtp servers, at least Postfix. Can be used when testing smtp with telnet.

simple github api php

2012-12-29 16:44 dennis iversen

Tags: php oauth

a verfy simple github API for PHP with example.

PHP PDO escape like query

2014-05-29 15:11 dennis iversen

Tags: php pdo

How to escape like queries with PHP and MySQL

git delete remote tag script

2015-08-27 18:45 dennis iversen

Tags: php git

Simple script to delete a remote git tag. When a programmer does a thing more than three times, he should make a small program.

include classes without namespaces into namespace php

2014-12-18 14:51 dennis iversen

Tags: php pear

Preventing fatal PHP error Cannot redeclare class Validate when importing classes without a namespace into a namespace.

babun and php composer

2016-06-06 15:20 dennis iversen

Tags: babun php composer

Fix errors when running php composer on babun.

anonymous and inline functions with php

2012-11-20 18:25 dennis iversen

Tags: php

Using inline and anonymous functions with PHP. Some tests and thoughts about function scope.

rename files recursively php

2012-01-31 17:14 dennis iversen

Tags: php scripts-and-functions

A couple of function to use in order to rename a directory recursively. Needed it at my work and could not find anything that worked the way I excepted.

parse ini file cached with APC

2011-12-29 14:45 dennis iversen

Tags: php scripts-and-functions apc

This is short howto which describes how to cache php ini files with APC by default. Ini files are not cached by APC by default.

Simple PRG Pattern PHP

2016-11-05 16:22 dennis iversen

Tags: php prg

A very simple implementation of the PRG pattern with PHP using sessions alone.

AFC search sub fields

2017-03-31 22:52 dennis iversen

Tags: php wordpress

How to search for AFC sub fields. Mostly about the date picker field or datetime.

Linux init scripts with php

2011-06-18 03:45 dennis iversen

Tags: php scripts-and-functions

Showing how to create startup or init scripts with PHP on a Ubuntu machine. Short and easy to follow howto.

remove all dirs with selected name

2013-09-12 15:41 dennis iversen

Tags: php scripts-and-functions

How to remove dirs with a special name using PHP and the unix shell.

create large text file with php

2012-12-13 11:40 dennis iversen

Tags: php

Howto create a very large text file with PHP

Serv from local IP (inet addr) with PHP

2019-04-15 19:52 dennis iversen

Tags: php

Use PHPs built-in server to serve from local IP - or inet addr. In order to use or test from other devices on the same network.

git auto commit script

2013-03-25 12:53 dennis iversen

Tags: php scripts-and-functions git

Simple script to perform the steps involved in adding, committing and pushing to a remote git repo. It rewrites the https URL to ssh URL in the process.

Parse PDO string into an array

2019-11-07 20:47 dennis iversen

Tags: php

How to Parse a PDO string into an array

redirect php request to secure https host

2011-05-07 21:54 dennis iversen

Tags: php scripts-and-functions

this entry describes how to redirect a request acording to both servername and server port (e.g. 80 = http and 443 = https)

simple css compiler written in php

2012-07-28 20:56 dennis iversen

Tags: php css

Blog entry showing how to make a very simple CSS compiler with PHP and CSS, without much effort.

simple event dispatcher php

2011-12-29 17:48 dennis iversen

Tags: php scripts-and-functions

Most simple example of an event dispatcher I can think of. Written in PHP

how to create a screen dump with php on linux

2011-05-26 02:40 dennis iversen

Tags: php scripts-and-functions linux screendumps

Short entry to show how to make screen dump on linux with PHP.

php built-in server and routing static content

2014-03-19 15:36 dennis iversen

Tags: php

PHP built-in server. How to route static content when it clashes with content served from routes and database.

build php solr extension on ubuntu linux

2012-02-14 17:07 dennis iversen

Tags: apache2 solr php

I had a few problems building the php5-solr extension with the regular pecl command on my Ubuntu 10.04 box, so this will show you how it is done. I guess it will work with other versions of ubuntu as well.

michelf markdown rel = nofollow

2013-12-18 16:38 dennis iversen

Tags: php scripts-and-functions

How to extend the michelf markdown parser to allow attributes to links, like rel="nofollow"

How to make a docker image with the php built-in server

2022-07-11 12:12 dennis iversen

Tags: php docker

How to create a docker image using the built-in php server. The php version being used is php-8.1.