Dave Gutteridge
2005-Sep-16 10:52 UTC
[CentOS] Are PHP and MySQL running on my CentOS installation?
When I was installing CentOS, I noticed among the list of components that PHP and MySQL were available. I made sure they were selected because I develop a lot of web sites in PHP/MySQL, but I always do my testing on the server side. I thought it would be kind of cool if I could do the testing and development on my home machine. Which is a long way of saying that I think I have PHP/MySQL on my machine, but have no idea what the heck to do with them. I mean, I can script PHP and write queries for MySQL, but don't know anything about their set up and installation. I wrote a small test HTML page with basic head and body information, and simply this PHP in the body: <?php echo 'hello world': ?> And then opened it in FireFox. As expected, it didn't display anything. So I went to my trusty friend, Google, and asked about it. But it's one of those cases where people seem to assume that it's already installed, and if it's installed, it's already working. The PHP site itself says "We do not distribute UNIX/Linux binaries. Most Linux distributions come with PHP these days" and then not much else about running it. Am I going to find myself in a whole new world of confusing settings and configurations if I try to get PHP working on my home machine? Dave
Ignacio Vazquez-Abrams
2005-Sep-16 11:00 UTC
[CentOS] Are PHP and MySQL running on my CentOS installation?
On Fri, 2005-09-16 at 19:52 +0900, Dave Gutteridge wrote:> Am I going to find myself in a whole new world of confusing settings and > configurations if I try to get PHP working on my home machine?yum install php-mysql mysql-server killall -HUP httpd -- Ignacio Vazquez-Abrams <ivazquez at ivazquez.net> http://centos.ivazquez.net/ gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20050916/32604b13/attachment.sig>
ABOKHALAF, Nassri Abdellatif
2005-Sep-16 11:11 UTC
[CentOS] Are PHP and MySQL running on my CentOS installation?
Dave, What you need is php, msql & apache. You can install all the packages via using yum First execute yum install php php-mysql httpd mysqlclient10 mysql-server yum will resolve all dependences for you and probably will install some additional packages that you may need. If you have some packages already installed yum will tell you ! After installation, you will have to start several services: service httpd start service mysqld start to test that your webserver is running you can use your local browser httpd://localhost the best way to test php is to put a phpinfo.php file in your webserver document root usually in /var/www/html/. Do the following: vi /var/www/html/phpinfo.php insert in the first line: <? phpinfo(); ?> To test php do the following: httpd://localhost/phpinfo.php it will show you your php configuration. Nassri> -----Original Message----- > From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On > Behalf Of Dave Gutteridge > Sent: sexta-feira, 16 de Setembro de 2005 11:52 > To: centos at centos.org > Subject: [CentOS] Are PHP and MySQL running on my CentOS installation? > > > When I was installing CentOS, I noticed among the list of components > that PHP and MySQL were available. I made sure they were selected > because I develop a lot of web sites in PHP/MySQL, but I always do my > testing on the server side. I thought it would be kind of cool if I > could do the testing and development on my home machine. > > Which is a long way of saying that I think I have PHP/MySQL on my > machine, but have no idea what the heck to do with them. I mean, I can > script PHP and write queries for MySQL, but don't know anything about > their set up and installation. > > I wrote a small test HTML page with basic head and body information,and> simply this PHP in the body: > <?php > echo 'hello world': > ?> > And then opened it in FireFox. As expected, it didn't displayanything.> > So I went to my trusty friend, Google, and asked about it. But it'sone> of those cases where people seem to assume that it's alreadyinstalled,> and if it's installed, it's already working. The PHP site itself says > "We do not distribute UNIX/Linux binaries. Most Linux distributionscome> with PHP these days" and then not much else about running it. > > Am I going to find myself in a whole new world of confusing settingsand> configurations if I try to get PHP working on my home machine? > > Dave > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
Karanbir Singh
2005-Sep-16 11:19 UTC
[CentOS] Are PHP and MySQL running on my CentOS installation?
Dave Gutteridge wrote:> I wrote a small test HTML page with basic head and body information, and > simply this PHP in the body: > <?php > echo 'hello world': > ?> > And then opened it in FireFox. As expected, it didn't display anything.Wrong place to ask, please take your querry to a more suitable list ( you might find something here : http://www.php.net/support.php ). If people on this list wish to reply, please do so off-list. - K