Recent Posts

Pink is the New Black

Pink is the New Black

Return To Blog Listing

A sexy look at programming ruby, php, and mySQL as well as various topics ranging from personal and cultural events. Also some free wallpaper, themes, and scripts.

Search This Blog's Tags For:

Recent Posts Tagged With 'php'

  • Simple API Writing, Part I

    Posted on Monday February 9th, 2009 at 20:55 in php, tutorials, Uncategorized, cpanel

    A lot of people don’t realize how easy it is to write an API with PHP. It really is as easy as having a simple PHP script accepting GET variables, and when you add in some security, you can pretty much do anything you want with a single script ...

  • Sexifying WHM with XML API

    Posted on Wednesday May 7th, 2008 at 04:33 in php, tutorials, code, shell, Uncategorized, cpanel

    I don’t know about you other cPanel system admins out there, but I find WHM to be very useful for the more advanced and time-consuming tasks, such as installing SSL certificates. However, the easy stuff like changing an account’s package...

  • Moving Towards PCI Compliance with cPanel

    Posted on Monday April 14th, 2008 at 04:31 in php, Security, apache, Uncategorized, cpanel

    Those of you who are server admins or use certain merchant services know what I’m taking about — it’s that dreaded security scan that picks apart your server to tell you everything that it thinks is wrong, assuming you have the know...

  • Alternative PHP Caching FTW

    Posted on Thursday March 27th, 2008 at 07:24 in php, Uncategorized

    We get a TON of requests for the PHP APC pecl module because after having adopted suPHP into our configuration, eAccelerator is worthless. It’s quick to install, and especially if you’re running suPHP or phpsuexec, each user can maintain...

  • The [pretty much] Complete Guide to Installing ffMPEG and Audio Binaries

    Posted on Monday January 7th, 2008 at 12:39 in php, tutorials, Uncategorized, centos

    I know you’ve provably seen a lot of guides on how to install ffMPEG, but I’ve noticed that most of them are incomplete and don’t cover the possible issues that can arise during installation. I’ve installed ffMPEG on dozens o...

  • Moving Towards PHP 6

    Posted on Thursday December 27th, 2007 at 00:13 in php, Uncategorized

    Back in the day I posted my horror of upgrading my server to PHP 6.  You might as well face it — PHP 5 is going to be dead in a few years just like PHP 4 is now, so it’s a good idea for all you programmers and server admins to start maki...

  • Working with Permissions in PHP

    Posted on Thursday December 20th, 2007 at 20:01 in php, tutorials, Uncategorized

    PHP uses the same command as *nix systems when dealing with changing permissions for files: chown - changes ownership, but can only be done by a root user chgrp - changes group ownership, can be done by a user who is a member of the new group chmod -...

  • Whitespace is Evil

    Posted on Wednesday December 19th, 2007 at 00:23 in php, code, Uncategorized

    I have this recurring nightmare of PHP apps that don’t trim whitespace when entering info. As a habitual copy and paster, it would be nice if some programmers could tend to my laziness and reluctance to type. Yes, Tony, I’m talking abou...

  • More of Using PHP for Server Info

    Posted on Sunday December 16th, 2007 at 23:53 in php, ruby, code, Uncategorized

    I’ll eventually get the whole thing up here, but I’ve been working on a simple server info script to help me and the other members of the system admin team keep up with the gazillion servers we have and all their different configurations....

  • Common PHP Errors

    Posted on Friday December 7th, 2007 at 21:44 in php, MySQL, code, apache, Uncategorized, troubleshooting

    I’m going back to the basics here, you know, when you wrote your first PHP script and saw an ugly-ass error message pop up on your screen? Error messages are the best tool a programmer has. Set up Error Reporting Most PHP errors are straight f...

  • Convert Database to UTF-8

    Posted on Thursday December 6th, 2007 at 21:25 in php, MySQL, scripts, code, Uncategorized

    We seriously see a ton of customers coming in with the type of databases that are a nightmare to move over. When you’re dealing with special characters in a database, you have to make sure that the charset and collation are dumped *with* the d...

  • Using an .htaccess with PHP Compiled as CGI

    Posted on Thursday December 6th, 2007 at 19:57 in php, tutorials, apache, Uncategorized, suphp

    We recently started installing suPHP on a few of our servers, which is an implementation of phpsuexec, only a ton faster and with less overhead. Yesterday I posted a tutorial on how to install suPHP on a PHP5/Apache server outside of EasyApache, but...

  • Installing suPHP on cPanel

    Posted on Wednesday December 5th, 2007 at 21:07 in php, tutorials, apache, Uncategorized, suphp

    I wrote this tutorial a while back and figured it would be good to post because suPHP is growing more popular as an alternative to phpSuExec. The instructions assume that you are on a Linux cPanel server and are familiar with how to install PHP, but...

  • How to Upgrade PHP

    Posted on Tuesday December 4th, 2007 at 11:21 in php, tutorials, Uncategorized

    Whether you compiled manually or with EasyApache, running a PHP upgrade from a previous version is super easy but also one of the most common questions I get. There are 3 likely assumptions about your current environment (specific to Linux servers, ...

  • Massive Upgrade Time

    Posted on Saturday December 1st, 2007 at 21:33 in php, Uncategorized, the site

    I decided to stop being lazy and get around to those upgrades I needed for my site and server: - Upgrade PHP to 5.2.5 and Apache 2.2.6 - Upgrade Gallery2 and the WPG2 plugin for Wordpress - Upgrade Wordpress to 2.3.1 First, I should admit that I do ...

  • MX Validation in PHP

    Posted on Friday November 30th, 2007 at 23:16 in php, scripts, tutorials, code, dns

    Hosting companies have all kinds of tactics to keep spam away from their customers, but one very common complaint I get is the amount of spam coming in through contact forms. Even though we don’t allow ‘nobody’ mail through the ...

  • A Simple Way to Save Bandwidth in PHP

    Posted on Sunday November 18th, 2007 at 08:05 in php, code

    If you were ever looking for a quick and sexy way to save bandwidth on your PHP-based porn high traffic site, all you have to do is add these two lines to the beginning of your PHP scripts: <?php @ini_set(’zlib.output_compression_level...

  • Installing IonCube loader with Zend Optimizer

    Posted on Sunday November 18th, 2007 at 07:48 in php, tutorials, cpanel

    This is a common request we get for Ioncube to be installed. It’s generally not an issue, but when you factor in other optimization plugins like Zend and eAccelerator, a common misconception is that the three don’t get along. It’...

  • Which Programming Language is For You?

    Posted on Tuesday October 30th, 2007 at 11:23 in php, ruby, perl, site design

    Working with a webhosting company I get asked all the time — which programming language is better? It’s obvious that I’m more bias towards PHP, but there are other great languages out there that may be more suitable for certain p...

  • Using PHP to Display Version Info - Part II

    Posted on Wednesday October 17th, 2007 at 10:18 in php, scripts

    Earlier I showed some examples of commands you can use to pull software versions into a simple PHP script. In the next example I’ll show how to do the distro and kernel versions. I’m sure that there’s a much simpler way to do th...

  • Using PHP to Display Version Info

    Posted on Monday October 15th, 2007 at 09:38 in php, ruby, perl, scripts, code, apache

    I’ve been working on this application for work that does some simple server reporting, part of which involves displaying the versions of major software running on the machines. The importance of this to me personally is that since we have ov...

  • Size Matters with PHP

    Posted on Monday August 27th, 2007 at 02:59 in php, tutorials, shell

    I figured this might be helpful to post since it seems to be a fairly common issue poking up about PHP’s limits in regard to file size. It’s no secret to fellow programmers that PHP is incapable of readily handling files over 2gb on th...

  • Dun Dun Dunnnnnnnnn

    Posted on Friday August 3rd, 2007 at 03:23 in php, hacking

    Just a nice life lesson for my fellow lazy programmers: I was looking at this site the other day in class while I was researching some crap on sub-netting (which is not one of my high points btw) and I noticed an all-too-obvious URL structure that...

  • Simple MySQL Search Query

    Posted on Wednesday July 4th, 2007 at 02:35 in php, MySQL, scripts, tutorials, code

    If you use MySQL to keep a ton of records, it might be nice to be able to search for the particular entry you’re looking for via a simple form on your site. To set this up, we’ll make two scripts — one being the form itself, the...

  • Make Apache Faster

    Posted on Wednesday May 9th, 2007 at 23:46 in php, tutorials, apache

    Apparently someone thinks that my website is too slow in its load time. I never really thought it was that bad, but his little handy danty Firefox plugin claims that it takes my site approximately 6-7 seconds to load initially, which kinda sucks....

  • PHP 5.2.1 is a Remote Include Hater

    Posted on Saturday April 28th, 2007 at 15:34 in php

    I found this out after troubleshooting a few sites a couple weeks ago. Unlike all other previous versions of PHP, with 5.2.1 you can no longer use a URL to include files, even if you have allow_url_fopen enabled in your php.ini. Just a quickie abo...

  • Sohosin Will Make your PHP Hard

    Posted on Friday April 20th, 2007 at 06:53 in php, tutorials

    I noticed a vague mention of Sohosin on a PHP blog that I read on occasion and I decided to give it a whirl to see if it's as sexy as is sounds. So far my server hasn't crashed, so I'm willing to recommend it to anyone who's interested in hardenin...

  • Timing Your PHP Scripts

    Posted on Sunday April 15th, 2007 at 07:52 in php, code

    This was just a little code addon that I put together as part of a tutorial I wrote on a friend's site (and copied on mine) about PHP optimization. Added to a page on your site, it will calculate how much time it took for a page or script to execu...