PHP

What’s the full path to php in CentOS?

The path to PHP is /usr/bin/php This is good to know if you need to setup a cron job which triggers a PHP file. Calling it from a web browser directly is not a problem, but if you have to call it from the command line or as a scheduled task you need to call [...]

Read the full article →

How to upgrade PHP on CentOS 5

With the recent end-of-life announcement it becomes clear that WordPress isn’t going to support PHP 5.1.6. for much longer anymore. CentOS 5 however comes pre-compiled with PHP 5.1.6 and there are no plans to change this in the current version. For simple folk like me it’s unimaginable to re-compile the entire OS from source or [...]

Read the full article →

Linux Disk Space shown as Pie Chart

I’m managing a server for Loft London. They’re using it as FTP site for various clients, so I wanted to provide an easy way for them to keep an eye on how much space is used and how much is left. I’ve done some digging and found this super handy PHP Pie Chart generator by [...]

Read the full article →

How to increase the Upload Limit in phpMyAdmin?

Since phpMyAdmin is written in php, all we need to do is change the file upload limit in the php.ini file. On CentOS and RHEL distributions, this file is located in /etc/php.ini Find this section: ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; ; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for [...]

Read the full article →

How to increase your PHP Memory Limit

With certain plugins, you may encounter error messages that tell you your PHP memory limit is not high enough. It usually means: you need more! Like your computer being really slow when you run out of memory, PHP does the same thing, sometimes refusing to work flat out. That’s not so good. There are several [...]

Read the full article →

How to add a Facebook Group Feed

I’ve come acoss this the other day, comes in handy as Facebook Groups don’t have a generic RSS feed. Here’s how you can display what’s new in your favourite groups within your WordPress Site: Make sure you have your Facebook Group ID handy (it’s the last 11 or so numeric digits after the ‘groupid’ tag [...]

Read the full article →

How to change the PHP Upload Limit

Usually your hosting package limits the amout of data you can upload to 2MB, which isn’t enough for most of us. It’s good for that 200k photo, but say you’re uploading a 4MB audio clip, a video or a large PDF, you’re stuck. Fret not my friends, for help is at hand! Put the following [...]

Read the full article →