Monthly Archives: April 2015

Faster Alternatives to FTP for uploading files from Linux or Windows

FTP is great, but when your looking to send files quickly over the network you may want to look at the commands: scp, rcp, and pscp.  The use case scenario my friend Chuk brought up is the initial load of a project with many dependencies that were quickly retrieved from the internet but pushing to the hosting server is slower.  On a Mac or Linux box you just need to get to the terminal to use the command and on Windows you just need to use Putty.  The links below will show you how to use them:

Linux

SCP – Secure Copy

http://www.hypexr.org/linux_scp_help.php

RCP – Remote file copy

http://linux.about.com/od/commands/l/blcmdl1_rcp.htm

“-C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. “

Windows to Linux

Download Putty

pscp – PuTTY Secure Copy

https://community.freescale.com/thread/220596

Other reasons for your file transfer being slow could be a slow connection to the server which if you can upgrade your connection, routers and internet connect to gigabit or better you’ll remove some of these issues

Detecting if a character field isNumeric via SQL in IBM i DB2 (Translate)

The translate function is pretty amazing. You pass in the variable, a string of characters you want the character to be replaced with followed by a string of characters you want to search for.  In the example below all numeric characters become N and all N’s become X.  This makes all your Digits the character N which you can then compare to ‘NNNNN’ in this instance of a char(5) datatype column to select your numeric only fields, you can then do a numeric comparison such as greater than <10000 without running into a SQL exception with casting nonnumeric characters.

SQL Reference for IBM i – to learn more about TRANSLATE

ftp://ftp.software.ibm.com/ps/products/db2/info/vr7/pdf/letter/db2s0e70.pdf

ZendCon 2015 to be held October 19-22 2015 in Las Vegas, NV at the Hard Rock Hotel & Casino!

According to the call for presenter’s website: http://cfp.zendcon.com/ Zend Con will be:

Oct 19-22 2015 (Monday – Thursday)
Hard Rock Hotel & Casino
Las Vegas, NV

zendcon

Dedicated tracks for:

CMS: WordPress, Drupal, Joomla

Frameworks: Zend, Larabel, Symfony

E-Commerce: Magento

Platforms: Linux, IBM

Future: PHP 7

Security: Deleting files in the IFS with PHP on IBM i using unlink

So I tried deleting a file on the IFS and the only permission a user needs is *OBJEXIST.  So make sure your not granting public or QTMHHTTP *OBJEXIST permission blindly and to lock down the $filename passed to unlink to make sure you don’t have someone deleting all your files.

Description