Thread: PHP problems.
View Single Post
Old July 18th, 2006   #9
harisund
Skinny Soy Caramel Ubuntu
 
harisund's Avatar
 
Join Date: Sep 2005
Location: Baton Rouge
Beans: 686
Xubuntu 6.06
Send a message via ICQ to harisund Send a message via AIM to harisund Send a message via MSN to harisund Send a message via Yahoo to harisund Send a message via Skype™ to harisund
Re: PHP problems.

Ok, let me give you a complete walk through about everything you really need.

First, let's start with a clean machine. Assuming you are familiar with the command line, do
Code:
sudo aptitude purge apache2 apache2-common php5 php5-common libapache2-mod-php5 mysql
sudo aptitude install apache2 apache2-common php5 php5-common libapache2-mod-php5 mysql
The above 2 lines of code to be executed in the terminal will give you a fresh installation to start with.

Next, execute
Code:
sudo a2enmod userdir
Finally, create a directory in your home folder called public_html. Assuming it is not already there, you could do
Code:
mkdir ~/public_html
Now, everything is done. You have mentioned that under Windows/XAMPP you used to place all files in a doc and then under www. Now, whatever you used to place there just go ahead and place it in public_html. Let's say we create an index.php and have just <?php phpinfo()> in it. You could do this using whichever editor you prefer, starting from simple nano, to gedit and bluefish/screem (even dreamweaver through wine if you please) and save it as index.php in your public_html directory. from now on, every time you mean to test something locally, put in public_html.

Then head over to your browser. Type http://localhost and you will see one folder in there. apache2-default. Ignore it.

Type in your browser http://localhost/~username and you will be delivered the contents of your public_html folder.

Since you are already familiar with web design to some extent under Windows, you should be comfortable here as well. Just put everything you want to test in public_html.

For example, you could put a temp.php in public_html and to test it you would go to your browser and the address you would type in would be http://localhost/~khaled/test.php and so on.

Have I made myself clear?
harisund is offline   Reply With Quote