Thursday, September 2, 2010

how to fix osCommerce and php 5.3.* problem

The problem is php 5.3.* deprecated some functions.
so when you run osCommerce on php 5.3.* it gives warnings.

you can find deprecated functions here:
http://php.net/manual/en/migration53.deprecated.php

there is two ways to fix this.
1. replace all the deprecated functions with
equivalent alternative one (the hard way)
exmp:
replace eregi("[regex]", $str) with preg_match("/[regex]/i", $str)

2. disable deprecated warning from php.ini file.
set error reporting value to this: error_reporting = E_ALL & ~E_DEPRECATED

3. use php 5.2.*

list open ports and unix sockets

To do this I use netstat command to list all open ports: $ sudo netstat -tuplen to list open ports and unix sockets: $ sudo netstat -...