Error 'Google_Service_Drive_ChildReference' not foundHow do I get PHP errors to display?How to fix “Headers already sent” error in PHPReference - What does this error mean in PHP?Can't Upload File to Google Cloud Storage with PHP Client Libraryupload image file to google cloud storageTrying to migrate SQL commands from plain PHP using Yii2Google cloud storage: How can I reset edge cache?Googledrive API Upload file via PHP return Erroryii2 Webhook post emptyGoogle Cloud Platform: Unable to upload a new file version in Storage via API

Is a stroke of luck acceptable after a series of unfavorable events?

Pole-zeros of a real-valued causal FIR system

Term for the "extreme-extension" version of a straw man fallacy?

How do I rename a Linux host without needing to reboot for the rename to take effect?

How can I quit an app using Terminal?

What happens if you roll doubles 3 times then land on "Go to jail?"

Why does indent disappear in lists?

Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?

How to Reset Passwords on Multiple Websites Easily?

Arithmetic mean geometric mean inequality unclear

Is exact Kanji stroke length important?

How does buying out courses with grant money work?

Would a high gravity rocky planet be guaranteed to have an atmosphere?

Why are there no referendums in the US?

Large drywall patch supports

Sequence of Tenses: Translating the subjunctive

Why escape if the_content isnt?

How to be diplomatic in refusing to write code that breaches the privacy of our users

What can we do to stop prior company from asking us questions?

Energy of the particles in the particle accelerator

How do I extract a value from a time formatted value in excel?

Can the discrete variable be a negative number?

What is the opposite of 'gravitas'?

Increase performance creating Mandelbrot set in python



Error 'Google_Service_Drive_ChildReference' not found


How do I get PHP errors to display?How to fix “Headers already sent” error in PHPReference - What does this error mean in PHP?Can't Upload File to Google Cloud Storage with PHP Client Libraryupload image file to google cloud storageTrying to migrate SQL commands from plain PHP using Yii2Google cloud storage: How can I reset edge cache?Googledrive API Upload file via PHP return Erroryii2 Webhook post emptyGoogle Cloud Platform: Unable to upload a new file version in Storage via API













0















I am trying to use Google Drive and Google Cloud Storage, but I got the error:




Class 'Google_Service_Drive_ChildReference' not found'




Here's my code



$ref = new Google_Service_Drive_ChildReference();
$ref->setId($createdFile->getId());
$drive->children->insert($view->drive_folder, $ref);


Anyone have any idea of how to fix this problem? I tried all i could but doesn't work. Also note i am using Yii2 Framework with PHP 7.3.0



This is what i have in my composer.json



"google/apiclient": "^2.2"









share|improve this question






















  • which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

    – Muhammad Omer Aslam
    Mar 22 at 0:41











  • @MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

    – Gabriel
    Mar 22 at 4:37















0















I am trying to use Google Drive and Google Cloud Storage, but I got the error:




Class 'Google_Service_Drive_ChildReference' not found'




Here's my code



$ref = new Google_Service_Drive_ChildReference();
$ref->setId($createdFile->getId());
$drive->children->insert($view->drive_folder, $ref);


Anyone have any idea of how to fix this problem? I tried all i could but doesn't work. Also note i am using Yii2 Framework with PHP 7.3.0



This is what i have in my composer.json



"google/apiclient": "^2.2"









share|improve this question






















  • which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

    – Muhammad Omer Aslam
    Mar 22 at 0:41











  • @MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

    – Gabriel
    Mar 22 at 4:37













0












0








0








I am trying to use Google Drive and Google Cloud Storage, but I got the error:




Class 'Google_Service_Drive_ChildReference' not found'




Here's my code



$ref = new Google_Service_Drive_ChildReference();
$ref->setId($createdFile->getId());
$drive->children->insert($view->drive_folder, $ref);


Anyone have any idea of how to fix this problem? I tried all i could but doesn't work. Also note i am using Yii2 Framework with PHP 7.3.0



This is what i have in my composer.json



"google/apiclient": "^2.2"









share|improve this question














I am trying to use Google Drive and Google Cloud Storage, but I got the error:




Class 'Google_Service_Drive_ChildReference' not found'




Here's my code



$ref = new Google_Service_Drive_ChildReference();
$ref->setId($createdFile->getId());
$drive->children->insert($view->drive_folder, $ref);


