Wednesday, 5 September 2012

Get rows from multiple statements

While I was trying to return rows from a SELECT statement at the end of a list of multiple statements passed through PHPs PDO with MySQL I ran in to a few problems.

1.) First, if you send multiple statements, you have to go through each rowset that is returned for each statement. This is accomplished using the nextRowset() function. Which is talked about on a StackOverflow question and discussed in depth on this Internet Super Hero blog post.

It seems that the standard pdo-mysql driver cannot do this, or has some other difficulty. The suggested solution is using the pdo-mysqlnd patch. Sounds simple enough with the instructions here, but I am running MAMP and so have a separate PHP version running for MAMP. Luckily there are instructions for upgrading MAMP's PHP on David Golding's blog post Upgrading PHP in MAMP.

2.) I had an issue with the error:
cannot open /Applications/MAMP/Library/build/ No such file or directory at /Applications/MAMP/Library/bin/apxs line 218.
during the configure process. As noted in the comments (by: Khang Nguyen) from the previously mentioned blog post the solution is changing:

3.) And for the purpose of compiling PHP with pdo-mysqlnd we change:


NOTE: For the following I use "/opt/local" since I use MacPorts, you might have to use something different like just "/opt".

4.) Next error:

configure: error: libjpeg.(a|so) not found.
Solution: Change:
'--with-jpeg-dir=/Applications/MAMP/Library' '--with-png-dir=/Applications/MAMP/Library' '--with-zlib' '--with-freetype-dir=/Applications/MAMP/Library'
--with-jpeg-dir=/opt/local --with-png-dir=/opt/local --with-zlib --with-freetype-dir=/opt/local
5.) Fix t1lib error. Make sure t1lib is installed:
sudo port install t1lib
6.) 'configure: error: Cannot locate header file libintl.h'
6.) Error: 'configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.'

If you need to install:
sudo port install php54-imap

Uggghh, know what? Just update MAMP, it works now! :p

Hayley Smith on Burning Man

"No, it's all about a bunch of naked morons drinking and doing lots of drugs."

Wednesday, 11 July 2012

i-Tech W3200 information

I've recently came across a 32" touchscreen from i-Tech, model W3200. I didn't have the fortune of receiving an install CD with it, and finding drivers or information on-line was quite difficult. Here is what I gathered however, and how I eventually found out the proper drivers.

i-Tech Model:W3200

32" High Brightness Sunlight Readable Behind Window Display HB LCD, 1100 Nits

32" W3200 (1100nits)

Made up of:
1.) eGalaxTouch controller?

Why did the instructions tell me to do this?!
1.) a visualplanet Touchfoil

If the shortcut on the desktop fails:
Point it to: /Applications/Touch screen?????/MMA9Launch

If the driver fails to run:
On mac, make sure you are using Java RTE 10.7: Applications/Utilities/Java Preferences

Selecting the drivers: ???????? Where is that bar-code?!

2.) Realtek LCD monitor controller monitor
    -Thankfully no drivers necessary!

Monday, 21 May 2012

Facebook canvas resize for an app tab

As a tip, if you are having trouble getting a Facebook API canvas function, such as FB.Canvas.setSize() or FB.Canvas.setAutoGrow(), to work it may be FB._https = true tripping you up. If you have FB._https = true set anywhere, try commenting it out or straight up removing it and see it the problem persists. You may be surprised.