473,574 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php does segmentation fault

Help! PHP is crashing when I go something very simple
and straightforward .

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.

The file:

<html><body>
<table><tr>
<?
mysql_connect(l ocalhost,"myuse r","mypass") ;
# other stuff here
?>
</table>
<hr>
HTML that never appears in the result.
</html>

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?

Thanks
333

?>

Jul 24 '05 #1
9 20638
Bush is a Fascist wrote:
Help! PHP is crashing when I go something very simple
and straightforward .

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.

The file:

<html><body>
<table><tr>
<?
mysql_connect(l ocalhost,"myuse r","mypass") ;
# other stuff here
?>
</table>
<hr>
HTML that never appears in the result.
</html>

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?

Thanks
333

?>


Did you look on php.net? Since they produce the modules, it's the first place I
go when I have this kind of problem...

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 24 '05 #2
Bush is a Fascist wrote:
Help! PHP is crashing when I go something very simple
and straightforward .

I downloaded PHP 5.0.4 and compiled it with MySQL support.
I checked that my database was up and running and that
the table I wanted to access was accessible from
the mysql prompt.

I then ran the following PHP file, first through my
webserver and then at the command line, with the
same result each time: PHP segfaulted.


Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.
//Aho
Jul 24 '05 #3
J.O. Aho wrote:
Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.


There is no such thing.

Do you mean the commandline version of php? I've already tried that,
as I pointed out in the original post.

Jul 24 '05 #4
Jerry Stuckle wrote:
Did you look on php.net?


It's not in the bug list.

I find it strange that people even use software that is this
buggy.

Jul 24 '05 #5
Bush is a Fascist wrote:
J.O. Aho wrote:

Run the script manually with "PHP-cli" and use a debugger (gdb or any other
you may have) and see what you get out from there.

There is no such thing.

Do you mean the commandline version of php? I've already tried that,
as I pointed out in the original post.


Run it within a debugger as I asked.

//Aho
Jul 24 '05 #6
Bush is a Fascist wrote:
Jerry Stuckle wrote:

Did you look on php.net?

It's not in the bug list.

I find it strange that people even use software that is this
buggy.


There's more than just the bugs list. Did you check the mail lists, for instance?

But I've never seen any program that's relatively complex which doesn't have
some bugs. Developers do their best to get all the bugs out - but there are
hundreds of thousands of lines of code in PHP, and there's no way to get every
one out. That's one of the reasons for updates. Heck - the last OS I know
about that was bug free was Dos 1.0 - and I'm not sure about that!

BTW, this includes your code. It should be

mysql_connect(" localhost","myu ser","mypass") ;
^ ^

Note the quotes around the string localhost.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 24 '05 #7
On 23 Jul 2005 18:13:00 -0700, "Bush is a Fascist" <z3***@yahoo.co m> wrote:
Help! PHP is crashing when I go something very simple
and straightforward .

PHP segfaults during the connect.

Can anyone tell me if this is a known bug?
Can anyone tell me which would be a more stable version
of PHP?


http://bugs.php.net/how-to-report.php
http://bugs.php.net/bugs-generating-backtrace.php

--
Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
Jul 24 '05 #8
Bush is a Fascist wrote:
I find it strange that people even use software that is this
buggy.


I find it strange that an inexperienced user thinks the bug is in the
software which has millions of man hours of testing behind it and not
in their inexperience which probably has not given the problem more
than a few hours of testing.

Jul 26 '05 #9
On 2005-07-26, el************* @yahoo.com <el************ *@yahoo.com> wrote:
Bush is a Fascist wrote:
I find it strange that people even use software that is this
buggy.


I find it strange that an inexperienced user thinks the bug is in the
software which has millions of man hours of testing behind it and not
in their inexperience which probably has not given the problem more
than a few hours of testing.


No matter how bad the code is, i don't think it should be able to make
php segfault.. (For example, i've had scripts that would work perfectly
well with mod_php but segfaulted in the php-cli version...)

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be >
Jul 26 '05 #10

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

Similar topics

2
6795
by: sivignon | last post by:
Hi, I'm writing a php script which deals with 3 ORACLE databases. This script is launch by a script shell on an linux machine like this : /../php/bin/php ./MySript.php (PHP 4.3.3) My script works fine and do all what I need. But at the end of the execution, I can read "Segmentation Fault". The segmentation fault appear at the end of my...
3
1939
by: diyanat | last post by:
i am writing a cgi script in C using the CGIC library, the script fails to run, i am using apache on linux error report from apache : internal server error Premature end of script headers: /var/www/cgi-bin/script.cgi when i debug the program i get Segmentation fault gdb ./script.cgi
6
2303
by: damian birchler | last post by:
If I run the following I get a segmentation fault: #define NAMELEN 15 #define NPERS 10 typedef struct pers { char name; int money; } pers_t;
3
2116
by: I_have_nothing | last post by:
Hi! I am new in C. I got a lots of "Segmentation Fault"s in my code. I guess One possibility is: if " int array_i; " is declard and the code trys to access "array_i", a Segmentation Fault will be returned by gcc compiler on linux. What are the other "major" reasons to have "Segmentation Fault"? I hope this is not a stupid question and...
3
11397
by: Zheng Da | last post by:
Program received signal SIGSEGV, Segmentation fault. 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 (gdb) bt #0 0x40093343 in _int_malloc () from /lib/tls/libc.so.6 #1 0x40094c54 in malloc () from /lib/tls/libc.so.6 It's really strange; I just call malloc() like "tmp=malloc(size);" the system gives me Segmentation fault I want to...
6
4759
by: I_have_nothing | last post by:
Hi! I am new in C. I try to use dynamical allocation fuction malloc( ) and realloc( ). I found something strange. After several calling realloc( ), the malloc( ) will give me a Segmentation fault. If I just call realloc( ) once before calling malloc( ), it is OK. Why? I am trying to read some double-typed items from infile and save them
5
2984
by: Fra-it | last post by:
Hi everybody, I'm trying to make the following code running properly, but I can't get rid of the "SEGMENTATION FAULT" error message when executing. Reading some messages posted earlier, I understood that a segmentation fault can occur whenever I declare a pointer and I leave it un-initialized. So I thought the problem here is with the (const...
7
5864
by: pycraze | last post by:
I would like to ask a question. How do one handle the exception due to Segmentation fault due to Python ? Our bit operations and arithmetic manipulations are written in C and to some of our testcases we experiance Segmentation fault from the python libraries. If i know how to handle the exception for Segmentation fault , it will help me...
3
5153
by: madunix | last post by:
My Server is suffering bad lag (High Utlization) I am running on that server Oracle10g with apache_1.3.35/ php-4.4.2 Web visitors retrieve data from the web by php calls through oci cobnnection from 10g release2 PHP is configured with the following parameters './configure' '--prefix=/opt/oracle/php' '--with-apxs=/opt/oracle/apache/bin/apxs'...
8
4200
by: Andrea | last post by:
I wrote this code: void * xmalloc (size_t size){ register void *value = OPENSSL_malloc(size); if (value == 0) printf("virtual memory exhausted"); return value; } int _chooseTSK(char* message,int seed){
0
7805
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8053
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. ...
0
6454
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5301
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...
0
3741
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...
0
3752
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2245
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
1
1341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1060
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.