Advertisements
I will write series of articles about Web Development Using PHP, this is the part one of those, about activating and installing PHP first. Mac OS X Leopard comes with Apache 2.2 bundle with PHP 5 by default. Beside they still provide option to switch back to PHP4 and also you can actually activate back Apache 1.3 web server. But for PHP, we need to activate it with few steps, which we will cover on this tutorial. We can start the apache web server use the System Preferences » Sharing » Just check the Web Server option.
Once it start, you can go to http://127.0.0.1/~username/ for your own personal website which located at /Users/username/Sites. And for the root website, which you can access from http://127.0.0.1/ and it located at
The configuration file for apache2 located at /private/etc/apache2/httpd.conf, we will need to edit the file to activate PHP5, by default PHP5 module is not activated. Open the file by clicking on your finder then press Command-Shift-G then key in /private/etc/apache2/ then open up httpd.conf using your TextEdit application.

Search for the line with:
#LoadModule php5_module libexec/apache2/libphp5.so
Then uncomment the line to become:
LoadModule php5_module libexec/apache2/libphp5.so
Save first, then go to System Preferences » Sharing and restart the web server again to get PHP up and running. To test whether the PHP its ON, lets create a file called: index.php inside ~/Sites/ folder. Below is the content of index.php:
You can see this page, mean you already success activate PHP
Another way to do this is to type the following in the Terminal application:
sudo apachectl start
You will be prompted to enter your root password. After that, your apache server should now be running. If you need to restart the server from the terminal, you can type this:
sudo apachectl restart
You also may prefer to use one of the 3rd party distributions of PHP, such as MAMP, XAMPP and Marc Liyanage.
Categories:
Development
Tags:
PHP
Some articles taken from our resource base, tightly related to current article, to empower you with more knowledge on tweaking the most out of your Mac.
You can't save httpd.conf without sudo.
Mojo is correct. Use this command (in the terminal) to open the file in TextEdit so that it can be modified: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/apache2/httpd.conf
mmm what happened to part 2...?
If you're tired of complex diet plans here's how to lose weight fast with these five simple and practical tips.
1. Eat at least five servings of fruit and vegetables a day
Not only do fruits and vegetables fill you up, they also supply vitamins, minerals and antioxidants to improve your health.
Don't juice the fruits and vegetables -- if you eat them as-is, you will add fiber to your diet and the bulk will fill you up, staving off hunger paul smith sale pangs.
Here's how to add your five servings to your meal plan for the day:
* eat a banana with your breakfast cereal;
* take a salad to work with you;
* eat an apple at lunch;
* have a fruit salad in mid-afternoon;
* steam some vegetables to eat with your dinner;
* have a snack of fruit and cheese at any time during the day.
2. Eat five small meals a day
Yes that's right. Eat more often to lose weight. If you have five small meals a day, you'll be eating every two or three hours. You won't have time to get seriously hungry. And there's less chance that you'll tempted to snack on fast food.
In addition to breakfast, lunch, and dinner, add two snack meals. You can have your snacks either during the chaussures paul smith</...
Today in Kansas City, Missouri a woman is currently on trial for kidnapping resulting in death. At the center of this trial is a medical condition that the defense insists that Lisa Montgomery suffers from called pseudocyesis. They claim that she is mentally unbalanced, suffering from a variety of psychological problems stemming from her childhood, which was marked by sexual abuse and frequent moves. Pseudocyesis, also known as false pregnancy or pseudopregnancy, is a condition wherein a woman believes she is pregnant even though there is no actual fetus in her womb. Experts are unsure as to why women experiencing false pregnancy sometimes exhibit true physical signs of pregnancy. Women who have false pregnancies will claim to have, or actually exhibit true pregnancy symptoms such as amenorrhea (stoppage of menstruation), morning sickness, cravings, widening of the abdomen, enlargement of the breasts and quickening (sensation of a child moving in the womb).
False pregnancy is a rare condition that is nonetheless a serious emotional and psychological condition in women. No single cause for the condition has been universally accepted by mental health professionals, although there are three popular theories. The first theory attributes the false pregnancy to emotional conflict, wherein an intense desire to become pregnant, or an intense fear of becoming pregnant, can create internal conflicts and changes in the endocrine system, which may explain some of the symptom...
Leave a Comment