Welcome Guest, Not a member yet? Register   Sign In
Please help, having trouble setting up development environment with MAMP using Mac OS X
#1

[eluser]shibuya[/eluser]
Hi.

I'm reading up on developing a web application and the development setup are the following:


Mac OS X
MAMP 1.7.1 (Apache, MySQL, PHP5)

MAMP preferences uses default apache and mysql ports,

I have it set up in VirtualHost so that I can access it on my browser using http://phpweb20/ with my document root being /Users/username/Sites

The filesystem structure is:
Code:
/
|- /data
| |- /logs
| |- /uploaded-files
| |- /tmp
|- /htdocs
|- /include
| |- /Controllers
|- /templates

Just to test to see if everything is working, I created a Class Controller called NewsController.php inside the /phpweb20/inlclude/Controllers

After that, created a php file named NewsController.php and placed it inside the directory (folder) /phpweb20/include/Controllers
Code:
<?php
    require_once('Zend/Loader.php');
    Zend_Loader::registerAutoload();

    $controller = Zend_Controller_Front::getInstance();
    $controller->setControllerDirectory('../include/Controllers');
    $controller->dispatch();

?>

However, I keep getting this error message when accessing the Controller and Action following this URL http://phpweb20/news/display
Code:
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /Users/valuedcustomer/Sites/phpweb20/htdocs/index.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Users/valuedcustomer/Sites/phpweb20/htdocs/index.php on line 2

I'm not sure what I'm doing wrong. I'm sure I setup the web development server correctly. The book tells me that I should see the text "News article details" output inside my browser but I keep getting that error.

This book is the Practical Web 2.0 Application with PHP from Apress.

Please help me setup the testing environment correctly. Thank you so much.


Messages In This Thread
Please help, having trouble setting up development environment with MAMP using Mac OS X - by El Forum - 01-10-2008, 04:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB