Author Archive

change root password in MySQL

By greg | Posted in MySQL

how to change / fix the root password in MySQL If you have root authority on your server, login as root (su -) in a terminal session and at a command prompt, stop mysql and then restart it in a controlled mode: /etc/init.d/mysql stop or service mysql stop then /usr/sbin/mysqld...
Read more »

How to install and customize-personalize Zen-Cart

By greg | Posted in PHP Advanced, PHP Zen-Cart
How to install and customize-personalize Zen-Cart

Tutorial help: how to find settings to set up, customize, Zen-Cart Fast. What Zen-Cart Won't Tell You Running the installation program is easy. The time consuming part is removing their sample store demo files and changing ZC's settings which are scattered...
Read more »

Delete the Zen-Cart Store Demo files, images, and Data

By greg | Posted in PHP Advanced, PHP Zen-Cart
Delete the Zen-Cart Store Demo files, images, and Data

"How to clean up default install and remove example store related files." How to remove, or delete, the "Zen Cart demonstration categories and products". How to Delete all the Zen-Cart Sample Store files, images, and Data. Install Zen-Cart and choose "NO" to the "Store Demo": (Would you like to install the Zen Cart demonstration categories...
Read more »

php 5.3: ctype vs. str_ vs. preg; Speed Optimizations

By greg | Posted in PHP Advanced

It should be noted that ctype functions are always preferred over regular expressions, and even to some equivalent str_* and is_* functions. This is because of the fact that ctype uses a native C library and thus processes significantly faster. NOTE: the ereg... functions have been removed from PHP6 {ereg, eregi,...
Read more »

Function: Convert Numbers to Words

By greg | Posted in PHP Advanced

This little, recursive, script is to convert a number, an integer, to words. It has an upper limit of 999,999,999 but you can expand or reduce it from there. Put the function in your include file and try it out. /* * Function: number_to_words * Description: recursive numerics...
Read more »

Stopping Website Visitor Blog Spam

By greg | Posted in PHP Advanced, PHP WordPress

Stopping Website Visitor Comment Spam. (ex: wordpress) IF you have a blog and want visitors to easily add a comment to an item, you will also get spam - lots of it - unless you, traditionally, forced visitors to create a login before commenting, or you used a captcha. As one guy...
Read more »

Unix-Apache .htaccess

By greg | Posted in Networking

.htaccess files (or "distributed configuration files") allow you to do many different things, ... commonly, to have your own custom 404 error pages, to redirect pages, and to enhance security. (for security, see Internet Security Note 1: Unix used .filename extensions before Microsloth Windoze or even DOS (or CP/M) existed. Unix/Linux...
Read more »

Internet, Web Site, Security

By greg | Posted in Networking

Neither the best passwords, nor .htaccess, nor php.ini files, nor a super-helpful hosting co., will protect your web site if your pc is infected with a key-stroke-logger sending crooks your every id and password - every time you use and or change one of them! There are many types of software threats: viruses, spyware, Trojan...
Read more »

Hello Programmers

By greg | Posted in RPG Intro
Hello Programmers

This FREE site is dedicated to all professional programmers trying to write clear structured code, network their pc's and, in some cases, deal with web site issues. We have free source code, free samples, free tips and techniques, free utilities, free sample test questions and answers, free downloads, free books and manuals, free examples. You do...
Read more »

SDA and RDA is now “RDS” or “RDPi”?, A.K.A. Eclipse

By greg | Posted in RPG Advanced
SDA and RDA is now “RDS” or “RDPi”?, A.K.A. Eclipse

April 2010 IBM Rational Developer for i (renamed in 2008 from WDSc), has been withdrawn from market and is replaced by the Rational Developer for Power Systems Software – RPG and COBOL Development Tools for IBM i. The latest release of Rational Developer for Power includes all of the features of Rational Developer for i (RDi...
Read more »

object listing

By greg | Posted in RPG Utilities

valuable for discovering old objects that have never been used, or not in the last X years - etc. As the administrator of the system, the QSECOFR, this was a handy utility for finding and removing old objects off the hard disk. PRTOBJT (PRTOBJText) enhanced from Nov.'91 Midrange...
Read more »

Structured display of All Variables in memory

By greg | Posted in PHP Advanced

"The function, get_defined_vars(), returns a multidimensional array containing a list of all defined variables at that location in your program." To get ALL variables, list ALL variables, display ALL variables, in memory and available at the point where you request it, your scope, (not just SESSION variables, everything ... except private function variables - invisible/unavailable...
Read more »

PHP6: Character encoding and other new features

By greg | Posted in PHP Advanced

The Internet is converging on UTF-8 for a common / universal character encoding. Set your apache environment to utf-8 by adding 'AddDefaultCharset utf-8' to your .htaccess. If you do not use apache add 'default_charset utf-8' to your php.ini. You have to do either of them (not both), php will use...
Read more »

SQL db Injection, Cross-Scripting, RFI, and LFI

It is possible for a hacker to enter the following seemingly innocuous text into the UserName textbox to gain entry to the system without having to know a valid user name and password: ' Or 1=1 -- The hacker breaks into the system by injecting malformed SQL into the query. This particular hack works because...
Read more »

Clean up WordPress

By greg | Posted in PHP WordPress

There are some problems with WordPress which can be easy to fix if someone would just tell you how. Some issues involve portability: when you change internet hosting providers, and when you have a copy of your web site, certainly your wordpress blog, on your pc, it is a backup copy, and a...
Read more »