Please help, having trouble setting up development environment with MAMP using Mac OS X |
[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: / 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 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 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.
[eluser]philm[/eluser]
I have a simlar setup to that working ok, however I have CI setup in the default MAMP location, eg. User -> Application -> MAMP -> htdocs -> codeignitor. Maybe try it without the Virtualhost stuff?
[eluser]Phil Sturgeon[/eluser]
Well I presume Zend/Load.php isnt in Controllers? Either way give it a full path to use. Combine APPPATH or BASEDIR and give it a proper location to chew on, then see if that works.
[eluser]shibuya[/eluser]
[quote author="philm" date="1199990938"]I have a simlar setup to that working ok, however I have CI setup in the default MAMP location, eg. User -> Application -> MAMP -> htdocs -> codeignitor. Maybe try it without the Virtualhost stuff?[/quote] Hi. I use Sites to prevent any of my files being overwritten in case I have to upgrade MAMP in the future. However, I may try installing it directly inside MAMP to see if that'll work.
[eluser]shibuya[/eluser]
[quote author="thepyromaniac" date="1199991812"]Well I presume Zend/Load.php isnt in Controllers? Either way give it a full path to use. Combine APPPATH or BASEDIR and give it a proper location to chew on, then see if that works.[/quote] I placed it inside the include folder in the directory. The Zend library is in there.
[eluser]shibuya[/eluser]
What would be MAMP equivalent to /var/www/phpweb20/htdocs in Apache Linux server
[eluser]shibuya[/eluser]
I've tried both method and it still doesn't recognize it. Anybody else reviewd the book Web 2.0 Applications with PHP by Apress? I think the installation chapter is written too vague but I want to know if others agree.
|
Welcome Guest, Not a member yet? Register Sign In |