[SOLVED] php on Centos 5.6

Support for webhosts that use CentOS
Post Reply
Obould
Posts: 3
Joined: 2011/02/23 17:25:08

[SOLVED] php on Centos 5.6

Post by Obould » 2011/05/04 15:13:53

Hello,

I am trying to run a php based application on Centos 5.6. I installed httpd, php and php-mysql.
(I think I need the mod_suphp too, I downloaded the rpm package but that just threw errors)
Whenever I try to open the index.php page of the app it just returns a blank page. I made a test.php file (phpinfo()) and that works just fine.
I tested the same app on Fedora 14 with the httpd, php, php-mysql and mod_suphp packages and that works like a charm.
Is there anybody who can give me a clue? I really would like to use Centos i.s.o. Fedora...

:-(

Best regards,
Obould

hawaiian717
Posts: 178
Joined: 2009/01/30 19:58:25
Location: California

Re: php on Centos 5.6

Post by hawaiian717 » 2011/05/04 19:53:10

Look for PHP errors in /var/log/httpd/error_log when you try to load the app's index.php page.

Des the PHP application list it's version requirements? CentOS ships by default with PHP 5.1.6 which many consider to be quite old. Fedora 14 ships with PHP 5.3.3. Starting with CentOS 5.6, there is a separate package, php53, that provides PHP 5.3.3. It could be that your PHP application is depending on features not available in PHP 5.1.6, so you may wish to try the php53 package.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] php on Centos 5.6

Post by pschaff » 2011/05/04 23:49:38

[quote]
Obould wrote:
...
(I think I need the mod_suphp too, I downloaded the rpm package but that just threw errors)
...[/quote]
Please [re]read about [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14408&forum=47]Installing Software[/url] and [url=http://wiki.centos.org/AdditionalResources/Repositories]Repositories[/url], and note the warnings and advice about installing and configuring the [url=http://wiki.centos.org/PackageManagement/Yum/Priorities]yum priorities plugin[/url]. Non-core repos should have a higher numeric value, which is a lower priority. Lower is "better" as in golf scores.

Rather than downloading an installing an rpm, enable the repo and use yum to satisfy dependencies.[code]
# alias yumlist
alias yumlist='yum --noplugins --showduplicates --enablerepo \* --disablerepo \*-source --disablerepo \*debug\* --disablerepo c5-media list'
# yumlist mod_suphp
Excluding Packages from Red Hat Enterprise Linux 5 - i386 - ATrpms testing
Finished
Excluding Packages from Extra Packages for Enterprise Linux 5 - i386
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Excluding Packages from RHEL 5 - RPMforge.net - dag
Finished
Excluding Packages from RHEL 5 - RPMforge.net - extras
Finished
Excluding Packages from RHEL 5 - RPMforge.net - testing
Finished
Available Packages
mod_suphp.i386 0.6.2-1.el5.rf rpmforge
mod_suphp.i386 0.6.3-1.el5 epel
mod_suphp.i386 0.6.3-1.el5.rf rpmforge
mod_suphp.i386 0.6.3-2.el5.art atomic
mod_suphp.i386 0.7.0-1.el5.rf rpmforge
mod_suphp.i386 0.7.1-1.el5.art atomic
mod_suphp.i386 0.7.1-1.el5.rf rpmforge[/code]
I'd recommend either RPMforge or EPEL as Atomic is [b]much[/b] too aggressive about replacing core packages for my taste. YMMV.

Obould
Posts: 3
Joined: 2011/02/23 17:25:08

Re: php on Centos 5.6

Post by Obould » 2011/05/05 08:39:15

Hello,

thank you for the quick replies. The problem is solved after I installed PHP 5.3.3.
The error in apache was:

PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /var/www/html/chamilo/index.php on line 2

Best regards,
Obould

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: [SOLVED] php on Centos 5.6

Post by pschaff » 2011/05/05 13:45:14

Thanks for reporting back. Marking this thread [SOLVED] for posterity.

Post Reply

Return to “CentOS 5 - Webhosting Support”