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
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
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
he is using centos and is a new user :)
Karanbir Singh wrote:
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
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
disable selinux for httpd, mysql deamon.. i had similar problem with mysql :-)
don't chase newbie's away.. i was also a newbie a couple of days.. ;-) i was new to the whole of Linux itself.. not just the CentOS.
----- Original Message ----- From: "Tom" admin@homemachine.net To: "CentOS mailing list" centos@centos.org Sent: Friday, September 16, 2005 5:32 PM Subject: Re: [CentOS] Are PHP and MySQL running on my CentOS installation?
he is using centos and is a new user :)
Karanbir Singh wrote:
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
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2005-09-16 at 17:34 +0530, Abilash Praveen M wrote:
disable selinux for httpd, mysql deamon.. i had similar problem with mysql :-)
don't chase newbie's away.. i was also a newbie a couple of days.. ;-) i was new to the whole of Linux itself.. not just the CentOS.
----- Original Message ----- From: "Tom" admin@homemachine.net To: "CentOS mailing list" centos@centos.org Sent: Friday, September 16, 2005 5:32 PM Subject: Re: [CentOS] Are PHP and MySQL running on my CentOS installation?
he is using centos and is a new user :)
Karanbir Singh wrote:
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
Not chasing anyone away ... the point was that after the webserver is setup and running, if you want more in detail help concerning PHP in general, the php lists are better for that.
Getting php installed and setup is on topic here.
(There were 2 good posts on how to do that ... and a couple more discussing turning off selinux).
What we can't do is open up the .php file directly ... it must be opened via web server. So following the earlier advise of Nassri Abdellatif ABOKHALAF (and turning off selinux) will get a good, php enabled webserver going on CentOS.
it was pretty obvious mysql server was needed (help here Dave :) )
Johnny Hughes wrote:
On Fri, 2005-09-16 at 17:34 +0530, Abilash Praveen M wrote:
disable selinux for httpd, mysql deamon.. i had similar problem with mysql :-)
don't chase newbie's away.. i was also a newbie a couple of days.. ;-) i was new to the whole of Linux itself.. not just the CentOS.
----- Original Message ----- From: "Tom" admin@homemachine.net To: "CentOS mailing list" centos@centos.org Sent: Friday, September 16, 2005 5:32 PM Subject: Re: [CentOS] Are PHP and MySQL running on my CentOS installation?
he is using centos and is a new user :)
Karanbir Singh wrote:
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
Not chasing anyone away ... the point was that after the webserver is setup and running, if you want more in detail help concerning PHP in general, the php lists are better for that.
Getting php installed and setup is on topic here.
(There were 2 good posts on how to do that ... and a couple more discussing turning off selinux).
What we can't do is open up the .php file directly ... it must be opened via web server. So following the earlier advise of Nassri Abdellatif ABOKHALAF (and turning off selinux) will get a good, php enabled webserver going on CentOS.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, 2005-09-17 at 00:02 +1200, Tom wrote:
he is using centos and is a new user :)
No kidding. Didn't Johnny just cover this?
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.
First off, if the colon is actually in your code, make sure that's gone.
Secondly, what I find helpful (and I didn't have to disable SELinux to get this to work, so you might prefer this perhaps) is to create a virtualhost in which to do all my work. So if you haven't already done that, you might give that a shot. Unlike many distros the Apache configuration tool is actually pretty handy and works pretty well. I've been using Ruby for a while, so haven't setup PHP and virtual hosts on this machine until just now, but it only took me a minute to use the HTTP panel under "Server Settings" to create a virtual host and point it to a new directory (like /var/www/sites/testing/) and then browse to that site.
I then edit /etc/hosts and add a line that's something like....
127.0.0.1 testing
That's my practice, at least.
Preston
On Fri, 2005-09-16 at 05:31 -0700, Preston Crawford wrote:
that, you might give that a shot. Unlike many distros the Apache configuration tool is actually pretty handy and works pretty well. I've
Meant to finish that thought by saying that unlike many distros the Apache configuration tool (in RHEL/CentOS) is actually pretty handy and works pretty well.
I've used other distros where setting up virtual hosts didn't work so well. The RHEL config panel does a good enough job that I don't have to edit httpd.conf manually.
Preston
Preston Crawford wrote:
On Sat, 2005-09-17 at 00:02 +1200, Tom wrote:
he is using centos and is a new user :)
No kidding. Didn't Johnny just cover this?
[delete]
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.
First off, if the colon is actually in your code, make sure that's gone.
Secondly, what I find helpful (and I didn't have to disable SELinux to get this to work, so you might prefer this perhaps) is to create a virtualhost in which to do all my work. So if you haven't already done that, you might give that a shot. Unlike many distros the Apache configuration tool is actually pretty handy and works pretty well. I've been using Ruby for a while, so haven't setup PHP and virtual hosts on this machine until just now, but it only took me a minute to use the HTTP panel under "Server Settings" to create a virtual host and point it to a new directory (like /var/www/sites/testing/) and then browse to that site.
I then edit /etc/hosts and add a line that's something like....
127.0.0.1 testing
That's my practice, at least.
Preston
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 9/16/05, Karanbir Singh mail-lists@karan.org wrote:
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.
Fortunately other people replied with meaningful information to help this person. I'm underwhelmed by your unwillingness to help. Linux, IMHO, is all about people helping each other
Collins Richey wrote:
On 9/16/05, Karanbir Singh mail-lists@karan.org 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.
Fortunately other people replied with meaningful information to help this person. I'm underwhelmed by your unwillingness to help. Linux, IMHO, is all about people helping each other
My message was posted well after enough content had been provided to clear up the issue, and answer the query raised. And no, we are not a PHP programming support group. If there are people who do so wish to tackle the code issue, feel free to do so off-list.
- K
On Sat, 2005-09-17 at 02:58 +0100, Karanbir Singh wrote:
Collins Richey wrote:
On 9/16/05, Karanbir Singh mail-lists@karan.org 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.
Fortunately other people replied with meaningful information to help this person. I'm underwhelmed by your unwillingness to help. Linux, IMHO, is all about people helping each other
My message was posted well after enough content had been provided to clear up the issue, and answer the query raised. And no, we are not a PHP programming support group. If there are people who do so wish to tackle the code issue, feel free to do so off-list.
It wasn't a PHP question so much as a configuration question, though. Look at the title.
"Are PHP and MySQL running on my CentOS installation?"
Meaning, why isn't this simple script running on CentOS.
That sounds like a CentOS question to me.
Preston
On Fri, 2005-09-16 at 20:30, Collins Richey wrote:
On 9/16/05, Karanbir Singh mail-lists@karan.org wrote:
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.
Fortunately other people replied with meaningful information to help this person. I'm underwhelmed by your unwillingness to help. Linux, IMHO, is all about people helping each other
But that question was wrong in so many ways that you can't tell where to start with an answer, aside from it not having a lot to do specifically with Centos.
That's not html. You can't expect firefox to do anything with it. If he did name the file with a .php extension and let apache serve it, he didn't mention the reason the logfile showed for why it didn't work.
The centos-related answers that might apply: yum install php php-mysql mysql mysql-server and disable selinux until you understand it.
On Fri, 2005-09-16 at 21:11 -0500, Les Mikesell wrote:
The centos-related answers that might apply: yum install php php-mysql mysql mysql-server and disable selinux until you understand it.
---- selinux isn't that tough. There may not be many people with immediate answers but I've been able to keep it running on now two systems without asking a single question of the list as I really didn't want to resort to the easy way out (disabled).
I just don't agree that it's best to advise everyone to disable it - at least let them know that it's a security measure deemed important enough by RedHat to install it by default and that disabling that security measure is a form of surrender.
Craig
On Fri, 2005-09-16 at 21:28, Craig White wrote:
The centos-related answers that might apply: yum install php php-mysql mysql mysql-server and disable selinux until you understand it.
selinux isn't that tough. There may not be many people with immediate answers but I've been able to keep it running on now two systems without asking a single question of the list as I really didn't want to resort to the easy way out (disabled).
I just don't agree that it's best to advise everyone to disable it - at least let them know that it's a security measure deemed important enough by RedHat to install it by default and that disabling that security measure is a form of surrender.
I didn't just say disable it - I said disable it until you understand it. But, I suppose that depends on how you feel about surprises.
On Fri, 2005-09-16 at 19:28 -0700, Craig White wrote:
On Fri, 2005-09-16 at 21:11 -0500, Les Mikesell wrote:
The centos-related answers that might apply: yum install php php-mysql mysql mysql-server and disable selinux until you understand it.
selinux isn't that tough. There may not be many people with immediate answers but I've been able to keep it running on now two systems without asking a single question of the list as I really didn't want to resort to the easy way out (disabled).
I just don't agree that it's best to advise everyone to disable it - at least let them know that it's a security measure deemed important enough by RedHat to install it by default and that disabling that security measure is a form of surrender.
In fact, I gave an answer that didn't require disabling it. I'm running PHP right now with SELinux enabled. So I agree.
Preston