Saturday, April 13, 2013

Change htdocs path in XAMPP

Here in this example, I am showing you to change the php project directories path from /opt/lampp/htdocs to /var/www

1) Open file /opt/lampp/etc/httpd.conf and change following line

DocumentRoot "/opt/lampp/htdocs"
to
DocumentRoot "/var/www"

2) Now search following line in same file (/opt/lampp/etc/httpd.conf)
and change

# This should be changed to whatever you set DocumentRoot to.
<Directory "/opt/lampp/htdocs">

to
# This should be changed to whatever you set DocumentRoot to. <Directory "/var/www">
(Above line is commented, it has been mentioned to find directive easily)

3) Restart the XAMPP.

4) If virtual hosts have been defined, change the path in /opt/lampp/etc/extra/httpd-vhosts.conf too.
Otherwise above steps will not work.

or if you want to remove virtual hosts, just comment following line in /opt/lampp/etc/httpd.conf
# Include etc/extra/httpd-vhosts.conf
5) Restart the XAMPP.

6) After following above process, if it throws php code in browser.
Uncomment following line in the file /opt/lampp/etc/httpd.conf
Include etc/extra/httpd-xampp.conf
This line should not be commented. It means there should be no Hash '#' symbol at start of the line.

7) If it gives Internal Server Error or Server Error.
Comment following line in the file /opt/lampp/etc/httpd.conf
# Include etc/extra/httpd-vhosts.conf
& Restart the XAMPP.

Thursday, March 28, 2013

Linux File Permission Mechanism

Linux File Permissions :

Understanding Linux File & Directory Permissions :



Linux File and directory Permission mechanism

Read Write Execute
Owner 400 200 100
Group 40 20 10
Others 4 2 1


If you want to give Read, Write & Execute permission to Owner, Groups & Others, it means full permission.
400+200+100+40+20+10+4+2+1 = 777

If you do not want to give Write permission to Groups Others, it means 
400+200+100+40+10+4+1 = 755

The best thing of this calculation, you can not make sum of a number in two different ways .
It means 644 can be made in this way only that is 400+200+40+4
The meaning of 644 is Read & Write permission to Owner and Read permission to Group and Others only.

To give 777 to a directory :

# chmod -R 777 /path/of/the/directory

where -R means Recursive, it means give this permission to all sub-directories and files.

To give 777 to a file :
# chmod 777 /path/of/the/file
Now you can create & give permissions by your own.

Friday, March 15, 2013

Unable to boot : please use a kernel appropriate for your cpu

Virtual Box Error :
Unable to boot : please use a kernel appropriate for your cpu




Go on
Settings -> System -> Processor 

&

Make the Check-box PAE/NX Enable.

Make sure your virtual machine is not started otherwise it shows options disabled.