Archive for category: PHP-MySQL


Solution to: ‘Warning: preg_match() [function.preg-match]: Unknown modifier ‘/’ in …. on line …’

12 July, 2008 (22:51) | PHP-MySQL | By: Rohan Shenoy

Regular expressions by themselves are difficult for many to implement. An error that many of the regex newbies will encounter is:

Warning: preg_match() [function.preg-match]: Unknown modifier ‘/’ in ….. on line …

Solution
This error occurs whenever the pattern you are looking for contains a literal forward-slash. You should escape every literal forward-slash with a backslash.
For those of [...]

5 less publicized mistakes that can weaken your PHP-MySQL application

7 June, 2008 (01:56) | PHP-MySQL | By: Rohan Shenoy

PHP-MySQL is great server side duo. But when designing an application, utmost care needs to be observed. With time, most web programmers learn about common things such as cannot send headers, mysql_query() is not a valid resource, unexpected T_IF VARIABLE, etc. However, some mistakes are less known and less publicized which leads to [...]