centos 6.3, yum installed php, it's not woring

Issues related to applications and software problems
phantom21
Posts: 8
Joined: 2013/11/21 06:26:03

centos 6.3, yum installed php, it's not woring

Post by phantom21 » 2013/11/21 06:31:41

OK, I'm trying to run a local web server with centos 6.3, installed apache with yum and php with yum. Apache is working, but php is not. When I tried to install wordpress, it gave me an error message. When I try a test.php file, with <? phpinfo; ?> I get a blank screen.

Help

Mark

User avatar
TrevorH
Forum Moderator
Posts: 23905
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: centos 6.3, yum installed php, it's not woring

Post by TrevorH » 2013/11/21 08:42:21

Did you look in your logs in /var/log/httpd?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

markkuk
Posts: 738
Joined: 2007/09/07 10:56:28
Location: Finland

Re: centos 6.3, yum installed php, it's not woring

Post by markkuk » 2013/11/21 13:05:28

phantom21 wrote: When I try a test.php file, with <? phpinfo; ?> I get a blank screen.
Short open tags aren't supported by default, use the normal <?php open tag for your PHP code.

phantom21
Posts: 8
Joined: 2013/11/21 06:26:03

Re: centos 6.3, yum installed php, it's not woring

Post by phantom21 » 2013/11/21 13:54:19

Sorry, I swhould have shown the entire code.

<?php
phpinfo;
?>
was used. still a blank screen.

I looked at the log, I grepped for php, no joy. what am I looking for in there which would tell me what the issue is.

Mark

User avatar
TrevorH
Forum Moderator
Posts: 23905
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: centos 6.3, yum installed php, it's not woring

Post by TrevorH » 2013/11/21 14:06:20

Look in /var/log/httpd/error.log
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

phantom21
Posts: 8
Joined: 2013/11/21 06:26:03

Re: centos 6.3, yum installed php, it's not woring

Post by phantom21 » 2013/11/21 18:18:44

thanks, I get that.

What specifically am I looking for?

Mark

User avatar
TrevorH
Forum Moderator
Posts: 23905
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: centos 6.3, yum installed php, it's not woring

Post by TrevorH » 2013/11/21 22:58:56

Well, look at the file and see what the last error logged is, then recreate your problem and see what has been appended to the file afterwards. If everything is working correctly I would expect nothing to be written to the file so anything that is written after startup is likely an error.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
vonskippy
Posts: 839
Joined: 2006/12/30 03:00:04
Location: Western Slope Colorado

Re: centos 6.3, yum installed php, it's not woring

Post by vonskippy » 2013/11/22 00:16:13

Did you add "php" to your Apache config?
For the 2.5^15th time :: Better Details = Better Answers

User avatar
TrevorH
Forum Moderator
Posts: 23905
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: centos 6.3, yum installed php, it's not woring

Post by TrevorH » 2013/11/22 00:27:17

The php package should add an /etc/httpd/conf.d/php.conf that should do all that but it is a good question: did the OP restart httpd after installing the php package?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

phantom21
Posts: 8
Joined: 2013/11/21 06:26:03

Re: centos 6.3, yum installed php, it's not woring

Post by phantom21 » 2013/11/22 02:39:41

OK. restarted Apache (service httpd restart), it restarted with two OKs.

I looked at the error log, and the last line said "[Thu Nov 21 21:32:20 2013] {notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations"

But, when I tried my test.php program again, I still only get a blank (below the url line and tabs)

So, it seems Apache is configured to use PHP, PHP seems to installed. (according to yum). What could the issue be here?

Mark

Locked