Hi all,
I have Kirby 4.3.1 and installed OAuth Email plugin v3.0 to handle emails via Google. I installed plugin within site/plugins/kirby-OAuth2-email folder so the folder sitting there is kirby-oauth2-email-0.3.0. I obtained client-id, client-secret and refresh-token from google. My config.php snippet looks like this:
<?php
return [
'nerdcel.kirby-oauth2-email' => [
'callback-path' => 'email/oauth2',
'enabled' => true,
'email' => 'hello@myemail.com',
'service' => 'google',
'client-id' => 'XXX',
'client-secret' => 'XXX',
'refresh-token' => 'XXX',
]
];
I tested emails and they come via srv659.main-hosting.eu (my host) not Gmail. How do I debug?
Thanks,
Robert
An update:
- I upgraded Kirby to 4.7.0
- I moved âkirby-oauth2-email-0.3.0â folder to site/plugins and renamed in to âkirby-oauth2-emailâ â thatâs where I think it should be
- I got an error: Composer detected issues in your platform: Your Composer dependencies require a PHP version â>= 8.3.0â. You are running 8.2.17.
- I upgraded PHP version to 8.3
- Now I get 500 error and debug doesnât show anything
Anybody, any idea what to do next?
the folder name is irrelevant
A 500 error is a server error, thatâs why debug doesnât show anything.
How did you upgrade? Are you testing this locally in a development environment( if so, which one), or on a remote server?
Itâs a remote server â lsapi V8.1 CloudLinux 1.3
Uncaught Error: Failed opening required â/kirby/bootstrap.phpâ (include_path=â.:/opt/alt/php84/usr/share/pear:/opt/alt/php84/usr/share/php:/usr/share/pear:/usr/share/phpâ) in /index.php:3 Stack trace: #0 {main} thrown in /index.php on line 3
Does the file exist? Please also answer my other question
Could be that you need to set the correct include path in your php.ini, so that it included your document root, something like
include_path = ".:/home/whatever/public_html"
Hi Sonja,
Kirby works fine after upgrade to 4.7.0 and PHP 8.4 at the moment. The problem occurs when the plugin is installed. Iâm not entirely sure where the pluginâs unzipped folder named âkirby-oauth2-email-0.3.0â should go â wheather it should be in:
- site/plugins/kirby-oauth2-email â Kirby works fine but emails are sent via hostâs server
- site/plugins â the error 500 occurs
Hi Robert,
the first option should be right. The plugin needs to be inside a directory called site/plugins/kirby-oauth2-email. So, the plugins index.php file is at the top level of site/plugin/kirby-oauth2-email.
Can you add a simple line of code at line 11 in the plugin/components.php file? It should be something like this: dump(option(ânerdcel.kirby-oauth2-email.enabledâ)); die();. This will just print out whether the plugin is enabled or not. If nothing happens, the enabled option is not recognized and the kirby email component is used as fallback.
Also, I wanted to check if the debug mode of Kirby is turned on. You can do that by adding a line to the config.php file called (âdebugâ => true).