but I'm a newbie to PHP and I want to be able to use the Zend library in my website to use the openID functionality but just can't get it to work.
I have the following structure -
$HOME/public_html/php.ini
$HOME/public_html/l.php
$HOME/public_html/zf/library/Zend/... Zend stuff
Where $HOME = /home1/mydomain (obviously replaced last bit)
default php.ini -
######################################################################
.....
include_path = ".:/usr/lib64/php:/usr/lib/php:/usr/share/pear"
.....
######################################################################
1.php -
######################################################################
<?php
$status = "";
if (isset($_POST['openid_action']) && $_POST['openid_action'] == "login" && !empty($_POST['openid_identifier'])) {
$consumer = new Zend_OpenId_Consumer();
if (!$consumer->login($_POST['openid_identifier'])) {
$status = "OpenID login failed.";
}
} else if (isset($_GET['openid_mode'])) {
if ($_GET['openid_mode'] == "id_res") {
$consumer = new Zend_OpenId_Consumer();
if ($consumer->verify($_GET, $id)) {
$status = "VALID " . htmlspecialchars($id);
} else {
$status = "INVALID " . htmlspecialchars($id);
}
} else if ($_GET['openid_mode'] == "cancel") {
$status = "CANCELLED";
}
}
?>
<html><body>
<?php
echo "$status<br>";
?>
<form method="post">
<fieldset>
<legend>OpenID Login</legend>
<input type="text" name="openid_identifier" value=""/>
<input type="submit" name="openid_action" value="login"/>
</fieldset>
</form>
</body></html>
<?php
phpinfo();
?>
######################################################################
I believe the problem is the include_path not being set correctly but tried all variations I can think of (listed below and verified using phpinfo() at bottom of script) but I always get the same error in the logs -
PHP Fatal error: Class 'Zend_OpenId_Consumer' not found in /home1/mydomain/public_html/l.php on line 4 ($consumer = new Zend_OpenId_Consumer();)
tried -
include_path = ".:/usr/lib64/php:/usr/lib/php:/usr/share/pear:zf/library/Zend"
include_path = ".:/usr/lib64/php:/usr/lib/php:/usr/share/pear:/public_html/zf/library/Zend"
include_path = ".:/usr/lib64/php:/usr/lib/php:/usr/share/pear:/home1/mydomain/public_html/zf/library/Zend"
Now I'm totally stumped, probably something really stupid as usual, but really can't see it?
If it makes any difference I'm using JustHost.com
thanks in advance


