I am a php developer. I've been developing projects on a Windows system. Now I have completely switched to Ubuntu. I've installed XAMPP on my Ubuntu 16.04. I am not able to save my web files on htdocs as I used to save them in Windows before. My current default directory is opt/lampp/htdocs/. Is there a different way to handle the projects on a Linux system?
Asked
Active
Viewed 5,166 times
1
Zanna
- 72,312
1 Answers
2
Follow these steps to get your projects setup:
Create a users group called
xamppusers:sudo groupadd xamppusersAdd yourself to that group:
sudo usermod -a -G xamppusers $USERChange the ownership of the
/opt/lampp/htdocsfolder:sudo usermod -R root.xamppusers /opt/lampp/htdocs sudo chmod -R 775 /opt/lampp/htdocsRestart the system
Restart
xampp:sudo /opt/lampp/lampp start
To set up sample webpage:
Create a document in
htdocs:nano /opt/lampp/htdocs/info.phpAdd this content to it:
<?php echo phpinfo(); ?>
Now in browser go to
localhost/info.php, and you should see the output of that file.
With that if you have a projects you want to create that would in your case come with a folder the place that folder in htdocs like you use to on Windows and your good to go. From the xampp dashboard go to http://localhost/dashboard/howto.html for more information on running applications.
George Udosen
- 37,534