Welcome Guest, Not a member yet? Register   Sign In
can't even get thru tutorial without errors
#31

[eluser]swgj19[/eluser]
For debugging and testing reasons, I also noticed that if I change the settings in database.php from
Code:
$db['default']['db_debug'] = TRUE;
to
Code:
$db['default']['db_debug'] = FALSE;

the database errors are not shown any more, but one error pops up with part of the view home.php page showing:


My view has been loaded
Code:
A PHP Error was encountered

Severity: Warning

Message: Invalid argument supplied for foreach()

Filename: views/home.php

Line Number: 13
#32

[eluser]InsiteFX[/eluser]
This is wrong:
Code:
$config['base_url'] = 'http://localhost/ci/index.php';

// should be:
$config['base_url'] = 'http://localhost/ci/';

InsiteFX
#33

[eluser]swgj19[/eluser]
I just changed $config base url, still it did not change anything with the errors.
#34

[eluser]swgj19[/eluser]
Ok. First, I made some adjustmens in my home.php views page and then set database debugging to false. This got rid of all errors, however, nothing is being pulled from the model, to the views. I really think I am on the right track. I am just missing something between the model and the view page that is holding up progress. Please, someone out there here my silent cry for help.

Code:
$db['default']['db_debug'] = FALSE;

home.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Untitled Document&lt;/title&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
    
    &lt;/head&gt;

    &lt;body&gt;
        <div id="container">
            <p>My view has been loaded</p>
                &lt;?php if(is_array($records)): ?&gt;
            &lt;?php foreach($records as $row) : ?&gt;
                <h1>&lt;?php echo $row->username; ?&gt;</h1>
                <p>&lt;?php echo $row->text; ?&gt;</p>
            &lt;?php endforeach; ?&gt;
        &lt;?php endif; ?&gt;
            
        </div>
    
    &lt;/body&gt;
&lt;/html&gt;
#35

[eluser]Unknown[/eluser]
Hey guy, I got the same error like you and I spend few days look it up in Google, but just like you, no one could solve the problem.
I found your thread here and just want to let you know that this is a issue between CodeIgniter DB_driver and MySQL in Xampp.

I tried to install newer version of xampp (1.8.1) and it worked perfectly.

damned it




Theme © iAndrew 2016 - Forum software by © MyBB