How to you debug blank pages? |
[eluser]CheekyGeek[/eluser]
I've been working with CodeIgniter almost nonstop for the last couple of days and really like what I'm seeing in theory (and in tutorials, etc.). Had things working well when I was using just Controllers and Views, but now that I'm trying to use a Model, I'm back to confused and doing something wrong. I had a problem with logging errors, due to the webserver user not having proper permissions on system/logs, so fixed that. My hope was that I would get some debugging information in the logs. The only errors I got had to do with not being able to fopen system/cache so I also gave the webserver user permissions to it. Now there is nothing getting written there, even when I get a blank page. So I assumed that I need to turn on display_errors in my php.ini file. But even after turning that on (with error_reporting set to E_ALL) I get nothing. How in the heck do you debug a blank page with no feedback of any kind? There must be something I don't have configured correctly so I can see where things are breaking. Anybody wanna throw me a bone?
[eluser]EEssam[/eluser]
I believe you should post your code and perhaps someone can tell you what you're doing incorrectly.
[eluser]CheekyGeek[/eluser]
I am a moron and forgot to restart Apache after my last php.ini edit. I hope to be close to proficient enough to post my non-working code in the near future. Right now I feel I'm so far off that it would be humiliatingly embarrassing to show anyone. :\
[eluser]Derek Allard[/eluser]
Hey don't worry about it CheekyGeek. Happens to all of us. Take a look at error handling in CodeIgniter also.
[eluser]CheekyGeek[/eluser]
Oh embarrassment be darned-to-heck. I've gotta get off the starting line somehow here. I hate asking questions but I'm really having problems even understanding the User Guide. I see the code, but have no context for where it is to be used (Active Record stuff for instance: Controller or Model?). Here's what I've got: A mysql "users" table. Here's the model for it. I'm pretty sure the model code should be OK because I modified the code from this tutorial to match my table fields. mdl_users.php Code: class Mdl_users extends Model { Here's the controller user.php Code: <?php I'm getting a "Parse error: syntax error, unexpected T_VARIABLE" in the line in red when I try to call localhost/CI/index.php/user/index
[eluser]CheekyGeek[/eluser]
And here is the view all.php Code: <html> I had this working fine when I was using just controller and view, but how to use the model I don't get. |
Welcome Guest, Not a member yet? Register Sign In |