can’t activate Open-ID – fatal error
-
When activating Open-ID, it complains about a fatal error:
Fatal error: Call to a member function on a non-object in /www/htdocs/.../wp-content/plugins/openid/core.php on line 156
Line 156 reads like this:
$wpopenid_log->setMask(Log::UPTO($wpopenid_log_level));
Any idea how to fix it?
-
Interesting. I also get an error, but not the same as yours:
Parse error: syntax error, unexpected '=', expecting ')' in /home/[...]/wp-content/plugins/openid/Auth/Yadis/Yadis.php on line 278
Line 278 (and 279)
function discover($uri, &$fetcher = null, $extra_ns_map = null, $timeout = 20)
I tried the latest code from the SVN repo and it worked fine on a test instance of 2.3.2.
http://peterstephanie.com/blog2/?p=1#comments
svn checkout http://diso.googlecode.com/svn/wordpress/wp-openid/trunk/
In my case, upgrading PHP up to 5.x fixed my problem.
@pmotyka: Tried the SVN Version, which didn’t help – same error in same line.
Will have to decide between waiting for a new version or upgrading to PHP5…
You need PHP5 for the latest version of the Yadis stuff, which WP-OpenID now uses. Bite the bullet and get upgrading 😉
Upgraded to PHP5, but i still got a fatal error.
But then I found out, that i had to deactivate Falbum prior to activating WP-Openid, et voilà – it worked.
When i try to reactivate Falbum, i get another error:
Fatal error: Cannot redeclare class Log in /www/htdocs/xxx/wp-content/plugins/falbum/lib/Log.php on line 38
Looks like they don’t like each other…
Update:
Obviously there was an error concerning the Log-class. Both FAlbum and Open-ID tried to use the same class, what gave the error.
Fixed it by simply renaming the class to F-log in Falbum.
Upgrading to php5 also fixed my problem.
First, I didn’t saw anything at all, but “Plugin could not be activated because it triggered a fatal error” fade-message. Then I added some lines to wp-admin/plugins.php:
ini_set('display_errors','1'); ini_set('display_startup_errors','1'); error_reporting (E_ALL);
and little more stuff appeared:
Warning: Log::factory() [function.factory]: open_basedir restriction in effect. File(/Log/file.php) is not within the allowed path(s): (/var/www/vhosts/dir01.org/httpdocs:/tmp) in /var/www/vhosts/dir01.org/httpdocs/wp-content/plugins/openid/OpenIDLog.php on line 142
Warning: Log::factory(Log/file.php) [function.factory]: failed to open stream: Operation not permitted in /var/www/vhosts/dir01.org/httpdocs/wp-content/plugins/openid/OpenIDLog.php on line 142
Warning: Log::factory() [function.include]: Failed opening ‘Log/file.php’ for inclusion (include_path=’.:’) in /var/www/vhosts/dir01.org/httpdocs/wp-content/plugins/openid/OpenIDLog.php on line 142
Fatal error: Call to a member function setMask() on a non-object in /var/www/vhosts/dir01.org/httpdocs/wp-content/plugins/openid/core.php on line 156
line from phpinfo:
open_basedir /var/www/vhosts/dir01.org/httpdocs:/tmp no value
Problem could be fixed either by reconfiguring php or by editing plugin.
I changed
include_once $classfile;
on line 142 in OpenIDLog.php toset_include_path( dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); include_once $classfile; restore_include_path();
and
require_once 'store.php';
on line 53 in logic.php toset_include_path( dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); require_once 'store.php'; restore_include_path();
I will be happy, if this will be usefull for anybody )
Ooops, plugin activated, but doesn’t work, when I submit a comment, I have a blank page http://dir01.org/wp-comments-post.php and nothing more
I’ve made the same trick to require on line 76 in logic.php
Everything works fine for me, great plugin, thx.…And what if you don’t control the PHP version on the server? Some people still use shared hosting (me being one of them) and even though I whole-heartedly agree with everyone on the merits of PHP5: if they won’t upgrade, there’s not much I can do, short of finding me another hoster.
That might happen anyway, but in the meantime, is there any way to use OpenID?
HandySolo:
The problem in your case is that ampersand. Lose it. The line should be
function discover($uri, $fetcher = null,
In PHP, a variable
fetcher
is indicated with “$
fetcher
” and reference to that variable is indicated with “&
fetcher
“.fetcher
is a reference variable, and the programmer has confusedly the value of a reference variable with reference to the reference variable, and then notated this incorrectly.no, “&fetcher” is not valid in PHP. passing by reference is indeed “&$fetcher”. the problem is that setting a default value to a reference in the function signature like I’ve done is only supported in PHP5. It’s fixed in the latest version of the plugin (v2.1.7).
- The topic ‘can’t activate Open-ID – fatal error’ is closed to new replies.