This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#DISCLAIMER: this is currently is a draft and is not meant to be used yet. Many things that I'm looking to clean up and simplify. There may be things that don't work so only do this on a development system that you aren't worried about it being fubar'd | |
#Download PHP source code and change directories to the downloaded src. This is a dev version of PHP. git.php.net is official. http://www.github.com/php/php-src is mirror | |
git clone http://git.php.net/repository/php-src.git && cd php-src | |
#Alternative get a certain branch (version), the default is the master branch which is development | |
#git clone -b PHP-5.6.7 http://git.php.net/repository/php-src.git | |
#specific to litmis space not having the includes on a fresh container | |
#local | |
scp qopensys-usr-include.tar.gz usrcis42@spaces.litmis.com:~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get latest ibm_db2 php extension tarbal (can't use wget for https, using curl and ignoring ssl [we don't need this data encrypted]) | |
#and installs it to /usr/local/phpdave7/lib/php/extensions/no-debug-non-zts-20160303/ibm_db2.so | |
#note depending on how PHP is configured on your system their will be either be a debug build or Zend Thread Safety (ZTS) builds of the extension | |
#$PREFIX/lib/php/extensions/no-debug-non-zts-API_NO for release builds without ZTS | |
#$PREFIX/lib/php/extensions/debug-non-zts-API_NO for debug builds without ZTS | |
#$PREFIX/lib/php/extensions/no-debug-zts-API_NO for release builds with ZTS | |
#$PREFIX/lib/php/extensions/debug-zts-API_NO for debug builds with ZTS | |
joe /usr/local/phpdave7/lib/php.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup follow https://cloud.google.com/natural-language/docs/reference/libraries#client-libraries-install-php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Get the Page Id of the parent | |
if ($post->post_parent) | |
{ | |
//There's a parent post lets get the ancestors and grab the top | |
$ancestors = get_post_ancestors($post->ID); | |
$parentPostId = $ancestors[count($ancestors) - 1]; | |
} | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1. Download the entire directory at ftp://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo | |
#2. Upload the entire directoy to IBM i ifs | |
#3. Change the baseurl in /QOpenSys/etc/yum/repos.d/ibm.repo to point to ifs directory | |
# FROM: baseurl=ftp://public.dhe.ibm.com/software/ibmi/products/pase/rpms/repo | |
# TO: baseurl=file:///path/to/local/repo | |
# EXTO: baseurl=file:///QOpenSys/etc/yum/IBMRepoLocalMirror/repo | |
vi /QOpenSys/etc/yum/repos.d/ibm.repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#some things we may need: | |
wget http://www.oss4aix.org/download/RPMS/zlib/zlib-devel-1.2.8-1.aix5.1.ppc.rpm | |
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv zlib-devel-1.2.8-1.aix5.1.ppc.rpm | |
#nginx: [emerg] using regex "\.php$" requires PCRE library in /usr/local/nginx/conf/nginx.conf:72 | |
wget http://www.oss4aix.org/download/RPMS/pcre/pcre-8.35-1.aix5.1.ppc.rpm | |
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv pcre-8.35-1.aix5.1.ppc.rpm | |
wget http://www.oss4aix.org/download/RPMS/pcre/pcre-devel-8.35-1.aix5.1.ppc.rpm | |
rpm --ignoreos --ignorearch --nodeps --replacepkgs -hUv pcre-devel-8.35-1.aix5.1.ppc.rpm | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias db2='function _db2(){ echo "Running $1"; system -i "call QSYS/QZDFMDB2 parm('\''$1'\'')"; };_db2' | |
db2 "SELECT * FROM MYLIB.MYTABLE" | |
#Get fancy and search the data | |
db2 "SELECT * FROM MYLIB.MYTABLE" | grep "Smith" | |
#Alternatively you can run it through qsh - https://kadler.github.io/2018/05/29/calling-qsh-utilities-from-pase.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PROCEDURE MYLIB.KILLJOBSGIVENFILE ( ) | |
LANGUAGE SQL | |
SPECIFIC MYLIB.KILLJOBSSP | |
BEGIN | |
--Variable to control loop | |
DECLARE END_TABLE INT DEFAULT 0; | |
--If there's no record update END_TABLE to 1 to end the loop | |
DECLARE CONTINUE HANDLER FOR NOT FOUND | |
SET END_TABLE = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load the SSL module into Apache | |
LoadModule ibm_ssl_module /QSYS.LIB/QHTTPSVR.LIB/QZSRVSSL.SRVPGM | |
# Listen for HTTPS traffic | |
Listen 10.1.1.200:80 | |
Listen 10.1.1.200:443 | |
NameVirtualHost 10.1.1.200:443 | |
# MYApp - Redirect to HTTPS | |
<VirtualHost 10.1.1.201:80> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
+----------------------------------------------------------------------+ | |
| Copyright IBM Corporation 2005-2014 | | |
+----------------------------------------------------------------------+ | |
| | | |
| Licensed under the Apache License, Version 2.0 (the "License"); you | | |
| may not use this file except in compliance with the License. You may | | |
| obtain a copy of the License at | | |
| http://www.apache.org/licenses/LICENSE-2.0 | | |
| | |