0

I am trying to use the AWS SDK for PHP 2 to create a file on S3.

Installing via Phar:

http://docs.aws.amazon.com/awssdkdocsphp2/latest/gettingstartedguide/sdk-php2-installing-the-sdk.html#sdk-php2-installing-via-phar

I added the following line to "/etc/php5/conf.d/suhosin.ini":

suhosin.executor.include.whitelist = phar

I restarted apache and the aws.phar include worked as intended. However, without changing anything, on further attempts it seems like the server doesn't send a response and Chrome displays the "no data received" error.

Everytime I restart apache it returns a response, but not on subsequent loads.

Any idea what could be causing this?

Using Laravel, PHP 5.3.2 and Ubuntu.

UPDATE The same thing seems happens with or without the suhosin.ini edit.

Even when the server doesn't return a response to the web browser, the code seems to run properly because it creates a file on S3.

Enkay
  • 1,898
  • 6
  • 24
  • 35
  • Does the script normally run a long time? Are you using a cgi/fcgi configuration of php? – datasage Apr 01 '13 at 04:04
  • The script just creates a text file and takes less than a second to run. No cgi/fcgi config as far as I know. – Enkay Apr 01 '13 at 13:50
  • If you are looking for a response in the browser, you do have php configured with a web server in some way. No data received error can sometimes result from php running in a cgi/fcgi configuration not returning anything to the web server. I would also check any related error logs to see if php is crashing for some reason. – datasage Apr 01 '13 at 15:12
  • How do you explain that the first time the script runs after an apache restart, it returns a response but without changing anything (hitting refresh on the website) it returns an empty response? Also no related errors in the php error log. Anywhere else I should be looking? Right now I'm not even sure what's causing the issue. – Enkay Apr 01 '13 at 15:23
  • You could be getting a segmentation fault on the second request. This may be something that should show up on an apache error log if its happening. – datasage Apr 01 '13 at 15:35
  • Run your PHP script from the command line if you can. I'm having a problem with the Amazon PHP SDK (v. 2) and only discovered a segmentation fault by doing this. The response to a browser just showed the generic "internal server error" (500) page. – Oscar May 10 '13 at 06:31

0 Answers0