{"id":173,"date":"2013-02-21T08:13:00","date_gmt":"2013-02-21T08:13:00","guid":{"rendered":""},"modified":"2021-03-17T02:36:34","modified_gmt":"2021-03-17T02:36:34","slug":"aix-7-1-apache-2-4-php-libphp5-so-with-pdo","status":"publish","type":"post","link":"https:\/\/www.shaopin.link\/wordpress\/index.php\/aix-7-1-apache-2-4-php-libphp5-so-with-pdo\/","title":{"rendered":"AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO"},"content":{"rendered":"<p>The following experience, it took me a lot of time &#8230;..may help you.<\/p>\n<p>1.Download PHP&nbsp;<span style=\"color: red;\">5.2.14 <\/span>(Other version NOT successed)<\/p>\n<p>2.AIX 7.1 need &nbsp;vi <gd_dir>\/include\/gd_io.h ,<span style=\"color: blue;\"> typedef struct gdIOCtx <\/span>add<span style=\"color: blue;\">&nbsp;<\/span><span style=\"color: red;\">void *data; &nbsp;<\/span><\/gd_dir><br \/><span style=\"color: red;\"><br \/><\/span>3.Edit PHP Makefile add this<br \/>&nbsp; &nbsp;PHP_CLI_OBJS = sapi\/cli\/php_cli.lo sapi\/cli\/php_http_parser.lo sapi\/cli\/php_cli_server.lo <span style=\"color: red;\">$(PHP_BINARY_OBJS)<\/span><br \/>PHP_CGI_OBJS = sapi\/cgi\/cgi_main.lo sapi\/cgi\/fastcgi.lo <span style=\"color: red;\">main\/internal_functions.lo<\/span><br \/><span style=\"color: red;\"><br \/><\/span>4.Edit PHP&nbsp;sapi\/apache2handler\/php_functions.c (becouse we use Apache 2.4 &nbsp;NOT 2.2)<br \/>&nbsp; &nbsp;&#8211; &nbsp; &nbsp; &nbsp; AP_DECLARE_DATA extern unixd_config_rec unixd_config;<br \/>&nbsp; &nbsp;+ &nbsp; &nbsp; &nbsp; AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;<br \/>&nbsp; &nbsp;&#8211; &nbsp; &nbsp; &nbsp; snprintf(tmp, sizeof(tmp), &#8220;%s(%d)\/%d&#8221;, unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);<br \/>&nbsp; &nbsp;+ &nbsp; &nbsp; &nbsp; snprintf(tmp, sizeof(tmp), &#8220;%s(%d)\/%d&#8221;, ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);<\/p>\n<p>5.Link some file &#8230;.<\/p>\n<p>&nbsp; &nbsp;ls -s \/opt\/freeware\/bin\/pg_config \/usr\/bin\/pg_config<br \/>&nbsp; &nbsp;ls -s \/opt\/freeware\/bin\/mysql_config \/usr\/bin\/mysql_config<br \/>&nbsp; &nbsp;ln -s \/opt\/freeware\/lib\/libcrypto.so.0.9.8 \/opt\/freeware\/lib\/libcrypto.so &nbsp; &nbsp;(OpenSSL ver cant greater than 0.9.8)<\/p>\n<p>6.Configure PHP 5.2.14 with<\/p>\n<p>.\/configure &#8211;prefix=\/opt\/freeware &#8211;with-apxs2=\/opt\/freeware\/bin\/apxs &#8211;with-zlib &#8211;with-zlib-dir=\/opt\/freeware &#8211;with-gd=\/opt\/freeware &#8211;with-freetype-dir=\/opt\/freeware &#8211;with-png-dir=\/opt\/freeware &#8211;with-mysql=\/usr\/local\/mysql &#8211;with-mcrypt=\/opt\/freeware &#8211;enable-mbstring &#8211;with-gettext=\/opt\/freeware &#8211;with-libxml-dir=\/opt\/freeware\/lib &#8211;enable-sockets &#8211;with-pcre-dir=\/opt\/freeware &#8211;with-snmp=\/opt\/freeware &#8211;with-openssl=\/opt\/freeware &#8211;with-bz2=\/opt\/freeware &#8211;with-jpeg-dir=\/opt\/freeware &#8211;enable-bcmath &#8211;enable-calendar &#8211;enable-maintainer-zts &#8211;disable-static &#8211;enable-shared &#8211;enable-ftp &#8211;with-curl=\/opt\/freeware &#8211;with-pdo-mysql=\/usr\/local\/mysql &#8211;with-t1lib=\/opt\/freeware &#8211;with-libmbfl &#8211;with-iconv=\/opt\/freeware &#8211;with-iconv-dir=\/opt\/freeware &#8211;with-xpm-dir=\/opt\/freeware &#8211;enable-json &#8211;with-mysqli=\/usr\/local\/mysql\/bin\/mysql_config &#8211;with-pgsql=\/opt\/freeware\/bin\/pg_config &#8211;with-pdo-pgsql=\/opt\/freeware\/bin\/pg_config<\/p>\n<p>7.Make and Copy module<br \/>make<br \/>cp .libs\/libphp5.so \/xxx\/xxx\/apache\/modules\/ &nbsp;(xxx depend on your apache config)<\/p>\n<p>Other note &#8212; Upgrading to 2.4 from 2.2<br \/>http:\/\/httpd.apache.org\/docs\/2.4\/upgrading.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following experi &hellip; <a href=\"https:\/\/www.shaopin.link\/wordpress\/index.php\/aix-7-1-apache-2-4-php-libphp5-so-with-pdo\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">AIX 7.1 + Apache 2.4 + PHP libphp5.so with PDO<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-173","post","type-post","status-publish","format-standard","hentry","category-aix"],"_links":{"self":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":1,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/173\/revisions"}],"predecessor-version":[{"id":239,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/173\/revisions\/239"}],"wp:attachment":[{"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shaopin.link\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}