simbor / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

Segmentation fault on certain ->mutate() methods on 64-bit hosts #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Running into a segmentation fault issue on certain SOAP requests (e.g.  
$campaignAdExtensionService->mutate() ), but works fine for other mutate 
methods (like those for the campaign service). I have it working on other AWS 
instances with the same version of PHP. Only configuration difference is that 
the failing machine is x86_64, while the working one is i686.

Which version of the library are you using?

v201101

Which version of PHP are you using?

5.2.4

What steps will reproduce the problem?

`
// Code above here would be for setting up $AdWordsUser and setting $campaignId

// Declare Service
$campaignAdExtensionService = 
$AdWordsUser->GetCampaignAdExtensionService('v201101);

// Building extension
$sitelink = new Sitelink();
$sitelink->destinationUrl = 'http://facebook.com/';
$sitelink->displayText = 'Facebook.com #' . time();
$sendlinks[] = $sitelink;

$sitelink = new Sitelink();
$sitelink->destinationUrl = 'http://cnn.com/';
$sitelink->displayText = 'CNN.com #' . time();
$sendlinks[] = $sitelink;

// Add to a sitelink exention object
$linksExtension = new SitelinksExtension();
$linksExtension->sitelinks = $sendlinks;

// Create campaign ad extension.
$campaignAdExtension = new CampaignAdExtension();
$campaignAdExtension->campaignId = (float) $campaignId;
$campaignAdExtension->adExtension = $linksExtension;

// Create operations.
$operation = new CampaignAdExtensionOperation();
$operation->operand = $campaignAdExtension;
$operation->operator = 'ADD';

$operations = array($operation);

print 'Setting new extensions... ';

try {
    $campaignAdExtensionService->mutate($operations);       
} catch (Exception $e) {
    error_log( $e->getMessage());
}

`

What is the expected output? What do you see instead?

On local development and on 32-bit AWS servers, the code above executes without 
any trouble. On a 64-bit host, this is throwing a segmentation fault.

Please provide any additional information below.

`==> /var/log/httpd/error_log <==
Jul 30 10:45:47 domU-12-31-36-00-29-31 httperror: [Sat Jul 30 10:45:47 2011] 
[error] [client 98.193.129.201] proxy: error reading status line from remote 
server 127.0.0.1
Jul 30 10:45:47 domU-12-31-36-00-29-31 httperror: [Sat Jul 30 10:45:47 2011] 
[error] [client 98.193.129.201] proxy: Error reading from remote server 
returned by /adwords/tests/2011-07-29_segmentation_fault.php

==> /var/log/httpd/haproxy.log <==
Jul 30 10:45:47 127.0.0.1 haproxy[7569]: 127.0.0.1:55999 [30/Jul/2011:10:45:46] 
www i-310c6e5a 0/0/0/-1/1532 -1 0 - - --VN 0/0/0 0/0 "GET 
/adwords/tests/2011-07-29_segmentation_fault.php HTTP/1.1"

==> /var/log/httpd/error_log <==
[Sat Jul 30 10:45:48 2011] [notice] child pid 13985 exit signal Segmentation 
fault (11)`

Original issue reported on code.google.com by stephen....@gmail.com on 30 Jul 2011 at 3:10

GoogleCodeExporter commented 8 years ago
Possibly related to issue #20 ...

Original comment by stephen....@gmail.com on 30 Jul 2011 at 5:12

GoogleCodeExporter commented 8 years ago
Is the 32-bit host also using PHP 5.2.4?  I can't replicate the seg fault on my 
64-bit machine, can you provide more details about your build?  In general I 
found that the underlying SOAP extension got much more stable in later 
releases, so I'd encourage you to upgrade to a newer version of PHP if possible.

While debugging I found a bug in the SoapRequestXmlFixer that was causing 
namespace issues in 5.2.4, and I will be pushing out a fix soon.

Original comment by ekoleda+devrel@googlers.com on 5 Aug 2011 at 4:13

GoogleCodeExporter commented 8 years ago
Yes, the 32-bit host was also running 5.2.4. Our solution was to upgrade our 
64-bit server instances to 5.2.16. That wasn't ideal, but we really needed to 
get the issue resolved on our end.

I'm more on the software side, but we use RightScale to manage our AWS 
instances. The server was built on 'rightscale-us/CentOS5_2_X86_64_V4_1_10'

Original comment by stephen....@gmail.com on 5 Aug 2011 at 4:19

GoogleCodeExporter commented 8 years ago

Original comment by ekoleda+devrel@googlers.com on 9 Sep 2011 at 2:43