Notice: wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/huement.com/blog/wp-includes/functions.php on line 3587

Notice: Use of undefined constant version - assumed 'version' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 14

Notice: Undefined index: awp in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 16

Notice: Undefined index: awp in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 19

Notice: Undefined index: noredirect in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 22

Notice: Undefined variable: awpsuffix in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 35

Notice: Undefined index: aiosp_enabled in /var/www/huement.com/blog/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 766

Notice: Undefined index: aiosp_enabled in /var/www/huement.com/blog/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php on line 766

Notice: Undefined index: date in /var/www/huement.com/blog/wp-content/plugins/feed-subscriber-stats/classes/fssStats.php on line 80

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: add_option was called with an argument that is deprecated since version 2.3 with no alternative available. in /var/www/huement.com/blog/wp-includes/functions.php on line 3553

Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in /var/www/huement.com/blog/wp-includes/functions.php on line 3587

Notice: rss.php is deprecated since version 3.0! Use wp-includes/class-simplepie.php instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3507

Notice: Undefined index: awp in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 49

Notice: Use of undefined constant version - assumed 'version' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/control/aWP-upgrade.php on line 17

Notice: Undefined index: action in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 94

Notice: Undefined index: page in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 117

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467

Notice: Use of undefined constant fss_widgetOption - assumed 'fss_widgetOption' in /var/www/huement.com/blog/wp-content/plugins/feed-subscriber-stats/feedsubstats.php on line 164

Notice: register_widget_control is deprecated since version 2.8! Use wp_register_widget_control() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467

Notice: register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467
Huement Bits
Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467

Notice: Undefined variable: wp_version in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/control/aWP-ajax.php on line 187

Notice: Use of undefined constant js_library - assumed 'js_library' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/control/aWP-ajax.php on line 194

Notice: Use of undefined constant no_load_library - assumed 'no_load_library' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/control/aWP-ajax.php on line 39

Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467

Notice: get_settings is deprecated since version 2.1! Use get_option() instead. in /var/www/huement.com/blog/wp-includes/functions.php on line 3467

Notice: Use of undefined constant last_modified - assumed 'last_modified' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 160

Notice: Use of undefined constant last_modified - assumed 'last_modified' in /var/www/huement.com/blog/wp-content/plugins/ajaxd-wordpress/aWP.php on line 161

Mac Apache2 Mysql5 Php5.3+
[MAMP 10.7.2]

Posted by johnny on Monday Jan 9, 2012 Under Tutorials

Notice: Undefined index: share_plugin in /var/www/huement.com/blog/wp-content/plugins/gigya-socialize-for-wordpress/resources/handlers.php on line 38

Getting it to work

Alot of people, like myself, are not real happy with the newest version of OSX server. Its an app you install via the App Store. It will likely break anything you have done on mac servers previous versions. No more /Library/WebServer/Documents for your default folder. Its now /Library/Server/Web/Data/Sites/Default/.  Yeah. SIX DIRECTORIES DEEP! I want /var/www like a LAMP server. Is that to much to ask? Apparently. One would think things would just work, (it is apples mantra), like  you could just, get to hosting. As everyone knows however, one does not simply, umm, do that thing..

Step One. Server App

I am going to assume you already have OSX Lion Installed. Next, we are going to setup our webserver. This is the easiest thing to do, or is it… Just get the app from the app store, and click it. Yeah. Boom. It will guide you through setting up everything. Mail, VPN, Push notifications, its all sooo easy. Until you get to your webserver. What a nightmare. The server app will be almost no help for setting up a traditional Mac Apache Mysql PHP [MAMP] webserver.

The server app will assist you with the Apache part, and you will now have Apache2 up and running. Visit localhost or your servers WAN or LAN ip to see this….

EDIT: Lion Server.app is only half the battle. Get Lion’s ServerAdminTools

I did not find this out until many hours into my Lion Server Install. I think alot of the butthurt hate from the switch to snow leopard server to lion server could be alleviated if people installed all the server tools. However when I installed the server app, it made no indication I could install more tools, or that more tools even existed. You are GOING TO WANT to download and install this. Its like another 200MBs of Mac Server that you’re missing. Thanks to this review I found the link. macgasm

Server Admin Tools Download Link

Step Two. Cold Hard Realities

So that looks neat. You can also click a button and have PHP instantly enabled. Saving you all that time of uncommenting one line! Thanks apple. What a time saver. From here on out, you can just close the server app. It will no longer assist you in your web serving/hosting needs.

Enough Boo Hooing, Lets keep going with our MAMP setup. Next we need the M and P. or Rather MySql and PHP. I used this tutorial (I have a few notes below this before you start) (pops) http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/ for getting PHP and MySql setup. He also has a link for getting mcrypt setup and PhpMyAdmin.

Notes on that tutorial: I skipped phpunit and the symphony setup. If you dont use those frameworks, you dont need them either. 

At the end of the tutorial there is a link for the installing the mcrypt extension on Lion. If you want to have PHPMyAdmin installed YOU NEED THAT. Also, before you start to install MCrypt, you will likely need to click his download links and get could potentially get the wrong thing. The first file your told to get, pay attention!! you dont want to download mcrypt, you want to download libmcrypt. The download link at the top of the page is for mcrypt. Its like 3 more pages in to get the libmcrypt link.

Here is the actual libmcyrpt download link.
http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz?r=&ts=1326152550&use_mirror=superb-sea2

And in case you missed it, here is the libmcrypt tutorial Link: Lion LibMcrypt Tutorial

Once you have gone through BOTH the tutorials, you should be able to visit your phpinfo() (info.php) script and see something like this:

PHPMyAdmin can be installed now, so lets get on with it. Download PHPMyAdmin from their website.

