Newbie Installation Problem
hatwat opened this issue · 4 comments
hatwat commented
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.DarkAxi0m commented
have you included the config.php file? Can you copy in your test.php script?
hatwat commented
Thanks for the reply. Here's the test script.
<?php
// setup the autoloading
require_once $_SERVER['DOCUMENT_ROOT'] . '/vendor/autoload.php';
// setup Propel
require_once $_SERVER['DOCUMENT_ROOT'] . '/generated-conf/config.php';
$q = new BarangayQuery();
$barangay = $q->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
<#1900 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2MJB6TR7KFKXFOARKJYTPDVX6YFVANCNFSM55VHNOGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
hatwat commented
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.
dereuromark commented
propelorm/propelorm.github.com#427
should probably easy things here