Welcome Guest, Not a member yet? Register   Sign In
New Install working; added Doctrine -> blank Welcome View
#1

[eluser]Donald Hughes[/eluser]
Hi guys I'm an old-school developer, but completely new to PHP and CodeIgniter. I'm very impressed so far, but I've gotten myself stuck.

Using MAMP on my Macbook, I setup CodeIgniter successfully and saw the default route to the welcome view working properly.

My next step was to install Doctrine using these instructions:
http://codeigniter.com/wiki/Using_Doctri...de_Igniter

I followed the steps closely, and even quadruple-checked everything, but now index.php is blank with no html at all.

Some things that I thought were weird about the above instructions:
* the sample code for "doctrine" and "doctrine.php" didn't have closing "?>" tags.
* I couldn't run "doctrine" from the shell: "no direct script access allowed".

Other things of note:
* I have not entered any database information yet
* In the above instructions, I stopped before defining any yaml schema files.


Does anyone have in ideas on what I can try?
#2

[eluser]Donald Hughes[/eluser]
I found the answer in the php error log (wonder why it didn't show up on the page?). I didn't realize that not having a database specified would throw an exception when no database calls were actually being made.


PHP Fatal error:
Uncaught exception 'Doctrine_Manager_Exception' with message 'No database available in data source name'
#3

[eluser]andreagam[/eluser]
Donald, to have the error shown in the page you have to set
Code:
error_reporting(E_ALL);
in the index.php file.
To get db errors try setting
Code:
$db['default']['db_debug'] = TRUE;
in the application > config > database.php file

Happy coding,
#4

[eluser]Donald Hughes[/eluser]
That seems straightforward. Thanks for the help!




Theme © iAndrew 2016 - Forum software by © MyBB