Upgrading to php5

Recent announcement from php.net about end support for php4 make me thinking about upgrading to php5. All server already use latest php4 version php 4.4.7 with mysql support (4.0.27) and apache1.37 Upgrading start from student server : 1. Uninstall all related php4 ports 2. Install php5 ports kongja# cd /usr/ports/lang/php5 && make clean ===>  Cleaning …

More

PHP 4 end of life announcement

From php.net "Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued. The PHP development team hereby announces that support …

More

Step by step install wamp in windows xp

With recent progress of php5 campaign and minimum windows xp deployment I think I should upgrade my appserv to wampserver mode. Wampserver can use dual php mode, php5 by default with php4 as addon. Latest release : WAMP5 1.7.2 with PHP 5.2.3 and MySQL 5.0.41 PHP4.4.7 ADD-ON for WAMP5 1.7.2 Latest release can be download …

More

disable php function in vhost or multiple user environment

Providing php access to many user require patience plus security aware. People can damage server with some php function like system, passthru etc. php provide php.ini file, this file needed to disable some dangerous function. some option for disable php function are : system, exec, shell_exec, passthru, set_time_limit, error_log, ini_alter, dl, pfsockopen, openlog, syslog, readlink, …

More

rthanks, wp-plugin for say thanks

In last few days after testing stumbleupon effect I see very good result, almost everyday stats log get visitor from stumbleupon. Other socialbookmark like digg also included, netscape etc. Google analytics also give interesting result, direct access very small while two other source come into major contributor : Search Engines Referring sites I also see …

More

Operation is not allowed when the object is closed

New problem come with javascript php and mysql script that proven to work suddenly pop error message and entire editing process get stuck Error message : ” Operation is not allowed when the object is closed “ line 94 char 11 code 0 file display.php a few suspect come after : xmlchapter.php xmlsubchapter.php xmlpage.php

ZFS and FreeBSD current

Very interesting to see progress of ZFS in FreeBSD, comitted in FreeBSD 7 ( will release in 2007). This excellent job done by Pawel Jakub Dawidek with collaboration with opensolaris  for suitable patch . Many feature that ZFS offer that make me hard to blink till see last pages of presentation Pawel also give quick …

More

PHP Ternary Operator

PHP ternary operator isn’t beautiful for reading reason It’s also make confuse, but for the sake of simple it’s OK Syntax : ( expr1 ) ? ( expr2 ) : (expr3) If expr1 return true, then it evaluates to ( expr2 )If expr1 return false, then it evaluates to ( expr3 ) it’s similar to …

More

Recover Your Joomla Administrator Password

Joomla is very popular CMS, it’s easy to setup and require only working php and mysql installation. A problem may arise when your administrator password lost or forgot. Can I recover my admin password or create a new one ? It’s common question in "Setting your own Content Management System" workshop. Use php md5() function …

More

Year Validation with PHP

This code snippet validate user input from a form : $year=strip_tags($year); if(empty($$year) || is_numeric($year) || strlen($year)!=4 || $year strip all html tags ( handle by strip_tags ) make sure the year in 4 digit (with strlen help) make sure its number not character (is_numeric) not empty (php empty function) force user enter year of birth …

More

Regex, nightmare for newbie

Regex (Regular Expression) is nightmare for me, validation email, pattern recognizing task always depend on regex. A few software out there will help us (newbie) to learn regex faster with “experience mentor” I like these software : 1. Regexbudy A lot of video demo PHP section 2. Regexcouch For medium level, since I’m totally newbie …

More

Configure another extension for php file

While surfing in internet my student see "strange" file extension .love He asked me : "How it could be ?" Well, I told him about another feature of httpd.conf Just open httpd.conf , find this line : AddType application/x-httpd-php .php Change it into AddType application/x-httpd-php .php .love .dear .whatever Save httpd.conf and restart apache You …

More