'Serialization of 'SimpleXMLElement' is not allowed' - hybridauth

I've changed around the path structure for HybridAuth quite a bit, all of the HybridAuth files are in a login directory.
require_once('login/Auth.php');
$auth = new Hybrid_Auth(self::$settings['auth']);
Where self::$settings['auth'] is this json file
{
"debug": 1,
"database": {
"driver": "mysql",
"host": "localhost",
"port": 3306,
"name": "ws_db",
"username": "root",
"password": "",
"charset": "utf8"
},
"auth": {
"base_url": "http://localhost/login/process",
"providers": {
"Twitter": {
"enabled": true
},
"Google": {
"enabled": true,
"keys": {
"id": "",
"secret": ""
}
},
"Facebook": {
"enabled": true,
"keys": {
"id": "",
"secret": ""
},
"trustForwarded": false
},
"Steam": {
"enabled": true
}
},
"debug_mode": true,
"debug_file": "auth.txt"
}
}
I have not yet acquired keys for the providers I intended to use (is that possibly why this is happening?). I tried to login with Steam to test that it was working since it was the only provider that didn't require me to get keys.
$_SESSION['user'] = $auth->authenticate('Steam');
I was correctly redirected to a Steam login page however upon clicking Login I received the above error.
Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in login\Auth.php:153 Stack trace: #0 login\Auth.php(39): Hybrid_Auth::initialize(Array) #1 index.php(83): Hybrid_Auth->__construct(Array) #2 index.php(6): Site::main() #3 {main} thrown in login\Auth.php on line 153
I thought it possibly had something to do with this line:
Hybrid_Logger::debug( "Hybrid_Auth initialize. dump used config: ", serialize( $config ) );
because that is the only line that I see serializing something but commenting that out didn't seem to work. Line 83 in my index.php is the initialization of Hybrid_Auth.
$auth = new Hybrid_Auth(self::$settings['auth']);
I can't seem to figure out what is going wrong with this though. Since that line of code is run when attempting to login and only causes a problem when returning from the Steam authorization page.
Here is the information that was output into auth.txt, I removed some information.
(
[message:protected] => Serialization of 'SimpleXMLElement' is not allowed
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => login\Storage.php
[line:protected] => 73
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => login\Storage.php
[line] => 73
[function] => serialize
[args] => Array
(
[0] => Hybrid_User Object
(
[providerId] => Steam
[timestamp] => 1431707732
[profile] => Hybrid_User_Profile Object
(
[identifier] => ***************
[webSiteURL] =>
[profileURL] => http://steamcommunity.com/id/******/
[photoURL] =>
[displayName] => Renari
[description] => <span>profile information was here</span>
[firstName] => SimpleXMLElement Object
(
[0] => SimpleXMLElement Object
(
)
)
[lastName] =>
[gender] =>
[language] =>
[age] =>
[birthDay] =>
[birthMonth] =>
[birthYear] =>
[email] =>
[emailVerified] =>
[phone] =>
[address] =>
[country] =>
[region] => location information was here
[city] =>
[zip] =>
)
)
)
)
[1] => Array
(
[file] => login\Providers\Steam.php
[line] => 37
[function] => set
[class] => Hybrid_Storage
[type] => ->
[args] => Array
(
[0] => hauth_session.Steam.user
[1] => Hybrid_User Object
(
[providerId] => Steam
[timestamp] => 1431707732
[profile] => Hybrid_User_Profile Object
(
[identifier] => ***************
[webSiteURL] =>
[profileURL] => http://steamcommunity.com/id/******/
[photoURL] =>
[displayName] => ******
[description] => <span>profile information was here</span>
[firstName] => SimpleXMLElement Object
(
[0] => SimpleXMLElement Object
(
)
)
[lastName] =>
[gender] =>
[language] =>
[age] =>
[birthDay] =>
[birthMonth] =>
[birthYear] =>
[email] =>
[emailVerified] =>
[phone] =>
[address] =>
[country] =>
[region] => location information was here
[city] =>
[zip] =>
)
)
)
)
[2] => Array
(
[file] => login\Endpoint.php
[line] => 182
[function] => loginFinish
[class] => Hybrid_Providers_Steam
[type] => ->
[args] => Array
(
)
)
[3] => Array
(
[file] => login\Endpoint.php
[line] => 55
[function] => processAuthDone
[class] => Hybrid_Endpoint
[type] => ->
[args] => Array
(
)
)
[4] => Array
(
[file] => login\Endpoint.php
[line] => 71
[function] => __construct
[class] => Hybrid_Endpoint
[type] => ->
[args] => Array
(
[0] =>
)
)
[5] => Array
(
[file] => index.php
[line] => 90
[function] => process
[class] => Hybrid_Endpoint
[type] => ::
[args] => Array
(
)
)
[6] => Array
(
[file] => index.php
[line] => 6
[function] => main
[class] => Site
[type] => ::
[args] => Array
(
)
)
)
[previous:Exception:private] =>
)

