Deploying site problems
I'm working through the latest Powers' book adapting it to a site I'm developing and running into several problems deploying the site successfully. For now I'll start with the login function. When I try to log in I get the following messages (haven't turned errors off yet):
Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/p/e/t/petermcdonald/html/scripts/library.php on line 5
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/p/e/t/petermcdonald/html/scripts/library.php on line 5
The library.php file looks like this:
<?php
// Adjust the path to match the location of the library folder on your system
//$library = 'http:/www.conmolbry.com/ZendFramework/library';
//set_include_path(get_include_path() . PATH_SEPARATOR . $library);
require_once('Zend/Loader/Autoloader.php');
try {
Zend_Loader_Autoloader::getInstance();
$write = array('host' => 'wfrma.db.5915058.hostedresource.com',
'username' => 'wfrma',
'password' => 'xxxxxx',
'dbname' => 'wfrma');
$read = array('host' => 'wfrma.db.5915058.hostedresource.com',
'username' => 'wfrmaread',
'password' => 'xxxxxx',
'dbname' => 'wfrma');
$dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
$dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
} catch (Exception $e) {
echo $e->getMessage();
}
I'm not sure, but it may be connected to an improper include_path based on my improper interpretation of the instructions in Lesson 13, top of p. 469. I'm using the linux code procedure which I think is ok. What I don't quite understand is what that path though is supposed to look like in reality. The example there is dummy language, but this dummy can't figure out how to get it to point to the location it needs to in my site on the remote server. Should it be of this form: include_path = ".:/php/includes:/www.mysite.com/site root folder ? Need help with that.
Also I found the instructions unclear if the host (in this case GoDaddy) does indeed provide the Zend Framework, how to tap into that correctly rather than upload it to a library folder on my site at all. They gave me instructions to add this code to a php.ini file:
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so
,then put the php.ini into the site root. They didn't mention anything about adjusting the include_path in the php.ini too. That all doesn't seem to be working either and I'm a bit baffled now how to either successfully connect to an existing ZF on the GoDaddy remote server, or upload the ZF and make the correct connections using the instructions in lesson 13.
Sorry for this massive confusion and tackling a couple things in one thread. However, it's all related to this singular exercise in the book. I feel if I can overcome these couple hurdles I'll be well on my way. Please let me know what additional information I might add to help with understanding and a solution.
Thanks!
Peter
