php-school / learn-you-php

🏆 Learn You PHP! - An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.
http://www.phpschool.io/
MIT License
319 stars 36 forks source link

Ex8: PDOException if no php5-sqlite installed #51

Closed snay closed 8 years ago

snay commented 8 years ago

For exercise №8 "Database Read" package php5-sqlite should be installed on Ubuntu. Without it the runner and verifier will throw PDOException with message 'could not find driver'. I guess, this is not by design and should be mentioned in requirements or hints. Also, after installation of missing packages and running learnyouphp run again, the RuntimeException with message 'Database directory /tmp/... already exists' throwed. Deleting of mentioned folder of course helps.

AydinHassan commented 8 years ago

Thanks for reporting @snay. Maybe you could send a pr to add php5-sqlite to composer requirements? if not i'll take a look later.

snay commented 8 years ago

I'm not too familiar with composer, but it looks to be the only solution: if we require ext-pdo_sqlite there will be the message.

Problem 1

  • The requested PHP extension ext-pdo_sqlite * is missing from your system. Install or enable PHP's pdo_sqlite extension.

Rather clear for me, but is it ok from usability view and so?

AydinHassan commented 8 years ago

That is okay for me, if it proves to be troublesome we can add something to the website install guide (should be ready soon)

AydinHassan commented 8 years ago

I've created a PR to do the cleaning up here: https://github.com/php-school/php-workshop/pull/99