Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
2012-08-10
Scratch of the day - PHP Warning: date(): It is not safe to rely on the system's timezone settings
Yesterday, I noticed one of my Apache server's error log is growing like 1.1 gb in 12 hours. The log is full of these :
2012-07-13
Scratch of the day - php throwing stricts error on browser
Today, I had to setup a Postgresql database server with phpPgAdmin web interface. While visiting the web interface for the first time, this error message appears on the top :
Seems like php 5.4.4 imposed some extra measure as best practice.
Although phpPgAdmin works as usual, the error message is annoying. Plus, it is kind of bad to show what potentially can be exploit.
To turn off these error messages, just tweak the below parameter in /usr/local/etc/php.ini :
Strict Standards: Only variables should be assigned by reference in /usr/local/www/phpPgAdmin/classes/database/Connection.php on line 23 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/phpPgAdmin/classes/database/Connection.php:23) in /usr/local/www/phpPgAdmin/classes/Misc.php on line 540
Seems like php 5.4.4 imposed some extra measure as best practice.
Although phpPgAdmin works as usual, the error message is annoying. Plus, it is kind of bad to show what potentially can be exploit.
To turn off these error messages, just tweak the below parameter in /usr/local/etc/php.ini :
2011-09-18
FreeBSD - PHPMyAdmin Error on initial setup
After the first time installation of FAMP (FreeBSD, Apache, MySQL & PHP) with PHPMyAdmin, an error message pops out when visiting PHPMyAdmin's page. The error message goes like this :
This is because the "ArrayObject" class is not enable in the required libraries and it can be solve by setup the proper parameters in php.ini. The recommended php.ini that comes with ports is sufficient to solve this problem. For my case, copying the recommended php.ini solve it. Here it goes :
Fatal error: Class 'ArrayObject' not found in /usr/local/www/phpMyAdmin/libraries/List.class.php on line 16
This is because the "ArrayObject" class is not enable in the required libraries and it can be solve by setup the proper parameters in php.ini. The recommended php.ini that comes with ports is sufficient to solve this problem. For my case, copying the recommended php.ini solve it. Here it goes :
2011-01-10
FreeBSD - portupgrade php5 got hiccups with security/php5-filter
During the routing upgrading of ports, caught a hiccups while upgrading php5 related packages.
One of the port failed to upgrade after issuing "portupgrade -vr php5*".
The errors :
Checking out /usr/ports/UPDATING and /usr/ports/MOVED doesn't seems to give a hint. Next try on Forum.FreeBSD.org shed light on this :
One of the port failed to upgrade after issuing "portupgrade -vr php5*".
The errors :
===> Building for php5-filter-5.3.4 /bin/sh /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/libtool --mode=compile cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -c /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c -o logical_filters.lo cc -I. -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -DPHP_ATOM_INC -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/include -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/main -I/usr/ports/security/php5-filter/work/php-5.3.4/ext/filter -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -O2 -fno-strict-aliasing -pipe -c /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c -fPIC -DPIC -o .libs/logical_filters.o In file included from /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:25: /usr/local/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory In file included from /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:25: /usr/local/include/php/ext/pcre/php_pcre.h:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /usr/local/include/php/ext/pcre/php_pcre.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /usr/local/include/php/ext/pcre/php_pcre.h:44: error: expected specifier-qualifier-list before 'pcre' /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c: In function 'php_filter_validate_regexp': /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: 'pcre' undeclared (first use in this function) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: (Each undeclared identifier is reported only once /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: for each function it appears in.) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:411: error: 're' undeclared (first use in this function) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:412: error: 'pcre_extra' undeclared (first use in this function) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c: In function 'php_filter_validate_email': /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:527: error: 'pcre' undeclared (first use in this function) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:527: error: 're' undeclared (first use in this function) /usr/ports/security/php5-filter/work/php-5.3.4/ext/filter/logical_filters.c:528: error: 'pcre_extra' undeclared (first use in this function) *** Error code 1 1 error *** Error code 1 Stop in /usr/ports/security/php5-filter. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20101224-47314-9ktu04-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=php5-filter-5.2.11_1 UPGRADE_PORT_VER=5.2.11_1 make ** Fix the problem and try again. ---> Build of security/php5-filter ended at: Fri, 24 Dec 2010 09:36:27 +0800 (consumed 00:00:43) ---> Upgrade of security/php5-filter ended at: Fri, 24 Dec 2010 09:36:27 +0800 (consumed 00:00:43) ---> ** Upgrade tasks 1: 0 done, 0 ignored, 0
Checking out /usr/ports/UPDATING and /usr/ports/MOVED doesn't seems to give a hint. Next try on Forum.FreeBSD.org shed light on this :
Subscribe to:
Posts (Atom)


