After updating my SSL certificate Letsencrypt on server (Linux Ubuntu), I am getting error "SOAP-ERROR: Encoding: object has no 'verify_bool' property" when sending SOAP request. I am using SoapClient.php in Laravel application. Before updating the certificate it worked fine.
My code is here:
$soap_client = new \SoapClient("https://.....?WSDL", array(
'local_cert' => app_path('Services/my.pem'),
'passphrase' => 'mypasphrase')
);
$auth = $soap_client->AuthenticateUser(array(
'aName' => '777.SSL.888',
'aPassword' => 'password'
));
$session_id = $auth->AuthenticateUserResult->SessionID;
$data = $soap_client->getClientsByKeyFields(array(
'aSessionID' => $session_id,
'aClient' => array(
'ID' => 0,
'Natural_Person_Bool' => 1,
'Class_ID' => 10,
'Sex_ID' => 0,
'SETTLEMENT_ID' => 0,
'DOCUMENT_TYPE_ID' => 0,
'ACTIVITY_KIND_ID' => 0,
'RESIDENT_BOOL' => 1,
'ECONOMICS_SECTOR_ID' => 0,
'COUNTRY_ID' => 0,
'IIN' => $iin)
));
Solution was simple. I just needed to add "verify_bool" item to the array for 'aClient' in "getClientsByKeyFields()" function with default value, so my edited code for $data is
$data = $soap_client->getClientsByKeyFields(array(
'aSessionID' => $session_id,
'aClient' => array(
'ID' => 0,
'Natural_Person_Bool' => 1,
'Class_ID' => 10,
'Sex_ID' => 0,
'SETTLEMENT_ID' => 0,
'DOCUMENT_TYPE_ID' => 0,
'ACTIVITY_KIND_ID' => 0,
'RESIDENT_BOOL' => 1,
'ECONOMICS_SECTOR_ID' => 0,
'COUNTRY_ID' => 0,
'IIN' => $iin,
'verify_bool' => 1)
));
On PHP 7.2, the built-in function exif_read_data returns different information to PHP 7.1
This is what I get when I use 7.2:
php -r 'var_export(exif_read_data("x.jpg", "ANY_TAG"));'
array (
'FileName' => 'x.jpg',
'FileDateTime' => 1543144462,
'FileSize' => 3564506,
'FileType' => 2,
'MimeType' => 'image/jpeg',
'SectionsFound' => 'ANY_TAG, IFD0, EXIF',
'COMPUTED' =>
array (
'html' => 'width="3968" height="2976"',
'Height' => 2976,
'Width' => 3968,
'IsColor' => 1,
'ByteOrderMotorola' => 1,
),
'ImageWidth' => 3968,
'ImageLength' => 2976,
'BitsPerSample' =>
array (
0 => 8,
1 => 8,
2 => 8,
),
'ImageDescription' => 'ptr',
'Make' => 'HUAWEI',
'Model' => 'STF-L09',
'Orientation' => 0,
'XResolution' => '72/1',
'YResolution' => '72/1',
'ResolutionUnit' => 2,
'Software' => 'STF-L09C432B120',
'DateTime' => '2018:11:24 15:11:58',
'YCbCrPositioning' => 1,
)
But when I run the exact same code on 7.1, I get much more EXIF data:
array (
'FileName' => 'x.jpg',
'FileDateTime' => 1543144462,
'FileSize' => 3564506,
'FileType' => 2,
'MimeType' => 'image/jpeg',
'SectionsFound' => 'ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS, INTEROP',
'COMPUTED' =>
array (
'html' => 'width="3968" height="2976"',
'Height' => 2976,
'Width' => 3968,
'IsColor' => 1,
'ByteOrderMotorola' => 1,
'ApertureFNumber' => 'f/2.2',
'Thumbnail.FileType' => 2,
'Thumbnail.MimeType' => 'image/jpeg',
'Thumbnail.Height' => 384,
'Thumbnail.Width' => 512,
),
'ImageWidth' => 3968,
'ImageLength' => 2976,
'BitsPerSample' =>
array (
0 => 8,
1 => 8,
2 => 8,
),
'ImageDescription' => 'ptr',
'Make' => 'HUAWEI',
'Model' => 'STF-L09',
'Orientation' => 0,
'XResolution' => '72/1',
'YResolution' => '72/1',
'ResolutionUnit' => 2,
'Software' => 'STF-L09C432B120',
'DateTime' => '2018:11:24 15:11:58',
'YCbCrPositioning' => 1,
'Exif_IFD_Pointer' => 280,
'GPS_IFD_Pointer' => 8454,
'DeviceSettingDescription' => 'ipp' . "\0" . '',
'THUMBNAIL' =>
array (
'ImageWidth' => 512,
'ImageLength' => 384,
'Compression' => 6,
'Orientation' => 0,
'XResolution' => '72/1',
'YResolution' => '72/1',
'ResolutionUnit' => 2,
'JPEGInterchangeFormat' => 8802,
'JPEGInterchangeFormatLength' => 31647,
),
'DocumentName' => NULL,
'ExposureTime' => '30000000/1000000000',
'FNumber' => '220/100',
'ExposureProgram' => 2,
'ISOSpeedRatings' => 320,
'ExifVersion' => '0210',
'DateTimeOriginal' => '2018:11:24 15:11:58',
'DateTimeDigitized' => '2018:11:24 15:11:58',
'ComponentsConfiguration' => '' . "\0" . '',
'ShutterSpeedValue' => '298973/10000',
'ApertureValue' => '227/100',
'BrightnessValue' => '0/1',
'ExposureBiasValue' => '0/10',
'MeteringMode' => 5,
'LightSource' => 1,
'Flash' => 0,
'FocalLength' => '3950/1000',
'MakerNote' => 'Auto',
'SubSecTime' => '405238',
'SubSecTimeOriginal' => '405238',
'SubSecTimeDigitized' => '405238',
'FlashPixVersion' => '0100',
'ColorSpace' => 1,
'ExifImageWidth' => 3968,
'ExifImageLength' => 2976,
'InteroperabilityOffset' => 8424,
'SensingMethod' => 2,
'FileSource' => '',
'SceneType' => '',
'CustomRendered' => 1,
'ExposureMode' => 0,
'WhiteBalance' => 0,
'DigitalZoomRatio' => '100/100',
'FocalLengthIn35mmFilm' => 27,
'SceneCaptureType' => 0,
'GainControl' => 0,
'Contrast' => 0,
'Saturation' => 0,
'Sharpness' => 0,
'SubjectDistanceRange' => 0,
'GPSVersion' => '' . "\0" . '' . "\0" . '',
'GPSLatitudeRef' => 'N',
'GPSLatitude' =>
array (
0 => '51/1',
1 => '8/1',
2 => '49994201/1000000',
),
'GPSLongitudeRef' => 'W',
'GPSLongitude' =>
array (
0 => '2/1',
1 => '42/1',
2 => '59101467/1000000',
),
'GPSAltitudeRef' => '' . "\0" . '',
'GPSAltitude' => '7162/100',
'GPSTimeStamp' =>
array (
0 => '15/1',
1 => '11/1',
2 => '58/1',
),
'GPSProcessingMode' => 'GPS' . "\0" . '',
'GPSDateStamp' => '2018:11:24',
'InterOperabilityIndex' => 'R98',
'InterOperabilityVersion' => '0100',
)
Are there any modules or extensions or changes that I can make to get the full EXIF data when using 7.2? I'm on a shared Linux host, so have some limitations on what I can do.
This appears to be a bug in PHP - https://bugs.php.net/bug.php?id=72682 and https://abi-laboratory.pro/index.php?view=changelog&l=php&v=7.2.3
The only answer is to downgrade - or upgrade - to a version which doesn't have the bug.
All data in array like this
<?php
$sub_arr = array();
$sub_arr[] = array(
'sr_nm' => 1,
'recept_number' => 3019,
'adm_number' => 3434,
'student_name' => 'amit',
'class' => 'LKG',
'pay' => 'online',
'cheq_nm' => '',
'adm_fee' => '',
'consolidated' => '',
'sec.fee' => '',
'dev.charge' => 5000,
'school_fee' => 1300,
'subling' => '-3400',
'transport' => 2300,
'late_fee' =>'total' => 35006
);
$sub_arr[] = array('sr_nm' => 1,
'recept_number' => 3019,
'adm_number' => 3434,
'student_name' => 'amit',
'class' => 'LKG',
'pay' => 'online',
'cheq_nm' => '',
'adm_fee' => '',
'consolidated' => '',
'sec.fee' => '',
'dev.charge' => 5000,
'school_fee' => 1300,
'subling' => '-3400',
'transport' => 2300,
'late_fee' => '',
'total' => 35006
);
And my excel file:
I want to insert new data from A4 shell after loading the file.
The following code chunk will be well known by WP coders working with permalinks.
add_filter('rewrite_rules_array', array($this, 'insert_rewrite_rules'));
function insert_rewrite_rules($rules)
{
// $link_cloaking_text is properly set
$newrules = array();
$newrules['([^\/]*)/\b'.$link_cloaking_text.'\b/(\d*)$'] =
'index.php?pagename=$matches[1]&link_cloaking_id=$matches[2]';
return $newrules + $rules;
}
Problem: I can't get pagename and link_cloaking_id values (query_vars hook and $wp_rewrite->flush_rules() are correctly used)
$newrules['([^\/]*)/\b'.$link_cloaking_text.'\b/(\d*)$'] =
'index.php?pagename=$matches[1]&link_cloaking_id=$matches[2]';
debug:
WP_Query::__set_state(array(
'query_vars' =>
array (
'error' => '404',
'm' => 0,
'p' => 0,
'post_parent' => '',
'subpost' => '',
'subpost_id' => '',
'attachment' => '',
'attachment_id' => 0,
'name' => '',
'static' => '',
'pagename' => '', // empty
'page_id' => 0,
But if I replace $matches[1] with a constant my_pagename, then works:
$newrules['([^\/]*)/\b'.$link_cloaking_text.'\b/(\d*)$'] =
'index.php?pagename=my_pagename&link_cloaking_id=$matches[2]';
debug:
WP_Query::__set_state(array(
'query_vars' =>
array (
'pagename' => 'my_pagename', // correct
'link_cloaking_id' => '8', // correct
'error' => '',
'm' => 0,
'p' => 0,
'post_parent' => '',
What am I doing wrong??
Ok I have a mult-dimensional array which has the following structure...
0 =>
array (
'membership' =>
array (
'member' =>
array (
'name' => '',
'landline' => '',
'libcard' => '',
'mobile' => '',
'email' => '',
),
'updated_at' => '',
'member_id' => 12345,
'starts_at' => '',
'id' => 14,
'group_id' => 280,
'optional_field_values' =>
array (
0 =>
array (
'optional_field' =>
array (
'name' => '',
'updated_at' => '',
'id' => 1,
'group_id' => 280,
'description' => '',
'created_at' => '',
),
'updated_at' => '',
'optional_field_id' => 1,
'membership_id' => 14,
'id' => 4,
'value' => '12539267',
'created_at' => '',
),
),
'ends_at' => '',
'joining_fee' => 0,
'created_at' => '',
),
),
Now I can access everything inside Membership and inside Member using code like...
$member[0]['membership']['member']['name']
or
$member[0]['membership']['joining_fee']
But when ever I try to access stuff inside optional_field_values I get nothing returned...
Any ideas why this is not working?
Edit:
Trying to access the field using code like...
$member[0]['membership']['optional_field_values']['value']
$member[0]['membership']['optional_field_values'][0]['value']
^ Should work...
(Edited to match OP's edit)
How about :
$member[0]['membership']['optional_field_values'][0]['value']
You can iterate over all optional field values like this :
foreach ($member[0]['membership']['optional_field_values'] as $field)
echo $field['value'];