Posts Tagged ‘PHP’

Function ereg() is deprecated in html2fpdf.php

Posted: 18th January 2011 by admin in programming

Since on PHP the function ereg is deprecated we should use:


But here is a catch!!!! since the POSIX regular expressions are different from the PCRE used in preg_match(), you need to replace:



preg_match(‘/^([^=]*)=[“\’]?([^”\’]*)[“\’]?$/’, $v, $a3)

Note that the / works as delimiter.

That’s all

session_start(): ps_files_cleanup_dir

Posted: 17th January 2011 by admin in programming

This happens when PHP does not have permission to write on the session directory, to correct this go to your /var/www directory and change the owner of the files to root like:

/var/www$ chown root.root myProjectDir -R

Where “myProjectDir” is the directory of the system that you are creating.