Getting High On PHP // High On PHP has been feeding the addiction of developers since 2009. Sharing tips, tricks and code with the open-source community, High On PHP helps bridge the gap between devices and servers.
function array_compare($weighted, $comparable){
return array_merge(array_diff_assoc($weighted, $comparable), array_diff_assoc($comparable, $weighted));
}
http://php.net/manual/language.references.pass.php
There is no reference sign on a function call – only on function definitions. Function definitions alone are enough to correctly pass the argument by reference. As of PHP 5.3.0, you will get a warning saying that “call-time pass-by-reference” is deprecated when you use & in foo(&$a);.
function myFunc(&$arg) { }
myFunc($var);
function myFunc($arg) { }
myFunc(&$var);
Some System Administrators like to change application prefixes around for security, organization and other reasons. Sometimes, being to quick for their fingers, they may forget a step in the install process. Once the source is ready for ‘make’, your configure options have already been parsed and saved. Running ‘./configure’ multiple times without a ‘make clean’ could cause some unwanted behavior.
In this example, ‘./configure’ was run on Apache source without a ‘–prefix’. The second time we ran it, we included a prefix of ‘/usr/local/apache-2.2′. As you can see, the default prefix is ‘/usr/local/apache2′, which carried over to the second make instance of Apache.
/bin/sh /opt/httpd-2.2.22/srclib/apr/libtool --mode=install /usr/bin/install -c -m 755 libaprutil-1.la /usr/local/apache21/lib libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending in /usr/local/apache2/lib make[2]: *** [install] Error 1 make[2]: Leaving directory `/opt/httpd-2.2.22/srclib/apr-util'
“Don’t be mean, use ‘make clean’”
If you are running configure more than once, make sure you use ‘make clean’ between each ‘./configure’, ‘make’ and ‘make install’.
Enjoy!
apache2-mpm-itk (just mpm-itk for short) is an MPM (Multi-Processing Module) for the Apache web server. mpm-itk allows you to run each of your vhost under a separate uid and gid — in short, the scripts and configuration files for one vhost no longer have to be readable for all the other vhosts. To read more, check out the mpm’s site: http://mpm-itk.sesse.net/
Updated 4/16/2012
Download the Monolithic Patch Here
Follow the steps below to apply the patch.
// Enter directory with apache source files wget http://www.highonphp.com/downloads/apache2.2-mpm-itk-2.2.22.patch patch -p1 < apache2.2-mpm-itk-2.2.22.patch autoconf ./configure --with-mpm=itk make sudo make install
Comments and questions below!
Enjoy.
Glaze is a newely launched service designed to take the legwork out of creating an API. It uses an easy-to-use, intuitive interface to guide you for the most part on how to create an API, controller, modifier and output data. We haven’t seen anything like this before, and it’s use comes in handy. You can get in touch with that at www.mobilefrosting.com or www.yumglaze.com. You can follow them on twitter at http://twitter.com/yumglaze.
Honestly, we ate it all up! Glaze really is a great app, with a lot of potential. Just a little more tweaking and it will be the next big thing!
Enjoy.
sixeightzero has been working with PHP since late 2003 developing websites, applications, appliances and utilities.
There is nothing that I enjoy more when it comes to programming than integration. From SNMP, Linux and system administration to music, movie and image manipulation with the power of PHP, if it sounds interesting, I’ve given it a try.
I’ve worked on projects in the past which have included Bonsolo, PHP News, PHP News2 and others.
The two things I enjoy most in life is being a husband and a father. When you’ve married the most amazing and beautiful lady in the world, and have amazing, smart and talented children, there’s nothing more you can ask for. Money can’t replace this happiness.
WHAT PEOPLE ARE SAYIN’