Anyone have any idea of how to fix this problem? I tried all i could but doesn't work. Also note i am using Yii2 Framework with PHP 7.3.0



This is what i have in my composer.json



"google/apiclient": "^2.2"






php google-api yii2 google-drive-sdk google-cloud-storage






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 21 at 15:55









GabrielGabriel

552215




552215












  • which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

    – Muhammad Omer Aslam
    Mar 22 at 0:41











  • @MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

    – Gabriel
    Mar 22 at 4:37

















  • which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

    – Muhammad Omer Aslam
    Mar 22 at 0:41











  • @MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

    – Gabriel
    Mar 22 at 4:37
















which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

– Muhammad Omer Aslam
Mar 22 at 0:41





which service APi are you referencing to? google drive does not have any namespace with that name that is why you are getting that error where did you get that code from?

– Muhammad Omer Aslam
Mar 22 at 0:41













@MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

– Gabriel
Mar 22 at 4:37





@MuhammadOmerAslam developers.google.com/drive/api/v2/reference/files/insert

– Gabriel
Mar 22 at 4:37












1 Answer
1






active

oldest

votes


















2














You need to look here which tells you that this class was changed to Google_Service_Drive_DriveFile since 1.0.0 version so you can change the above code to



$file = new Google_Service_Drive_DriveFile();
$result = $service->files->insert($file, array(
'data' => file_get_contents(TESTFILE),
'mimeType' => 'application/octet-stream',
'uploadType' => 'media'
));





share|improve this answer























  • Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

    – Gabriel
    Mar 25 at 5:30











  • @Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

    – Muhammad Omer Aslam
    2 days ago










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284450%2ferror-google-service-drive-childreference-not-found%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You need to look here which tells you that this class was changed to Google_Service_Drive_DriveFile since 1.0.0 version so you can change the above code to



$file = new Google_Service_Drive_DriveFile();
$result = $service->files->insert($file, array(
'data' => file_get_contents(TESTFILE),
'mimeType' => 'application/octet-stream',
'uploadType' => 'media'
));





share|improve this answer























  • Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

    – Gabriel
    Mar 25 at 5:30











  • @Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

    – Muhammad Omer Aslam
    2 days ago















2














You need to look here which tells you that this class was changed to Google_Service_Drive_DriveFile since 1.0.0 version so you can change the above code to



$file = new Google_Service_Drive_DriveFile();
$result = $service->files->insert($file, array(
'data' => file_get_contents(TESTFILE),
'mimeType' => 'application/octet-stream',
'uploadType' => 'media'
));





share|improve this answer























  • Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

    – Gabriel
    Mar 25 at 5:30











  • @Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

    – Muhammad Omer Aslam
    2 days ago













2












2








2







You need to look here which tells you that this class was changed to Google_Service_Drive_DriveFile since 1.0.0 version so you can change the above code to



$file = new Google_Service_Drive_DriveFile();
$result = $service->files->insert($file, array(
'data' => file_get_contents(TESTFILE),
'mimeType' => 'application/octet-stream',
'uploadType' => 'media'
));





share|improve this answer













You need to look here which tells you that this class was changed to Google_Service_Drive_DriveFile since 1.0.0 version so you can change the above code to



$file = new Google_Service_Drive_DriveFile();
$result = $service->files->insert($file, array(
'data' => file_get_contents(TESTFILE),
'mimeType' => 'application/octet-stream',
'uploadType' => 'media'
));






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 19:52









Muhammad Omer AslamMuhammad Omer Aslam

13.5k72548




13.5k72548












  • Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

    – Gabriel
    Mar 25 at 5:30











  • @Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

    – Muhammad Omer Aslam
    2 days ago

















  • Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

    – Gabriel
    Mar 25 at 5:30











  • @Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

    – Muhammad Omer Aslam
    2 days ago
















Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

– Gabriel
Mar 25 at 5:30





Unfortunately, it is not work, I have already tried, this is for v2, v3 has different flow :(

– Gabriel
Mar 25 at 5:30













@Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

– Muhammad Omer Aslam
2 days ago





@Gabriel , well that's odd how have you modified the code, can you share in the question by editing and what error are you getting, you need to init the $service in the above code before you use it

– Muhammad Omer Aslam
2 days ago



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55284450%2ferror-google-service-drive-childreference-not-found%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript