Category : google-cloud-platform

I am using a compute instance VM of Google Cloud, have installed Debian 10 and PHP 7.3. Then tried to run this: php -r "print_r(gethostbynamel(‘2.0.0.127.zen.spamhaus.org.’));" Surprisingly it returns an empty string. However, on any other non-Google Cloud VM it works perfectly: Array ( [0] => 127.0.0.4 [1] => 127.0.0.10 [2] => 127.0.0.2 ) Even stranger, ..

Read more

I got some problem while managing migration from PHP5 to PHP7. Actually, what I was doing with php5, to get an URL where upload a file, was something like this: $options = [ ‘gs_bucket_name’ => ‘mybucket.appspot.com’ ]; $myvar = $_GET[‘myvar’]; $upload_url = CloudStorageTools::createUploadUrl($myvar, $options); return $upload_url; I’ve uploaded the library and now I’m trying to ..

Read more

I am having some troubles understanding and getting this to work. So basically I have created an API Gateway that receives flow from the outside world, this one created with Lumen (PHP) and inside a kubernetes cluster, and I want to access another micro service that is inside the same kubernetes cluster, also a Lumen ..

Read more

I am connecting to my project files through FileZilla (hosted in Google Clouds). It was working fine till yesterday. Starting yesterday I am getting issues: When I restart the compute engine FileZilla is working for fine few seconds. Then it reverts back to permission issue or showing Failed while saving files. I checked with permissions ..

Read more

I am following this document https://cloud.google.com/vision/automl/docs/predict-batch and here is my curl command. authorization is fine. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $post = array(‘file’=>’@’.realpath(‘request.json’)); curl_setopt($ch, CURLOPT_POSTFIELDS,$post); $headers = array(); $headers[] = ‘Authorization:Bearer ‘.$accessToken; $headers[] = ‘Content-Type: application/json; Charset=utf-8’; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); if (curl_errno($ch)) { echo ‘Error:’ . curl_error($ch); } ..

Read more