Missing xgettext Program Linux

If you’re in the business of translating text and coding websites you’ll most probably at some point be needing the utility called ‘xgettext’ but if it is not installed on your system you will need to install the entire set of tools called gettext from GNU.

If you’re on a CentOS system or equivalent and have yum installed simply run

yum install gettext

» Read more…

PHP JSON Module Install on a CentOS 5 Server

So I was messing around with jQuery‘s new little piece of sex – the jQuery Mobile Framework, when bam!

Call to undefined function json_decode() in /var/www/server/path/secret/h4x.php on line 56

Oh no! My PHP skills have failed me so I thought. But alas I had not made this magical mystical function up, it is of course a PHP Module, and soon to be included in PHP 5.2

After a quick bit of googling I came across an excellent tutorial for installing the said module, however I then ran into another problem after trying to execute ‘pecl install json’.

» Read more…

Install, Remove and Update Applications Plesk and Virtuozzo Power Panel

On the eUKhost blog, they just posted a new article about Virtuozzo Power Panel that comes with most of their VPS servers. The Power Panel is a great piece of kit and I’ve been intending on writing a little blog post for a while about how easy it is to use, not only for the features listed in the eUKhost blog but more aimed towards the ease of installing programs and applications at the operating system level (CentOS in my case).

» Read more…

ImageMagick Plesk and open_basedir

PHPBecause of the way that ‘open_basedir’ works in restricting everything some things that you access file system wise in code, it will restrict you also in using programs such as ImageMagick , or in applications that may use it such as Coppermine Gallery or Menalto Gallery.

To fix this you need to either turn off openbase_dir or make it so that the PHP running on the target domain can access the directory where ImageMagick resides. First you need to modify your vhost.conf, you can see examples of modifying/changing/reloading this config file here.

php_admin_value open_basedir /var/www/vhosts/example.com/httpdocs:/tmp:/usr/bin/

Above you can see the line of code that needs to be added, the first two options ‘/var/www/vhosts/example.com/httpdocs’ and ‘/tmp’ are the default running settings (restricting things), so when defining the value of the open_basedir you need to re-declare these two. The third path allows our PHP to access that folder when running, and so can now access ImageMagick etc, along with a lot of other things.. Security risk perhaps, but at least it works for now.

I’ll look into a more secure method, please comment if you can suggest/add anything to this topic.

Cannot unsuspend domains – After Plesk Backup

For one of my domains, I noticed it was stuck as ‘suspended’ but was still functioning. This was due to my server going offline during a Plesk cp backup. There are two ways of fixing this:

If your domain is just that, a domain then run this command as root from your CLI

/usr/local/psa/bin/domain -u <full_domain_name> -status enabled

It should then tell you that it was successful, and hopefully your domain is back to normal. –

SUCCESS: Update of domain ‘example.com’ complete.

For domains that are part of a client, or if a client has been susspended simply run

/usr/local/psa/bin/client -u <login_name> -status enabled