473,224 Members | 1,581 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,224 software developers and data experts.

PHP5 Stability issues?

Hey,

We are in the process of rewriting our internal management system (which was
written in PHP4), and figured this would be a good time to migrate to PHP5
to get all the OO goodness it has to offer :) I am running php 5.0.3 on
apache 1.3.something under slackware linux.

Unfortunately I frequently get segfaults from php scripts, and they are not
even scripts that do anything fancy or special. For example, in one script
i got a segfault just in the middle of a HTML comment, which seems to make
no sense whatsoever (unless hte crash came later and it hadn't gotten round
to sending the rest of the output yet.. but whatever the case if i removed
the html comment the code started working again). Another crash occurs when
i assign a value to a variable, not any kind of special variable, just
assigning a string value to a variable, and php5 segfaults.

Naturally this makes very very unhappy as I very much want to move the new
system to php5, because it looks like a much better language otherwise :)
Has anyone else experienced problems like this? And more importantly, does
anyone know how to get around these problems?

Thanks,
Daniel
Jul 17 '05 #1
4 1793
Daniel Andersen wrote:
Hey,

We are in the process of rewriting our internal management system (which was
written in PHP4), and figured this would be a good time to migrate to PHP5
to get all the OO goodness it has to offer :) I am running php 5.0.3 on
apache 1.3.something under slackware linux.

Unfortunately I frequently get segfaults from php scripts, and they are not
even scripts that do anything fancy or special. For example, in one script
i got a segfault just in the middle of a HTML comment, which seems to make
no sense whatsoever (unless hte crash came later and it hadn't gotten round
to sending the rest of the output yet.. but whatever the case if i removed
the html comment the code started working again). Another crash occurs when
i assign a value to a variable, not any kind of special variable, just
assigning a string value to a variable, and php5 segfaults.

Naturally this makes very very unhappy as I very much want to move the new
system to php5, because it looks like a much better language otherwise :)
Has anyone else experienced problems like this? And more importantly, does
anyone know how to get around these problems?

Thanks,
Daniel

Well for what its worth I've been through the same grief. The new object
functionality in 5 is great, but i've ended up going back to 4 sources.
I don't think its an intrinsic problem with 5, rather the underlying
libraries and O/s that PHP piggybacks onto.

Most of the problems appear to be related to non thread safe libraries,
which is not a PHP issue. If one doesn't use an O/s that uses threads
then 5 doesn't have a problem. PHP 5 + threaded O/s = a potential
problem. Like all thread problems they are a real pain to diagnose.

Rumour has it that setting up Apache to use mpm modules thus avoiding
threading issues fixes any problems. Essentially, PHP of any description
ain't thread safe.

Chris
Jul 17 '05 #2
What software stack are you using? I have been running PHP5 on a Linux 2.4
kernel, and Apache for the webserver for several months in a production
environment. No problems, and I have some pretty "demanding" (i.e., non
trivial code dealing with very large objects, DOM, 3+ levels of inheritance,
and some *very* large strings variables) code. Never had a single problem
that wasn't my fault (e.g., did something dumb and ate too much system
memory with a script, etc.)
Jul 17 '05 #3
Joshua Beall wrote:
What software stack are you using? I have been running PHP5 on a Linux 2.4
kernel, and Apache for the webserver for several months in a production
environment. No problems, and I have some pretty "demanding" (i.e., non
trivial code dealing with very large objects, DOM, 3+ levels of inheritance,
and some *very* large strings variables) code. Never had a single problem
that wasn't my fault (e.g., did something dumb and ate too much system
memory with a script, etc.)

IMHO it appears to be a threading problem. Its the libraries that PHP
employs that creaet the problem. For sure, thread problems only occur
under load conditions, thats why they are such a pain to diagnoze. Lise
of strings isn't an issue unless one is concerned with stack overflows
which is more of a sloppy coding issue
Jul 17 '05 #4
NSpam wrote:
Joshua Beall wrote:
What software stack are you using? I have been running PHP5 on a Linux
2.4 kernel, and Apache for the webserver for several months in a
production
environment. No problems, and I have some pretty "demanding" (i.e., non
trivial code dealing with very large objects, DOM, 3+ levels of
inheritance,
and some *very* large strings variables) code. Never had a single
problem that wasn't my fault (e.g., did something dumb and ate too much
system memory with a script, etc.)

IMHO it appears to be a threading problem. Its the libraries that PHP
employs that creaet the problem. For sure, thread problems only occur
under load conditions, thats why they are such a pain to diagnoze. Lise
of strings isn't an issue unless one is concerned with stack overflows
which is more of a sloppy coding issue


I'll respond to both posts at once here to save a bit of time :)

I'm running Linux 2.4.26, which we run on other servers and appears as
stable as can be hoped for. Apache is version 1.3.33 (which i believe is
unthreaded, i was under the impression apache didn't start threading until
the 2.x release series, but correct me if i'm wrong :)

There is basically no load at all on the server, as this is just our test
machine as we rewrite the system in PHP5, so the only person loading pages
off the machine is me, and it does nothing else. The pages are complicated
to the extent there is a lot of OO and custom error handlers set,
auto-prepend and appends etc etc, but I wouldn't think they'd actually
cause any kind of load.

PHP's configure line is as follows, in case that helps at all:
'./configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs'
'--prefix=/usr/local/php/norm' '--enable-track-vars'
'--with-config-file-path=/usr/local/php/norm' '--enable-magic-quotes'
'--enable-ftp' '--enable-calander' '--with-zlib' '--with-gd'
'--with-png-dir--with-jpeg-dir' '--with-curl'

Thanks,
Daniel Andersen
Jul 17 '05 #5

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

Similar topics

6
by: Spidah | last post by:
Looking at the list of changes made in PHP5 one of them is "Removed the bundled MySQL client library" Does anyone know exactly what this means? I assume we will still be able to code for...
5
by: gf | last post by:
I had a client recently contact me with a script that wasn't working. I quickly isolated the problem as to the fact that the $_GET array was not being made available to all scripts, even though...
0
by: Andrew Crowe | last post by:
Hi guys, As PHP5 is on its final beta, we decided to start writing a web application in it to take advantage of the much better object support it offered. We're running the...
5
by: Doug | last post by:
I am looking for PHP5 web hosting and many companies have not moved up to using PHP5 yet. Is there any one who has had any experiences good or bad with any company using PHP5? -d
12
by: Sarah Tanembaum | last post by:
Though I installed MySQL5 and PHP5, how come my phpinfo() shows as follow: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.57 <<<<<<<<<<<<<<< ...
6
by: n8agrin | last post by:
I've been doing some level of PHP programming for many years now, and have in the past few months started implementing lots of the core PHP5 features into a new project, when I noticed some...
5
by: sinister | last post by:
I'm starting a database/web interface project, using Linux and postgresql. I've programmed in PHP4 in the past, and for this new project am unsure whether to use PHP4 or PHP5. My main concerns...
2
by: eltower | last post by:
adactio.com/journal/1202 has a very interesting PHP script which gathers RSS data from various feeds and prints them in an HTML table. He calls this a lifestream. Anyways, unfortunately, my...
7
by: archimonde2 | last post by:
What are pros any cons to use eaccelerator and zend optimizer on php5-mod with apache2.2 ?? Does accelerators work immediately after install on all php files? When both are in use which...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.