CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
Pages: [1]

Author Topic: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)  (Read 12245 times)

vkdir

  • Guest
Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
August 31, 2008, 12:07:43 pm
Hi all,

Any ideas what I need to do here?

Code: [Select]
> ./imap2soap.pl 
imap2soap: Initializing http://<domain>+<subdir>/modules/civicrm/extern/soap.php
imap2soap: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141
)

I'm on Dreamhost.  I've compiled my own PHP5 with SOAP enabled, and I've installed all the Perl modules locally.  I also don't have permissions to get to the modules/civicrm/extern/soap.php file from cli.  I don't know if that's a problem or not, though.

Any help is most appreciated!

Thanks!
Victor
« Last Edit: August 31, 2008, 02:15:18 pm by vkdir »

clearlytechnical

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 14, 2008, 02:11:12 pm
Try running

./imap2soap.pl ./imap2soap.conf

make sure your settings are correct in the conf file. 141 has to do with authentication. You are not passing the variables for the login information to the .pl file (I think. Maybe by default it looks for a .conf file and I am way off.)

Please post either way what you have learned.  A lot of people struggle with this and it would be a big help if you shared.

vkdir

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 14, 2008, 02:43:37 pm
I've checked the imap2soap.conf account settings for both the CiviCRM user and the IMAP user and even tried using alternate account information.  I also tried different explicitly passing imap2soap.conf as a command line argument to imap2soap.pl.  Same error each time.

Is there anything within how CiviCRM is configured that would affect the authentication process?  I am under the impression that I only need an account enabled that has CiviCRM access.  Does the domain info have to match?

 ???

FYI, I'm running CiviCRM 2.0.5 & Drupal 5.9.

Victor

clearlytechnical

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 15, 2008, 10:38:25 am
First, I am a newbie, so take what I say with a grain of salt. I am only sharing what I have done and what results I have got.

On a positive note, it looks like your script is solid. So my guess is that you have your SOAP issues behind you. That is a win (you may celebrate by dancing by yourself if you would like, none of us will judge you and understand completely).

Ok, so 141 error.

Are you running this with Joomla or Drupal, or as a stand alone?

Also, you did not confirm that you ran ./imap2soap.pl ./imap2soap.conf.

1. Make sure the conf file is in the current directory as your .pl file.
2. Please confirm that you ran it as I am stating above. As it will NOT WORK unless you call the conf file.

Please confirm and also let me know if you are on Joomla or Drupal, or stand alone version.


Thanks


clearlytechnical

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 15, 2008, 10:41:12 am
Sorry, I just re-read and saw you are running Drupal.

So please confirm that you ran the .pl script as I stated.

After that, please post your conf file so we can look it over. That would help.

1. Make sure you have your imap information correct.
2. Make sure you have your drupal user/pass correct.
3. Make sure you have your url to your soap file correct.

In other words, post your conf file and let's have a look. Please replace any confidential information with place holders like <DOMAIN> <PASS> etc.


Thanks,

vkdir

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 15, 2008, 12:48:40 pm
Quote from: clearlytechnical on September 15, 2008, 10:41:12 am
3. Make sure you have your url to your soap file correct.

I was previously using this link:
Code: [Select]
$SOAP_Server   = 'http://<DOMAIN>/<DRUPAL DIR>/modules/civicrm/extern/soap.php';
I changed it to this and it works now:
Code: [Select]
$SOAP_Server   = 'http://<DOMAIN>/<DRUPAL DIR>/sites/all/modules/civicrm/extern/soap.php';
I should have checked that before.  Sometimes it's hard to wrap my head around all the requirements for everything to work properly.  Thanks for making me confirm all the settings!   ;)

Victor

clearlytechnical

  • Guest
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
September 15, 2008, 03:02:31 pm
Nice work!

Well this may help someone else with a 141 error, so thank you for following up.

sypl

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 03, 2008, 03:42:23 am
I'm having this problem, but am getting a 500 error instead, and can't see what could be wrong with my imap2soap.conf file.