This was an issue with the Steam provider and was fixed in a commit you can download the fixed steam provider from the github repo.

Related

Can't use GQL on Google App Launcher

I am developing a application for the google app engine but I am meeting some difficulties accessing the datastore using the GQL on my app engine launcher. I am using the PHP-GDS library to access the datastore https://github.com/tomwalder/php-gds
This only happens when I am using Google App Engine Launcher. Everything works as expected once I deploy the application.
Call stack
Uncaught exception 'google\appengine\runtime\ApplicationError'
Array
(
[type] => 0
[message] => GQL not supported.
[file] => C:\Program Files (x86)\Google\google_appengine\php\sdk\google\appengine\runtime\RealApiProxy.php
[line] => 53
[backtrace] => Array
(
[0] => Array
(
[file] => C:\Program Files (x86)\Google\google_appengine\php\sdk\google\appengine\runtime\ApiProxy.php
[line] => 40
[function] => makeSyncCall
[class] => google\appengine\runtime\RealApiProxy
[type] => ->
[args] => Array
(
[0] => datastore_v4
[1] => RunQuery
[2] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[3] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
[4] => 60
)
)
[1] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Gateway\ProtoBuf.php
[line] => 205
[function] => makeSyncCall
[class] => google\appengine\runtime\ApiProxy
[type] => ::
[args] => Array
(
[0] => datastore_v4
[1] => RunQuery
[2] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[3] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
[4] => 60
)
)
[2] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Gateway\ProtoBuf.php
[line] => 280
[function] => execute
[class] => GDS\Gateway\ProtoBuf
[type] => ->
[args] => Array
(
[0] => RunQuery
[1] => google\appengine\datastore\v4\RunQueryRequest Object
(
[partition_id] => google\appengine\datastore\v4\PartitionId Object
(
[dataset_id] => dev~okacdn-534
)
[read_options] => google\appengine\datastore\v4\ReadOptions Object
(
)
[gql_query] => google\appengine\datastore\v4\GqlQuery Object
(
[name_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[number_arg:google\appengine\datastore\v4\GqlQuery:private] => Array
(
)
[query_string] => SELECT * FROM `Book` ORDER BY __key__ ASC
[allow_literal] => 1
)
)
[2] => google\appengine\datastore\v4\RunQueryResponse Object
(
)
)
)
[3] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\GDS\Store.php
[line] => 256
[function] => gql
[class] => GDS\Gateway\ProtoBuf
[type] => ->
[args] => Array
(
[0] => SELECT * FROM `Book` ORDER BY __key__ ASC
[1] =>
)
)
[4] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\App\Http\Controller\Sandbox.php
[line] => 30
[function] => fetchAll
[class] => GDS\Store
[type] => ->
[args] => Array
(
)
)
[5] => Array
(
[function] => Execute
[class] => App\Http\Controller\Sandbox
[type] => ::
[args] => Array
(
)
)
[6] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\Oka\Web.php
[line] => 148
[function] => call_user_func_array
[args] => Array
(
[0] => Array
(
[0] => \App\Http\Controller\Sandbox
[1] => Execute
)
[1] => Array
(
)
)
)
[7] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Libraries\Oka\Web.php
[line] => 93
[function] => Execute
[class] => Oka\Web
[type] => ::
[args] => Array
(
)
)
[8] => Array
(
[file] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Public\index.php
[line] => 30
[function] => Initialize
[class] => Oka\Web
[type] => ::
[args] => Array
(
)
)
[9] => Array
(
[file] => C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\php\setup.php
[line] => 147
[args] => Array
(
[0] => C:\Users\Ole\Google Drive\Workspace\OkaCdn\Public\index.php
)
[function] => require
)
)
)
The exception is called from some python files
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\cloud_datastore_validator.py:
985
986
987: _assert_condition(not req.HasField('gql_query'), 'GQL not supported.')
988 _assert_initialized(req)
989 self.__entity_validator.validate_partition_id(READ,
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_stub_util.py:
3861
3862 datastore_pbs.check_conversion(not v1_req.HasField('gql_query'),
3863: 'GQL not supported')
3864 v3_query = datastore_pb.Query()
3865 self._query_converter.v1_to_v3_query(v1_req.partition_id, v1_req.query,
....
4212
4213 datastore_pbs.check_conversion(not v4_req.has_gql_query(),
4214: 'GQL not supported')
4215 v3_query = datastore_pb.Query()
4216 self._query_converter.v4_to_v3_query(v4_req.partition_id(), v4_req.query(),
C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_v4_validator.py:
1063
1064
1065: _assert_condition(not req.has_gql_query(), 'GQL not supported.')
1066 _assert_initialized(req)
1067 self.validate_read_options(req.read_options())
4 matches across 3 files
Does anybody by any chance why GQL is not supported on my App Engine Launcher?
GQL is not currently supported by the local development server - only the live Datastore environment. This is a restriction of the Google SDK.
I am considering adding a basic GQL parser to the php-gds library. Feel free to note your support (or not) for this idea here:
https://github.com/tomwalder/php-gds/issues/44
I think I also updated your issue here too:
https://github.com/tomwalder/php-gds/issues/45

GET statuses/mentions_timeline original id not associated with replies

I am having a hard time understanding the structure of the API call when using https://api.twitter.com/1.1/statuses/mentions_timeline.json.
According to their documentation in_reply_to_status_id_str is refered to as
If the represented Tweet is a reply, this field will contain the string representation of the original Tweet’s ID
That part I understand is so you can know what reply is associated with what original tweet. Makes sense...
Now in the original tweet it will contain its ID in id_str
Problem is that when viewing the array even though I have tweets and replies the replies in_reply_to_status_id_str have an ID associated with them but that ID never matches the original tweets ID.
Here is an example output I am receiving. Excuse me if the array is huge but it's what it is.
Array
(
[0] => stdClass Object
(
[created_at] => Wed Jul 25 23:25:31 +0000 2018
[id] => 1022261593520857088
[id_str] => 1022261593520857088
[text] => #somecompany test https://example.com/0D83Rp32ZA
[truncated] =>
[extended_entities] => stdClass Object
(
[media] => Array
(
[0] => stdClass Object
(
[id] => 1022261588324016128
[id_str] => 1022261588324016128
[indices] => Array
(
[0] => 19
[1] => 42
)
[media_url] => http://pbs.twimg.com/media/Di_Nf5eUYAA58XD.jpg
[media_url_https] => https://pbs.twimg.com/media/Di_Nf5eUYAA58XD.jpg
[url] => https://example.com/0D83Rp32ZA
[display_url] => pic.twitter.com/0D83Rp32ZA
[expanded_url] => https://twitter.com/jsmith/status/1022261593520857088/photo/1
[type] => photo
[sizes] => stdClass Object
(
[thumb] => stdClass Object
(
[w] => 150
[h] => 150
[resize] => crop
)
[small] => stdClass Object
(
[w] => 640
[h] => 480
[resize] => fit
)
[large] => stdClass Object
(
[w] => 640
[h] => 480
[resize] => fit
)
[medium] => stdClass Object
(
[w] => 640
[h] => 480
[resize] => fit
)
)
)
)
)
[source] => Twitter Web Client
[in_reply_to_status_id] =>
[in_reply_to_status_id_str] =>
[in_reply_to_user_id] => 874407123177713664
[in_reply_to_user_id_str] => 874407123177713664
[in_reply_to_screen_name] => somecompany
[user] => stdClass Object
(
[id] => 55914522
[id_str] => 55914522
[name] => John Smith
[screen_name] => jsmith
[location] => Las Vegas, NV
[description] => Coder, Sys Admin, Star Wars Lover and #SEO FTW
[url] => https://example.com/X76OkU3gFw
[entities] => stdClass Object
(
[url] => stdClass Object
(
[urls] => Array
(
[0] => stdClass Object
(
[url] => https://example.com/X76OkU3gFw
[expanded_url] => http://www.somecompany.com
[display_url] => somecompany.com
[indices] => Array
(
[0] => 0
[1] => 23
)
)
)
)
[description] => stdClass Object
(
[urls] => Array
(
)
)
)
[protected] =>
[followers_count] => 172
[friends_count] => 59
[listed_count] => 2
[created_at] => Sat Jul 11 19:55:42 +0000 2009
[favourites_count] => 59
[utc_offset] =>
[time_zone] =>
[geo_enabled] => 1
[verified] =>
[statuses_count] => 675
[lang] => en
[contributors_enabled] =>
[is_translator] =>
[is_translation_enabled] =>
[profile_background_color] => 131516
[profile_background_image_url] => http://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_tile] => 1
[profile_image_url] => http://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_image_url_https] => https://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_banner_url] => https://pbs.twimg.com/profile_banners/55914522/1497644070
[profile_link_color] => 009999
[profile_sidebar_border_color] => EEEEEE
[profile_sidebar_fill_color] => EFEFEF
[profile_text_color] => 333333
[profile_use_background_image] => 1
[has_extended_profile] =>
[default_profile] =>
[default_profile_image] =>
[following] =>
[follow_request_sent] =>
[notifications] =>
[translator_type] => none
)
[geo] =>
[coordinates] =>
[place] =>
[contributors] =>
[is_quote_status] =>
[retweet_count] => 0
[favorite_count] => 1
[favorited] =>
[retweeted] =>
[possibly_sensitive] =>
[lang] => en
)
[1] => stdClass Object
(
[created_at] => Wed Jul 25 23:50:13 +0000 2018
[id] => 1022267810850852864
[id_str] => 1022267810850852864
[text] => #somecompany Back To you
[truncated] =>
[source] => Twitter Web Client
[in_reply_to_status_id] => 1022266741638934529
[in_reply_to_status_id_str] => 1022266741638934529
[in_reply_to_user_id] => 874407123177713664
[in_reply_to_user_id_str] => 874407123177713664
[in_reply_to_screen_name] => somecompany
[user] => stdClass Object
(
[id] => 55914522
[id_str] => 55914522
[name] => John Smith
[screen_name] => jsmith
[location] => Las Vegas, NV
[description] => Coder, Sys Admin, Star Wars Lover and #SEO FTW
[url] => https://example.com/X76OkU3gFw
[entities] => stdClass Object
(
[url] => stdClass Object
(
[urls] => Array
(
[0] => stdClass Object
(
[url] => https://example.com/X76OkU3gFw
[expanded_url] => http://www.somecompany.com
[display_url] => somecompany.com
[indices] => Array
(
[0] => 0
[1] => 23
)
)
)
)
[description] => stdClass Object
(
[urls] => Array
(
)
)
)
[protected] =>
[followers_count] => 172
[friends_count] => 59
[listed_count] => 2
[created_at] => Sat Jul 11 19:55:42 +0000 2009
[favourites_count] => 59
[utc_offset] =>
[time_zone] =>
[geo_enabled] => 1
[verified] =>
[statuses_count] => 675
[lang] => en
[contributors_enabled] =>
[is_translator] =>
[is_translation_enabled] =>
[profile_background_color] => 131516
[profile_background_image_url] => http://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_tile] => 1
[profile_image_url] => http://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_image_url_https] => https://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_banner_url] => https://pbs.twimg.com/profile_banners/55914522/1497644070
[profile_link_color] => 009999
[profile_sidebar_border_color] => EEEEEE
[profile_sidebar_fill_color] => EFEFEF
[profile_text_color] => 333333
[profile_use_background_image] => 1
[has_extended_profile] =>
[default_profile] =>
[default_profile_image] =>
[following] =>
[follow_request_sent] =>
[notifications] =>
[translator_type] => none
)
[geo] =>
[coordinates] =>
[place] =>
[contributors] =>
[is_quote_status] =>
[retweet_count] => 0
[favorite_count] => 0
[favorited] =>
[retweeted] =>
[lang] => en
)
[2] => stdClass Object
(
[created_at] => Thu Jul 26 18:13:20 +0000 2018
[id] => 1022545418192740352
[id_str] => 1022545418192740352
[text] => #somecompany #jsmith I like
[truncated] =>
[source] => Twitter for iPhone
[in_reply_to_status_id] => 1022266300872048641
[in_reply_to_status_id_str] => 1022266300872048641
[in_reply_to_user_id] => 874407123177713664
[in_reply_to_user_id_str] => 874407123177713664
[in_reply_to_screen_name] => somecompany
[user] => stdClass Object
(
[id] => 508050392
[id_str] => 508050392
[name] => Josh
[screen_name] => jcarp53
[location] => nunya, bidness
[description] =>
[url] =>
[entities] => stdClass Object
(
[description] => stdClass Object
(
[urls] => Array
(
)
)
)
[protected] =>
[followers_count] => 48
[friends_count] => 183
[listed_count] => 0
[created_at] => Tue Feb 28 23:03:17 +0000 2012
[favourites_count] => 359
[utc_offset] =>
[time_zone] =>
[geo_enabled] =>
[verified] =>
[statuses_count] => 798
[lang] => en
[contributors_enabled] =>
[is_translator] =>
[is_translation_enabled] =>
[profile_background_color] => C0DEED
[profile_background_image_url] => http://abs.twimg.com/images/themes/theme1/bg.png
[profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme1/bg.png
[profile_background_tile] =>
[profile_image_url] => http://pbs.twimg.com/profile_images/3598324323/914b87cec022095e4bbde9cc4ee902fc_normal.jpeg
[profile_image_url_https] => https://pbs.twimg.com/profile_images/3598324323/914b87cec022095e4bbde9cc4ee902fc_normal.jpeg
[profile_banner_url] => https://pbs.twimg.com/profile_banners/508050392/1367383299
[profile_link_color] => 1DA1F2
[profile_sidebar_border_color] => C0DEED
[profile_sidebar_fill_color] => DDEEF6
[profile_text_color] => 333333
[profile_use_background_image] => 1
[has_extended_profile] =>
[default_profile] => 1
[default_profile_image] =>
[following] =>
[follow_request_sent] =>
[notifications] =>
[translator_type] => none
)
[geo] =>
[coordinates] =>
[place] =>
[contributors] =>
[is_quote_status] =>
[retweet_count] => 0
[favorite_count] => 0
[favorited] =>
[retweeted] =>
[lang] => en
)
[3] => stdClass Object
(
[created_at] => Thu Jul 26 19:39:06 +0000 2018
[id] => 1022567004270551040
[id_str] => 1022567004270551040
[text] => #somecompany Another test
[truncated] =>
[source] => Twitter Web Client
[in_reply_to_status_id] =>
[in_reply_to_status_id_str] =>
[in_reply_to_user_id] => 874407123177713664
[in_reply_to_user_id_str] => 874407123177713664
[in_reply_to_screen_name] => somecompany
[user] => stdClass Object
(
[id] => 55914522
[id_str] => 55914522
[name] => John Smith
[screen_name] => jsmith
[location] => Las Vegas, NV
[description] => Coder, Sys Admin, Star Wars Lover and #SEO FTW
[url] => https://example.com/X76OkU3gFw
[entities] => stdClass Object
(
[url] => stdClass Object
(
[urls] => Array
(
[0] => stdClass Object
(
[url] => https://example.com/X76OkU3gFw
[expanded_url] => http://www.somecompany.com
[display_url] => somecompany.com
[indices] => Array
(
[0] => 0
[1] => 23
)
)
)
)
[description] => stdClass Object
(
[urls] => Array
(
)
)
)
[protected] =>
[followers_count] => 172
[friends_count] => 59
[listed_count] => 2
[created_at] => Sat Jul 11 19:55:42 +0000 2009
[favourites_count] => 59
[utc_offset] =>
[time_zone] =>
[geo_enabled] => 1
[verified] =>
[statuses_count] => 675
[lang] => en
[contributors_enabled] =>
[is_translator] =>
[is_translation_enabled] =>
[profile_background_color] => 131516
[profile_background_image_url] => http://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_image_url_https] => https://abs.twimg.com/images/themes/theme14/bg.gif
[profile_background_tile] => 1
[profile_image_url] => http://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_image_url_https] => https://pbs.twimg.com/profile_images/423584132547891200/HxV6vRel_normal.jpeg
[profile_banner_url] => https://pbs.twimg.com/profile_banners/55914522/1497644070
[profile_link_color] => 009999
[profile_sidebar_border_color] => EEEEEE
[profile_sidebar_fill_color] => EFEFEF
[profile_text_color] => 333333
[profile_use_background_image] => 1
[has_extended_profile] =>
[default_profile] =>
[default_profile_image] =>
[following] =>
[follow_request_sent] =>
[notifications] =>
[translator_type] => none
)
[geo] =>
[coordinates] =>
[place] =>
[contributors] =>
[is_quote_status] =>
[retweet_count] => 0
[favorite_count] => 0
[favorited] =>
[retweeted] =>
[lang] => en
)
)
There are 2 mentions in this array. The first original tweet has a id_str of 1022261593520857088. According to the documentation the following replies to that original tweet should contain that id in the in_reply_to_status_id_str. If you notice that original id is no where in any of the other in_reply_to_status_id_str including the replies to that tweet. So I am confused to the documentations description where it specifies that it should contain the id of the original tweet...which is doesn't.
What I am trying to do is to be able to import the tweet and replies and associate them, but until I can find a common link between the original tweet and the associated replies I cannot do anything.

FedEx : Shipment request failed due to label creation error

I'm trying to create a shipping using FedEx webservice and return commercial invoice. I'm using the request values provided below:
Array
(
[WebAuthenticationDetail] => Array
(
[UserCredential] => Array
(
[Key] => XXXXXXX
[Password] => XXXXXX
)
)
[ClientDetail] => Array
(
[AccountNumber] => XXXX
[MeterNumber] => XXXXX
)
[Version] => Array
(
[ServiceId] => ship
[Major] => 13
[Intermediate] => 0
[Minor] => 0
)
[RequestedShipment] => Array
(
[DropoffType] => REGULAR_PICKUP
[ShipTimestamp] => 2013-09-23T20:50:27+02:00
[ServiceType] => FIRST_OVERNIGHT
[PackagingType] => FEDEX_BOX
[Shipper] => Array
(
[Contact] => Array
(
[PersonName] => User
[CompanyName] => Company
[PhoneNumber] => 56757567456
)
[Address] => Array
(
[StreetLines] => Array
(
[0] => 4400 test street
[1] => apt 65, nro 6098
)
[City] => New York
[StateOrProvinceCode] => NY
[PostalCode] => 10018
[CountryCode] => US
)
)
[Recipient] => Array
(
[Contact] => Array
(
[PersonName] => Test
[CompanyName] => Test
[PhoneNumber] => 4563456
)
[Address] => Array
(
[StreetLines] => Array
(
[0] => Test
[1] =>
)
[City] => New York
[StateOrProvinceCode] => NY
[PostalCode] => 10019
[CountryCode] => US
)
)
[ShippingChargesPayment] => Array
(
[PaymentType] => SENDER
[Payor] => Array
(
[ResponsibleParty] => Array
(
[AccountNumber] => XXXXXX
[Contact] =>
[Address] => Array
(
[CountryCode] => US
)
)
)
)
[CustomsClearanceDetail] => Array
(
[DutiesPayment] => Array
(
[PaymentType] => SENDER
[Payor] => Array
(
[ResponsibleParty] => Array
(
[AccountNumber] => XXXX
[Contact] =>
[Address] => Array
(
[CountryCode] => US
)
)
)
)
[CustomsValue] => Array
(
[Currency] => USD
[Amount] => 44
)
[Commodities] => Array
(
[0] => Array
(
[NumberOfPieces] => 1
[Description] => XXXX
[CountryOfManufacture] => US
[Weight] => Array
(
[Value] => 1
[Units] => LB
)
[Quantity] => 3
[QuantityUnits] => PCS
[UnitPrice] => Array
(
[Currency] => USD
[Amount] => 1
)
[CustomsValue] => Array
(
[Currency] => USD
[Amount] => 3
)
)
)
)
[RateRequestTypes] => LIST
[PackageCount] => 1
[RequestedPackageLineItems] => Array
(
[0] => Array
(
[SequenceNumber] => 1
[GroupPackageCount] => 1
[Weight] => Array
(
[Value] => 1
[Units] => LB
)
[Dimensions] => Array
(
[Length] => 2
[Width] => 3
[Height] => 4
[Units] => IN
)
)
)
[LabelSpecification] => Array
(
[LabelFormatType] => COMMON2D
[ImageType] => PDF
[LabelStockType] => PAPER_7X4.75
)
[ShippingDocumentSpecification] => Array
(
[ShippingDocumentTypes] => Array
(
[0] => COMMERCIAL_INVOICE
)
)
)
)
If i don't include the ShippingDocumentSpecification part it works perfectly. But when i add it i always get this response no matter what:
stdClass Object
(
[HighestSeverity] => FAILURE
[Notifications] => stdClass Object
(
[Severity] => FAILURE
[Source] => ship
[Code] => 6050
[Message] => Shipment request failed due to label creation error
[LocalizedMessage] => Shipment request failed due to label creation error
[MessageParameters] => stdClass Object
(
[Id] => CAUSE
[Value] => General error from JCLS
)
)
[Version] => stdClass Object
(
[ServiceId] => ship
[Major] => 13
[Intermediate] => 0
[Minor] => 0
)
)
Why is this happening? where is there error on the request, cause response is not helping to identify it. Also I'm using a fedex test account, do this have anything to do with this error?...
Thanks.
Part of your request is incomplete:
[ShippingDocumentSpecification] => Array
(
[ShippingDocumentTypes] => Array
(
[0] => COMMERCIAL_INVOICE
)
[CommercialInvoiceDetail] => Array
(
[Format] => Array
(
[StockType] => PAPER_LETTER
[ImageType] => PDF
[ImageTypeSpecified] => 1
[StockTypeSpecified] => 1
)
)
)

Set the dynamic values in drop down in ZF2

I am using Zend Framework 2 and I would like to understand how I can add values to a drop down that is coming from a database.
The code is here:
$this->add(
array(
'name' => 'role',
'type' => 'Zend\Form\Element\Select',
'option' => array(
'label' => 'Role',
'value_option' => $roleData
)
)
);
Here the $roleData as an array and the value of array is as follows:
Array ( [0] => Array ( [id] => 1 [cell] => admin ) [1] => Array ( [id] => 2 [cell] => member ) [2] => Array ( [id] => 3 [cell] => guest ) [3] => Array ( [id] => 4 [cell] => Admina1 ) [4] => Array ( [id] => 5 [cell] => Admina1 ) )
Try 'value_options' instead of 'value_option'.
And your array has to be the following structure:
$options = array(
'1' => 'admin',
'2' => 'member',
'3' => 'guest',
'4' => 'Admina1',
'5' => 'Admina1'
);
$this->add(array(
'name' => 'yesorno',
'type' => 'Zend\Form\Element\Select',
'options' => array(
'label' => 'Yes or No Label',
'value_options' => array(
0 => 'No',
1 => 'Yes'
)
),
));

WSDL Soap Exception in webservices

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

Resources