Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: mod_fcgid: stderr: PHP Warning |
|
Author |
|
maskego
Joined: 16 Apr 2010 Posts: 238
|
Posted: Mon 23 Jul '12 2:55 Post subject: mod_fcgid: stderr: PHP Warning |
|
|
I use the mod_fcgid2.3.7 to run php scripts.But,the error log shows:mod_fcgid: stderr: PHP Warning: Illegal string offset 'active'
My php version is 5.4.5
How to fix it? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 23 Jul '12 10:24 Post subject: |
|
|
how to fix that? Write better code
Such an error is a notice error. If appears
Code: |
if($blah['active']=="something"){foo();}
|
if the index active does not exist than you get that notice error. To avoid that you can do check if that index is set / exists.
Code: |
if(isset($blah['active']) && $blah['active']=="something"){foo();}
|
|
|
Back to top |
|
|
|
|
|
|