Here's my error:
Code: [Select]
imap2soap: Fatal: During SOAP initialization (500 Can't connect to www.some.org:80 (connect: Connection refused) at imap2soap.pl line 144
Which of course corresponds to this line in imap2soap.pl:
Code: [Select]
my $result =
    $soapClient->authenticate($SOAP_User, $SOAP_Password);

Here's a copy of my details in imap2soap.conf:

Code: [Select]
$SOAP_Server   = 'http://www.some.org/mydrupalinstall/sites/all/modules/civicrm/extern/soap.php';  # your CiviCRM
 $SOAP_User     = 'civiadminusername'; # dedicated user account with access to CiviCRM
 $SOAP_Password = 'civiadminpassword'; # password you set for this account

# Email user: don't forget to forward messages with VERP format to this account
# - the easy way is to set up a 'catch all'
#
 $imapHost = 'mail.some.org'; # e.g. mail.yourdomain.org
 $imapUser = 'catchall@some.org'; # the user name you log into imap with
 $imapPass = 'catchallpassword'; # your IMAP password
 $SSL      = 0; # set to 1 if using IMAPS (port 993)

civiadminuser is a drupal user with access to everything in CiviCRM.

Looking at this thread, it may be that my SOAP::Lite isn't working, but it's installed by default on the server (I'm on a shared hosting environment), so doubt it.

If anyone can help I'd be really grateful. I'm this close to getting the return path set up and think this is the last hurdle.

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 03, 2008, 06:07:01 am
Quote from: sypl on October 03, 2008, 03:42:23 am
Looking at this thread, it may be that my SOAP::Lite isn't working, but it's installed by default on the server (I'm on a shared hosting environment), so doubt it.

Please also check that your PHP is compiled with the SOAP libraries.  Run phpinfo() and search for 'SOAP'.

=Fen

sypl

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 03, 2008, 10:29:29 pm
My server runs PHP4 by default and running phpinfo() doesn't give me SOAP as an installed module for that.

However, I can check installed PHP5 modules via my control panel, and that say I do have it installed for PHP5. Table of info below.

soap

Soap Clientenabled
Soap Serverenabled

DirectiveLocal ValueMaster Value
soap.wsdl_cache11
soap.wsdl_cache_dir/tmp/tmp
soap.wsdl_cache_enabled   11
soap.wsdl_cache_limit55
soap.wsdl_cache_ttl8640086400

Any ideas?

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 04, 2008, 07:04:55 am
The Apache process running your site(s) must be using PHP5 with SOAP.  To test, create a file phpinfo.php under your docroot containing:
Code: [Select]
<?php phpinfo(); ?>
and visit http://yourservername.com/phpinfo.php
« Last Edit: October 05, 2008, 08:52:15 pm by fen »

sypl

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 04, 2008, 08:07:18 am
I did that but like I said it give me the results for PHP Version 4.4.8.

My Drupal site on the other hand definitely uses PHP5, as I forced it to by adding 'SetEnv DEFAULT_PHP_VERSION 5' to the .htaccess file.

Is imap2soap.pl using SOAP or SOAP::Lite? SOAP::Lite is not installed by default on the server for PHP5, only SOAP. I had to install it myself locally via CPAN.

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 05, 2008, 08:55:08 pm
imap2soap.pl uses SOAP::Lite and Drupal needs PHP5 with SOAP installed.

You might get some additional infiormation by turning on debugging by reversing the commenting in these lines:
Code: [Select]
# use SOAP::Lite +trace => 'debug';     # or:
use SOAP::Lite;

sypl

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 07, 2008, 09:55:11 pm
Here's the result with debugging turned on. Is this something to do with the 'Internal response' line?

Code: [Select]
imap2soap: Initializing http://www.some.org/drupal/sites/all/modules/civicrm/extern/soap.php
SOAP::Transport::HTTP::Client::send_receive: POST http://www.some.org/drupal/sites/all/modules/civicrm/extern/soap.php HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 522
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:civicrm#authenticate"

<?xml version="1.0" encoding="UTF-8"?>
  <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                        soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
                        xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <authenticate xmlns="urn:civicrm">
      <c-gensym3 xsi:type="xsd:string">civimail</c-gensym3>
      <c-gensym5 xsi:type="xsd:string">Js35aGug</c-gensym5>
  </authenticate>
  </soap:Body>
</soap:Envelope>

SOAP::Transport::HTTP::Client::send_receive: 500 (Internal Server Error) Can't connect to www.some.org:80 (connect: Connection refused)
Content-Type: text/plain
Client-Date: Wed, 08 Oct 2008 04:17:30 GMT
Client-Warning: Internal response

500 Can't connect to www.some.org:80 (connect: Connection refused)
imap2soap: Fatal: During SOAP initialization (500 Can't connect to www.some.org:80 (connect: Connection refused) at imap2soap.pl line 144)

sypl

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 1
Re: Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)
October 08, 2008, 07:42:22 am
Figured it what was wrong. It's to do with my host - they don't allow scripts to make HTTP requests to themselves to prevent infinite loops.

Is there any way around this? I tried a relative path of '/sites/all/modules/civicrm/extern/soap.php', but that throws a
Code: [Select]
proxy: transport protocol not specified. error.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail »
  • Using IMAP2SOAP »
  • Fatal: During SOAP initialization (404 Not Found at ./imap2soap.pl line 141)

This forum was archived on 2017-11-26.