Then either use the terminal or finder to

  1. unpack it
  2. move it to /usr/local/
  3. rename it to phpMyAdmin
Then you need to use the Terminal.app to create a system link. So to use the default Lion Server directory,
sudo ln -s /usr/local/phpMyAdmin/ /Library/Server/Web/Data/Sites/Default/pma

You should now be able to visit http://localhost/pma and see your phpMyAdmin install.

Checkpoint Reached

You should now have [M]ac [A]pache2 [M]ySQL [P]hp Setup on your Lion Server and be capable of admin’n everything. PHP, Pear, Pecl, phpMyAdmin and mcrypt have all also been installed. Phew. But we can still only host one website. To enable hosting of multiple websites we will need to configure virtual hosts. In Snow Leopard this could be done through the server application, not so in lion. You will need a good text editor and the terminal to get virtual hosts to work in lion.

Open up your httpd.conf file for apache2 in a text editor. It’s located in /etc/apache2/httpd.conf

Next edit it to look something like this (just replace with your info):

 
...
 
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
 
...

If you want to change your server root back to what it was in snow leopard, edit the file 0000_any_80.conf in /etc/apache2/sites folder to look like this.

	ServerAdmin you@your_email.com
	DocumentRoot "/Library/WebServer/Documents"
 
...
 
		Options All +MultiViews -ExecCGI -Indexes
		AllowOverride All

Next we need to edit etc/apache2/extra/httpd-vhosts.conf. So open it up in your editor of choice, and edit that to look something like this, but again, with your information.

NameVirtualHost *:80
 
  DocumentRoot /Library/WebServer/Documents/site1.com
  ServerName site1.com
 
    Order allow,deny
    Allow from all
 
  DocumentRoot /Library/WebServer/Documents/site2.com
  ServerName site2.com
 
    Order allow,deny
    Allow from all

Now this should enable virtual hosts on your OSX 10.7.2 Lion Server. Congrats. You could actually host alot of stuff now. Multiple sites, latest php version. Also if you are looking for a package manager and are sick of macports, checkout HomeBrew!

@johnnyfortune

Share
Tags : , , , , , , | add comments

PHP, Pear, Pecl, Pyrus and Ubuntu 11.10

Posted by johnny on Monday Jan 2, 2012 Under Tutorials

Notice: Undefined index: share_plugin in /var/www/huement.com/blog/wp-content/plugins/gigya-socialize-for-wordpress/resources/handlers.php on line 38

Wow. A lot of P words going on in that title. Being a huge fan of alteration I just couldn’t resist.

Anyways, this is a brief guide on how to get Ubuntu 11.10 up and running w/ the latest version of PHP and all her hot sisters. Also, I use apt-get, if you wanna use aptitude or whatevs alter the commands accordingly.

Lets Start with getting Apache2 and PHP (and optionally apc cache and curl) up and running. Run Each of these Separately, and the second to last one is optional but recommended. The last command is restarting apache2 and absolutely is required.
 

sudo su
apt-get install apache2
apt-get install libsqlite3-0 libsqlite3-dev
apt-get install php5-dev libapache2-mod-php5
apt-get install php5-cli make
apt-get install php5-sqlite php5-mysql
apt-get install php-apc php5-curl
service apache2 restart

 
You should now be able to visit http://localhost/ and see It Works! You can also create a phpinfo() file to checkout your php install, or type php -i into the terminal and read really fast.
 
However, if you are on the 11.10 a nasty error is going to popup. This is because sqlite was disabled, and now we get sqlite3 only. To fix this error…

PHP Warning: PHP Startup: Unable to load dynamic library
‘/usr/lib/php5/20090626/sqlite.so’ 
– /usr/lib/php5/20090626/sqlite.so: 
cannot open shared object file: 
No such file or directory in Unknown on line 0

Fix that error with this command
 

sudo rm /etc/php5/conf.d/sqlite.ini

 
For sqlite to work, you NEED to add this line “extension=sqlite3.so” without the quotes to your php.ini file (typically in /etc/php5/apache2/php.ini on ubuntu)
 
Now We need to step our game up for the hot sisters, Pear, Pecl, and Pyrus.
 

sudo su
apt-get install php-pear
pear config-set preferred_state alpha

 
That should Give you PHP Pear and Pecl. Along w/ PHPIZE and a MySQL database plugin. Next up is geting PEAR2 (aka Pyrus.phar) working.
 

sudo su
apt-get install wget
mkdir ~/pyrus
cd ~/pyrus
wget http://pear2.php.net/pyrus.phar
cp pyrus.phar /usr/bin/pyrus.phar
chmod 755 /usr/bin/pyrus.phar
pyrus.phar

 
After that last command, pyrus.phar will ask you to setup your default directory. Dont fret to much over this, if you need to change it later its easy. (unlike pear).
 
For this, I used the ~/pyrus directory we created earlier. After the quick setup you should be able to do something like:

sudo su
php pyrus.phar install pear/System_Daemon-1.0.0RC1

and have Pear2 install the packages! Congrats, your PHP setup is officially ready to get alot of work done.

Good Luck in all your projects!

Share
Tags : , , , | add comments

CCC Video On Copy write v. Open Source

Posted by johnny on Wednesday Dec 28, 2011 Under Reviews

Notice: Undefined index: share_plugin in /var/www/huement.com/blog/wp-content/plugins/gigya-socialize-for-wordpress/resources/handlers.php on line 38

YouTube Link -> The coming war on general computation

This is such a good video. The first 20-30 minutes are his excellent discussion of the issues. The remaining time is q&a w/ the audience. Super funny and zoo worth the watch.

Share
Tags : | add comments