Debugging Project Built in CodeIgniter |
[eluser]justmelat[/eluser]
Hello: I inherited a codeigniter app, that was created for our production and development environments, long story short, the user is able to auto create their own url, so for example if the company is "companyx" they enter in 'companyx' and click save, then they can go to the url "company.myproject.com" or if the company's name is gaming, the enter it into the system, save it and the url is now "gaming.myproject.com". That works perfectly. All clients are using the same framework. The problem started last week, there is an archive page that won't open for a particular client. Tried the sites for the other 20 clients and the archive link works, opens all the projects that they have marked as archived. So with this one client that's having the issue- We "assume" there is some odd data in their request db table that is preventing this page from opening. [it is a completely blank page, no code when you do view source.] A query runs at the beginning of the controller to determine what projects are in archive status. For various reasons that i wont' go into, I can't debug directly on the stg server, so I download everything, code, db, all of it, and set it up on my local machine, the thing is, I can't figure out what the url would be for my local machine. I have to put that url into the debugger to kick it off. For my other codeigniter projects, the url is http://localhost/newCI for example If i want to open gaming.myproject.com from my local machine, how do i do it? Or is there a way to go automatically go thru the mysql database to and verify that all all the field values are legit for this client? Help please!! aNd THank you!!
[eluser]IgnitedCoder[/eluser]
You can do this using virtual host settings in apache.. if you are using XAMPP, then add a directive to apache for your domain. http://httpd.apache.org/docs/2.0/vhosts/name-based.html Also for better debugging, install firebug and firephp for firefox. Google or check the forums on howto setup firephp on Codeigniter. I use it as follows once setup. Code: $this->load->library('firephp'); //this gets logged in the firebug window via firephp lib. Hope this helps some...
[eluser]justmelat[/eluser]
Actually I got Firephp up and running. It is really cool, but the problem is, since the page dies immediately, you can't see any detailed info and I really think there is something funky in one of the database fields making it crap out. I need the debugger so I can see the values that are being pass from the database.
[eluser]Matt Stein[/eluser]
I could be way off with this suggestion, but I found Webgrind to be pretty useful after the moderate struggle to get it working properly with MAMP Pro. http://code.google.com/p/webgrind/ http://www.mamp.info/en/index.html
[eluser]justmelat[/eluser]
Thanks Matt I am open to anything right now. I wouldn't have thought it would be so difficult to one, debug and then debug codeigniter. Thanks again.
[eluser]InsiteFX[/eluser]
Make sure you have all the ERROR Reporting turned on! You may need to edit your php.in file. Check CodeIgniters index.php and make sure its on. InsiteFX
[eluser]justmelat[/eluser]
I have turned very type of error reporting on. This is what is in my error log now[this is just a snipped of the code, the "Model Class Initialized" goes on forever.] What can I do to see exactly what is wrong. Help please. DEBUG - 2011-03-20 17:53:07 --> Language file loaded: language/english/labels_lang.php DEBUG - 2011-03-20 17:53:07 --> Language file loaded: language/english/lookup_lang.php DEBUG - 2011-03-20 17:53:07 --> Language file loaded: language/english/emailmsg_lang.php DEBUG - 2011-03-20 17:53:07 --> Database Driver Class Initialized DEBUG - 2011-03-20 17:53:07 --> Session Class Initialized DEBUG - 2011-03-20 17:53:07 --> Helper loaded: string_helper DEBUG - 2011-03-20 17:53:07 --> Session routines successfully run DEBUG - 2011-03-20 17:53:07 --> Helper loaded: form_helper DEBUG - 2011-03-20 17:53:07 --> Form Validation Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Controller Class Initialized DEBUG - 2011-03-20 17:53:07 --> Helper loaded: date_helper DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Helper loaded: file_helper DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07 --> Model Class Initialized DEBUG - 2011-03-20 17:53:07
[eluser]justmelat[/eluser]
Finally I figured it out: ini_set(Memory_limit, 32M) changed it to 128M the page works!!!!!
[eluser]Matt Stein[/eluser]
I'm glad you got it working -- I was just going to ask if it was more of a server issue than an app issue. It seems like something could need some optimization if this is on a test server and you're blowing through the memory limit! Good luck!
[eluser]justmelat[/eluser]
I tell you, this has been two weeks of agony. I can't believe it was the memory. Actually this is the production server that is having the issue. And this one particular client just has tons of data, so something will have to be done because they will chew through this 128M within a few months. |
Welcome Guest, Not a member yet? Register Sign In |