A Clockwork Noodle

Make such knaveries yours!

Eclipse PHP with VMWare LAMP on Windows

leave a comment »

With the free tools now available I decided to jump in and finally set up a better PHP toolkit. I work primarily in Windows… so there’s that… and my end production environments are half IIS and half LAMP so I set up IIS locally with PHP and also installed VMWare Player with a LAMP appliance from rPath on the VMWare site. My criteria for the LAMP appliance were a. LAMP and b. smallest download.

VMWare Player is awesome. Installation is a breeze, and running the appliance is pretty simple. One annoying trick with this one is that Ctrl-Alt is the shortcut to return keyboard/mouse control to the system, and the VM demands Ctrl-Alt-F2 for shell login. You need to hold Ctrl-Alt-SPACE-F2.

VMWare installs a pair of virtual network interfaces which you can use in Windows to talk to your VM. You have network options of Host-Only, NAT or Bridged. I first used Host-Only which assigned an IP address from my machine, but ended up using Bridged which uses an IP from your physical network — this was needed in order to connect to the outside world to retrieve installation packages. Either way, you want to be able to hit http://192.168.x.x which is the address the VM is running on, and you should see a LAMP appliance welcome screen. Use ifconfig, ifdown eth0 and ifup eth0 to mess around with the interface.

At first all I cared about was setting up FTP access so I could dump my files into the Apache document root. On this VM the documents are stored under /srv which was a little weird. I needed to make some changes to /etc/vsftpd.conf in order to set up FTP service the way I wanted it. Once that was done, I had my working LAMP dev environment and could do things the way I always had.

Once I had Eclipse installed, I wanted a way to simplify the way to deploy code to the VM. I found Aptana Studio which, among other things, allows you to synchronize local project files to a remote system (or VM in this case). All that was left was a way to round out the IDE with integrated debugging.

Eclipse PHP is automatically set up for use with Zend or XDebug. Zend didn’t seem like an option after the above setup so I went after XDebug. However it was a little tricky to get going on the VM since rPath had trimmed out a lot of utility “stuff”. They used a package manager called conary (new to me) and XDebug wasn’t included. XDebug would have been a snap to install using PECL but there were several missing dependencies:

– php (the php:devel libraries needed to build php extensions with phpize were not included, such as php.h)
– autoconf (from the world of compiling-from-source)
– gcc (the c compiler)
– glibc (the c libraries with which to build the extension)

As you can guess, I trudged through these missing dependencies as PECL returned error messages. Luckily all of these were available in rPath’s repository. I had no problems running these installers:

conary update php
conary update autoconf
conary update gcc
conary update glibc

During my flailings I got an error about out-of-date channel for PECL so I ran a channel update (basically, what it told me to do):

pecl channel-update pecl.php.net

Then the XDebug install using PECL went perfectly.

pecl install xdebug

Once I actually had the XDebug.so created, I added the following lines to /etc/php.ini:

[xdebug]
zend_extension="/usr/lib/php5/xdebug.so"
xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=127.0.0.1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000

Restarted apache (/etc/init.d/httpd restart).

In Eclipse, I needed to set up my debugging to use an SSH tunnel (Run->Debug Configurations->Advanced) which allowed me to connect to the “remote host” of 127.0.0.1. Apparently Eclipse will automatically set up forwarding for port 9000.

That’s it! Eclipse PHP with full debug capabilities through a LAMP VM appliance. It may have been easier to put XAMPP on my machine but I think I prefer the cleanliness of the VM. Also, rPath itself offers a way to generate custom VMs which includes all of the above, but I’m still fiddling around with their interface.

Written by greensweater

2011-01-21 at 02:01

Posted in General

AVISynth and Premiere Pro CS4, audio problems

leave a comment »

I am trying to import VOB files into Premiere using AVISynth and the AVISynth v1.95 plugin. My VOBs use MPA audio. I was having major problems with audio coming across as absolutely blasting — I thought my earbuds were going to explode in my head.

The solution was to use ConvertAudioTo16Bit(clip) as the plugin was unable to recognize that the audio was originally in 16bit MP3 format.

The clip works fine in VirtualDub so I’m thinking it’s just a problem with the Premiere plugin. Hopefully my ears will stop ringing soon so I can finish this project.

Written by greensweater

2010-04-26 at 10:04

Posted in General

Tagged with , , ,

Adobe Acrobat update April 2010

leave a comment »

It looks like the latest Acrobat updater for Windows uses a changed interface. There’s a new system tray icon, and fewer user options.

Of particular concern to me is the “details” link on the window:
adobe acrobat updater

When you click “Details” it opens a browser window which takes you to an Adobe for Windows download page, with no information whatsoever about the software you’re about to update.

I installed the update but I had a brief moment when I thought, I’ve just been owned by malware pretending to be an Adobe update! Then I realized, if it’s playing around in my system tray, I’m already owned. Still, not a great way to improve your tarnished image.

Obligatory non-Adobe PDF links: Foxit Reader, PDF Creator.

EDIT: link to announcement on Adobe blogs.

Written by greensweater

2010-04-15 at 08:04

Posted in General

Tagged with , , ,

Follow

Get every new post delivered to your Inbox.