Today, my colleague said that PHP lacks a calendar module on the server, go up a check really did not, well, can only recompile the calendar this module to add in, the function of this module is Calendar expansion function, due to the development of rush, there is no more information, the following to compile the installation bar.
System: CentOS 5.x
Required Packages: php5.2.x
1. Enter the Calendar directory
This depends on the PHP package you left behind, I was in/root/install/php-5.2.17
The code is as follows |
Copy Code |
Cd/root/install/php-5.2.17/ext/calendar |
2. Start Compiling installation
The code is as follows |
Copy Code |
/usr/local/php/bin/phpize ./configure--with-php-config=/usr/local/php/bin/php-config--enable-calendar Make && make install |
3. Load Calendar Module
The code is as follows |
Copy Code |
Vi/etc/php.d/calendar.ini extension= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/calendar.so" |
Then restart PHP-FPM and Nginx.
4. Verify
Casually find a website, in its root directory to lose a test.php, the contents are as follows:
The code is as follows |
Copy Code |
<?php Phpinfo (); ?> |
If the following figure appears, the Calendar module is installed successfully.
Well, after the success of the development can be said.