Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File not found errors when using plugin #24

Open
reibuehl opened this issue Mar 25, 2015 · 6 comments
Open

File not found errors when using plugin #24

reibuehl opened this issue Mar 25, 2015 · 6 comments

Comments

@reibuehl
Copy link

Hi,

after upgrading roundcube to version 1.0.5, I get the following error when activating google_addressbook:

[25-Mar-2015 19:08:06 Europe/Berlin] PHP Warning: require_once(/var/lib/roundcube/plugins/google_addressbook/../../vendor/autoload.php): failed to open stream: Datei oder Verzeichnis nicht gefunden in /var/lib/roundcube/plugins/google_addressbook/google_func.php on line 10
[25-Mar-2015 19:08:06 Europe/Berlin] PHP Fatal error: require_once(): Failed opening required '/var/lib/roundcube/plugins/google_addressbook/../../vendor/autoload.php' (include_path='/var/lib/roundcube/program/lib:.:/usr/share/php:/usr/share/pear:/usr/share/roundcube/program/lib') in /var/lib/roundcube/plugins/google_addressbook/google_func.php on line 10

I have installed the latest version of google _addressbook via composer.

@stwa
Copy link
Owner

stwa commented May 18, 2015

So, is there a /var/lib/roundcube/vendor/autoload.php?
I don't know your roundcube installation in detail, but if you take a look inside google_func.php you can see that the plugin tries to get
require_once(dirname(FILE) . '/../../vendor/autoload.php');
If that is not the path of your autoloader please change it to the correct destination.
In case you can fix this please let me know your correct path and the way you have installed roundcube on your server (looks like you have your plugins in /var/lib and roundcube in /var/www?)

@reibuehl
Copy link
Author

I used Debian packages for roundcube. My autoload.php seems to be in /usr/share/roundcube/vendor/autoload.php.
I checked my installation again and it seems that for these packages, the google_sync plugin directory should be in /usr/share/roundcube/plugins, but there should be a symbolic link to that directory from /var/lib/roundcube/plugins to it. After moving the plugins directory and creating the link instead of it in the original destination, everything seems to work now.

@lbdroid
Copy link

lbdroid commented May 27, 2015

What is the source of autoload.php?

... it is NOT part of roundcube, and is not included with EL6 or EL7 roundcube packages.

@lbdroid
Copy link

lbdroid commented May 27, 2015

Ah, nevermind... that is kind of hilarious. autoload.php, of course, is a part of Google API Client Library for PHP. How exactly would anyone end up having that mixed into their rcmail install?

@stwa
Copy link
Owner

stwa commented May 27, 2015

Actually, autoload.php is generated by Composer and used by my plugin to autoload the plugins dependencies (Google API Client Library, also installed by Composer).
You have to write your own ClassLoader when installing manually or you have to replace the call to the autoload.php with the actual classes needed from Google API Client Library.
Well, if you want a Google Addressbook in Roundcube you want to have the Google API Client Library, too.
Any suggestions on how to simplify the manual installation?

@lbdroid
Copy link

lbdroid commented May 27, 2015

Probably the easiest thing to do, and all that is really needed for simplifying manual installs is just to document it in the readme file.

Manual installs: change line #X in google_func.php to refer to the installed path of Google API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants