(SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
martingmills
New Member
New Member
Posts: 2
Joined: Sat May 09, 2009 1:23 pm

(SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by martingmills »

Hi,
I am currently in the process of doing my second CMSMS installation via cpanel.

I have created the database and database user.
I have uploaded and extracted the CMSMS tar file
I have created the config.php file.

When I go to my site (www.daoiri.com) I cannot see the CMSMS welcome screen.
Instead I get the message ...

Fatal error: Cannot redeclare readfile() in /home/daoiri/public_html/lib/misc.functions.php on line 1151

I never got this message when I previously installed CMSMS successfully, about 4 weeks ago, and using the same hosting provider.

Can somebody please help me?!

Thanks

Martin
Last edited by martingmills on Sun May 10, 2009 6:34 pm, edited 1 time in total.
martingmills
New Member
New Member
Posts: 2
Joined: Sat May 09, 2009 1:23 pm

(SOLVED) Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by martingmills »

There was a security feature preventing this that was enabled. The hosting company has disabled it now.

So to summarise, should anyone else run into this problem in the future....

If after installing CMSMS, and your url displays "Fatal error: Cannot redeclare readfile() in /home/yourdomain/public_html/lib/misc.functions.php on line 1151" , then contact your hosting company!

;D
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by jmcgin51 »

do you know exactly what the security feature is/was?
SideshowBob
Forum Members
Forum Members
Posts: 80
Joined: Thu Sep 13, 2007 10:50 am

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by SideshowBob »

I would guess that the host had declared readfile as a disabled function in their configuration.

A few hosts do this as they believe that readfile can present a security risk, unfortunately the workaround in misc.functions.php doesn't work in this instance.

Bob
Pierre M.

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by Pierre M. »

@all : feel free to improve the "Fatal error: Cannot redeclare..." section of the troubleshooting section of the documentation in the wiki.

Pierre M.
SideshowBob
Forum Members
Forum Members
Posts: 80
Joined: Thu Sep 13, 2007 10:50 am

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by SideshowBob »

Hi Pierre,

I don't know if it will happen but I have requested that the use of readfile be completely removed from CMSMS.

It's an easy change with no negative effects (afaik) and it will eliminate the various support issues caused by readfile.

Bob
Pierre M.

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by Pierre M. »

Hi Bob,

I don't know PHP so I suppose you are right. But have you submitted your 'request' as a bug in the forge ? It is were the DevTeam tracks issues.
Have fun with CMSms

Pierre M.
SideshowBob
Forum Members
Forum Members
Posts: 80
Joined: Thu Sep 13, 2007 10:50 am

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php

Post by SideshowBob »

Hi Pierre,

Yes the bug number is 3794.

I have around 20 CMSMS installations all running without readfile with no issues so I don't think there will be any issues but that will be for the gods devs to decide.

Bob
Locked

Return to “[locked] Installation, Setup and Upgrade”