JuanJose

JuanJose

(86 comments, 84 posts)

I've been programming for awhile, have been having crazy ideas for much longer. Now a days I'm both a husband and a father, and quite happy for it.

Home page: http://www.gimmesoda.com/

Posts by JuanJose

A Few Notes for Building PHP 5 on DreamHost PS

5

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

0

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

10

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

0

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

http://testing.gimmesoda.com/

There is also an interactive command line install which is fun, try it out!

php install.php install

Simple Truth

0

that still burning night
your lips are my seduction
memories vivid

Installing Magento Commerce on DreamHost – Updated for 1.6.0.0

36

*And Again*

Now using 1.6.0.0 stable.

*Updating Again*

Now updated for Magento 1.5.0.1 stable.

*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://files.gimmesoda.com/install_magento.sh

You can also run these commands from the folder you will be installing it to.

wget http://files.gimmesoda.com/install_magento.sh;
wget http://www.magentocommerce.com/downloads/assets/1.6.0.0/magento-1.6.0.0.tar.gz;
chmod 0744 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!

-h mysql.example.com -d database -u dbuser -p dbpass -a http://store.example.com/ -f First -l Last -e admin@example.com -r admin -s adminpass1

Slacking

0

I really need to do some work with my CJ affiliate earnings. I’ve done basically nothing in the last three months and I wouldn’t mind boosting my earnings. WTH should help out with that, once it’s finished. :(

Playlist AWESOME

3

You HIMYM fans will recognize this. Some of the songs have been cut to decrease any potential for loss in tremors of psychitude.

1) You Give Love a Bad Name – Bon Jovi
2) The Humpty Dance – Digital Underground

3) Come Sail Away – Styx
4) Don’t Stop Believin’ – Journey
5) The Transformers Theme – Vince DiCola
6) You’re The Best Around – Joe Esposito
7) High Enough – Damn Yankees
8) Jessie’s Girl – Rick Springfield
9) Rock You Like A Hurricane – Scorpions
10) Hip Hop Hooray – Naughty By Nature
11) Change Of Heart – Tom Petty
12) Run Runaway – Slade

I’m worried now – we NEED more songs. Working on it….

Songs to add in:

I Wanna Rock – Twisted Sister ???
Paradise City – Guns N’ Roses *fist bump*
Lick It Up – KISS
Talk Dirty To Me – Poison

Laconica – Bugs, Extra Features and DH Compatability

17

—-Update—-

I custom compiled PHP in order to get the daemons running. Apparently PHP5 has the “pcntl” functions disabled by default and I had to compile with –enable-pcntl, with those functions enabled the daemons ran without error.

Also, I modified the script for compiling PHP5 from the DreamHost wiki, normally found here:

http://wiki.dreamhost.com/Installing_PHP5

I’ve modified it so that it will compile a few PECL extensions into the binary statically and I didn’t have to go through the hassle of build a phpize that would work with the non-root user allowed me on the DreamHost environment. So I added memcache and mailparse to the binary and they are both working smoothly.

As mentioned earlier I was trying to get memcache to work on the PS and I am glad to report that I have gotten it working. Currently it’s setup to use a max of 512MB worth of memory and seems to be running nicely.

CPU   MEM%   COMMAND

0.0  1.4   0:00.11 ./memcached -d -m 512 -l 66.33.199.189 -p 11211

All in all – http://www.theserandomwords.com/ is coming along smoothly.

—-End Update—-

So apparently laconica fails to remote subscribe on various hosts – not sure if it is happening everywhere (I doubt it) but in any case DreamHost and BlueHost installs seem to be affected on version 0.7.3. Not so much fun!

http://laconi.ca/trac/ticket/1408

I’m investing some time into getting this fixed mostly because this type of problem (an issue on a core feature) really really bugs me. I think I’ve gotten close but no luck yet – any devs reading? Wanna get your hands dirty!? I’m pretty sure the issue is related to the actions/remotesubscribe.php and/or the extlib/OAuth.php files.

Beyond that I have some good news! Since I’m on a DreamHost PS I was able to spend some time in getting two things setup for use with my laconica installs.

Sphinx and the OpenFire XMPP Server are both working smoothly and integrated into Laconica. Memcache is next on my list and maybe a plugin that will allow users to register OpenFire accounts when they signup with the laconica instance! Nice, no?

Finally, I really am not enjoying the current installer – I think I’ll streamline my current class and convert it to a much simpler/cleaner version and submit it as a replacement, with any luck we’ll be getting clean web-based installs soon, one way or another!

Anyhow I need some sleep. Night… or ummm Morning!

JJ

New Page – Installing Laconica

0

I finally got around to posting a rather bare-bones version of my own “Installing Laconica” page. I’ll add to it when I get more time but I couldn’t sleep so I figured I’d get it live.

JuanJose's RSS Feed
Go to Top