473,915 Members | 7,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_FE TCHMODE_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 1845
On Tue, 03 May 2005 21:06:58 +0200, Yannick Majoros <ma*****@inma.u cl.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_FE TCHMODE_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.andyhsoftwa re.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
1470
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. I've installed the RPM binary distribution of MySQL 4.0.14 right from the MySQL website. The only thing I have done is disable InnoDb in my my.cnf file. Database Table: I have a database with 21.4 million records. One field is a VARCHAR(255)...
5
12916
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 kernel Linux 2.4.20-8smp redhat stock. Top shows mysql steadily consuming more resourses over a period of 2 hours, up to 1.2 Gb, before it crashes. Any clues?
14
2755
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= 0; char *aString = 0; char *bString = 0; MY_NUM *a;
7
1591
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
1306
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 error' message and the site becomes unusable. I have customErrors set to 'Off' so I can see what bit of code it is crashing at and it is always at line 78 below. (If I try and start a debug session - the server seems to reset itself and goes back...
8
2051
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
3314
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 month, these crashes have been cropping up. What is really strange is, the crashes occur on two DB2 different servers at the customer site, both running DB2 version 7 fixpack 14, although ater uninstalling OO-Defrag from both servers, one of the...
1
3059
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 redirected to the page as expected. I was only able to see this particular error once but have continued to follow the advice by others when dealing with any usage of Response.Redirect: A first chance exception of type...
2
1890
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 stopping the computer from crashing? --
0
11359
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10928
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11069
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10543
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7259
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5944
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4779
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4346
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.