{"id":2127,"date":"2016-08-24T16:32:28","date_gmt":"2016-08-24T21:32:28","guid":{"rendered":"http:\/\/www.threshold-zero.com\/cblog\/?p=2127"},"modified":"2016-08-24T16:34:14","modified_gmt":"2016-08-24T21:34:14","slug":"mysql_connect-breaking-with-an-upgrade-to-php7","status":"publish","type":"post","link":"https:\/\/www.threshold-zero.com\/cblog\/2016\/08\/mysql_connect-breaking-with-an-upgrade-to-php7\/","title":{"rendered":"mysql_connect() breaking with an upgrade to PHP7?"},"content":{"rendered":"<p><em>mysql_connect()<\/em> has been finally removed from PHP7 (it was deprecated for some time), and now you have to use <em>mysqli_connect()<\/em>;\u00c2\u00a0\u00c2\u00a0 The same goes for any other <em>mysql_ <\/em>commmand.\u00c2\u00a0 (I simply did a find\/replace for &#8220;mysql_&#8221; and changed it to &#8220;mysqli_&#8221; in my php code.<\/p>\n<p>Also, if you&#8217;re running your own server, you probably need to install the &#8220;php-mysql&#8221; after upgrading to PHP7 &#8212; it doesn&#8217;t seem to be installed along by default anymore.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>mysql_connect() has been finally removed from PHP7 (it was deprecated for some time), and now you have to use mysqli_connect();\u00c2\u00a0\u00c2\u00a0 The same goes for any other mysql_ commmand.\u00c2\u00a0 (I simply did a find\/replace for &#8220;mysql_&#8221; and changed it to &#8220;mysqli_&#8221; in my php code. Also, if you&#8217;re running your own server, you probably need to [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"categories":[58,11,18,15,31],"tags":[],"class_list":["post-2127","post","type-post","status-publish","format-standard","hentry","category-internet","category-linux","category-programming","category-science-and-technology","category-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2ZUZG-yj","_links":{"self":[{"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/posts\/2127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/comments?post=2127"}],"version-history":[{"count":1,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/posts\/2127\/revisions"}],"predecessor-version":[{"id":2128,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/posts\/2127\/revisions\/2128"}],"wp:attachment":[{"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/media?parent=2127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/categories?post=2127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.threshold-zero.com\/cblog\/wp-json\/wp\/v2\/tags?post=2127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}