473,391 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,391 software developers and data experts.

php crashing

Hello,

PHP is crashing (segfault) due to some bug. See
http://bugs.php.net/bug.php?id=32929 for details, but here is the code
in which it occurs:

while ($res=$result->fetchRow(DB_FETCHMODE_ASSOC))
{
// TODO: make iconv optional
foreach ($res as $key=>$val)
$res[$key]=iconv("ISO-8859-1","UTF-8",$val);
////// CRASHING ON FOLLOWING LINE AFTER 5 ITERATIONS (DATA DEPENDANT)
$wikireq[$id][]=$res;
}

Tried on two different servers and with various compile options/php
versions (recent), it is still there.

Oops, and this code really needs to go to "production", I don't know
what to do :-(

Does someone see something in it (workaround, ...) ?

Thank you,

Yannick Majoros
Jul 17 '05 #1
4 1826
On Tue, 03 May 2005 21:06:58 +0200, Yannick Majoros <ma*****@inma.ucl.ac.be>
wrote:
PHP is crashing (segfault) due to some bug. See
http://bugs.php.net/bug.php?id=32929 for details, but here is the code
in which it occurs:

while ($res=$result->fetchRow(DB_FETCHMODE_ASSOC))
{
// TODO: make iconv optional
foreach ($res as $key=>$val)
$res[$key]=iconv("ISO-8859-1","UTF-8",$val);
////// CRASHING ON FOLLOWING LINE AFTER 5 ITERATIONS (DATA DEPENDANT)
$wikireq[$id][]=$res;
}

Tried on two different servers and with various compile options/php
versions (recent), it is still there.

Oops, and this code really needs to go to "production", I don't know
what to do :-(

Does someone see something in it (workaround, ...) ?


As you'll probably be asked in the bug report, post a complete but minimal
runnable example. You said it's data dependent, but didn't provide data. The
code won't run as-is.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Andy Hassall wrote:
As you'll probably be asked in the bug report, post a complete but minimal
runnable example. You said it's data dependent, but didn't provide data. The
code won't run as-is.


You are right, but it is very difficult to provide. The fact is that I
wrote some plugins for a wiki-based portal, and that some pages break. I
know they break on the code I provided, but it probably won't break
without the portal ("tikiwiki"), plugins, etc. being loaded.

I think my next step will be to fill big arrays with random data and
see if I can make php crash this way, so I'll have reproducible code.

Regards,

Yannick Majoros
Jul 17 '05 #3
What if you use array_push() instead of the the $a[] = syntax?

Jul 17 '05 #4
Ok, it seems that the bug was somewhere else, in the portal I use
(tikiwiki).

It's true that it didn't crash if I put a return just before the
assignment, and that it did otherwise, but the crash was really
somewhere else, due to "infinite" recursion (limited to 64 by php). I
corrected the bug in tikiwiki.

Thanks to all people who checked this, and sorry for the inconvenience.

Regards,

Yannick Majoros
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Henry Hank | last post by:
Environment: I'm setting up a database server on a Dell Poweredge 2650, dual 1.8GHZ pentium with 1GB of memory and RAID5 drives. I've installed RedHat 9, and updated the kernel to 2.4.20-19.9smp....
5
by: Eddie | last post by:
I have a MySQL-server running Innodb. We have installed ~ 2GB of memory in the server. In spite of this MySQL keeps crashing due to out-of-memory errors. The server is a dual xeon i686 running...
14
by: Java and Swing | last post by:
static PyObject *wrap_doStuff(PyObject *self, PyObject *args) { // this will store the result in a Python object PyObject *finalResult; // get arguments from Python char *result = 0; char *in=...
7
by: Jeffrey Barrett | last post by:
/* machine.txt: ------------------ Cola 0.75 20 Ruby Red Blast 1.00 10 Lemon Fizz 0.75 8 Grape Soda
0
by: Grant | last post by:
My C# web application connects to an Access database using the OleDbConnection and OleDbDataReader. I have 3 other computers that connect to this server but very frequently I get an 'Unspecified...
8
by: code break | last post by:
Can Any one tell me why this program is crashing . testFunc() { int a1, *ptr ; f=&a1; f=f+1; return 0; }
5
by: news.cyberlink.ch | last post by:
Hi, We have a DB2 version 7 fixpack 14 installed on Windows 200 at a customer site that is crashing at regular intervals.Everything was working fine for over many years, now since about one...
1
by: mwallis76 | last post by:
Upon clicking on a hyperlink generated in a ASP.NET GridView control, I am finding Firefox 1.5 to crash. However, when clicking on the same link, Internet Explorer 6.0 works just fine and is...
2
by: =?Utf-8?B?QW5uZXh4eHh4eHg=?= | last post by:
My computer keeps crashing. The files created when it does this are: WERdc15.dir00\Mini090708-03.dmp WERdc15.dir00\sysdata.xml has anybody any idea of what these files are and the solution to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.