SDK Php provided is not working properly

Posted in General by Mark Alan Tue Nov 03 2015 09:08:01 GMT+0000 (UTC)·7·Viewed 884 times

I download sdk and installed using composer I tried to run the the code and also included the api key as well but I am getting an unexpected error caused here is the error Warning: require_once(C:\wamp\www\aylien\vendor\aylien\textapi\testsbootstrap.php): failed to open stream: No such file or directory in C:\wamp\www\aylien\vendor\aylien\textapi\tests\AllTest.php on line 2 Fatal error: require_once(): Failed opening required 'C:\wamp\www\aylien\vendor\aylien\textapi\testsbootstrap.php' (include_path='.;C:\php\pear') in C:\wamp\www\aylien\vendor\aylien\textapi\tests\AllTest.php on line 2 Please let me know so I can get reid of this error as on line 2 of AllTest.php the file which i placed is require_once __DIR__ . 'bootstrap.php'; but i do not know why I am getting back of this error or is there any way I would be able to locate where and how to integrate the api excluding the install version is there any extracket version of yout api for php Thank yOu Regards Mark Alan
Amir M. Saeid
Nov 3, 2015

Hi Mark,

Can you please share the code snippet that causing these errors? Does something simple like this throw errors as well?

require __DIR__ . "/vendor/autoload.php";
$textapi = new AYLIEN\TextAPI("YOUR_APP_ID", "YOUR_APP_KEY");
Mark Alan
Nov 3, 2015

Yes I was doing wrong before I tried to modify my code but now I am getting the response as null

here is my modified code


require DIR . "/vendor/autoload.php";

$textapi = new AYLIEN\TextAPI("###", "###");

$text = '';

$sentiment = $textapi->Sentiment(array("text" => $text));
$language = $textapi->Language(array("text" => $text));

$sentiment = $textapi->Sentiment(array(
    'text' => 'John is a very good football player!'

$url = '';
$extract = $textapi->Extract(array('url' => $url, 'best_image' => 'true'));


Amir M. Saeid
Nov 3, 2015

It's most likely that it's an SSL certificate issue. Can you pass a third boolean parameter to AYLIEN\TextAPI with falue of false? That'd make calls via HTTP instead of HTTPS.


$textapi = new AYLIEN\TextAPI("ID", "KEY", false);

instead of:

$textapi = new AYLIEN\TextAPI("ID", "KEY",);

Mark Alan
Nov 3, 2015

okay thank you now I got the value returned back so for the result I will clean up using the array method like will separate the data using array method right once again thank you very much

and secondly by mistake I have placed api and key in my article how can I remove it

Amir M. Saeid
Nov 3, 2015

I'm unable to find a way to edit your message and redact the secrets. I've contacted support, but I suggest creating a new Application key and removing the old one via

Mark Alan
Nov 3, 2015

okay thank you

Amir M. Saeid marked this as solved
Markdown is allowed