I'm new in server-side programming. I need lampp and mysql running on my computer. I have installed mysql using tasksel lamp-server, and then install php with apt-get install libapache2-mod-php5 phpmyadmin. And now I have now ideas how to use them. In xampp on Windows I needed only to copy my php files in htdocs directory. How to run php files in Linux and connect them to my MySQL?
I'm not sure if I understood your question, but if you just installed the
AFAK the default directory where you have to put your files into is
Per default the apache server, and the mysql database should be started automatically after boot. So you don't have to start them as with
If you're seeing any output on
The mysql connection is the same as on windows, as you write it in PHP. The mysql database should run on the port
Also you can check this site where getting PHP running with
What I have understand is, you want to install xampp server just like you did using Windows.
If this is what you want, download and install xampp from here
This xampp suite contain apache server, mysql server, php, perl, and phpmyadmin.
Installation and configuration instructions of xampp can be found here
This way, you don't need to install mysql or php separately.
Maybe you should install the following software first.
and then, you should configure you server. 1, Test apache, open you browser, and enter 127.0.0.1, if "It Works!" appears, okay. 2, Test php, create a file under /var/www, and name is "index.php", the content is:
save and open the url "127.0.0.1/index.php", the php info should appear, if not, make sure you have proper permission.
3, Configure and test you phpmyadmin. first, run as root,
and then create a file named "phpmyadmin-web.conf" or other you like, and the content of the file is:
finally, you also should make a symbol link:
then restart you apache server
Now, you can use your ubuntu as a lamp server.