The Blog of a Programmer
Software
Quick Note on Meteor Server Permissions
Jun 25th
You don’t need root to run Meteor Server, it can be setup to run under a single user without sudo. If you are running it on the same machine as the website it is serving you also don’t need to run it on anything other then the default port and you’ll still avoid cross site scripting errors.
Good times!
OpenVBX: Useful right out of the box
Jun 20th
More often then not when I’m looking at a new software I find myself thinking about how it can be made useful for my clients, how I would need to modify it to suit their needs, and what the best way to present it would be.
It’s not too often when I come across a piece of software that immediately makes me want to setup a demo, call up clients and simply say, “You HAVE to see this, this software is for you!”
The other day I had one of those rare moments. Looking through my email there was a newsletter which mentioned OpenVBX , so I signed up for an account with Twilio and got my $30 of free sandbox credit, and then went on to install OpenVBX (with the DreamHost One-Click Installer). It took me about 10 minutes to setup my first call flow, menu items, voicemail, and finally get my first call into the sandbox number.
I haven’t tried modifying the themes yet, or taken too close a look at the API, but it all seems so simple, right out of the box, and I’m already thinking about those first few calls.
Thanks Twilio, you’ve already made me into a fan.
Piwik Error: User ‘anonymous’ doesn’t exist.
Jun 14th
There is an easy fix to this; login to phpmyadmin, or whatever you want to use to access the database and execute the following query on the db for your piwik install:
INSERT INTO `piwik_user` (`login`,`password`,`alias`,`email`,`token_auth`,`date_registered`) VALUES ('anonymous', '', '', '', '', NOW());
Basically piwik needs to have an anonymous user setup in the DB as it looks for it when you try and access the settings.
-JJ
Magento Commerce Installer Updated
May 28th
If you’re looking for an updated version of my old Magento install script for DreamHost, you’re in luck – I went ahead and updated it so it is now installing version 1.4.0.1 of Magento Commerce.
http://www.gimmesoda.com/installing-magento-commerce-on-dreamhost/
JJ G
DreamHost WordPress Backup
Apr 30th
Okay, so it’s a bad plugin name but it does what it says, pretty much.
This plugin creates a copy of your wp-content folder (excluding any backups made by this plugin) and creates an archive, that archive is then uploaded to the DreamHost backup server. A backup of your sql database can also be created and uploaded for you. As per the DreamHost style I went ahead and made this as simple as possible with 1 click backups for each option.
Just enter your backup username and password and click on backup. You can grab a copy of the plugin from here, I’ll be submitting it to the WP Plugin Directory soon.
JJ
A Few Notes for Building PHP 5 on DreamHost PS
Mar 26th
The information here is being used to overwrite the original PHP install on a DreamHost PS, mostly because I want to enable SOAP and XMLRPC.
Since the OS is currently Debian Etch I need to download, compile, and install xmlrpc-epi:
http://xmlrpc-epi.sourceforge.net/
I want to enable SOAP so I modified the configure command to use:
‘./configure’ ‘–prefix=/usr/local/php5′ ‘–datadir=/usr/local/php5/share’ ‘–localstatedir=/usr/local/php5/var’ ‘–enable-sockets’ ‘–enable-fastcgi’ ‘–enable-bcmath’ ‘–with-pear=/usr/local/php5/lib/pear’ ‘–with-mysql=/usr’ ‘–enable-calendar’ ‘–with-mhash=/usr’ ‘–with-kerberos’ ‘–enable-force-cgi-redirect’ ‘–with-config-file-path=/etc/php5/cgi’ ‘–with-imap’ ‘–with-imap-ssl’ ‘–with-gd’ ‘–with-xsl’ ‘–with-ttf=/usr’ ‘–with-freetype-dir=/usr’ ‘–enable-exif’ ‘–with-jpeg-dir=/usr’ ‘–with-png-dir=/usr’ ‘–with-zlib-dir=/usr’ ‘–with-pdo-mysql’ ‘–enable-ftp’ ‘–with-curl=/usr’ ‘–with-pspell=/usr’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-mysqli’ ‘–with-openssl=/usr’ ‘–with-gettext’ ‘–enable-soap’
I also had wanted xmlrpc but ended up having so much trouble trying to get PHP to compile with it enabled that I went the route of downloading the debian etch package “php5-xmlrpc” from here:
http://packages.debian.org/etch/php5-xmlrpc
I extracted the contents using:
dpkg –extract package.deb folder/
Then pulled the xmlrpc.so file and put it into my extension dir and added the following line to the php.ini:
extension=xmlrpc.so
It should also be noted that the old configure command contained:
–enable-trans-sid
–with-xml
–with-xslt
–with-xslt-sablot=/usr
–with-dom-xslt=/usr
Which are PHP4 configure options and not needed for PHP5.
Finally, there are LOTS of dependencies that needed installation, can’t remember if these are all correct:
sudo apt-get install libcurl3-dev
sudo apt-get install libc-client-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libmhash-dev
sudo apt-get install libaspell-dev
sudo apt-get install libpspell-dev
That’s all for the time being, I’ll make a final post when I have all the details (and a working install) up and running.
It looks like it’s all up and running smoothly! There was one last catch, when running php through fastcgi you need to manually replace a file:
/dh/cgi-system/php5.cgi
With the file that was created here:
/usr/local/php5/bin/php-cgi
So a quick:
cp -a /usr/local/php5/bin/php-cgi /dh/cgi-system/php5.cgi
Did the trick.
ejabberd2 on DreamHost
Mar 14th
I’m in the middle of a move to a new apartment, and oddly I’m very happy. I was able to spend the time to learn how to install and configure ejabberd2 on my PS with DreamHost. I’ve also gone ahead and downloaded a few extra modules, compiled, and enabled them. Notably I’ve enabled the ejabberd_xmlrpc module – and I’ve started work on writing a PHP class which will interface with that module and enable a few specific actions.
Basically I will be creating a class capable of running an XMPP hosting service. Fun, right!?
Memcache on DreamHost PS
Mar 11th
Create an admin user:
https://panel.dreamhost.com/index.cgi?tree=vserver.adminusers&
Login to SSH using that admin, then run:
sudo apt-get install memcached
That’ll do it!
StatusNet Install Patch: Command Line Install
Mar 10th
Opened a ticket on StatusNet: http://status.net/trac/ticket/2226
There was a recent need to automate the installation of StatusNet, so I went ahead and modified the install.php to allow for a command line interface to the install process, including a version which can be used to run the install from a script. I’m not a fan of the install.php at all, but it does the job – so rather then a rewrite I expanded it – at least until I have more time.
The modified file can be found here:
http://files.gimmesoda.com/dreamhost/software_patches/statusnet/install.php
The patch file is here:
http://files.gimmesoda.com/dreamhost/software_patches/statusnet/install.php.patch
So to handle the install process automatically:
php install.php dbhost sqltype dbname dbuser dbpass “Site Name Goes Here” siteurl fancyurl
The following might need explaining:
sqltype = mysql (it can also be pgsql)
Site name should be quoted, some characters like ! should be escaped.
siteurl = domain.com (not using http:// and no ending slash)
fancyurl is either true or false and if true the htaccess.sample should be renamed to .htaccess
So for the site I tested on:
php install.php mysql.gimmesoda.com mysql database dbuser dbpass “It’s Just Testing\!” testing.gimmesoda.com true
There is also an interactive command line install which is fun, try it out!
php install.php install
Installing Magento Commerce on DreamHost – Updated for 1.4.1.0
Nov 10th
*Updating Again*
Now updated for Magento 1.4.1.0
*Another Update*
I’ve gotten a few requests to get this updated for the new version of Magento. This is now done – the same instructions apply with slightly different download locations for the new version of Magento.
*One quick update*
Thanks to Ashley for mentioning that I didn’t add the prefix option as an argument. Added it to the script and updated the content below to show how to use it.
-JJ
There has apparently been quite a few people having trouble with the Magento install on DreamHost. I was among them, so I took the advice of fellow co-workers and used the command line method for installation. It worked, but I figured it could be easier so I threw together a bash script for that purpose. You can grab a copy from the following url and save it to the folder you want magento installed in.
http://www.gimmesoda.com/install_magento.sh
You can also run these commands from the folder you will be installing it to.
wget http://www.gimmesoda.com/install_magento.sh;
wget http://www.magentocommerce.com/downloads/assets/1.4.1.0/magento-1.4.1.0.tar.gz;
chmod +x install_magento.sh;
To make it easier you don’t need to hard code any of your variables, rather you just enter them through arguments for the script:
./install_magento.sh
In order to install Magento all the following are required.
-h: MySQL Database Hostname
-d: MySQL Database Name
-u: MySQL Database User
-p: MySQL Database Password
-x: Database Prefix
-a: Magento Shop Address (Example: http://shop.example.com/)
-f: Magento Admin First Name
-l: Magento Admin Last Name
-e: Magento Admin Email Address
-r: Magento Admin Login
-s: Magento Admin Pass (Must have letters and numbers.)
Which ends up looking like this:
./install_magento.sh -h mysql.example.com -d database -u dbuser -p dbpass -x prefix -a http://store.example.com/ -f First -l Last -e admin@example.com -r admin -s adminpass1
If everything worked as expected (running this on DreamHost it should) you’ll be prompted with something similar to this:
SUCCESS: 88dd17d566d65128b6bb9357773d269b
Which is the Magento encryption key and is rather important, so the keep a copy of that key. I’ll be adding a cleanup argument to this script which will remove all files from the install directory, which is useful in the case of errors. If you have any questions just let me know!
Recent Comments