Propel2 icon indicating copy to clipboard operation
Propel2 copied to clipboard

Newbie Installation Problem

Open hatwat opened this issue 3 years ago • 3 comments

Followed all instructions in setting up a propel project. after, installation I created a test php script with the following code:

findPK(1); echo $barangay->barangay; It's giving me a database is missing error. Fatal error: Uncaught PDOException: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected in C:\laragon\www\obo_orm\vendor\propel\propel\src\Propel\Runtime\Connection\PdoConnection.php:183 Stack trace: #0 C:\laragon\www\obo_orm\vendor\propel\propel\src\Propel\Runtime\Connection\PdoConnection.php(183): PDO->prepare('SELECT id, bara...', Array) #1 C:\laragon\www\obo_orm\vendor\propel\propel\src\Propel\Runtime\Connection\StatementWrapper.php(81): Propel\Runtime\Connection\PdoConnection->prepare('SELECT id, bara...', Array) #2 C:\laragon\www\obo_orm\vendor\propel\propel\src\Propel\Runtime\Connection\ConnectionWrapper.php(394): Propel\Runtime\Connection\StatementWrapper->prepare(Array) #3 C:\laragon\www\obo_orm\generated-classes\Base\BarangayQuery.php(155): Propel\Runtime\Connection\ConnectionWrapper->prepare('SELECT id, bara...') #4 C:\laragon\www\obo_orm\generated-classes\Base\BarangayQuery.php(137): Base\BarangayQuery->findPkSimple(1, Object(Propel\Runtime\Connection\ConnectionWrapper)) #5 C:\laragon\www\obo_orm\ in C:\laragon\www\obo_orm\generated-classes\Base\BarangayQuery.php on line 160 Any assistance will be highly appreciated. Thank you very much in advance.

hatwat avatar Aug 05 '22 08:08 hatwat

have you included the config.php file? Can you copy in your test.php script?

DarkAxi0m avatar Aug 07 '22 13:08 DarkAxi0m

Thanks for the reply. Here's the test script.

findPK(1); echo $barangay->barangay; On Sun, Aug 7, 2022 at 9:06 PM Christopher Chase ***@***.***> wrote: > have you included the config.php file? Can you copy in your test.php > script? > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >

hatwat avatar Aug 08 '22 01:08 hatwat

have you included the config.php file? Can you copy in your test.php script?

would appreciatre if you can let me know any misconfiguration in my test script. Thanks in advance.

hatwat avatar Aug 16 '22 03:08 hatwat

https://github.com/propelorm/propelorm.github.com/pull/427 should probably easy things here

dereuromark avatar Dec 19 '22 11:12 dereuromark