Page 1 of 1
(SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Sat May 09, 2009 1:32 pm
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
(SOLVED) Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Sun May 10, 2009 6:33 pm
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!

Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Mon May 11, 2009 9:47 pm
by jmcgin51
do you know exactly what the security feature is/was?
Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Tue Jul 28, 2009 2:14 pm
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
Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Fri Jul 31, 2009 1:46 pm
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.
Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Fri Jul 31, 2009 1:52 pm
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
Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Fri Jul 31, 2009 3:06 pm
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.
Re: (SOLVED)Fatal error: Cannot redeclare readfile()....misc.functiion.php
Posted: Fri Jul 31, 2009 3:53 pm
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