Thursday, April 28, 2011

Odd PHP error

On my new VPS server, I am working on getting a lot of things I need installed and configured. Well, one of the tools I need has minimum requirements. I was checking the PHP version information with the following command:


$ php --version

Here is what it spit out at me:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP 5.3.2-1ubuntu4.7 with Suhosin-Patch (cli) (built: Jan 12 2011 18:36:08)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


That line in bold is what bothers me. So, I did some quick Googling and voila!!!

It looks like its a simple bug, but even trying to update the php5-mcrypt module was no help as it tells me its at the current version. So, per the bug page, I edited the mcrypt.ini file (as root of course) and changed the '#' to a ';', as was suggested. After doing that, it just worked, and perfectly, without the error.

The Wonderful World of Setting Up Your Own VPS

There is nothing like the learning curve that comes with setting up your own VPS. Sure, there are plenty of things that I have had experience in setting up, but there are things that I have never had the opportunity to dabble in. Its actually quite fun, albeit frustrating at times.

For instance, Apache is an amazing web server, but trying to configure it to support a subdomain is a pain in the @$$! I have followed a number of forum posts and tutorials and done a lot of what was mentioned, but still, no joy. Unreal! When it works, its amazing, but when you are trying to do something specific, its a picky pain.

For anyone who is curious, here are the stats on the server that I got:

Hard Disk: 100 gig
Memory: 512 mb (with a burst to 1024 mb)
CPUs: 4
Bandwidth: 1.5 Tb per month.

Here is the page describing the different configurations. To tell you the truth, I looks at a lot of different providers and Semoweb provided the most disk space and bandwidth combination for the price.

Plus, their customer service has been top notch so far, both through chat and on the phone. No real issues, more questions from me. If your looking for a provider, I recommend them. So far I haven't had any issues.

Monday, April 25, 2011

Converting jpg files to svg

I am by no means a graphic designer. In fact, I am quite far from it. I do however have a need at times to work with images to get the results that I need, and like a lot of developers out there, I don't exactly have the funds to just hire one, nor do I know any (which would be incredibly handy sometimes, gotta say).

Today I was looking at some images online and found one that really liked, but was only able to get it in .jpg format. So, I did some digging and found handy instructions over here that guided me to converting the jpg to an svg (Scalable Vector Graphics) file. Once converted I was able to re-size the image without pixelation or blurring.

The instructions, as were provided, are for doing this under Ubuntu Linux, which I run. If you are on another OS, sorry, you will have to either see if this application is available for your system or find a similar application that will do the job.


To Convert .jpg files to .svg format:

1. Install Inkscape, if not already installed: sudo apt-get install inkscape
2. Start Inkscape after it is installed and then import the image under File->Import
3. Using the arrows on the image, re-size it to the size you wish, then hover your cursor over the image and hit Ctrl-Shift-D. That will bring up the Document Properties box.
4. Click on the Shrink To Fit button to re-size the image desktop to your images size.
5. Client File->Save As to save your image. It will default to a .svg file.

That is it. That's all there is to it. Hope this helps you in your quest, if you had one.
 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.