- Back to Home »
- AIX »
- AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO
The following experience, it took me a lot of time .....may help you.
1.Download PHP 5.2.14 (Other version NOT successed)
2.AIX 7.1 need vi
3.Edit PHP Makefile add this
PHP_CLI_OBJS = sapi/cli/php_cli.lo sapi/cli/php_http_parser.lo sapi/cli/php_cli_server.lo $(PHP_BINARY_OBJS)
PHP_CGI_OBJS = sapi/cgi/cgi_main.lo sapi/cgi/fastcgi.lo main/internal_functions.lo
4.Edit PHP sapi/apache2handler/php_functions.c (becouse we use Apache 2.4 NOT 2.2)
- AP_DECLARE_DATA extern unixd_config_rec unixd_config;
+ AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
- snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
+ snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
5.Link some file ....
ls -s /opt/freeware/bin/pg_config /usr/bin/pg_config
ls -s /opt/freeware/bin/mysql_config /usr/bin/mysql_config
ln -s /opt/freeware/lib/libcrypto.so.0.9.8 /opt/freeware/lib/libcrypto.so (OpenSSL ver cant greater than 0.9.8)
6.Configure PHP 5.2.14 with
./configure --prefix=/opt/freeware --with-apxs2=/opt/freeware/bin/apxs --with-zlib --with-zlib-dir=/opt/freeware --with-gd=/opt/freeware --with-freetype-dir=/opt/freeware --with-png-dir=/opt/freeware --with-mysql=/usr/local/mysql --with-mcrypt=/opt/freeware --enable-mbstring --with-gettext=/opt/freeware --with-libxml-dir=/opt/freeware/lib --enable-sockets --with-pcre-dir=/opt/freeware --with-snmp=/opt/freeware --with-openssl=/opt/freeware --with-bz2=/opt/freeware --with-jpeg-dir=/opt/freeware --enable-bcmath --enable-calendar --enable-maintainer-zts --disable-static --enable-shared --enable-ftp --with-curl=/opt/freeware --with-pdo-mysql=/usr/local/mysql --with-t1lib=/opt/freeware --with-libmbfl --with-iconv=/opt/freeware --with-iconv-dir=/opt/freeware --with-xpm-dir=/opt/freeware --enable-json --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pgsql=/opt/freeware/bin/pg_config --with-pdo-pgsql=/opt/freeware/bin/pg_config
7.Make and Copy module
make
cp .libs/libphp5.so /xxx/xxx/apache/modules/ (xxx depend on your apache config)
Other note -- Upgrading to 2.4 from 2.2
http://httpd.apache.org/docs/2.4/upgrading.html
張貼留言