Archive for the 'programming' Category

Adding pdftk to 1and1 shared hosting

UPDATE 2010-09-03: I updated a couple links to reflect newer downloads. Because shared is on an older debian (etch) system I had to tweak the steps for using lenny based packages. ENJOY!

There are some cases where you might need a powerful toolkit to use with . 1and1 does not come with any built in processors or libraries built into . Here is the process I used to integrate phptk into my 1and1 shared account.

Requirements: 1and1 shared plan that has ssh support

- Download deb file for debian lenny:

http://ftp.us.debian.org/debian/pool/main/p//pdftk_1.41-3_i386.deb

- Extract the deb file:

ar xv pdftk_1.41-3_i386.deb

- Extract the data.tar.gz file:

tar xvzf data.tar.gz

- Download libgcj deb file for debian lenny:

http://ftp.us.debian.org/debian/pool/main/g/gcj-4.2/libgcj8-1_4.2.4-4_i386.deb

- Extract the libgcj deb file:

ar xv libgcj7-0_4.1.1-20_i386.deb

- Extract the data.tar.gz file:

tar xvzf data.tar.gz

- Download libstdc++ deb file for debian lenny (backport file http://packages.debian.org/lenny-backports/i386/libstdc++6/download):

http://mirror.linux.org.au/backports.org/pool/main/g/gcc-4.3/libstdc++6_4.3.4-6~bpo50+1_i386.deb

- Extract the libstdc++6 deb file:

ar xv libstdc++6_4.3.4-6~bpo50+1_i386.deb

- Extract the data.tar.gz file:

tar xvzf data.tar.gz

- Create a script to link libgcj and libstdc++6 for (use nano or vi):

#!/bin/bash

LD_LIBRARY_PATH="usr/lib:$LD_LIBRARY_PATH" usr/bin/ $*

- Chmod the script so it can run:

chmod 755

Now you can run from your main directory and process files from or cronjobs.

If you run into any problems try running the command with some test files. If you have any problems please leave a comment. Thanks!

Adding PECL Uploadprogress to 1&1 shared hosting for Drupal FileField

Drupal 6.x is the platform we use to build great websites. There are modules FileField and ImageField 3.0 that allow the ability to update a progress meter when uploading a file. This requires installing a extension to called uploadprogress. Here is the process I used to get it working on a 1and1.com package. You will need a package with ssh support currently the Business and Developer packages do.

  • Download PECL uploadaccess to your 1&1 account
  • Extract the package
    tar xvzf -1.0.0.tgz
  • Go into the directory
    cd -1.0.0
  • Run phpize5
    phpize5
  • Change -config to -config5 in configure script
    sed -i 's/=-config/=-config5/g' configure
  • Change include directives in Makefile
    sed -i 's#-I/usr/local/include/#-I/usr/include/php5#g' Makefile
  • Run make and make test
    make
    make test
  • Make new extensions folder for new extension to go in
    mkdir ~/extensions
  • Copy extension to new folder
    cp .libs/.so ~/extensions/
  • Create new .ini under your main folder (or under a single subfolder for just that application) to add new extension_dir then add this code to the file
    extension_dir=/kunden/homepages/6/d87663654/htdocs/extensions/
    extension=.so

That should be it. You should now be able to see the “Upload progress Enabled ( )” on the admin/reports/status page in .

Links that helped me with the above info:

Life is good

I love my macbook pro. I’m posting form BlogMate within TextMate and it’s pretty slick. Listening to Bethany Live in iTunes and talking to Phil in Adium. Programming for Maryland Online an dall in all having a good time. Life is good.

Proper Environment for the Web Development

Great post on slashdot about setting up a proper environment web developing. I’m posting a good one here for future reference. Enjoy.

Actual article here.
Actual comment here.

This is Unix/OSX-centric, and I’ve been doing this for years and showing others the way:

* My code always has a standard layout (bin, conf, src, lib, and so on). No exceptions, because you never know when that little script will become a big app (this happens to me at least once a year).

* Use good coding practices: unit tests, continuous integration, whatever

* The code is checked into CVS/Subversion/Darcs, whatever. Use branches and so forth intelligently (dev on the trunk, release branches which are bugfix only, whatever). Make it “obvious” where the latest stable code always lives, so that someone besides yourself can deploy it.

Continue reading ‘Proper Environment for the Web Development’

Gallery2 Watermarks on all Images

After much searching and Database queries I found a forum post that explains how to add a url rewrite rule to make all images on a gallery2 site have a watermark. I’m sure also with some massaging it can be applied to different albums, but all I need is all or nothing.
Continue reading ‘Gallery2 Watermarks on all Images’

The PNG problem in Windows Internet Explorer

This is by far the quickest and easiest technique for getting png files to work in IE that I have found. Check it out here:
The PNG problem in Windows Internet Explorer




SEO Powered by Platinum SEO from Techblissonline