Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection with IMDB #122

Closed
greenhouseffecto opened this issue Apr 27, 2018 · 9 comments
Closed

Connection with IMDB #122

greenhouseffecto opened this issue Apr 27, 2018 · 9 comments

Comments

@greenhouseffecto
Copy link

greenhouseffecto commented Apr 27, 2018

Hi, when i try to search a film from my database (php4dvd) this fatal error appears to me.
Can you please help me?

Thank you

Fatal error: Uncaught exception 'Imdb\Exception\Http' with message 'Failed fetch url [https://www.imdb.com/find?s=tt&q=la+dolce+vita] Received HTTP code 403 from proxy after CONNECT' in /php4dvd-master/lib/imdbphp/src/Imdb/Request.php:84
Stack trace:
#0 /php4dvd-master/lib/imdbphp/src/Imdb/Pages.php(72): Imdb\Request->sendRequest()
#1 /php4dvd-master/lib/imdbphp/src/Imdb/Pages.php(54): Imdb\Pages->requestPage('https://www.imd...')
#2 /php4dvd-master/lib/imdbphp/src/Imdb/MdbBase.php(136): Imdb\Pages->get('https://www.imd...')
#3 /php4dvd-master/lib/imdbphp/src/Imdb/TitleSearch.php(28): Imdb\MdbBase->getPage('la dolce vita')
#4 /php4dvd-master/includes/movie.update.inc.php(41): Imdb\TitleSearch->search('la dolce vita', Array)
#5 /php4dvd-master/index.php(135): require_once('/membri/skynexs...')
#6 {main} thrown in /php4dvd-master/lib/imdbphp/src/Imdb/Request.php on line 84
@jreklund
Copy link
Collaborator

jreklund commented Apr 27, 2018

Hi, have you done any changed to your configuration file?
/config/config.php
/config/config.default.php
/lib/imdbphp/conf/php4dvd.ini

Are you using the latest version? As it's says master I would think so; I haven't made a new release just for the updated imdbphp I included in it a few days ago.

You can activate the debug mode just for imdbphp with:
$settings["imdbphp"]["debug"] = true;
Or turn it on globally:
$settings["development"] = true;
These are turned on in:
/config/config.default.php

If you haven't; please test the /demo/ application in this project, as it's not included in php4dvd.

As far as php4dvd goes, It works fine from my dev machine and hosting provider with moviesearch for la dolce vita. But I don't catch error messages, my bad. :-)

@tboothman
Copy link
Owner

Something to do with using https through a http proxy maybe? Not entirely sure. Have you updated something recently? New config?

@greenhouseffecto
Copy link
Author

With your files for change from http to https something is changed. But now i have this error:

Fatal error: Class 'BrowserEmulator' not found in /membri/skynexsrl/php4dvd-master/lib/imdbphp/src/Imdb/Request.php on line 20

How can i fix this problem?

@jreklund
Copy link
Collaborator

You can download php4dvd version 3.8.0. It dosen't contain the https fixes for IMDb, but you can instead get the 302 Found redirection problem fixed in 6.0.1 instead.
So I would try to fix your webhost settings instead (try different php version).

BrowserEmulator haven't been used since version 5.0.0 of imdbphp released on Oct 16, 2016. What version did you actually grab? php4dvd first public version (3.1.1) uses 5.0.1 so you didn't grab it from jreklund/php4dvd.

@greenhouseffecto
Copy link
Author

i think that the version is 3.8.0 but i send you the file so you can check if is correct.
php4dvd-master.zip
I put this file in altervista, i follow the configuration, but every time a problem occurs.

@jreklund
Copy link
Collaborator

jreklund commented Apr 30, 2018

It works as expected (but these are https fixes, not the true 3.8.0 version), what kind of error message do you get of that code?

If you are using it on a webbserver/webhost, try to setup WAMP/XAMPP on your local Windows(?) computer instead. As it's something wrong with your webbserver or your proxy settings.

@greenhouseffecto
Copy link
Author

greenhouseffecto commented May 1, 2018

Fatal error: Uncaught exception 'Imdb\Exception\Http' with message 'Failed to retrieve url [http://www.imdb.com/find?s=tt&q=s]. Status code [403]' in /php4dvd-3.8.0/lib/imdbphp/src/Imdb/Pages.php:88
Stack trace: 
#0 /php4dvd-3.8.0/lib/imdbphp/src/Imdb/Pages.php(53): Imdb\Pages->requestPage('http://www.imdb...') 
#1 /php4dvd-3.8.0/lib/imdbphp/src/Imdb/MdbBase.php(137): Imdb\Pages->get('http://www.imdb...') 
#2 /php4dvd-3.8.0/lib/imdbphp/src/Imdb/TitleSearch.php(28): Imdb\MdbBase->getPage('s') 
#3 /php4dvd-3.8.0/includes/movie.update.inc.php(41): Imdb\TitleSearch->search('s', Array) 
#4 /php4dvd-3.8.0/index.php(135): require_once('/membri/skynexs...') 
#5 {main} thrown in /php4dvd-3.8.0/lib/imdbphp/src/Imdb/Pages.php on line 88

I repeated the procedure from the beginning without changing anything, now the error that appears is this.
P.S I used your zipped file (3.8.0 version)

@jreklund
Copy link
Collaborator

jreklund commented May 1, 2018

Okey, still returning 403 Forbidden (without a proxy warning this time). That's not something we can fix.
You need a new hosting provider; Your's are blocked by IMDb or miss-configured.

You got any error logs from your server?

@greenhouseffecto
Copy link
Author

Thank you very much, jreklund
I am gonna write to my hosting provider to see if IMDb is actually blocked or just miss-configured.

Meanwhile I activated the debug mode and I am posting below the more detailed exception
Fatal error: Uncaught exception 'Imdb\Exception\Http' with message 'Failed fetch url [https://www.imdb.com/find?s=tt&q=s] Received HTTP code 403 from proxy after CONNECT' in /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/Request.php:75 Stack trace: #0 /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/Pages.php(72): Imdb\Request->sendRequest() #1 /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/Pages.php(54): Imdb\Pages->requestPage('https://www.imd...') #2 /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/MdbBase.php(136): Imdb\Pages->get('https://www.imd...') #3 /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/TitleSearch.php(28): Imdb\MdbBase->getPage('s') #4 /membri/skynex/php4dvd-master/includes/movie.update.inc.php(41): Imdb\TitleSearch->search('s', Array) #5 /membri/skynex/php4dvd-master/index.php(135): require_once('/membri/skynex/...') #6 {main} thrown in /membri/skynex/php4dvd-master/lib/imdbphp/src/Imdb/Request.php on line 75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants