Skip to content
This repository was archived by the owner on Apr 18, 2019. It is now read-only.
This repository was archived by the owner on Apr 18, 2019. It is now read-only.

How to deploy this into my own server? Error:'Couldn't resolve host 'api.dropbox.com'' #85

Description

@khurshid-alam

I am using free hosting web on 2freehosting.com (php 5.3.24).

  1. I uploaded the Dropbox folder & its sub-directories under public_html.
  2. I put examples/bootstap.php & tests/setup.php under /public_html/pushover/.
  3. Edited bootstrap.php:

$key = 'my-app-key';
$secret = 'my-app-secret';

$protocol = (!empty($_SERVER['HTTPS'])) ? 'https' : 'http';
$callback = $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

$encrypter = new \Dropbox\OAuth\Storage\Encrypter('24810121416182022242628303234363');


$userID = 1;

$storage = new \Dropbox\OAuth\Storage\PDO($encrypter, $userID);

$storage->connect('mysql.2freehosting.com', 'u311345763_db', 'u211345763_db', 'my-database-pass', 3306);

I do not understand what should be userID or how to find it. So I left it as it is.

Now when I am pinging setup.php it gives me a error:

Fatal error: Uncaught exception 'Dropbox\Exception\CurlException' with message 'Couldn't resolve host 'api.dropbox.com'' in /home/u31134576/public_html/Dropbox/OAuth/Consumer/Curl.php:113 Stack trace: #0 /home/u31134576/public_html/Dropbox/OAuth/Consumer/ConsumerAbstract.php(68): Dropbox\OAuth\Consumer\Curl->fetch('POST', 'https://api.dro...', '') #1 /home/u31134576/public_html/Dropbox/OAuth/Consumer/ConsumerAbstract.php(52): Dropbox\OAuth\Consumer\ConsumerAbstract->getRequestToken() #2 /home/u31134576/public_html/Dropbox/OAuth/Consumer/Curl.php(61): Dropbox\OAuth\Consumer\ConsumerAbstract->authenticate() #3 /home/u31134576/public_html/pushover/bootstrap.php(48): Dropbox\OAuth\Consumer\Curl->__construct('my-app-key', 'my-app-secret', Object(Dropbox\OAuth\Storage\PDO), 'http://zetacode...') #4 /home/u31134576/public_html/pushover/setup.php(10): require_once('/home/u31134576...') #5 {main} thrown in /home/u211345713/public_html/Dropbox/OAuth/Consumer/Curl.php on line 113

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions