Strange PHP error help me!

Hi people,
I am new in php I now basic things and i got some strange error for me , on my website , I will share the log of that error and maybe some expert here can help me out with this error ? Here is the error log file:

[04-Jul-2018 11:39:19 UTC] PHP Fatal error:  Uncaught Google\Cloud\Core\Exception\GoogleException: Given keyfile path C:\xampp\htdocs\translate\encoded-aspect-208816-95c7fbe125ac.json does not exist in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php:133
Stack trace:
#0 /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php(99): Google\Cloud\Translate\TranslateClient->getKeyFile(Array)
#1 /home/wbcgk10s3roa/public_html/vendor/google/cloud-translate/src/TranslateClient.php(129): Google\Cloud\Translate\TranslateClient->configureAuthentication(Array)
#2 /home/wbcgk10s3roa/public_html/index.php(87): Google\Cloud\Translate\TranslateClient->__construct(Array)
#3 {main}
  thrown in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php on line 133
[04-Jul-2018 11:39:50 UTC] PHP Fatal error:  Uncaught Google\Cloud\Core\Exception\GoogleException: Given keyfile path C:\xampp\htdocs\translate\encoded-aspect-208816-95c7fbe125ac.json does not exist in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php:133
Stack trace:
#0 /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php(99): Google\Cloud\Translate\TranslateClient->getKeyFile(Array)
#1 /home/wbcgk10s3roa/public_html/vendor/google/cloud-translate/src/TranslateClient.php(129): Google\Cloud\Translate\TranslateClient->configureAuthentication(Array)
#2 /home/wbcgk10s3roa/public_html/index.php(87): Google\Cloud\Translate\TranslateClient->__construct(Array)
#3 {main}
  thrown in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php on line 133
[04-Jul-2018 11:39:53 UTC] PHP Fatal error:  Uncaught Google\Cloud\Core\Exception\GoogleException: Given keyfile path C:\xampp\htdocs\translate\encoded-aspect-208816-95c7fbe125ac.json does not exist in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php:133
Stack trace:
#0 /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php(99): Google\Cloud\Translate\TranslateClient->getKeyFile(Array)
#1 /home/wbcgk10s3roa/public_html/vendor/google/cloud-translate/src/TranslateClient.php(129): Google\Cloud\Translate\TranslateClient->configureAuthentication(Array)
#2 /home/wbcgk10s3roa/public_html/index.php(87): Google\Cloud\Translate\TranslateClient->__construct(Array)
#3 {main}
  thrown in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php on line 133
[04-Jul-2018 11:41:18 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 9
[04-Jul-2018 11:41:18 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 9
[04-Jul-2018 11:41:18 UTC] PHP Fatal error:  Uncaught Google\Cloud\Core\Exception\GoogleException: Given keyfile path C:\xampp\htdocs\translate\encoded-aspect-208816-95c7fbe125ac.json does not exist in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php:133
Stack trace:
#0 /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php(99): Google\Cloud\Translate\TranslateClient->getKeyFile(Array)
#1 /home/wbcgk10s3roa/public_html/vendor/google/cloud-translate/src/TranslateClient.php(129): Google\Cloud\Translate\TranslateClient->configureAuthentication(Array)
#2 /home/wbcgk10s3roa/public_html/generate.php(75): Google\Cloud\Translate\TranslateClient->__construct(Array)
#3 {main}
  thrown in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php on line 133
[04-Jul-2018 11:42:09 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:42:09 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:42:09 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:42:09 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:42:10 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:42:10 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:43:43 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wbcgk10s3roa/public_html/generate.php:108) in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:45:46 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:47:33 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wbcgk10s3roa/public_html/generate.php:108) in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:48:26 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:48:26 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:48:26 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:48:26 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:48:27 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:48:27 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:50:01 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:51:48 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wbcgk10s3roa/public_html/generate.php:108) in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:52:05 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:54:18 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wbcgk10s3roa/public_html/generate.php:108) in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:56:14 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:58:06 UTC] PHP Notice:  Undefined variable: location in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:58:06 UTC] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/wbcgk10s3roa/public_html/generate.php:108) in /home/wbcgk10s3roa/public_html/generate.php on line 124
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 11:59:04 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 13:40:49 UTC] PHP Warning:  include(\vendor\mantas-done\subtitles\src\Subtitles.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 13:40:49 UTC] PHP Warning:  include(): Failed opening '\vendor\mantas-done\subtitles\src\Subtitles.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/generate.php on line 7
[04-Jul-2018 13:40:49 UTC] PHP Warning:  include(code\Helpers.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 13:40:49 UTC] PHP Warning:  include(): Failed opening 'code\Helpers.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/Subtitles.php on line 2
[04-Jul-2018 13:40:50 UTC] PHP Warning:  include(Converters\SrtConverter.php): failed to open stream: No such file or directory in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2
[04-Jul-2018 13:40:50 UTC] PHP Warning:  include(): Failed opening 'Converters\SrtConverter.php' for inclusion (include_path='.:/opt/alt/php71/usr/share/pear') in /home/wbcgk10s3roa/public_html/vendor/mantas-done/subtitles/src/code/Helpers.php on line 2

The error messages aren’t “strange” at all and they are pretty much in plain English. Which is what I love about PHP’s error messages. The message is telling you that those files don’t exist which is represented from the plain text English words saying “No such file or directory”. :grin: Plain text English is fun to read.

3 Likes

I am sorry my friend , to me it is a strange because all that files realy exist and I can see them :slight_smile: so why this error if the files exist ?

Thank you

Do you have a local version? What I am trying to get at is that I want you to take screenshots of those locations to make sure that they really are there. Just saying “they are there” doesn’t really make them there. I also don’t want you to be posting your live version for security reasons hence why I am asking for a local version of the screenshots.

Looking at this error message:

[04-Jul-2018 11:39:50 UTC] PHP Fatal error:  
Uncaught Google\Cloud\Core\Exception\GoogleException: Given keyfile 
path **C:\xampp\htdocs\translate\encoded-aspect-208816-95c7fbe125ac.json** 
does not exist in /home/wbcgk10s3roa/public_html/vendor/google/cloud-core/src/ClientTrait.php:133

Is that exactly how you’re specifying the keyfile name? Shouldn’t you be using a file name relative to the web server home, rather than an absolute path like this?

1 Like

Ah ok, so which file I need to change, to add real destination of that files or directories ?

Thank you

It looks like it is being given the path to the file under the “htdocs” folder, but is looking for it under the “public_html” folder. My best guess would be you need to put the file where it’s looking for it.

Well I asked my admin is he change the folders correctly and he sad that the directories have right destination but again in error log I get that error :frowning:

If the file is in that location, then it needs to not be given the wrong path.

I don’t know if or how it happened, but it might be that when developed on your localhost XAMPP that path got saved somewhere (database? config file?) and is now being used in an environment where that path is no longer correct. Can you find out where that path is coming from?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.