Does anyone know what this error means? I've read that it could be PHP version issue. Could it also be due to permissions? Or say.. like a firewall?
SoapFault Object ( [message:protected] => SOAP-ERROR: Parsing Schema: can't import schema from
'http://www.w3.org/2005/05/xmlmime' [string:Exception:private] => [code:protected] => 0 [file:
protected] => /person/ok/my_library/Zend/Soap/aplace.php [line:protected] => 51 [trace
:Exception:private] => Array ( [0] => Array ( [file] => /person/ok/my_library/Zend/Soap/Client
/aplace.php [line] => 51 [function] => SoapClient [class] => SoapClient [type] => -> [args] =>
Array ( [0] => http://myWSDL:7001/web/10/Intw?WSDL [1] => Array ( [encoding]
=> UTF-8 [soap_version] => 2 [trace] => 1 ) ) ) [1] => Array ( [file] => /person/ok/my_library/
Zend/Soap/Client.php [line] => 1024 [function] => __construct [class] => Zend_Soap_Client_aplace
[type] => -> [args] => Array ( [0] => Array ( [0] => Zend_Soap_Client Object ( [_encoding:protected]
=> UTF-8 [_classmap:protected] => [_faultExceptions:protected] => Array ( ) [_soapVersion:protected]
=> 2 [_uri:protected] => [_location:protected] => [_style:protected] => [_use:protected] =>
[_login:protected] => [_password:protected] => [_proxy_host:protected] => [_proxy_port:protected]
=> [_proxy_login:protected] => [_proxy_password:protected] => [_local_cert:protected] =>
[_passphrase:protected] => [_compression:protected] => [_connection_timeout:protected] =>
[_stream_context:protected] => [_features:protected] => [_cache_wsdl:protected] =>
[_user_agent:protected] => [_wsdl:protected] => http://myWSDL:7001/web/101/Intw?WSDL
[_soapClient:protected] => [_lastMethod:protected] => [_soapInputHeaders:protected] => Array ( )
[_permanentSoapInputHeaders:protected] => Array ( ) [_soapOutputHeaders:protected] => Array ( ) )
[1] => _doRequest ) [1] => http://myWSDL:7001/web/101/Intw?WSDL [2] =>
Array ( [encoding] => UTF-8 [soap_version] => 2 [trace] => 1 ) ) ) [2] =>
Array ( [file] => /my_library/place.php [line] =>
1180 [function] => _initSoapClientObject [class] => Zend_Soap_Client
[type] => -> [args] => Array ( ) ) [3] => Array ( [file] => /my_library/place.php
[line] => 1104 [function] => getSoapClient [class] => Zend_Soap_Client [type] => -> [args] => Array ( ) ) [4] =>
Array ( [file] => /some/path/to/my/file.php [line] =>
149 [function] => __call [class] => Zend_Soap_Client [type] => -> [args] => Array ( [0] => command [1] =>
Array ( [0] => Array ( [arg0] => Array ( [Username] => myUsername:) [Password] =>
myPassword:) [InputField] => Summary [ItemId] => 9999999 ) ) ) ) ) [5] =>
Array ( [file] => /some/path/to/my/file.php
[line] => 149 [function] => command [class] => Zend_Soap_Client [type] => -> [args] =>
Array ( [0] => Array ( [arg0] => Array ( [Username] => myUsername:) [Password] => myPassword:) [InputField] =>
Summary [ItemId] => 9999999 ) ) ) ) [6] => Array ( [file] => /some/path/to/my/file.php
[line] => 256 [function] => getPickFieldValue [class] => Code_Tracker_PriNvcProcessController [type] => -> [args] =>
Array ( [0] => Dev Task Component ) ) [7] => Array ( [file] => /person/ok/my_library/Zend/Controller/Action.php [line] => 513 [function] =>
mksFormAction [class] => Code_Tracker_PriNvcProcessController [type] => -> [args] => Array ( ) ) [8] =>
Array ( [file] => /some/other/path/to/another/file.php [line] => 289 [function] =>
dispatch [class] => Zend_Controller_Action [type] => -> [args] => Array ( [0] => mksFormAction ) ) [9] =>
Array ( [file] => /person/ok/my_library/Zend/Controller/Front.php [line] => 954 [function] => dispatch [class] =>
Zend_Controller_Dispatcher_Standard [type] => -> [args] => Array ( [0] => Zend_Controller_Request_Http Object ( [_paramSources:protected] =>
Array ( [0] => _GET [1] => _POST ) [_requestUri:protected] => /yet/another/path/to/a/js/form?code_id=706 [_baseUrl:protected] =>
[_basePath:protected] => [_pathInfo:protected] => /yet/another/path/to/a/js/form [_params:protected] => Array ( [module] =>
code_tracker [controller] => pri-nvc-process [action] => mks-form ) [_rawBody:protected] => [_aliases:protected] => Array ( )
[_dispatched:protected] => 1 [_module:protected] => code_tracker [_moduleKey:protected] => module [_controller:protected] =>
pri-nvc-process [_controllerKey:protected] => controller [_action:protected] => mks-form [_actionKey:protected] => action ) [1] =>
Zend_Controller_Response_Http Object ( [_body:protected] => Array ( ) [_exceptions:protected] => Array ( ) [_headers:protected] => Array ( )
[_headersRaw:protected] => Array ( ) [_httpResponseCode:protected] => 200 [_isRedirect:protected] => [_renderExceptions:protected] =>
[headersSentThrowsException] => 1 ) ) ) [10] => Array ( [file] => /again/another/path/to/initialize.php [line] => 67 [function] =>
dispatch [class] => Zend_Controller_Front [type] => -> [args] => Array ( ) ) [11] => Array ( [file] => /again/another/path/to/initialize.php
[line] => 43 [function] => dispatch [class] => application_Init [type] => :: [args] => Array ( ) ) [12] => Array ( [file] =>
/again/another/path/to/initialize.php [line] => 55 [function] => init [class] => application_Init [type] => :: [args] =>
Array ( ) ) [13] => Array ( [file] => /another/path/but/to/html/index.php [line] => 20 [function] => start [class] =>
application_Init [type] => :: [args] => Array ( ) ) ) [previous:Exception:private] => [faultstring] => SOAP-ERROR:
Parsing Schema: can't import schema from 'http://www.w3.org/2005/05/xmlmime' [faultcode] => WSDL )
There could still be proxy (preventing access to schema from your application) but your browser might already be preconfigured for it.
Within your php application, can print log output for the HTTP code returned for that schema location? Haven't use PHP before but perhaps using HttpClient - something like this: http://scripts.incutio.com/httpclient/examples.php
Related
Code:
$response = $s3->copyObject(array(
'Bucket' => $bucket,
'Key' => $key,
));
Response:
Aws\Result Object
(
[data:Aws\Result:private] => Array
(
[CopyObjectResult] => Array
(
[ETag] => "s906113sa3401932f56f79ec75a1c877"
[LastModified] => Aws\Api\DateTimeResult Object
(
[date] => 2021-05-31 04:51:54.000000
[timezone_type] => 2
[timezone] => Z
)
)
[Expiration] =>
[CopySourceVersionId] =>
[VersionId] =>
[ServerSideEncryption] =>
[SSECustomerAlgorithm] =>
[SSECustomerKeyMD5] =>
[SSEKMSKeyId] =>
[SSEKMSEncryptionContext] =>
[BucketKeyEnabled] =>
[RequestCharged] =>
[#metadata] => Array
(
[statusCode] => 200
[effectiveUri] => https://bucket-dev.s3.amazonaws.com/store111/RawVideo/videogallery/file_example_MP4_480_1_5MG_1622436712.mp4
[headers] => Array
(
[x-amz-id-2] => DFzipf5adLLXV1435xCQO5d+R0LgDDl74o143UicbYF5biXv78G/j4HEDhoS8FsBY9C8HC+mOw8=
[x-amz-request-id] => 4SVDA143BSDZ49A6QJK
[date] => Mon, 31 May 2021 04:51:54 GMT
[content-type] => application/xml
[content-length] => 234
[server] => AmazonS3
)
[transferStats] => Array
(
[http] => Array
(
[0] => Array
(
)
)
)
)
[ObjectURL] => https://bucket-dev.s3.amazonaws.com/store111/RawVideo/videogallery/file_example_MP4_480_1_5MG_1622436712.mp4
)
[monitoringEvents:Aws\Result:private] => Array
(
)
)
The above out I want to get the ETag value in the below code
$etag = $response->get('ETag');
I am getting the $etag value as empty. Please help and let me know how I will get it?
Note: It was working fine for aws v2 when we migrate it from aws v2 to v3 we are getting different types of responses.
After checking finally I just call the below:
$etag = $response['CopyObjectResult']['ETag'];
It's working fine as expected.
I want to get index items by range according to the docs: https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_range_filters.html
Here is my request:
array (
'ConsistencyLevel' => 'EVENTUAL',
'DirectoryArn' => 'myARN',
'IndexReference' =>
array (
'Selector' => '/Global/fieldIndex',
),
'RangesOnIndexedValues' =>
array (
0 =>
array (
'AttributeKey' =>
array (
'FacetName' => 'Field',
'Name' => 'fieldPath',
'SchemaArn' => 'myARNSCHEMA',
),
'Range' =>
array (
'EndMode' => 'LAST',
'StartMode' => 'INCLUSIVE',
'StartValue' =>
array (
'StringValue' => 'deal.applications.applicants',
),
),
),
),
)
And I have the error response:
Limited range must be the first range after prefixes
'[range[<FIRST>, <LAST>], range[precedes{6465616c2e6170706c69636174696f6e732e6170706c6963616e7473}, <LAST>]]' -
{"Message":"Limited range must be the first range after prefixes '[range[<FIRST>, <LAST>], range[precedes{6465616c2e6170706c69636174696f6e732e6170706c6963616e7473}, <LAST>]]'"}
Does anybody know what am I doing wrong?
Thanks.
Sorted this in another way changing the request:
array (
'ConsistencyLevel' => 'EVENTUAL',
'DirectoryArn' => 'arn',
'IndexReference' =>
array (
'Selector' => '/Global/fieldIndex',
),
'RangesOnIndexedValues' =>
array (
0 =>
array (
'AttributeKey' =>
array (
'FacetName' => 'Field',
'Name' => 'fieldPath',
'SchemaArn' => 'schmaarn',
),
'Range' =>
array (
'EndMode' => 'EXCLUSIVE',
'StartMode' => 'INCLUSIVE',
'StartValue' =>
array (
'StringValue' => 'Global.deal.applications.applicants.',
),
'EndValue' =>
array (
'StringValue' => 'Global.deal.applications.applicants/',
),
),
),
),
)
Have this:
Array ( [0] => Tiger [first_name] => Tiger [1] => Nixon [last_name] => Nixon [2] => Accountant [position] => Accountant [3] => Tokyo [office] => Tokyo [4] => 2016-11-08 [start_date] => 2016-11-08 [5] => 320800 [salary] => 320800 ) Array ( [0] => Garrett [first_name] => Garrett [1] => Winters [last_name] => Winters [2] => Accountant2 [position] => Accountant2 [3] => Tokyo [office] => Tokyo [4] => 2016-11-08 [start_date] => 2016-11-08 [5] => 170750 [salary] => 170750 ) Array ( [0] => Ashton [first_name] => Ashton [1] => Cox [last_name] => Cox [2] => Accountant3 [position] => Accountant3 [3] => Tokyo [office] => Tokyo [4] => 2016-11-08 [start_date] => 2016-11-08 [5] => 86000 [salary] => 86000 ) Array ( [0] => Cedric [first_name] => Cedric [1] => Kelly [last_name] => Kelly [2] => Accountant4 [position] => Accountant4 [3] => Tokyo [office] => Tokyo [4] => 2016-11-08 [start_date] => 2016-11-08 [5] => 433060 [salary] => 433060 )
Want it to look like this:
Array (
[0] => Tiger [first_name] => Tiger
[1] => Nixon [last_name] => Nixon
[2] => Accountant [position] => Accountant
[3] => Tokyo [office] =>
...
In notepad++ usng regex
Find this:
\[(\d)\]
And replace with this
\n\[$1\]
\[(\d)\] - this finds this pattern [0] or [1] ...
(\d) - this captures the value inside the squar brackets: 0 or 1 ...
\n\[$1\] - this puts a new line before the open square bracket, $1 is what was captured in the brackets () in the find above and replaced here, and then finished with a ] square bracket.
NOTE note the \ escaping on the square brackets e.g. \[
The other answer plus:
Find What: " Array"
Replace With: "\nArray"
To also have each of your Array on new line.
I need to figure out how to iterate through a Facebook group feed that's returned as an object from the Facebook graph. Everything is working fine until I try to go through the object and get all the data so that I can format and print it.
This is my request...
$request = new FacebookRequest( $session, 'GET', '/group_id/feed' );
$response = $request->execute();
$object = $response->getGraphObject()->asArray();
It returns the feed of my group in an object, for example...
Array
(
[data] => Array
(
[0] => stdClass Object
(
[id] => POST ID
[from] => stdClass Object
(
[id] => MEMBER ID
[name] => MEMBER NAME
)
[to] => stdClass Object
(
[data] => Array
(
[0] => stdClass Object
(
[name] => Film Club
[id] => GROUP ID
)
)
)
[message] => MESSAGE
[picture] => PICTURE URL
[link] => LINK URL
[icon] => https://fbstatic-a.akamaihd.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif
[actions] => Array
(
[0] => stdClass Object
(
[name] => Comment
[link] => LINK
)
[1] => stdClass Object
(
[name] => Like
[link] => LINK
)
)
[privacy] => stdClass Object
(
[value] =>
)
[type] => photo
[object_id] => OBJECT ID
[application] => stdClass Object
(
[name] => Facebook for iPhone
[namespace] => fbiphone
[id] => ID
)
[created_time] => 2014-10-02T00:39:00+0000
[updated_time] => 2014-10-02T00:51:53+0000
[likes] => stdClass Object
(
[data] => Array
(
[0] => stdClass Object
(
[id] => ID
[name] => NAME
)
[1] => stdClass Object
(
[id] => ID
[name] => NAME
)
)
[paging] => stdClass Object
(
[cursors] => stdClass Object
(
[after] => ODI5MTk3ODI3MTEzOTk1
[before] => MTU1NjEwNzcxMTI3MjIyNQ==
)
)
)
[comments] => stdClass Object
(
[data] => Array
(
[0] => stdClass Object
(
[id] => COMMENT ID
[from] => stdClass Object
(
[id] => MEMBER ID
[name] => NAME
)
[message] => COMMENT
[can_remove] => 1
[created_time] => 2014-10-02T00:45:23+0000
[like_count] => 1
[user_likes] =>
)
)
[paging] => stdClass Object
(
[cursors] => stdClass Object
(
[after] => WTI5dGJXVnVkRjlqZFhKemIzSTZNamczT0RreU9EQXhOREF4TlRnd09qRTBNVEl5TVRFeE1UTTZMVEU9
[before] => WTI5dGJXVnVkRjlqZFhKemIzSTZNamczT0RreE5EazBOek0xTURRME9qRTBNVEl5TVRBM01qTTZMVEU9
)
)
)
)
)
)
And to loop through all this I've tried a number of different things, stuff I've found here and everywhere else on the internet. I haven't been able to find any way to output more than just the POST ID. It's been a while since I've programmed anything, but this shouldn't be this hard. Can anyone help me figure this out?
Here is my code:
$session = $facebook->getSession();
var_dump($session);/*it says session is perfectly established*/
try {
$uid = $facebook->getUser();
echo '<br>';
var_dump($uid);/*User id is found*/
$fb_user = $me = $facebook->api('/me');/*PHP execution doesn't go forward, here it breaks*/
echo '<br>';
var_dump($fb_user);/*PHP execution doesn't come up to here*/
EDITED:
I have print_r the $exception in the catch section and got the following long message:
FacebookApiException Object
(
[result:protected] => Array
(
[error_code] => 6
[error] => Array
(
[message] => name lookup timed out
[type] => CurlException
)
)
[message:protected] => name lookup timed out
[string:private] =>
[code:protected] => 6
[file:protected] => /home/abusadat/public_html/.../facebook.php
[line:protected] => 614
[trace:private] => Array
(
[0] => Array
(
[file] => /home/abusadat/public_html/.../facebook.php
[line] => 575
[function] => makeRequest
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => https://graph.facebook.com/me
[1] => Array
(
[method] => GET
[access_token] => ******...******
)
)
)
[1] => Array
(
[file] => /home/abusadat/public_html/.../facebook.php
[line] => 539
[function] => _oauthRequest
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => https://graph.facebook.com/me
[1] => Array
(
[method] => GET
)
)
)
[2] => Array
(
[file] => /home/abusadat/public_html/.../facebook.php
[line] => 492
[function] => _graph
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => /me
)
)
[3] => Array
(
[file] => /home/abusadat/public_html/.../fb-connect.php
[line] => 31
[function] => api
[class] => Facebook
[type] => ->
[args] => Array
(
[0] => Array
(
[0] => Facebook Object
(
[appId:protected] => ******...******
[session:protected] => Array
(
[access_token] => ******...******
[base_domain] => abusadat.com
[expires] => 1312567200
[secret] => ******...******
[session_key] => ******...******
[sig] => ******...******
[uid] => ******...******
)
[signedRequest:protected] =>
[sessionLoaded:protected] => 1
[cookieSupport:protected] => 1
[baseDomain:protected] =>
[fileUploadSupport:protected] =>
)
[1] => _graph
)
[1] => Array
(
[0] => /me
)
)
)
[4] => Array
(
[file] => /home/abusadat/public_html/.../index.php
[line] => 29
[args] => Array
(
[0] => /home/abusadat/public_html/.../fb-connect.php
)
[function] => include_once
)
)
)
I am using SDK version 2.1.2. I have some restriction to use SDK 3 or greater.
My guess is that an exception is being thrown and that you don't see it because your PHP error reporting settings are not tuned properly.
Add this to the top of your PHP file:
ini_set('display_errors', 1);
error_reporting(E_ALL);
You should then see a PHP error when visiting the page.