OS Commerce
- Online osCommerce Documentation
- osCommerce 2.2
- osCommerce 2.3
- osCommerce 3.0
- osCommerce 3.0 Developer’s Guide (Only 3.0 has this guide)
- Download osCommerce
- osCommerce sourceforge files
- Check version
Look in catalog/includes/application_top.php
About line 30 – look for “// define the project version"
Socket Programming
- PHP Online Manual – Sockets
- PHP Online Manual – Socket Functions Example
- devshed: Socket Programming With PHP
- Zend DevZone: Writing Socket Servers in PHP (year 2003)
- PHP Socket Daemon library
(no activity since 2006-12) - Create daemons in PHP (with System_Daemon class in PEAR, 1.0.0RC1 at 2011-02)
- Create a socket server in php and run as a service (another example using System_Daemon PEAR class, not used forking)
- VB6 TCP/IP Blocking vs Non-Blocking sockets
- PHP Socket Programming (include example on writing a multi-socket connection server, in a single process)
- Process forking with PHP (year 2004)
- Forked PHP Daemon Example (use fork to listen multiple socket connections)
- Nanoserv – a server daemon framework for PHP 5.1+ (very complex OO concept server)
- xinetd
Json Support
- JSON (JavaScript Object Notation)
- Steps to enable json extension in RHEL 5/CentOS 5
Installation steps on CentOs 5.x include # yum install php-devel # yum install php-pear # yum install gcc # pear install pecl/json # cd /etc/php.d # echo "extension=json.so" > json.ini # service httpd restart After that phpinfo() would output json support enabled json version 1.2.1
PHP PDO
- Experience (2011-04-27)
- Serious bug in mysql, rowCount return no result
- Run FetchAll() 2 times will generate exception error HY000 2050
- Introduction to PHP PDO
- PDO versus MDB2
Problem: PDO could not start a new session before stop the current session
General
- PHP Manual
- Constants
- Define PHP Configuration Values in Apache
Apache 2.0 can only use “php_value" - PHP Pre-defined variables
- Array functions
- Filesystem functions
- Regular Expression functions
- String functions
- Openssl functions
- PHP configuration options (php.ini)
- Apache 2.0.x on Microsoft Windows
- PHP JSON
- PHP PDO
- PHP Development
- PHP Development Tools
- PHPEdit
VERY GOOD OpenSource IDE for PHP!
Use around 28M RAM for the v0.8.0.25 for Windows - phpCodeBeautifier
OpenSource Tool to beautify your PHP codes! (function included in PHPEdit already) - XMI2PHP
OpenSource Tool to convert UML XMI files into PHP directly (e.g. generated from ArgoUML) - phpCodeSite
PHP Library to help debugging - DBG
OpenSource PHP client/server architecture debugger - ArgoUML
OpenSource Java tool to draw UML diagrams and do code generation
- PHPEdit
- Design
- Bombusbee
A kind of fusebox design framework for PHP - An activity based Workflow Engine for PHP
- Bombusbee
- ActiveState Programmer Network PHP codes
- Compare different PHP frameworks
Framework
Portals / Articles
Portals
PHP Articles
- An introduction to PEAR’s Validate package
Quick way to validate e-mail like: $validate->email($email);
Its check domain function can also check the domain’s MX record is exist or not (using checkdnsrr() function)
It can also check e-mail comply with RFC822 format - PHP Filtering with OWASP
Intro to use OWASP (Open Web Application Security Project) filters for PHP to make sure the variable is valid for a particular purpose - Regular Expressions PHP Tutorial
Non PHP Articles (To be moved somewhere)
Forums
PHP and Unicode
- PHP 6.0 unicode support design document
This document is only included in PHP6, not even include in PHP 5.1.2. - CentralNic Unicode Library (Unicode.php)
- Multibyte String (mbstring) extension to handle Unicode
- Most functions available since PHP 4.3.0
- For Win32, the extension included in ZIP distribution only
- mbstring RPM is already included in the Fedora RPM since FC3 (or even FC1 with latest update)
- PEAR I18N_UnicodeString Class (Not updated since 2004-08-28)
PHP Extensions
- Turck MMCache for PHP (Free open source extension to encode PHP into byte code for source protection)
- Win32 dll of mmcache.dll from CVS for PHP 4.3.9 to 5.0.1
- PHP : Step by Step Tutorial (Step by step guide to setup PHP Win32, include setup the mmcache)
PECL Classes
- bcompiler: A bytecode compiler for classes (BETA: Class to compile function/class into byte code)
PEAR Classes
- Tree
- Pager_Pager (Pagination for database w/o limit function or raw data)
- DB_Pager (Pagination for database)
- DB_DataObject (code generation from SQL Database tables)
- Official documentation
- Discuss using DB_DataOBject with transaction
Just use $obj->query(“BEGIN"); and $obj->query(“COMMIT");
- Contact_Vcard_Build (a class to create vCard)
- HTML_QuickForm (A very complete form class)
- Example for enable Client Side JavaScript valiation
Add ‘client’ to the 5th element of the AddRule function - List of QuickForm rules (as of v3.2.2)
‘required’ => array(‘html_quickform_rule_required’, ‘HTML/QuickForm/Rule/Required.php’),
‘maxlength’ => array(‘html_quickform_rule_range’, ‘HTML/QuickForm/Rule/Range.php’),
‘minlength’ => array(‘html_quickform_rule_range’, ‘HTML/QuickForm/Rule/Range.php’),
‘rangelength’ => array(‘html_quickform_rule_range’, ‘HTML/QuickForm/Rule/Range.php’),
’email’ => array(‘html_quickform_rule_email’, ‘HTML/QuickForm/Rule/Email.php’),
‘regex’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘lettersonly’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘alphanumeric’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘numeric’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘nopunctuation’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘nonzero’ => array(‘html_quickform_rule_regex’, ‘HTML/QuickForm/Rule/Regex.php’),
‘callback’ => array(‘html_quickform_rule_callback’, ‘HTML/QuickForm/Rule/Callback.php’),
‘compare’ => array(‘html_quickform_rule_compare’, ‘HTML/QuickForm/Rule/Compare.php’) - compare rule example
- Custom rules example (add a compare function in QuickForm 2.x)
function cmpPass($element, $pass2val)
{
global $form;
$pass1val = $form->getElementValue(‘passwd1’);
return ($pass1val == $pass2val);
}
$form->registerRule(‘compare’, ‘function’, ‘cmpPass’);
$form->addElement(‘password’, ‘passwd1’, ‘Enter password’);
$form->addElement(‘password’, ‘passwd2’, ‘Confirm password’);
$form->addElement(‘submit’, ‘submit’, ‘submit’);
$form->addRule(‘passwd1’, ‘Please enter password’, ‘required’);
$form->addRule(‘passwd2’, ‘Please confirm password’, ‘required’);
$form->addRule(‘passwd2’, ‘Passwords are not the same’, ‘compare’, ‘function’); - PEAR HTML_QuickForm Getting Started Guide
- pookey.co.uk – HTML_QuickForm Tutorial
- Example for enable Client Side JavaScript valiation
- The Log Package
PHP Libraries / 3rd party applications
- xdebug for php (2.0.0beta6 at 2006-06-30)
- DBGp debug protocol (1.0 draft 14)
- phpEclipse
An OpenSource IDE for PHP integrate with Eclipse - PHPUnit
Unit Test framework in PHP - Smarty Template Engine (Very famous and active developing, can use with PEAR QuickForm)
- Configuring Dreamweaver MX to use with Smarty tpl files
- Dynamic Variable Name
{assign var="newname" value="string1_$id"}
{$object.$newname.variable} - Mixing Smarty & Dreamweaver
- Methods to Mixing Smarty & Dreamweaver (Japanese)
- Dreamweaver & Smarty by Doug Felton
2005-08, quite complex method - Dreamweaver JS Translator to handle Smarty
- SmartyDWT – Smarty Dreamweaver Tags Extension
Seems to be a better one, even include an insert bar - Dreamweaver support contribs from smarty official web
quite out-dated, year 2002. The: smarty_with_dreamweaver.zip may work better - Smarty Aids for Dreamweaver
Some Dreamweaver extensions that make editing Smarty templates easier, include support for XOOPS
- JpGraph OO Graph Library
Generate PNG Chart for PHP 4.3.1+, free for non-commercial use - GlobFX Swiff Chart Generator
Generate Flash animation Charts for PHP - SafeSQL class
safely escape SQL commands, by author of Smarty, seems only support mySQL and no update since 2004 - PHP Documentor
Code documentation tool, also used by PHP PEAR. Output in HTML, PDF (directly), CHM (with windows help compiler), XML DocBook
PHP Applications
- Discuz! Forum
- Cacti
For throughput and performance monitoring. The Complete RRDTool-based Graphing Solution. For Network & Server Monitoring. Has RPM package. - Squirrelmail
- Patch for Squirrelmail against Cyrus IMAP server quota extension, allow direct delete e-mail when quota is full
- i18n problem since 1.2.x upto 1.4.2 when in Traditional/Simplified Chinese, Korean, Japanese
- May solve compose problem when using non-English language
- My experience: Just remove all locales language files!
- Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3…
- Discuss on that problem
- Likely running SquirrelMail 1.2.x under PHP 4.3.x. My experience: turn register_globals on will fix this error
- “Could not move/copy file" error after upload file
- LinPHA – The PHP Photo Archive
Online Graphic Gallery- Access Denied problem in File Management
Seems cannot limit the directory access
- Access Denied problem in File Management
- ezPublish
Content Management System - WebMail
Troubleshooting
- warning: mail() [function.mail]: SMTP server response: 501 5.5.4 Invalid Address
In Windows enviornment, php’s mail() function only accept simple name@domain.com but not “name" format