MAMP: host setup questions

I'm just setting up a test environment, a few questions.

  • I am using MAMP, should my document root be in the htdocs folder in MAMP?
  • MAMP currently uses a php.ini file located in: Applications / MAMP / conf / php5 / php.ini, how do I use it to use php.ini in my / var / www / projectname / folder?
  • I am getting the following error, simply because I have no controller settings?

    Fatal error: Throw "Zend_Controller_Dispatcher_Exception" with "Invalid controller specified (error)" in / Users / kieransenior / Development / reformsoft _dietron / trunk / var / www / dietron / include / Zend / Controller / Dispatcher / Standard.php: 241 Stack trace: # 0 / Users / kieransenior / Development / reformsoft_dietron / trunk / var / www / dietron / include / Zend / Controller / Front.php (934): Zend_Controller_Dispatcher_Standard-> dispatch ((Zend_Controller_Request_Http) object, (Zend_Rttp_ponseController) object ) # 1 / Users / kieransenior / Development / reformsoft_dietron / trunk / var / www / dietron / htdocs / index.php (7): Zend_Controller_Front-> dispatch () # 2 {main} inrown in / Users / kieransenior / Development / reformsoft_dietron /trunk/var/www/dietron/include/Zend/Controller/Dispatcher/Standard.php on line 241

Any smart noggin willing to give a hand?

EDIT:

This is my httpd.conf which is located in my var / www / proj folder

<VirtualHost *:*>
    ServerName localhost
    DocumentRoot /Users/kieransenior/Development/reformsoft_dietron/trunk/var/www/dietron/htdocs

    <Directory /Users/kieransenior/Development/reformsoft_dietron/trunk/var/www/dietron/htdocs>
        AllowOverride All
        Options All
    </Directory>

    php_value include_path .:/Users/kieransenior/Development/reformsoft_dietron/trunk/var/www/dietron/include:/usr/local/lib/pear
    php_value magic_quotes_gpc off
    php_value register_globals off
</VirtualHost>

      

It doesn't work, so I have the following in my php.ini file:

include_path = ".:/Applications/MAMP/bin/php5/lib/php:/Users/kieransenior/Development/reformsoft_dietron/trunk/var/www/dietron/include"

      

But I don't want to do that, I want to be able to use httpd.conf. Are these just two methods of achieving the same thing?

+1


a source to share


2 answers


This error comes from an error loading bootstrap (line index.php 7) while trying to submit a request, and also you don't have ErrorController installed.

Create a controller next to your IndexController called ErrorController in ErrorController.php file



The ZF reference manual contains an ErrorController section (scroll a bit for the code)

This should at least allow you to use the ErrorController to display the root cause of the problem!

+1


a source


  • I honestly don't remember because I am using MAMP PRO. In MAMP PRO (and MAMP as far as I remember) you will be able to change your document root. In MAMP PRO (only) you can create multiple virtual hosts.

  • Instead of specifying MAMP in another file, edit MAMP one, because MAMP does some changes in the file to give you more flexibility. Try looking at File> Modify Template> PHP5 php.ini

  • You have not created any controllers in your Zend Framework installation. Because there is no exception for the catch generated by pr. by default, you are presented with the "Fatal error: uncaught exception" error.



Hoping that my answer will be helpful.

0


a source







All Articles