Ik heb een webserver geinstalleerd met apache2 en php5. Nu wil ik zend framework gaan gebruiken maar mijn .htaccess bestanden werken op een of de andere manier niet.
Ben al 2 dagen bezig met het configureren van de server
Ik heb httpd.conf aangepast. Nu word mijn phpmyadmin wel onzichtbaar gemaakt in mn www root. dmv
<Directory /phpmyadmin>
Options FollowSymLinks
AllowOverride All
</Directory>
In mijn .htaccess staat "deny from all"
In mijn httpd.conf:
ServerRoot "/etc/apache2"
DocumentRoot "/var/www"
ServerName localhost
<Directory "/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /phpmyadmin>
Options FollowSymLinks
AllowOverride All
</Directory>
In Apache2 zit een gelinkt configfile die de admin-file overschrijft.
Werkt standaard NIET met Zend Framework!
Weer wat geleerd iig :)
I’ve just updated my personal system from Ubuntu 7.04 to Ubuntu 7.10 and must admit that I’m impressed with the progress it has made in 6 months. The most noticeable (and practical) change in my opinion is the font support (very important when you have been programming 10 hours straight). Just beautiful. Anyway, this post is not about Ubuntu but rather about setting up the Zend Framework on Ubuntu.
First of all, you have to install the appropriate packages with Synaptic Package Manager. Let’s start with installing PHP5 (the Zend Framework only works with PHP 5.13 or PHP 5.14 and above) and all its dependent libraries. The next package to install is the PHP5-MySQL library which includes both the ‘pdo_mysql’ and the ‘mysqli’ modules. In my case, I’m interested in the PDO-module because the topic map store (used in QueSucede.com) is implemented on top of the PHP Data Objects (PDO) extension.
Right, that was the easy part. The tricky part is the Apache configuration which is not difficult but you can’t skip these few essential steps otherwise the Zend Framework will just not work. So, what is the Apache stuff all about? Well, in two words: URL rewriting. Those two words are enough to strike fear into the heart of any intrepid developer ;-)
Okay, just kidding. In Ubuntu, it is relatively simple to enable Apache URL rewriting. First of all, open a terminal and change directory to ‘/etc/apache2′. Within this directory you’ll see the two directories that we are interested in, namely ‘mods-enabled’ and ’sites-enabled’. The mods-enabled directory contains a bunch of symbolic links to (Apache) configuration files/directives that Apache uses to load modules when it (re)starts. So all we have to do is create the symbolic link to the appropriate directive (in our case ‘rewrite.load’ ) by executing the following line in the terminal window (from within the mods-enabled directory):
ln -s ../mods-available/rewrite.load rewrite.load
Once that is done, we change to the previously-mentioned ’sites-enabled’ directory and load the ‘000-default’ file (a symbolic link to /etc/apache2/sites-available/default) into a text-editor and change the following: ‘AllowOverride None’ to ‘AllowOverride All’ in both the <Directory /> and <Directory /var/www> sections. Once that is done, save the file and open up the ‘Services Admin’ window and restart Apache (Web server). That’s it. URL rewriting should be enabled in Apache.
In my next post we’ll install the Zend Framework and set-up a skeleton application which will demonstrate the basics of the framework.