servidor mysqli_query mysqli_fetch_array mysqli_connect ejemplo consulta conexion conectar con como archivo php google-app-engine mysqli google-cloud-sql

mysqli_fetch_array - mysqli_query php ejemplo



No se puede usar mysqli en php flex env en el motor de la aplicaciĆ³n (1)

Agregue un archivo php.ini con lo siguiente:

mysqli.default_socket= ''/cloudsql/CONNECTION_NAME''

Asegúrese también de que la API sqladmin esté habilitada: https://console.cloud.google.com/apis/api/sqladmin.googleapis.com/overview

Recientemente cambié de un env estándar a un env flexible, para poder usar sockets en mi aplicación php. Sin embargo, ahora mi función mysqli no funciona cuando se implementa ...

Así es como se ve la llamada de función y error ...

$link = new mysqli( null, // host ''user'', // username null, // password ''db'', // database name null, ''/cloudsql/myapp:us-central1:sql-instance'' // instance name );

¿Me estoy perdiendo de algo? ¿Puedo usar mysqli en un flex env? Aquí están los registros de errores ...

2017-06-22 21:40:16 admin[20170622t152917] 172.17.0.1 - - [22/Jun/2017:21:40:16 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" 2017-06-22 21:40:17 admin[20170622t152917] "GET /" 499 2017-06-22 21:40:21 admin[20170622t152917] "POST /app/template_tabs.php" 499 2017-06-22 21:40:29 admin[20170622t151722] "GET /MyAdmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /db/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /myadmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /mysql/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /mysqladmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /p/m/a/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /php-my-admin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.2.6/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.5.1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.5.5-rc2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.5.6-rc1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.5.6-rc2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.0-alpha/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.0-alpha2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.0-rc3/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.0/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.1-pl1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.1-pl3/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.2-beta1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.3/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.6.4-pl4/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.7.0-pl1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.7.0-rc1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.8.0-beta1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.8.0.3/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2.8.0/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin-2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpMyAdmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpadmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpmanager/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpmyadmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpmyadmin1/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /phpmyadmin2/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /pma2005/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /sqlweb/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /web/phpMyAdmin/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /web/scripts/setup.php" 404 2017-06-22 21:40:29 admin[20170622t151722] "GET /websql/scripts/setup.php" 404 2017-06-22 21:41:11 admin[20170622t152917] [22-Jun-2017 21:41:11] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning: mysqli::__construct(): (HY000/2002): Connection timed out in /app/php/cons.php on line 25" 2017-06-22 21:41:11 admin[20170622t152917] [22-Jun-2017 21:41:11] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 4" 2017-06-22 21:41:11 admin[20170622t152917] [22-Jun-2017 21:41:11] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 7" 2017-06-22 21:41:11 admin[20170622t152917] [22-Jun-2017 21:41:11] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 26" 2017-06-22 21:41:11 admin[20170622t152917] [22-Jun-2017 21:41:11] WARNING: [pool app] child 36 said into stderr: "NOTICE: PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 59" 2017-06-22 21:41:12 admin[20170622t152917] [22-Jun-2017 21:41:12] WARNING: [pool app] child 37 said into stderr: "NOTICE: PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 4" 2017-06-22 21:41:12 admin[20170622t152917] [22-Jun-2017 21:41:12] WARNING: [pool app] child 37 said into stderr: "NOTICE: PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 7" 2017-06-22 21:41:12 admin[20170622t152917] [22-Jun-2017 21:41:12] WARNING: [pool app] child 37 said into stderr: "NOTICE: PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 26" 2017-06-22 21:41:12 admin[20170622t152917] [22-Jun-2017 21:41:12] WARNING: [pool app] child 37 said into stderr: "NOTICE: PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 59" 2017-06-22 21:41:12 admin[20170622t152917] PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 4 2017-06-22 21:41:12 admin[20170622t152917] PHP message: PHP Warning: mysqli_query(): Couldn''t fetch mysqli in /app/app/body.php on line 7 2017-06-22 21:41:12 admin[20170622t152917] PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 26 2017-06-22 21:41:12 admin[20170622t152917] 172.17.0.1 - - [22/Jun/2017:21:41:12 +0000] "GET / HTTP/1.1" 200 2404 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" 2017-06-22 21:41:12 admin[20170622t152917] PHP message: PHP Warning: Invalid argument supplied for foreach() in /app/app/body.php on line 59" while reading response header from upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "admin-dot-appdocs-com.appspot.com" 2017-06-22 21:41:17 admin[20170622t152917] "GET /" 200 2017-06-22 21:41:17 admin[20170622t152917] "GET /favicon.ico" 200