{"id":1464,"date":"2018-01-19T19:22:52","date_gmt":"2018-01-19T19:22:52","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/getting-started-with-php-ming-page-2\/"},"modified":"2018-01-19T19:24:48","modified_gmt":"2018-01-19T19:24:48","slug":"getting-started-with-php-ming-page-2","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/getting-started-with-php-ming-page-2\/","title":{"rendered":"Getting Started with PHP\/Ming Page 2"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By Iman S. H. Suyoto<\/div>\n<div class=\"\">on August 10, 2001<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\">\n<h2>Installing PHP\/Ming on Debian GNU\/Linux<\/h2>\n<div class=\"articlePara\">\nOkay, I&#8217;ll use <var>$MINGINST<\/var> to state Ming<br \/>\ninstallation directory. For example, in my computer, the<br \/>\ninstallation directory is <var>\/usr\/apps\/src\/ming-0.1.1<\/var>.<br \/>\nSo, if I say <var>$MINGINST\/php_ext<\/var>, it means<br \/>\n<var>\/usr\/apps\/src\/ming-0.1.1\/php_ext<\/var>.<\/div>\n<div class=\"articlePara\">\nMy initial (intuitive, again) step was trying to recompile<br \/>\nthe source code to get the shared object. The <var>README<\/var><br \/>\nstated that the first thing to do was simply typing <code class=\"example\">make<br \/>\nstatic<\/code>. This produced <var>$MINGINST\/libming.a<\/var> and<br \/>\nsome object files under <var>$MINGINST\/src<\/var>. Next, still<br \/>\nfollowing the <var>README<\/var>, I changed directory to<br \/>\n<var>$MINGINST\/php_ext<\/var> and typed <code class=\"example\">make<\/code>.<br \/>\nWhew&#8230; lots of errors. I read the error messages and they were<br \/>\nabout header files being not found. Maybe you think that it<br \/>\nshouldn&#8217;t be a problem if we have apt-got (err&#8230; perfect form<br \/>\nof apt-get&#8230;) install <var>php4-dev<\/var> (for your<br \/>\ninformation, I&#8217;m using the stable version). The fact is: it is,<br \/>\nand it is because of the Debian directory layout that<br \/>\n&#8220;confuses&#8221; <code class=\"example\">php-config --includes<\/code> being used inside<br \/>\n<var>Makefile<\/var>. The same thing also applies for<br \/>\n<code class=\"example\">php-config --extension-dir<\/code>.<\/div>\n<div class=\"articlePara\">\n<p>With such a condition, in such a &#8220;quick and dirty&#8221; way, I<br \/>\nmodified <var>Makefile<\/var> so it became like this:<br \/>\n(includes wrapped for formatting for this example)<\/p>\n<\/div>\n<div class=\"example\">\n<pre>\n\n\nprefix=`php-config --prefix`\n\nincludes=-I \/usr\/include\/php4\/main -I \/usr\/include\/php4\/Zend \n-I \/usr\/include\/php4\/ext\/standard -I \/usr\/include\/php4 \n-I \/usr\/include\/php4\/TSRM\nextension=\/usr\/lib\/php4\/apache\n\nDEFINES = -DHAVE_MING -DCOMPILE_DL_MING -DZEND_NEW_ERROR_HANDLING\n\nCFILES = ming.c\n\nphp_ming.so: ming.o\n\t${CC} -shared -fpic ming.o ..\/libming.a -o php_ming.so -lm\n\nming.o: ${CFILES}\n\t${CC} ${DEFINES} -c ming.c -I. -I.. ${includes} \n\nclean:\n\trm -f php_ming.so\n\ninstall:\n\tcp php_ming.so ${extension} \n\techo \"Don't forget to add 'extension=php_ming.so' to php.ini!\"\n\n<\/pre>\n<\/div>\n<div class=\"articlePara\">\nPlease notice the changes: two additional variables<br \/>\n(<var>includes<\/var> and <var>extension<\/var>) and a few<br \/>\nchanges in the targets <var>ming.o<\/var> and<br \/>\n<var>install<\/var>.<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"suyoto20010809.html\">\u00ab Previous Page<\/a><\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"suyoto20010809.html\">1<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">2<\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"suyoto200108099ba9.html?page=3\">3<\/a> <\/div>\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"suyoto200108099ba9.html?page=3\">Next Page \u00bb<\/a><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>One day, I found a site about Ming, a SWF output library and PHP module. Somehow, it attracted me, and gave me a driving force to try it immediately.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1464","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1464"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1464\/revisions"}],"predecessor-version":[{"id":3318,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1464\/revisions\/3318"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}