PHP 5+ Warning, errors fix

If you upgraded to PHP 5.3, chances are high you're going to run into a few warnings or deprecated function messages, here are some collections of fixing warnings and errors

This information was copied from devthought.com Guillermo Rauch's blog, I just put it here for my own personal reference

An example is the ereg family of functions, which are gone for good, as they were slower and felt less familiar than the alternative Perl-compatible preg family.

To migrate ereg():

ereg('\.([^\.]*$)', $this->file_src_name, $extension);

becomes

preg_match('/\.([^\.]*$)/', $this->file_src_name, $extension);

Notice that I wrapped the pattern (\.([^\.]*$)) around / /, which are RegExp delimiters. If you find yourself escaping / too much (for an URL for example), you might want to use the # delimiter instead.

To migrate ereg_replace():

$this->file_dst_name_body = ereg_replace('[^A-Za-z0-9_]', '', $this->file_dst_name_body);

becomes

$this->file_dst_name_body = preg_replace('/[^A-Za-z0-9_]/', '', $this->file_dst_name_body);

Again, I just added delimiters to the pattern. If you are using eregi functions (which are the case-insensitive version of ereg), you’ll notice there’re no equivalent pregi functions. This is because this functionality is handled by RegExp modifiers.
Basically, to make the pattern match characters in a case-insensitive way, append i after the delimiter:

eregi('\.([^\.]*$)', $this->file_src_name, $extension);

becomes

preg_match('/\.([^\.]*$)/i', $this->file_src_name, $extension);

URL rewrite not working on local PC

Change your setting in your C:\apache\conf\httpd.conf file. So first copy the file at that location for a backup. Then load the file at C:\apache\conf\httpd.conf in notepad to do the following modifications.
1 - Uncomment the following line by removing the # symbol

#LoadModule rewrite_module modules/mod_rewrite.so
change above to below
LoadModule rewrite_module modules/mod_rewrite.so

Then replace all instances of AllowOverride None to AllowOverride All

Comments: 108 Add a comment
buy tadalafil oFirst entered on: 2012-02-23 00:33:14
Sorry, no links allowed.
Real buy dexedrFirst entered on: 2012-02-22 22:52:04
Sorry, no links allowed.
Real buy soma oFirst entered on: 2012-02-22 19:27:47
Sorry, no links allowed.
buy soma onlineFirst entered on: 2012-02-22 17:46:00
Sorry, no links allowed.
Real buy ambienFirst entered on: 2012-02-22 16:02:32
Sorry, no links allowed.
buy ambien onliFirst entered on: 2012-02-22 14:18:19
Sorry, no links allowed.
buy alprazolamFirst entered on: 2012-02-22 12:33:59
Sorry, no links allowed.
All about buy aFirst entered on: 2012-02-22 10:51:27
Sorry, no links allowed.
Real buy ativanFirst entered on: 2012-02-22 09:08:35
Sorry, no links allowed.
Only buy ativanFirst entered on: 2012-02-22 07:24:53
Sorry, no links allowed.