PHP In Case Of

PHP In Case Of

2013-07-24. Category & Tags: Nix, Soft&Skills Nix, Soft&Skills

Fatal error: Call to undefined function mb_strlen() #

apt-get / yum search mbstring ; apt-get / yum install php-mbstring ...

http://blog.fity.cn/post/187/

 

Fatal error: Call to undefined function imagecreate() #

and it takes a lot of time to upload a image.

apt-get install php5-gd

http://www.php.net/manual/en/image.installation.php

 

Warning: It is not safe to rely on the system’s timezone settings #

Solution: modify php.ini:

date.timezone = Asia/Shanghai

http://stackoverflow.com/questions/2213608/php-configuration-it-is-not-safe-to-rely-on-the-systems-timezone-settings

 

Set Include Path in PHP File #

set_include_path(get_include_path() . PATH_SEPARATOR . $path);

 

Speedup Zend Studio #

http://devzone.zend.com/3291/10-tips-for-a-speedy-zend-studio/

 

Error and Log #

user_error($str) prints the string in apache error log with php file path and line number.

error_log($str) prints only the string in apache error log.

Both will not influence http status (will be 200).

http://php.net/manual/en/ref.errorfunc.php