CodeIgniter Forums

Full Version: [CI2.1.4] This page isn’t working website is currently unable to handle this request.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I try to access my website I get the following error message

This page isn’t working

website.co.ke is currently unable to handle this request.

The error log is as follows

ERROR - 2017-04-20 12:30:12 --> Severity: Notice  --> Undefined variable: ark_root /home/website/public_html/application/config/config.php 34

ERROR - 2017-04-20 12:30:12 --> Severity: Notice  --> Only variable references should be returned by reference /home/website/public_html/system/core/Common.php 257


What could be the problem?
What version of CI are you using?

(Edit: Some early versions of )V3 gives the last error when using PHP 7.
(04-20-2017, 10:44 AM)enlivenapp Wrote: [ -> ]What version of CI are you using?

V3 gives the last error when using PHP 7.

No it doesn't.

Some of the early 3.x versions may have, but when you say just "3" you're speaking of the entire version tree, in which case you should be referring to the latest release.
(04-20-2017, 11:25 AM)Narf Wrote: [ -> ]
(04-20-2017, 10:44 AM)enlivenapp Wrote: [ -> ]What version of CI are you using?

V3 gives the last error when using PHP 7.

No it doesn't.

Some of the early 3.x versions may have, but when you say just "3" you're speaking of the entire version tree, in which case you should be referring to the latest release.

yeah, that's fair enough.  Should have been more specific... Appologies for that.  I've seen the error in 3.0.x and 3.0.0-dev?(PyroCMS 2.5.x)

Still, I think he's maybe using CI2 or CI3 and posted in the wrong forum.
@cndunga What is on line 34 of your config.php? That is where the error is reported.
(04-20-2017, 10:44 AM)enlivenapp Wrote: [ -> ]What version of CI are you using?

(Edit: Some early versions of )V3 gives the last error when using PHP 7.

I am using CI_VERSION', '2.1.4'
Ah, I figured. This is the CI v4 support forum.

Well, before this thread gets moved a couple things.

CI 3.1.4 is the latest, you should upgrade to that before you try running on PHP7. I understand they're not going to do any further updates for CI2. Otherwise, you're stuck in the PHP 5.3/5.4 ish which is not ideal.
(04-20-2017, 12:15 PM)ciadmin Wrote: [ -> ]@cndunga What is on line 34 of your config.php? That is where the error is reported.

34 - $ark_root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
(04-20-2017, 02:00 PM)cndunga Wrote: [ -> ]
(04-20-2017, 12:15 PM)ciadmin Wrote: [ -> ]@cndunga What is on line 34 of your config.php? That is where the error is reported.

34 - $ark_root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

Either (a) $ark_root is not initialized before ".=" or
(b) basename(...) is conflicted because it has 2 args according to the PHP docs, not 3 like you have used.
(04-20-2017, 01:16 PM)enlivenapp Wrote: [ -> ]Otherwise, you're stuck in the PHP 5.3/5.4 ish which is not ideal.

Not true, CI version 2.2.2 works just fine running on PHP 5.6.30
We still use it for small websites. To be fair we do now update core file as CI 2.x.x is no longer supported.

And any problems under 5.6.30 were quick to fix