{"id":74,"date":"2017-04-17T12:54:46","date_gmt":"2017-04-17T12:54:46","guid":{"rendered":"http:\/\/sci-tech-blog.com\/?p=74"},"modified":"2017-04-17T12:54:46","modified_gmt":"2017-04-17T12:54:46","slug":"%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-php-%d1%81-unixodbc","status":"publish","type":"post","link":"https:\/\/sci-tech-blog.com\/?p=74","title":{"rendered":"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PHP \u0441 UnixODBC"},"content":{"rendered":"<p>Original:http:\/\/www.unixodbc.com\/doc\/php3.html<\/p>\n<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 Apache 1.3.12 \u0438 PHP 3.0.16, \u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 apache 1.3.6 \u0438 php 3.0.9. \u0423 PHP4 \u0438\u0437 \u0431\u0435\u0442\u0430 3 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0446\u0438\u044f configure \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f unixODBC, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e unixODBC \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \/ usr \/ local, \u0438 \u0447\u0442\u043e \u043a\u0430\u043a Apache, \u0442\u0430\u043a \u0438 PHP \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<ol>\n<li>\u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 Apache \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443\n<pre>   .\/configure --prefix = \/ WWW\r\n<\/pre>\n<p>\u043f\u043b\u044e\u0441 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b \u0432 \/usr\/local\/include called odbc.h, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438\n<pre>   #include &lt;sql.h&gt;\r\n   #include &lt;sqlext.h&gt;\r\n   #include &lt;odbcinst.h&gt;\r\n<\/pre>\n<p>\u0437\u0430\u043c\u0435\u043d\u0430 \/ WWW \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0430\u043f\u0430\u0447\u043e\u043c \u043f\u0443\u0442\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 PHP. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b\n<pre> CFLAGS=\"-I\/usr\/local\/include\"\r\n LDFLAGS=\r\n CUSTOM_ODBC_LIBS=\"-L\/usr\/local\/lib -lodbc\"<\/pre>\n<p>\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<pre>export CFLAGS LDFLAGS CUSTOM_ODBC_LIBS<\/pre>\n<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 PHP \u0441\n<pre>.\/configure --with-apache=..\/apache_1.3.12 --with-custom-odbc=\/usr\/local  --enable-track-vars<\/pre>\n<p>\u041f\u043b\u044e\u0441 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b &#8230;<\/p>\n<pre>   make\r\n   make install<\/pre>\n<\/li>\n<li>\u0412\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0432 \u0441\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 apache \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435\n<pre>   .\/configure --prefix=\/www --activate-module=src\/modules\/php3\/libphp3.a\r\n   make\r\n   make install<\/pre>\n<\/li>\n<li>\u0412\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 PHP,\u0437\u0430\u0442\u0435\u043c \u0446\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 PHP INSTALL\n<pre>   cp php3.ini-dist \/usr\/local\/lib\/php3.ini\r\n   You can edit \/usr\/local\/lib\/php3.ini file to set PHP options.\r\n   Edit your httpd.conf or srm.conf file and add:\r\n     AddType application\/x-httpd-php3 .php3<\/pre>\n<\/li>\n<\/ol>\n<p>\u0418 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0430\u043a.<\/p>\n<h3>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Apache DSO<\/h3>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 PHP \u043a\u0430\u043a \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e apache. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e unixODBC \u0441\u0442\u0440\u043e\u0438\u0442 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e apache \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c \u0432 \u0441\u0431\u043e\u0440\u043a\u0435 \u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u044d\u0444\u0438\u0440: \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u043f\u0435\u0440\u0435\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435\u043c apache<\/p>\n<pre>export CFLAGS=-D_REENTRANT\r\nexport LFLAGS=-lpthread\r\n.\/configure --prefix=www<\/pre>\n<p>\u0418\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0438\u0442\u044c unixODBC \u0431\u0435\u0437 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0432 .\/configure &#8211;enable-threads = no<\/p>\n<p>\u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b config.cache \u0438\u0437 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 Apache \u0438\u043b\u0438 unixODBC<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Original:http:\/\/www.unixodbc.com\/doc\/php3.html \u042d\u0442\u0430 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 Apache 1.3.12 \u0438 PHP 3.0.16, \u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 apache 1.3.6 \u0438 php 3.0.9. \u0423 PHP4 \u0438\u0437 \u0431\u0435\u0442\u0430 3 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0446\u0438\u044f configure \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f unixODBC, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u043d\u0438\u043c. \u0412 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e unixODBC \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sci-tech-blog.com\/?p=74\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 PHP \u0441 UnixODBC&#8221;<\/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":[11],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=74"}],"version-history":[{"count":1,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":75,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=\/wp\/v2\/posts\/74\/revisions\/75"}],"wp:attachment":[{"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sci-tech-blog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}