Comments (6)
@liyifei1987 do you have experience using composer? it sounds like if you want to adopt composer for your project (as we recommend) you might need to spend a few minutes learning how its used. here is a good resource: http://code.tutsplus.com/tutorials/easy-package-management-with-composer--net-25530
If you are trying to use the SDK in a project that does not use composer, I recommend downloading the latest release (https://github.com/opentok/OpenTok-PHP-SDK/releases), unzipping the files, and placing them in your project. In order to load the files, you will either need to use a PSR-0 compliant autoloader (such as http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/class-loading.html) or use require_once
to load the OpenTok classes into your project. If you are just using require_once
you will also need to load classes from the dependencies: guzzle/guzzle
@~3.7, justinrainbow/json-schema
@~1.3.
from opentok-php-sdk.
I don't have experience about composer.
I think the composer.json is not valid.
from opentok-php-sdk.
Hi,
Sorry, I have still some questions.
Yesterday, I succeeded to install composer and build the php sdk.
Thanks for your help yesterday.
But for now, I cannot create session.
Here is my code.
"create_session.php"
create_session($_SERVER["REMOTE_ADDR"], array('mediaMode' => MediaMode::ROUTED)); //$session = $apiObj->create_session(); var_dump($session); echo "here3"; echo $session->getSessionId(); ``` ?>And the outputs are as follow:
here here1object(OpenTok\OpenTok)#2 (3) { ["apiKey":"OpenTok\OpenTok":private]=> string(8) "44888502" ["apiSecret":"OpenTok\OpenTok":private]=> string(40) "95300455e523ee423308ca28512fa4ae5408c2ca" ["client":"OpenTok\OpenTok":private]=> object(OpenTok\Util\Client)#3 (11) { ["apiKey":protected]=> string(8) "44888502" ["apiSecret":protected]=> string(40) "95300455e523ee423308ca28512fa4ae5408c2ca" ["configured":protected]=> bool(true) ["defaultHeaders":protected]=> object(Guzzle\Common\Collection)#5 (1) { ["data":protected]=> array(0) { } } ["userAgent":protected]=> string(82) "OpenTok-PHP-SDK/2.2.2 Guzzle/3.9.1 curl/7.22.0 PHP/5.4.28-1+deb.sury.org~precise+1" ["config":"Guzzle\Http\Client":private]=> object(Guzzle\Common\Collection)#4 (1) { ["data":protected]=> array(1) { ["curl.options"]=> array(3) { [10065]=> string(74) "/var/www/OpenTok/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem" [64]=> bool(true) [81]=> int(2) } } } ["baseUrl":"Guzzle\Http\Client":private]=> string(23) "https://api.opentok.com" ["curlMulti":"Guzzle\Http\Client":private]=> NULL ["uriTemplate":"Guzzle\Http\Client":private]=> NULL ["requestFactory":protected]=> object(Guzzle\Http\Message\RequestFactory)#6 (3) { ["methods":protected]=> array(25) { ["getInstance"]=> int(0) ["__construct"]=> int(1) ["fromMessage"]=> int(2) ["fromParts"]=> int(3) ["create"]=> int(4) ["cloneRequestWithMethod"]=> int(5) ["applyOptions"]=> int(6) ["visit_headers"]=> int(7) ["visit_body"]=> int(8) ["visit_allow_redirects"]=> int(9) ["visit_auth"]=> int(10) ["visit_query"]=> int(11) ["visit_cookies"]=> int(12) ["visit_events"]=> int(13) ["visit_plugins"]=> int(14) ["visit_exceptions"]=> int(15) ["visit_save_to"]=> int(16) ["visit_params"]=> int(17) ["visit_timeout"]=> int(18) ["visit_connect_timeout"]=> int(19) ["visit_debug"]=> int(20) ["visit_verify"]=> int(21) ["visit_proxy"]=> int(22) ["visit_cert"]=> int(23) ["visit_ssl_key"]=> int(24) } ["requestClass":protected]=> string(27) "Guzzle\Http\Message\Request" ["entityEnclosingRequestClass":protected]=> string(42) "Guzzle\Http\Message\EntityEnclosingRequest" } ["eventDispatcher":protected]=> object(Symfony\Component\EventDispatcher\EventDispatcher)#9 (2) { ["listeners":"Symfony\Component\EventDispatcher\EventDispatcher":private]=> array(3) { ["request.sent"]=> array(1) { [100]=> array(1) { [0]=> array(2) { [0]=> object(Guzzle\Http\RedirectPlugin)#8 (1) { ["defaultMaxRedirects":protected]=> int(5) } [1]=> string(13) "onRequestSent" } } } ["request.clone"]=> array(1) { [0]=> array(1) { [0]=> array(2) { [0]=> object(Guzzle\Http\RedirectPlugin)#8 (1) { ["defaultMaxRedirects":protected]=> int(5) } [1]=> string(14) "cleanupRequest" } } } ["request.before_send"]=> array(1) { [0]=> array(2) { [0]=> array(2) { [0]=> object(Guzzle\Http\RedirectPlugin)#8 (1) { ["defaultMaxRedirects":protected]=> int(5) } [1]=> string(14) "cleanupRequest" } [1]=> array(2) { [0]=> object(OpenTok\Util\Plugin\PartnerAuth)#10 (2) { ["apiKey":protected]=> string(8) "44888502" ["apiSecret":protected]=> string(40) "95300455e523ee423308ca28512fa4ae5408c2ca" } [1]=> string(12) "onBeforeSend" } } } } ["sorted":"Symfony\Component\EventDispatcher\EventDispatcher":private]=> array(0) { } } } } here2
I can arrive at only "here2";
Could you please help me to fix this bug?
The path of the file "create_session.php" is - "/var/www/OpenTok/create_session.php"
The vendor folder - "/var/www/OpenTok/vendor"
OpenTok.php - "/var/www/OpenTok/OpenTok.php"
Thank you.
Best Regards.
from opentok-php-sdk.
I'm going to close this Issue since it seems like there were no issues building anymore. We can continue to discuss the problem you are having on the other Issue you created. Please do not post the same message more than once in the future, it makes things harder for me to work with.
from opentok-php-sdk.
Hi Frnds ,
i am new to opentok and dont know how to get the open tok package in my project folder.
I have successfully run the composer it does not show the open tok folder to use.
Pls help me to resolve the problem ?
$apiObj = new OpenTok($API_KEY, $API_SECRET); does not works.
from opentok-php-sdk.
@deepak01230 please send an email to [email protected] with a full description of your problem.
from opentok-php-sdk.
Related Issues (20)
- opentok/src/OpenTok/Util/Client.php - handleSignalingException sporadically causes another unhandled exception HOT 1
- How I can set a time limit for video call? HOT 1
- ClientTest.php causes a Composer deprecation notice when updating opentok/opentok HOT 1
- Client error: `POST https://api.opentok.com/session/create` resulted in a `403 Forbidden` response: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><errorPayload><code>-1</code><message>No suitable authentication (truncated...) in my larvel project HOT 2
- PHP 8 support HOT 1
- 4.10.0 SIP dialing error HOT 4
- jquery-3.4.1.min.js: 2 vulnerabilities (highest severity is: 6.1) HOT 1
- bootstrap-3.0.0.min.js: 6 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 3
- firebase/php-jwt-v5.5.1: 1 vulnerabilities (highest severity is: 9.1) - autoclosed HOT 1
- phpunit/phpunit-8.5.26: 2 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 1
- jquery-1.10.2.min.js: 4 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 1
- Invalid stream object HOT 1
- Screenshare Dialogue box HOT 2
- 4.11.0 SIP dialing error HOT 1
- phpunit/phpunit-8.5.31: 2 vulnerabilities (highest severity is: 6.1) - autoclosed HOT 1
- bootstrap-4.0.0.min.js: 4 vulnerabilities (highest severity is: 6.1) HOT 1
- The apiKey was not a string nor an integerin laravel project HOT 2
- Error 409 with the "startArchive" function HOT 1
- Fix Sample App SipCall
- E_ERROR: Cannot redeclare OpenTok\Util\array_is_list() (previously declared in/opentok/opentok/src/OpenTok/Util/Validators.php:465 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentok-php-sdk.