Tuesday, March 15, 2016

Re: [google-cloud-sql-discuss] Trying to Connect to database in PHP using PDO and Cloud SQL Proxy

But you're not running the apache server under a docker container, or anything like that, right? --> Correct

When I do php index.php on the command line it WORKS but not when I call it from apache/php, I get : Connection failed: SQLSTATE[HY000] [2002] No such file or directory

On Tuesday, March 15, 2016 at 3:59:27 PM UTC-4, Vadim Berezniker wrote:
But you're not running the apache server under a docker container, or anything like that, right?
I installed just the basic packages: php-cli, php-mysql, php-pdo, fuse

Please watch https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/4 for future updates about example service configs.


On Tue, Mar 15, 2016 at 12:53 PM <wob...@yblew.com> wrote:
Thank you both.


Kevin : The example was great! 


Vadim:

hmm that's odd...

I'm testing this under apache/php/pdo, not on google cloud

did you install any packages on your server?

Also When can I expect the service script?

On Tuesday, March 15, 2016 at 3:49:53 PM UTC-4, Vadim Berezniker wrote:
It works for me on a clean CentOS 7.2 install. 
How are you running your test script? Command line? Under a server? 
Is your PHP server running directly in the VM or is it running in a container?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e3c65a6c-3cd6-4789-bc8a-fbc30316624c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/f070863c-5035-4be6-b07d-ce725e925c74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment