Amazon S3 putObject() - not working - PHP - php

I'm using the standalone PHP-S3 class:
http://undesigned.org.za/2007/10/22/amazon-s3-php-class
I've tried all the ready made tutorials, downloaded the source, changed the corresponding variables (set my bucket, access_key, access_secret).
I'm guetting the following error whenever I try to upload any file:
Warning: S3::putObject(): [417] Unexpected HTTP status in C:\Users\Jad\Dropbox\www\test\S3.php on line 312
Note: My bucket already exists and I even allowed all the permissions to the user everyone (temporarily for it to work but it's still not working)

I had the same problem.
If you are connected through a proxy in my case it worked connection to S3 over SSL.
$s3 = new S3(S3KEY, S3SECRET, true);

So I created a new bucket in the US (the last one was in Ireland) and everything works smoothly now.

I had the same problem. I'm connected to a proxy... If I'm connected to an other network, it works :)

I've had this issue behind a squid3 proxy and the problem was resolved by the following squid configuration directive:
ignore_expect_100 on

Related

Trouble with CKFinder + Laravel 8

I did everything according to points 1-5 as indicated in the Readme.MD
https://github.com/ckfinder/ckfinder-laravel-package#configuring-authentication
On site authors say: At this point you should see the connector JSON response after navigating to the <APP BASE URL>/ckfinder/connector?command=Init address. Authentication for CKFinder is not configured yet, so you will see an error response saying that CKFinder is not enabled
I opened link
http://127.0.0.1:8000/ckfinder/connector?command=Init
And have JSON error:
{"error":{"number":110,"message":"Unknown error."}}
Can someone help me? How to find reason of trouble? i google many sites and there is no desicion
Are you using PHP 8+?
For me the issue was a deprecated line in the package itself.
I fixed this error by changing vendor\ckfinder\ckfinder-laravel-package\_connector\ArgumentResolver.php line 65
from
if ($reflectionClass = $param->getClass()) {
to
if ($reflectionClass = new \ReflectionClass($param->getType()->getName())) {
because getClass() is deprecated in PHP 8.0.3, It works fine for me now.
Note: Do keep in mind that it's not good to change things inside the vendor folder!

Error "Couldn't reach API" when I try to log in

I install Directus CMS via git clone successful. In the database 15 tables were created. In /config folder my projectkey.php file were created too.
After installation I want to login with my credentials and get the error "Couldn't reach API".
In PHP Error log -> no entry
In Directus log -> no entry
REST calls:
authenticate/ -> Code 200; Response: data/user
projectkey/ -> Code 200; Response: data/api
ping/ -> Code 200; Response: Pong
In a working instance I have seen that in API Call projectkey/ are more properties. For example data/server is missing in my instance.
Does anyone have any idea what this could be?
Version 8.5.X solved my problem
I had the same error and found the solution in the project's corresponding issue:
Check that you're using HTTPS on webservers and local... that is a new requirement added in 8.7.2 due to a cookie policy change by Chrome et al. If it STILL is an issue, please open a new ticket with exact/specific information. Thanks! 👍
Also, just as a reminder, this is a VERY generic error and could shown for several different root causes. More specific error handling/codes is something we're adding in v9.
Enabling SSL fixed it for me.

PHP / Laravel and Jenkins

I'm Integrating Laravel and Jenkins, and it seems to be working.
The only problem I have is that all my tests are used with base Url : http://localhost.
So All my tests fails because it says:
http://**localhost**/path/to/uri] failed. Received status code [500].
So, all the test fails because I guess I don't know
Where should I define what should be the http://localhost to be the baseUrl I want.
What should I put here, or where should I configure it... I could log ssh to my Jenkins machine and curl my url to see what's the response to see if it is responding well, but I'm quite unsure how should this work...
Any help will be appreciated!
Open TestCase.php which is inside test folder. There you should have protected $baseUrl which should be your application URL.

how to configure facebook api in localhost in xampp or wamp server? what is php.ini settings requirement to use it?

I m new to use of facebook api after some googling i found facebook api from this link:
https://github.com/facebook/facebook-php-sdk
after download this package i try to execute example code from this package but it returns an error like:
Fatal error: Uncaught CurlException: 6: Could not resolve host: graph.facebook.com; Host not found thrown in D:\xampp\htdocs\testing\phpdemo\fb\src\base_facebook.php on line 994
to solve this problem i try too much googling but i doesnt get positive result from there.
If anybody know what kind of possibilities for this problem then please help.
here is may be two posibilities like:
1) Do you have any firewalls? The problem is not about configuration is just CURL can't do requests to graph.facebook.com and possible any website. Try disable any firewalls that may be blocking your CURL requests
2) From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it. Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.
You can get help here,https://stackoverflow.com/questions/16294630
From my experience you can't use facebook APi local, however they have a free host provider,Heroku, try it.
Also don't forget to replace YOUR_APP_ID and YOUR_APP_SECRET with your app Data.

Twitter OAuth failing to work (PHP)

I have the TwitterOAuth class and demonstration running on a local development server and I cannot get it to authorize. I have entered the new CONSUMER_KEY and CONSUMER_SECRET in the config.php. I have also synced the server time to NTP. I get the error message: 'Could not connect to Twitter. Refresh the page or try again later.'
var_dump($connection->http_code);
results:
int 0
ANY help or advise would be appreciated.
I am running PHP 5.3
When I try to ping the api server I can't.
C:\Users\Owner>ping api.twitter.com
Ping request could not find host api.twitter.com. Please check the name and try
again.
could this be the problem ?
I had some issues with this process as well. I don't exactly recall what resolved this error, but I followed This Tutorial (albeit a bit out of date) and made sure I explicitly set the callback URL in the twitter panel for my app. Also, and I believe this one also caused the int 0 return for me, make sure that if you are going with a hosting provider they allow CURL requests.
step 1: https://apps.twitter.com/app or go to your app setting
step 2: Unchecked the (Enable Callback Locking (It is recommended to enable callback locking to ensure apps cannot overwrite the callback url)) This box..
save and exit and check..
ThankYou..!

Categories