milispan.blogg.se

Mamp directory
Mamp directory






  1. #MAMP DIRECTORY MAC OSX#
  2. #MAMP DIRECTORY FULL#
  3. #MAMP DIRECTORY CODE#
  4. #MAMP DIRECTORY DOWNLOAD#

We’ll achieve this in modifying the file /application/configs/application.ini and add the following line at the bottom of the section : In order to have a correct XHTML Doctype declaration, we have to initialize the view object because declaring a doctype will call a view. The file /application/configs/application.ini has also been changed to point the layout directory. Notice the /application/layout/ directory structure : Users/my_name/Sites/ZF/bin/zf.sh enable layout Then type the following command to enable layout : Just open a terminal window and type the path to your ZF project : We’ll activate layout in ZF in order to be able to add the missing tags to all our pages.

#MAMP DIRECTORY CODE#

Have a look at the source code : the, and tags are missing. Simply restart MAMP servers and type in your favourite browser : Open the file /Applications/MAMP/conf/apache/nf with TextEdit.app and add the following lines at the bottom of the file :ĭocumentRoot "/Users/my_name/Sites/my_zend/public"

mamp directory

Use the keyboard arrows to get to the bottom line of the file and type You’ll be prompted to type your Mac’s Super User password. Those files are important files for which you should save a copy thanks to the following command in Terminal :Ĭp /private/etc/hosts /private/etc/hosts.bakĬp /Applications/MAMP/conf/apache/nf /Applications/MAMP/conf/apache/ In order to achieve this, you’ll have to modify 2 files /private/etc/hosts and /Applications/MAMP/conf/apache/nf. It is possible to reach the site through the url I personnally use as a virtualhost in order not to mix local websites with internet websites. (8888 being the default http port in MAMP) Indeed, in the default configuration, reaching our new project can be done through the use of the following url : The use of virtual hosts can be very useful. Therefore, we will create a Virtual Host. The only directory that should be reachable from an internet client is the public directory. Controllers : will receive the client’s request, treat it, make calls to models and output data in views.Views : will contain files with Html, Css.Models : will contain files with queries to the database.If you’re not new to frameworks like Codeigniter, you know what it means : The application directory contains files structured in the MVC pattern. The ZF shell script will be executed and will generate the directory /Users/my_name/Sites/my_zend/ with the following directory tree : Users/my_name/Sites/ZF/bin/zf.sh create project my_zend Then use the following command to place yourself in MAMP’s Document Root : Open a Terminal window found in Applications/Utilitaires/Terminal. Include_path = “.:/Applications/MAMP/bin/php5.3/lib/php:/Users/olivier/Sites/ZF/library”ĭon’t forget to restart MAMP once your include_path has been modifiedĬreate a ZF project : the Terminal magical way include_path = “.:/Applications/MAMP/bin/php5.3/lib/php” This line has been commented (use of “ ” in front of the line) and replaced by the following:

mamp directory mamp directory

So open your php.ini file (/Applications/MAMP/conf/PHPX.X/php.ini or browse the /Applications/MAMP/ directory to find it (PHPX.X stands for your current PHP version)) and change your include_path : You’ll have to change your php.ini file to declare the path to ZF’s library, which will be required by the applications you’ll create. Unzip it and copy the uncompressed ZF directory to your local web server : /Users/my_name/Sites/ZF/ in my case.

#MAMP DIRECTORY FULL#

I chose the Zend Framework 1.11.11 Full package for download.

#MAMP DIRECTORY DOWNLOAD#

That’s the directory in which I’ll set up ZF.įirst download ZF from or follow the “Download Now” link from the homepage.

mamp directory

So all my PHP projects are stored in /Users/my_name/Sites/. I’ve changed MAMP’s document root (in /Applications/MAMP/htdocs by default) to :

#MAMP DIRECTORY MAC OSX#

Zend download (ZF) and local installation on MAMP MAc OSX 10.6.8 After spending much time in OOP PHP (Object Oriented PHP) and choosing Codeigniter as my first PHP framework, I decided to start working with Zend Framwork which is said to be less lightweight but seems to be a well-documented and universal reference.








Mamp directory