Skip to content

Commit 3133564

Browse files
authored
chore: fix region tag mismatch (GoogleCloudPlatform#1203)
1 parent a53ec78 commit 3133564

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

cloud_sql/postgres/pdo/src/app.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,18 @@ function init_tcp_database_connection(array $conn_config) : PDO
6262
$host = getenv('DB_HOST');
6363

6464
try {
65-
// # [START cloud_sql_postgres_pdo_create_tcp]
66-
// // $username = 'your_db_user';
67-
// // $password = 'yoursupersecretpassword';
68-
// // $db_name = 'your_db_name';
69-
// // $host = "127.0.0.1";
65+
# [START cloud_sql_postgres_pdo_create_tcp]
66+
// $username = 'your_db_user';
67+
// $password = 'yoursupersecretpassword';
68+
// $db_name = 'your_db_name';
69+
// $host = "127.0.0.1";
7070

7171
// Connect using TCP
7272
$dsn = sprintf('pgsql:dbname=%s;host=%s', $db_name, $host);
7373

7474
// Connect to the database
7575
$conn = new PDO($dsn, $username, $password, $conn_config);
76+
# [END cloud_sql_postgres_pdo_create_tcp]
7677
} catch (TypeError $e) {
7778
throw new RuntimeException(
7879
sprintf(
@@ -115,12 +116,12 @@ function init_unix_database_connection(array $conn_config)
115116
$socket_dir = getenv('DB_SOCKET_DIR') ?: '/cloudsql';
116117

117118
try {
118-
// # [START cloud_sql_postgres_pdo_create_socket]
119-
// // $username = 'your_db_user';
120-
// // $password = 'yoursupersecretpassword';
121-
// // $db_name = 'your_db_name';
122-
// // $cloud_sql_connection_name = getenv("CLOUD_SQL_CONNECTION_NAME");
123-
// // $socket_dir = getenv('DB_SOCKET_DIR') ?: '/cloudsql';
119+
# [START cloud_sql_postgres_pdo_create_socket]
120+
// $username = 'your_db_user';
121+
// $password = 'yoursupersecretpassword';
122+
// $db_name = 'your_db_name';
123+
// $cloud_sql_connection_name = getenv("CLOUD_SQL_CONNECTION_NAME");
124+
// $socket_dir = getenv('DB_SOCKET_DIR') ?: '/cloudsql';
124125

125126
// Connect using UNIX sockets
126127
$dsn = sprintf(

0 commit comments

Comments
 (0)