Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> propel, problem po instalacji :)
predom
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 1.09.2007

Ostrzeżenie: (0%)
-----


czy może ktoś pomoc? mam taki błąd

Fatal error: Uncaught exception 'PropelException' with message 'No dsn specified in your connection parameters for datasource [poetawiersz]' in C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php:580 Stack trace: #0 C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php(523): Propel::initConnection(Array, 'poetawiersz') #1 C:\Program Files\WebServ\httpd\propel_przyklad_gajdaw\aplikacja\build\classes\poetawiersz\om\BasePoeta.php(339): Propel::getConnection('poetawiersz', 'write') #2 C:\Program Files\WebServ\httpd\propel_przyklad_gajdaw\aplikacja\wstawianie_rekordow.php(22): BasePoeta->save() #3 {main} thrown in C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php on line 580

kod:
  1. <?php
  2. $poeta = new Poeta();
  3. $poeta->setImie('Adam');
  4. $poeta->setNazwisko('Mickiewicz');
  5. $poeta->save();
  6. ?>


Ten post edytował predom 10.09.2008, 21:03:44
Go to the top of the page
+Quote Post
sowiq
post
Post #2





Grupa: Zarejestrowani
Postów: 1 890
Pomógł: 339
Dołączył: 14.12.2006
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Tu masz wskazówkę:
http://www.symfony-project.org/forum/index.php/m/56386/
Go to the top of the page
+Quote Post
predom
post
Post #3





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 1.09.2007

Ostrzeżenie: (0%)
-----


propel 1.2 rozni sie troche chyba od 1.3  winksmiley.jpg
Uzywam 1.3
dziwne to troche, zmienilem plik runtime-conf.xml

  1. .....
  2. <connection>
  3.            <dsn>mysql:host=localhost;dbname=poetawiersz;</dsn>
  4.            <username>pwadm</username>
  5.            <password>secretpass</password>
  6.          </connection>
  7. .....


jesli zamiast <username> jest <user> to przy budowaniu klas wystepuje blad
wiec buduje z <username> - build finished

wywoluje skrypt php i blad

Fatal error: Uncaught exception 'PropelException' with message 'Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access denied for user 'ODBC'@'localhost' (using password: TAK)]' in C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php:610 Stack trace: #0 C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php(523): Propel::initConnection(Array, 'poetawiersz') #1 C:\Program Files\WebServ\httpd\propel_przyklad_gajdaw\aplikacja\build\classes\poetawiersz\om\BasePoeta.php(339): Propel::getConnection('poetawiersz', 'write') #2 C:\Program Files\WebServ\httpd\propel_przyklad_gajdaw\aplikacja\wstawianie_rekordow.php(22): BasePoeta->save() #3 {main} thrown in C:\Program Files\WebServ\php\propel\runtime\classes\propel\Propel.php on line 610

Zmieniam w poetawiersz-conf.php
  1. <?php
  2.          'dsn' => 'mysql:host=localhost;dbname=poetawiersz;',
  3.          'username' => 'pwadm',   // tutaj zmieniam na 'user' =>'pwadm'
  4.          'password' => 'secretpass',
  5.        ),
  6. ?>

i dziala bez bledow
 






 

Ten post edytował predom 10.09.2008, 23:30:57
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 20:43