Friday, September 25, 2015

Re: [google-cloud-sql-discuss] my php script is working fine in GAE but not on the server

it is still showing the same error. 

error message :-  Could not get data: Unable to find the socket transport "unix" - did you forget to enable it when you configured PHP?
 
<?php
    echo 'Hello world!';

$conn = mysql_connect('/cloudsql/testingqweqwe:gh', 
  'root', // username
  ''      // password
  );
if ($conn)
{
echo "connection established";
}
$checkdb = mysql_select_db('test');
if ($conn)
{
echo "database connected";
}
$sql = "INSERT INTO test (name) VALUES (123)";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
  die('Could not get data: ' . mysql_error());
}
echo "successfully done ";
?>

--
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/6f0efa62-5434-42db-b3cd-ba269d521a38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment