Page 1 of 1
How to start PHP and MySQL on Mandriva?
Posted: Sun Sep 25, 2005 10:32 am
by tech291083
I have just installed the latest Mandriva limited edition Linux dvd (which came with a linux magazine named Linux Format) on my pc.During the installation I chose all the options including servers,office all the packeges.Since I am quite new to linux, I am not in a position to start testing php files with MySQL database connected to it as a web design practice which is part of hobby/interest. Can any one plz tell me as how to start them both.I could not find out where MySQL was installed on the system nor php and Apache server.During the installation I assumed that all three of them (PHP,MySQL and the Apache server) would be included in the installation of Mandriva limited edition.I am eager to learn PHP and MySQL on Linux.I would really apprecitate any help form the community.Thanks...
Posted: Sun Sep 25, 2005 11:19 am
by ambivalent
Run drakconf and look at "Services" under the "System" tab. If installed correctly, httpd (Apache) and MySQL will show as running. PHP will not be in this list. To check if PHP is running, create a test file:
and move it to the web root, usually /var/www/html. Call it via your browser at
http://127.0.0.1/test.php - If nothing happens, it's broken

Posted: Sun Sep 25, 2005 11:35 am
by pilau
Search Google for XAMPP. It changed my life, and it will change yours.
"Access denied to /var/html/www/test.php"
Posted: Sun Sep 25, 2005 12:08 pm
by tech291083
Hi ambivalent,
as u told me before, i tried to make a file with the code given by u and tried to copy it to the /var/html/www folder but when i was copying it to this folder, came a dialog box telling me that "Access denied to /var/html/www/test.php". i can not really figure out what is going on.i m sorry i m a complete idiot when it comes to linux in any form.plz help me as what to do asap.thanks.
Posted: Sun Sep 25, 2005 4:18 pm
by ambivalent
It's a permissions issue. /var/www/html is owned by root, not you as a regular "user" and the permissions are such that you can't write to the directory. You can do one of several things including: change the permissions (chmod); change the owner (chown); or only do this type of stuff as root. With respect to the first two, you also have to weigh these changes against your security needs.
You can use chmod and chown at the command line after you "su" to root.
Change permissions -
Code: Select all
chmod 666 /var/www/html <== everybody has read/write permissions on the directory
chmod 777 /var/www/html <== everybody has read/write/execute permissions
...etc
Change owners -
Code: Select all
chown yourUserName /var/www/html <=== you now own the directory
chown -R yourUserName /var/www/html <=== you now own the directory, and all subdirectories
Once again, consider your security needs - who has access and from where.
You need to find yourself a decent book, preferably specific to your distro, as you're going to have a lot of questions. As the saying goes: "You're not in Kansas anymore".
EDIT: Forgot to mention, you can find a lot of Mandriva-specific help
here.
Posted: Mon Sep 26, 2005 3:06 am
by timvw
I prefer to leave the /var/www/html as is...
And then define the virtualhosts with a documentroot in /home/userX/services/
www..