Segmentation fault and Invalid opcode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sangaiah
Forum Newbie
Posts: 6
Joined: Wed Apr 22, 2009 2:30 am

Segmentation fault and Invalid opcode

Post by sangaiah »

Hi ,

We have upgraded the PHP 4.0 to PHP 5.1.6 and RHEL3 to RHEL5

We are getting following errors,

1. [notice] child pid 31881 exit signal Segmentation fault (11)

2. Invalid opcode 117/8/8. in XXXX.php on line 788


Please note:
These above errors are not occurring consistently.

Please help me..... How to resolve the above errors?

Thanks,
Sangaiah
nwhiting
Forum Newbie
Posts: 18
Joined: Sun May 03, 2009 8:30 pm

Re: Segmentation fault and Invalid opcode

Post by nwhiting »

Segmentation fault is not a PHP error but an apache error, saying it crashed.

This is most likely caused from a hardware issue, can you post the code at line 778, something is running causing it to crash wither it is a PHP bug or an issue with your script exhausting and crashing apache
sangaiah
Forum Newbie
Posts: 6
Joined: Wed Apr 22, 2009 2:30 am

Re: Segmentation fault and Invalid opcode

Post by sangaiah »

This is my code.

This error is not occurring on the same line... Randomly its happening.

776 $active_locales = getLocalecodes();
777 if (!empty($active_locales))
778 {
779 foreach($active_locales as $key=>$val)
780 {
781 if ($val[country_code] == "SI")
782 {
783 $char_encode = "utf-8";
784 break;
785 }
786
787 }
788 }
Post Reply