{"id":1160,"date":"2026-06-17T07:03:22","date_gmt":"2026-06-17T07:03:22","guid":{"rendered":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/"},"modified":"2026-07-25T01:18:26","modified_gmt":"2026-07-24T23:18:26","password":"","slug":"cum-se-face-conectarea-la-postgresql-din-php","status":"publish","type":"docs","link":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/","title":{"rendered":"Cum se face conectarea la PostgreSQL din PHP?"},"content":{"rendered":"<p>Pentru a te conecta la o baz\u0103 de date PostgreSQL din PHP, folose\u0219te func\u021bia <code>pg_connect()<\/code>. Pentru detalii, consult\u0103 manualul PHP. (PostgreSQL este disponibil exclusiv pe serverele virtuale \u0219i dedicate cu cPanel.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pentru a te conecta la o baz\u0103 de date PostgreSQL din PHP, folose\u0219te func\u021bia pg_connect(). Pentru detalii, consult\u0103 manualul PHP. (PostgreSQL este disponibil exclusiv pe serverele virtuale \u0219i dedicate cu cPanel.)<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"whmcs_kb_id":589,"footnotes":""},"doc_category":[115],"doc_tag":[231,247,230,270],"class_list":["post-1160","docs","type-docs","status-publish","hentry","doc_category-postgresql","doc_tag-baza-de-date","doc_tag-php","doc_tag-postgresql","doc_tag-vps"],"year_month":"2026-11","word_count":34,"total_views":"23","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Adrian Firican","author_nicename":"techeditor1","author_url":"https:\/\/www.hostx.ro\/kb\/author\/techeditor1\/"},"doc_category_info":[{"term_name":"PostgreSQL","term_url":"https:\/\/www.hostx.ro\/kb\/docs-category\/postgresql\/"}],"doc_tag_info":[{"term_name":"baz\u0103 de date","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/baza-de-date\/"},{"term_name":"PHP","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/php\/"},{"term_name":"PostgreSQL","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/postgresql\/"},{"term_name":"VPS","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/vps\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX<\/title>\n<meta name=\"description\" content=\"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/\" \/>\n<meta property=\"og:locale\" content=\"ro_RO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX\" \/>\n<meta property=\"og:description\" content=\"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Centrul de suport HostX\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-24T23:18:26+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-face-conectarea-la-postgresql-din-php\\\/\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-face-conectarea-la-postgresql-din-php\\\/\",\"name\":\"Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-17T07:03:22+00:00\",\"dateModified\":\"2026-07-24T23:18:26+00:00\",\"description\":\"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-face-conectarea-la-postgresql-din-php\\\/#breadcrumb\"},\"inLanguage\":\"ro-RO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-face-conectarea-la-postgresql-din-php\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/cum-se-face-conectarea-la-postgresql-din-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prima pagin\u0103\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfoCentru\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cum se face conectarea la PostgreSQL din PHP?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\",\"name\":\"Centrul de suport HostX\",\"description\":\"tutoriale gazduire web, domenii web \u0219i servere\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ro-RO\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX","description":"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/","og_locale":"ro_RO","og_type":"article","og_title":"Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX","og_description":"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.","og_url":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/","og_site_name":"Centrul de suport HostX","article_modified_time":"2026-07-24T23:18:26+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/","url":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/","name":"Conectare PostgreSQL din PHP - Ghid - Centrul de suport HostX","isPartOf":{"@id":"https:\/\/www.hostx.ro\/kb\/#website"},"datePublished":"2026-06-17T07:03:22+00:00","dateModified":"2026-07-24T23:18:26+00:00","description":"Conecteaz\u0103-te la PostgreSQL din PHP folosind pg_connect(). Ghid pentru serverele virtuale \u0219i dedicate cu cPanel.","breadcrumb":{"@id":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/#breadcrumb"},"inLanguage":"ro-RO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hostx.ro\/kb\/cum-se-face-conectarea-la-postgresql-din-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Prima pagin\u0103","item":"https:\/\/www.hostx.ro\/kb\/"},{"@type":"ListItem","position":2,"name":"InfoCentru","item":"https:\/\/www.hostx.ro\/kb\/docs\/"},{"@type":"ListItem","position":3,"name":"Cum se face conectarea la PostgreSQL din PHP?"}]},{"@type":"WebSite","@id":"https:\/\/www.hostx.ro\/kb\/#website","url":"https:\/\/www.hostx.ro\/kb\/","name":"Centrul de suport HostX","description":"tutoriale gazduire web, domenii web \u0219i servere","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostx.ro\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ro-RO"}]}},"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/comments?post=1160"}],"version-history":[{"count":2,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1160\/revisions"}],"predecessor-version":[{"id":4588,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/1160\/revisions\/4588"}],"wp:attachment":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/media?parent=1160"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_category?post=1160"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_tag?post=1160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}