Welcome Guest, Not a member yet? Register   Sign In
How do I debug this code igniter problem?
#1

[eluser]patbert[/eluser]
I have a codeigniter app that I have written, it has been working fine for quite some time. I have moved it to a different server, and now part of it doesn't work any more! Specifically, one single page doesn't work, the only page that depends on a specific library I wrote. Everything else works just fine.

The frustrating bit is that the page that does not work outputs absolutely nothing. Some sort of error would be lovely! It does seem to crash some aspect of apache2 though lol:

[Sat Feb 07 18:29:08 2009] [notice] child pid 8523 exit signal Segmentation fault (11)
[Sat Feb 07 18:29:09 2009] [notice] child pid 8524 exit signal Segmentation fault (11)

That happens every time I try to load that page.

I am just not sure where to start. I have browsed over the library code, and everything looks fine. I mean, it's running fine on a different server, so I don't think it is the code itself. Unless it is trying to do something that the php setup on this new server isn't allowing?

Can some one give me an idea of what to try?! I'm just a bit baffled, I've never had a problem like this. Thank you.
#2

[eluser]johnwbaxter[/eluser]
This is rather crass but what i sometimes do (depending on what the code is doing but most of the time this works fine) is simply put "echo "still working";" after a point and see if the script stops and echoes it. If it does i put it further down the code basically until it stops echoing then i can see exactly where it is going wrong.

Have you got error_reporting turned on by the way? Have you got CI error logging set to 4?
#3

[eluser]patbert[/eluser]
Is there some way to compare the apache/php set up on two servers?

The server that works with my app is not mine, it is a hosting deal, running freebsd I believe. My server is running debian. I have compared the outputs from phpinfo() on both servers and I don't see anything that jumps out at me. Is there some other output I could look at? Is it worth trying this way at all?

PHP on my box is PHP Version 5.2.0-8, on the other working server it is 5.2.8. Could this be an issue? 5.2.0-8 is the latest that debian etch has, how can I update it properly?
#4

[eluser]TheFuzzy0ne[/eluser]
This might help - http://www.cyberciti.biz/tips/segmentati...-unix.html
#5

[eluser]johnwbaxter[/eluser]
I doubt the php version is the error. I still think my suggestion is worth doing, if you can narrow down the problem code then you might be able to identify a missing php library or something.
#6

[eluser]jcavard[/eluser]
[quote author="audiopleb" date="1234468069"]I doubt the php version is the error. I still think my suggestion is worth doing, if you can narrow down the problem code then you might be able to identify a missing php library or something.[/quote]
WORD!

Try what audiopleb said, put some echo at a few places in the crashing code, so you have an idea what specific line is making your CI a living hell Wink. Use the
Code:
$config['log_threshold'] = 4;
in config.php, this will report everything in system/logs/log-2009-02-12.php

You can use application like Hoo Win Tail to read logs in real time. This is your best friend.

good luck buddy
#7

[eluser]DanRomanchik[/eluser]
Did you ever figure out what was causing your segmentation errors?

I'm getting the same errors from code that I downloaded to my Mac (running Snow Leopard, Apache, and PHP 5.3.1). On the other server, the site runs just fine as well.

Dan




Theme © iAndrew 2016 - Forum software by © MyBB