Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

child pid 25742 exit signal Segmentation fault (11)

Status
Not open for further replies.

bezakv

Programmer
Nov 23, 2003
2
GP
Hello.
I have a problem when i am trying to open an imap connection to a server in php

Here is the code:
echo "test";

$a_address = "{servername:143}";
$a_username = "user";
$a_password = "password";

$result = imap_open ($a_address . $a_folder, $a_username, $a_password, $a_flags);

die($result);

On IE i get a message: The page cannot be diplayed and when I look in apache error log, there is a log message:

[Sat Nov 22 14:28:43 2003] [notice] child pid 25742 exit signal Segmentation fault (11)

All mailservers which I tried to connect work, only the one that I need causes this segmentation fault :-(

When i tried to telnet to the mailserver from the computer where apache and php is running it is OK:

telnet servername 143
Trying servername...
Connected to servername.
Escape character is '^]'.
* OK IMAP4 server ready (5.5.021)
1 LOGIN username password
1 OK login successful


What coul be wrong?

PHP Version 4.3.3
Apache/1.3.27


Thanx

 
Variable definitions should not have the $ in front like you have them here:

$a_address = "{servername:143}";
$a_username = "user";
$a_password = "password";

They should be:
a_address = "{servername:143}";
a_username = "user";
a_password = "password";
 
Hello.

That is the normal syntax in php. Variables should have $ in front of them.

The problem is, why the apache child terminates when it tries to open connection to that imap server.

I have also tried it with passthru("telnet servername 143") and it works....
 
There's not much we can do. You either found a bug in PHP or Apache, I'd assume the first. Do you have the IMAP libraries available?

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top