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

Help : Failed to connect to .... http://akas.imdb #330

Open
foxbille opened this issue Apr 26, 2024 · 5 comments
Open

Help : Failed to connect to .... http://akas.imdb #330

foxbille opened this issue Apr 26, 2024 · 5 comments

Comments

@foxbille
Copy link

It's a question, how to manage this error, what have i done wrong, forgot to set, etc... ?

Imdb\Exception\Http
Failed to connect to server when requesting url [http://akas.imdb.com/find?s=tt&q=Lady+Bird]
in
VENDORPATH/imdbphp/imdbphp/src/Imdb/Pages.php : 52

Code

$config = new \Imdb\Config();
$config->language = 'fr-FR,fr,en';
$search = new \Imdb\TitleSearch($config, null,);
$firstResultTitle = $search->search($titre)[0];

Thanks for help
Eric

@jreklund
Copy link
Collaborator

@foxbille Either you are using a really old version or you have changed more settings than that. akas where removed in 4.0.0. Search all files for imdbsite, maybe you have an .ini file somewhere.

@foxbille
Copy link
Author

I will check all parameters again.
But i do :
composer require imdbphp/imdbphp
over a codeigniter4 fresh install in an empty directory
then i put my code, mainly in CI4 App directory.
And that's all i do.
composer require tboothman/imdbphp does not work. Why? i don't even know!

@foxbille
Copy link
Author

Ok, i got it... i guess
Codeigniter requires psr/log 3.0
Imdbphp requires psr/log 1.0
When i do
composer require imdbphp/imdbphp
it creates composer.json with imdbphp 3.3 (because of codeigniter requirement on psr/log)
If i overwrite imdb to 8.2 it downgrades ci4 version to 4.4.8 (because of psr/log version, i guess)
How can i manage to get a ci4 4.5.1 version and a imdbphp 8.2 version working together ? Wait for developpers of those projects?

@jreklund
Copy link
Collaborator

Users of imdbphp have requested that this project support < PHP 8, so afaik the only thing you can do is forking the project and upgrade it to psr/log 3.0.

You can also take another route and use TMDB instead.

@foxbille
Copy link
Author

Thank you!
But i don't even know how to do that (upgrade psr/log to 3.0).
Have tried TMDB but can't find how to retrieve cast of one movie...

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

2 participants