{"id":11395,"date":"2008-10-25T18:06:51","date_gmt":"2008-10-25T15:06:51","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=11395"},"modified":"2008-10-25T23:45:33","modified_gmt":"2008-10-25T20:45:33","slug":"oracle-and-php-the-deadly-mix","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/","title":{"rendered":"Oracle and PHP &#8211; the deadly mix"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>WI&#8217;ve spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP.\u00a0 Before you start laughing, cursing, and blaming, Oracle wasn&#8217;t my choice of the database for this specific project.\u00a0 It&#8217;s just the company already had it installed and working for the background, and there needed to be some integration with the front, which is of course MySQL and PHP based.<\/p>\n<p>First thing I do, obviously, is visit <a href=\"http:\/\/www.php.net\">PHP.net<\/a> to check for the prefix of the functions that I need for Oracle.\u00a0 Through out my experience with PHP, that&#8217;s about the only thing I need to know to start working with the new database.\u00a0 Oh, and the PHP module installed to provide those functions. Oracle interface for PHP is called is called <a href=\"http:\/\/uk.php.net\/oci8\">OCI8<\/a>.\u00a0 All you need to do now is install the oci8 module.<\/p>\n<p>Here comes the first trouble.\u00a0 oci8 is not provided as a pre-compiled package for Fedora Linux.\u00a0 There is an alternative yum repository &#8211; <a href=\"http:\/\/blog.famillecollet.com\/post\/2005\/10\/02\/8-telechargement-installation-et-yum\">Remi<\/a>, which has oci8 RPMs, but first of all, the oci8 module is compiled against somewhat outdated Oracle headers (version 10.2.0.4 instead of the latest 11.1.0.1), and it also needs to replace your native PHP and MySQL packages.\u00a0 I tried that, and it sort of worked, but I wasn&#8217;t happy.\u00a0 So I got my Fedora packages back and decided that I need to compile oci8 myself.<\/p>\n<p>In order to compile oci8, one needs to download Oracle InstantClient (basic package) and some header files (devel package).\u00a0 These can be downloaded from the <a href=\"http:\/\/www.oracle.com\/technology\/tech\/oci\/instantclient\/index.html\">Oracle web site<\/a>, for free, minus the time for the registration.\u00a0 The little trick here is that during oci8 compilation process, the includes are searched from locations which do not include the one from Oracle RPM.\u00a0 I did a simple symlink of the includes folder to where Oracle headers were, and compilation went on just fine.\u00a0 (Hint: otherwise you&#8217;ll get a whole lot of Zend related messages and a fatal error).\u00a0 Gladly, I only had to do this path correction on the Fedora 9 machine.\u00a0 My production server with Red Hat Enterprise Linux 5 compiled oci8 without any problems all by itself.<\/p>\n<p><strong>Update:<\/strong> <em>more detailed instructions on the actual installation can be found <a href=\"http:\/\/www.gena01.com\/forum\/gena01-blog\/installing-oracle-instant-client-11g-and-pecl-oci8\/?PHPSESSID=0f7719d3518ee3b361bff3661936c967\">here<\/a> and <a href=\"http:\/\/blog.fourthirty.org\/?p=115\">here<\/a>.<\/em><\/p>\n<p>Now that oci8 installed and configured, I spent some time figuring the correct way to specify the DSN.\u00a0\u00a0 Oracle uses some weirdly name file (tnsnames.ora) in some weird location, but luckily there is a way to go around it.\u00a0 More so, I recommend that you remove tnsnames.ora file altogether, since it can add to your troubles.\u00a0 For example, if you mix spaces and tabs as whitespaces in that file, you are screwed.\u00a0 So, just get rid of it.\u00a0 The way you specify DSN is directly in the PHP script, and you use the syntax like so:\u00a0 &#8220;<em>\/\/hostname.or.ip:port\/dbname<\/em>&#8220;.\u00a0 Intuitive, I know.<\/p>\n<p>Once you&#8217;ll get connected to the server, you have a whole bag of surprises waiting for you.\u00a0 That is if you are too used to working with MySQL.\u00a0 First is the syntax.\u00a0 Oracle is using PL\/SQL, so you wipe the dust of from that really old Pascal textbook that you have somewhere.\u00a0 &#8220;<em>begin :result := some.procedure.call(:param1, :param2); end;<\/em>&#8221; &#8211; that sort of thing.\u00a0 Secondly, you&#8217;ll be happy to know that prepared queries are supported.\u00a0 So your workflow will slightly change.\u00a0 Perl programmers will feel more at home here.\u00a0 <a href=\"http:\/\/www.php.net\/manual\/en\/function.oci-bind-by-name.php\">oci_bind_by_name()<\/a> and <a href=\"http:\/\/www.php.net\/manual\/en\/function.oci-execute.php\">oci_execute()<\/a> are your friends here.\u00a0 Oh, and while you are at, get familiar with the types of the parameters, because they are important.\u00a0 And don&#8217;t forget that you&#8217;ll have to bind each and every variable in the query, or get a fatal error. And since you are learning something here, get ready for the oracle errors.\u00a0 The most frequent one you&#8217;ll get would be something like &#8220;Failed to retreive the error message for ORA-12345&#8221;, where 12345 would be a number of the error.\u00a0 So you&#8217;ll google for ORA-12345 and ORA-54321 and ORA-XYZZZ a lot.\u00a0 But than you&#8217;ll have a wrapper library and you&#8217;ll be OK.<\/p>\n<p><strong>Update:<\/strong> <em>as was noted in the comments, PL\/SQL is just an option, not a requirement.\u00a0 Also, most of the headaches of the above paragraph could be avoided by using one of the PHP frameworks.\u00a0 I personally haven&#8217;t yet tried the framework yet, since I&#8217;d like to see things working directly first.\u00a0 Especially since we are not in the test mode only.<\/em><\/p>\n<p>The bigger surprise is still waiting for you though.\u00a0 You are very likely to discover that OCI8 implementation for PHP is very slow.\u00a0 And I do mean extremely very slow.\u00a0 I couldn&#8217;t believe that it could be slow, so I went into the source code and OMG!\u00a0 It is really slow.\u00a0 The slow part is around fetch_all() against fetch_row().\u00a0 Basically, it&#8217;s always row by row and never all, even if you tell it how many rows you need fetched.<\/p>\n<p>In my case, I have the server a bit far away, and there is a possibility to get many rows back.\u00a0 So even for a simple query with 140 rows in results I was getting 20 seconds execution time.\u00a0 Oracle was serving results fast, the network was OK, machines on both sides were powerful and all, but it was still taking 20 seconds or more.<\/p>\n<p>I am still trying to find the solution to this issue, but so far it seems that the current way I do it will be the way to do it.\u00a0 And the way I do it now is the following.\u00a0 Never ever run direct SQL queries.\u00a0 Everything goes through a stored procedure.\u00a0 The results are returned all in a single row.\u00a0 And that single row has the BLOB (CLOB actually) with all results in one single XML.\u00a0 Fetching works good enough to get it, and then parsing is done with one of the billion XML parsers for PHP.<\/p>\n<p>In my case <a href=\"http:\/\/minixml.psychogenic.com\/\">MiniXML<\/a> worked pretty good until bigger results started coming in.\u00a0 That&#8217;s when I learned an important lesson.\u00a0 MiniXML parses XML with a regular expression.\u00a0 PHP has a couple of settings in the configuration file that limits the size of the memory and recursion during regex parsing &#8211; pcre.backtrack_limit and pcre.recursion_limit.\u00a0 If you really want to kill your server, set these to -1 (instead of default 100000) and try a regex against a 1 MB XML file.\u00a0 Enjoy, cause it won&#8217;t be long before everything goes down. I didn&#8217;t feel like changing from MiniXML so we just implemented some limits in the queries and stored procedures on the Oracle side, and add a few checks in PHP fail rather than crash the system.<\/p>\n<p>So, to some it up, here is my experience with Oracle and PHP from the last week:<\/p>\n<ul>\n<li>I had to register on Oracle web site to download packages<\/li>\n<li>I had to re-learn my long forgotten compilation skills<\/li>\n<li>I had to go read some C<\/li>\n<li>I had to step on the &#8220;re-inventing the wheel&#8221; path more than once<\/li>\n<li>I am parsing XML when working with the database<\/li>\n<li>I had a head ache more than twice<\/li>\n<li>I didn&#8217;t have much fun<\/li>\n<li>After all, it works.\u00a0 Sort of.<\/li>\n<\/ul>\n<p>One last point in this saga is about Googling.\u00a0 Ask me any question, and I do mean any question, about MySQL.\u00a0 Heck, even PostgreSQL.\u00a0 And the answer is just there, on the first page of Google results.\u00a0 In any human or programming language.\u00a0 For any operating system.\u00a0 You&#8217;ll be sorted out and working in less then a minute.\u00a0\u00a0 Then, try asking even the simplest of the simplest questions about Oracle and PHP.\u00a0 Sometimes you&#8217;ll find something.\u00a0 Some other times, you won&#8217;t.\u00a0 The overall feeling I have is that not a lot of people are using Oracle with PHP, and those of them who do are in their majority not very happy.<\/p>\n<p>Now I&#8217;ve joined the army.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>WI&#8217;ve spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP.\u00a0 Before you start laughing, cursing, and blaming, Oracle wasn&#8217;t my choice of the database for this specific project.\u00a0 It&#8217;s just the company already had it installed and working for the background, and there &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Oracle and PHP &#8211; the deadly mix<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_links_to":"","_links_to_target":""},"categories":[1,18,133,62,1334],"tags":[1559,1620,38,124],"keyring_services":[],"class_list":["post-11395","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-sysadmin","category-technology","category-web-work","tag-databases","tag-oracle","tag-php","tag-web"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"WI&#039;ve spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn&#039;t my choice of the database for this specific project. It&#039;s just the company already had it installed and working for the background, and there\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Leonid Mamchenkov\"\/>\n\t<meta name=\"google-site-verification\" content=\"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Leonid Mamchenkov - Life, universe, and everything else\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov\" \/>\n\t\t<meta property=\"og:description\" content=\"WI&#039;ve spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn&#039;t my choice of the database for this specific project. It&#039;s just the company already had it installed and working for the background, and there\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2008-10-25T15:06:51+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2008-10-25T20:45:33+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MamchenkovBlog\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov\" \/>\n\t\t<meta name=\"twitter:description\" content=\"WI&#039;ve spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn&#039;t my choice of the database for this specific project. It&#039;s just the company already had it installed and working for the background, and there\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@mamchenkov\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#blogposting\",\"name\":\"Oracle and PHP \\u2013 the deadly mix - Leonid Mamchenkov\",\"headline\":\"Oracle and PHP &#8211; the deadly mix\",\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"},\"datePublished\":\"2008-10-25T18:06:51+02:00\",\"dateModified\":\"2008-10-25T23:45:33+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":10,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#webpage\"},\"articleSection\":\"All, Programming, Sysadmin, Technology, Web work, databases, oracle, PHP, web\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/programming\\\/#listItem\",\"name\":\"Programming\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/programming\\\/#listItem\",\"position\":3,\"name\":\"Programming\",\"item\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/programming\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#listItem\",\"name\":\"Oracle and PHP &#8211; the deadly mix\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#listItem\",\"position\":4,\"name\":\"Oracle and PHP &#8211; the deadly mix\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/category\\\/technology\\\/programming\\\/#listItem\",\"name\":\"Programming\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/\",\"name\":\"Leonid Mamchenkov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"Leonid Mamchenkov\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#webpage\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/\",\"name\":\"Oracle and PHP \\u2013 the deadly mix - Leonid Mamchenkov\",\"description\":\"WI've spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn't my choice of the database for this specific project. It's just the company already had it installed and working for the background, and there\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/2008\\\/10\\\/25\\\/oracle-and-php-the-deadly-mix\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/author\\\/leonid\\\/#author\"},\"datePublished\":\"2008-10-25T18:06:51+02:00\",\"dateModified\":\"2008-10-25T23:45:33+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/\",\"name\":\"Blog of Leonid Mamchenkov\",\"description\":\"Life, universe, and everything else\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mamchenkov.net\\\/wordpress\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov","description":"WI've spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn't my choice of the database for this specific project. It's just the company already had it installed and working for the background, and there","canonical_url":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"google-site-verification":"VHvdD0_usx1_4DzKy_QCVcICVgX2EgA2ybELT-wl7kQ","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#blogposting","name":"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov","headline":"Oracle and PHP &#8211; the deadly mix","author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"},"datePublished":"2008-10-25T18:06:51+02:00","dateModified":"2008-10-25T23:45:33+02:00","inLanguage":"en-US","commentCount":10,"mainEntityOfPage":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#webpage"},"isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#webpage"},"articleSection":"All, Programming, Sysadmin, Technology, Web work, databases, oracle, PHP, web"},{"@type":"BreadcrumbList","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","position":1,"name":"Home","item":"https:\/\/mamchenkov.net\/wordpress","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/#listItem","name":"Programming"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/#listItem","position":3,"name":"Programming","item":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#listItem","name":"Oracle and PHP &#8211; the deadly mix"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#listItem","position":4,"name":"Oracle and PHP &#8211; the deadly mix","previousItem":{"@type":"ListItem","@id":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/#listItem","name":"Programming"}}]},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/#person","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"Person","@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author","url":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/","name":"Leonid Mamchenkov","image":{"@type":"ImageObject","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3cf6df002a284d78fb6e9d8222ca4d102e0832035ed6bc8447008bd234e131a4?s=96&d=identicon&r=g","width":96,"height":96,"caption":"Leonid Mamchenkov"}},{"@type":"WebPage","@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#webpage","url":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/","name":"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov","description":"WI've spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn't my choice of the database for this specific project. It's just the company already had it installed and working for the background, and there","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#website"},"breadcrumb":{"@id":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/#breadcrumblist"},"author":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"creator":{"@id":"https:\/\/mamchenkov.net\/wordpress\/author\/leonid\/#author"},"datePublished":"2008-10-25T18:06:51+02:00","dateModified":"2008-10-25T23:45:33+02:00"},{"@type":"WebSite","@id":"https:\/\/mamchenkov.net\/wordpress\/#website","url":"https:\/\/mamchenkov.net\/wordpress\/","name":"Blog of Leonid Mamchenkov","description":"Life, universe, and everything else","inLanguage":"en-US","publisher":{"@id":"https:\/\/mamchenkov.net\/wordpress\/#person"}}]},"og:locale":"en_US","og:site_name":"Leonid Mamchenkov - Life, universe, and everything else","og:type":"article","og:title":"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov","og:description":"WI've spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn't my choice of the database for this specific project. It's just the company already had it installed and working for the background, and there","og:url":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/","og:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:secure_url":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg","og:image:width":1024,"og:image:height":1024,"article:published_time":"2008-10-25T15:06:51+00:00","article:modified_time":"2008-10-25T20:45:33+00:00","article:publisher":"https:\/\/www.facebook.com\/MamchenkovBlog","twitter:card":"summary_large_image","twitter:site":"@mamchenkov","twitter:title":"Oracle and PHP \u2013 the deadly mix - Leonid Mamchenkov","twitter:description":"WI've spent most of the last week getting into, around, and out of the issues related to interoperability of Oracle and PHP. Before you start laughing, cursing, and blaming, Oracle wasn't my choice of the database for this specific project. It's just the company already had it installed and working for the background, and there","twitter:creator":"@mamchenkov","twitter:image":"https:\/\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2026\/03\/leonid-sailing-beer.jpg"},"aioseo_meta_data":{"post_id":"11395","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-19 21:13:37","updated":"2026-01-15 04:00:45","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/\" title=\"Programming\">Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tOracle and PHP \u2013 the deadly mix\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/mamchenkov.net\/wordpress"},{"label":"Technology","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/"},{"label":"Programming","link":"https:\/\/mamchenkov.net\/wordpress\/category\/technology\/programming\/"},{"label":"Oracle and PHP &#8211; the deadly mix","link":"https:\/\/mamchenkov.net\/wordpress\/2008\/10\/25\/oracle-and-php-the-deadly-mix\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":15172,"url":"https:\/\/mamchenkov.net\/wordpress\/2011\/06\/16\/day-in-brief-2011-06-16\/","url_meta":{"origin":11395,"position":0},"title":"Day in brief &#8211; 2011-06-16","author":"Leonid Mamchenkov","date":"June 16, 2011","format":false,"excerpt":"@asaliev Create public notebook. Add its RSS feed to TwitterFeed.com . Now you can share useful bookmarks and notes with the world. :) # Google Chromebooks are now available from Amazon and BestBuy http:\/\/bit.ly\/mzB2ft # New note : Titanium Studio | Appcelerator http:\/\/bit.ly\/lQPW8M # New note : Oracle Resources for\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28623,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/06\/11\/top-100-php-functions\/","url_meta":{"origin":11395,"position":1},"title":"Top 100 PHP functions","author":"Leonid Mamchenkov","date":"June 11, 2018","format":false,"excerpt":"\"Top 100 PHP functions\" is a list of the top 100 most frequently used PHP functions, from the analysis of the 1,900 open source projects.\u00a0 \u00a0If you are still learning PHP, this list is a good overview of what you'll see the most in real life projects.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28418,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/02\/27\/github-quickly-review-changed-functions-in-your-php-pull-requests\/","url_meta":{"origin":11395,"position":2},"title":"GitHub : Quickly review changed functions in your PHP pull requests","author":"Leonid Mamchenkov","date":"February 27, 2018","format":false,"excerpt":"GitHub is one of the greatest tools for developers ever.\u00a0 And it keeps getting better.\u00a0 Most of the new features that GitHub introduces are usually generic and apply to all developers universally.\u00a0 Today, however, they have a special present for the PHP developers -\u00a0Quickly review changed functions in your PHP\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/02\/github-php-500x221.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":16557,"url":"https:\/\/mamchenkov.net\/wordpress\/2012\/07\/23\/php-exposure-via-easter-egg\/","url_meta":{"origin":11395,"position":3},"title":"PHP exposure via easter egg","author":"Leonid Mamchenkov","date":"July 23, 2012","format":false,"excerpt":"Here is an interesting easter egg in PHP. \u00a0Check if your php.ini file has expose_php setting turned on like so: If it's on, then you can see PHP Credits page, which includes PHP authors and contributors, as well as authors and contributors to the PHP modules that you have installed.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/07\/PHP-credits.png?fit=610%2C420&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/07\/PHP-credits.png?fit=610%2C420&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2012\/07\/PHP-credits.png?fit=610%2C420&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":28552,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/07\/working-with-php-arrays-in-the-right-way\/","url_meta":{"origin":11395,"position":4},"title":"Working With PHP Arrays in the Right Way","author":"Leonid Mamchenkov","date":"May 7, 2018","format":false,"excerpt":"\"Working With PHP Arrays in the Right Way\" is a collection of tips and tricks on the array functions in PHP.\u00a0 PHP is weird, to say the least, when it comes to arrays, compared to many other programming languages, so articles like that are useful for pointers to better ways\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":26718,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/10\/10\/php-array_merge_recursive-vs-array_replace_recursive\/","url_meta":{"origin":11395,"position":5},"title":"PHP: array_merge_recursive() vs. array_replace_recursive()","author":"Leonid Mamchenkov","date":"October 10, 2016","format":false,"excerpt":"Here is a nice blog post describing the important differences between array_merge_recursive() and array_replace_recursive() functions in PHP. \u00a0These are often overlooked when testing new developments with simpler data structures. \u00a0Troubleshooting for it later is not too obvious.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/11395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=11395"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/11395\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=11395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=11395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=11395"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=11395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}