My kung-f00 is better than yours!

How to successfully deploy a fully working php/symfony environment in Snow Leopard III: Apache+PHP5

Posted: March 21st, 2010 | Author: alej | Filed under: tutorials | Tags: , , | 3 Comments »

Ok, so now that we have the database, let’s work a bit in the fronted, with Apache and PHP5. Apache comes already installed in our machine, we just have to start it in the Sharing option of the Control Panel. Check “Web sharing” to start apache and uncheck it to shut it down.

That was easy, wasn’t it? Now we have to enable php in apache’s configuration file, as it comes disabled by default.

$ sudo vim /etc/apache2/httpd.conf
Now let’s navigate to the commented line where php5 is (it’s easy to go there by typing /php5) and uncomment the line (by removing the first # symbol).
Save and quit the file (by typing :wq) and restart apache by unchecking and checking again the checkbox in the sharing option of the control panel, as explained before.

Well, now we should have php5 working in our machine. Let’s check it by creating a simple php file and displaying it:

$ echo “<? phpinfo(); ?>” > ~/Sites/test.php

Now browse to http://localhost/~yourusername/test.php and see all the info php has about you. Do not forget to change yourusername in this example with your real username.

That wasn’t so hard! Now that you have apache+php working, you really should learn to configure them. Read the apache docs and the php docs.
See you around!


3 Comments on “How to successfully deploy a fully working php/symfony environment in Snow Leopard III: Apache+PHP5”

  1. 1 AJDINOVSKI said at 02:03 on March 22nd, 2010:

    [...] Read more from the original source: Lab216 » Blog Archive » How to successfully deploy a fully working … [...]

  2. 2 Webby Scripts Lab216 » Blog Archive » How to successfully deploy a fully working … said at 03:10 on March 22nd, 2010:

    [...] more here: Lab216 » Blog Archive » How to successfully deploy a fully working … [...]

  3. 3 Lab216 » Blog Archive » How to successfully deploy a fully working … | Coder Online said at 04:35 on March 22nd, 2010:

    [...] Originally posted here: Lab216 » Blog Archive » How to successfully deploy a fully working … [...]


Leave a Reply