1
paketep
Xoops reboots my Apache... help!
  • 2006/6/9 10:34

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Hi!

I'm using XOOPS 2.2.3 (a bit modified) & News 1.44, WinXP Pro, Apache 1.3.35, PHP 4.4.1.

I've noticed that with HTML-heavy news items, XOOPS will restart my Apache completely and I'll get a Server Reset Connection. No errors in Apache & PHP logs, nothing from Xoops.

After much tracing, I found the "error" in the xTheme.class, line 139 in my version:

Quote:
$GLOBALS['xoopsTpl'] = &$this->tplEngine;


If I delete the ampersand, it will not restart the Apache server, but obviously I'll get an empty news item since it doesn't pass the engine by reference.

Upgrading to PHP5 didn't help. Curiously, the same DB and files work perfectly in our preduction server (RHL4, Apache 1.3.34 & PHP 4.4.2).

Any ideas?. It's not exactly critical, since its for a testing machine, but I don't have the time right now to migrate it to a linux box right now :(

Thanks!

2
Herko
Re: Xoops reboots my Apache... help!
  • 2006/6/9 10:42

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


I'm confused here, does it actually restart the whole Apache webserver (the http daemon), or is the connection reset? They're separate issues...

The issues with the code you describe are known, but this should generate a PHP notice, not reset the connection. The PHP notice shouldn't break anything either...

It has to do with the fact that only variables should be passed as reference or something (I'm no coder), and there are a lot of posts about that on this forum. The search feature here is your friend

Herko

3
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/9 10:55

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Well, I guess it restarts the server, since I get

"The Apache service entered the running state."

in my System Event Viewer

but I don't get any kind of "Service stopped unexpectedly", so I don't really know.

I've been searching the forums, but &= is too short, and both GLOBALS and xTheme don't give me results applicable to my case. Still searching, but I decided to post in case anyone could help.

Thanks!

4
leostotch
Re: Xoops reboots my Apache... help!
  • 2006/6/9 11:28

  • leostotch

  • Just popping in

  • Posts: 76

  • Since: 2006/4/1 1


If apache reboots, your connection is reset... they are not separate issues, but cause and effect.

If this happens on heavy items and can kinda get solved by short-circuiting the template engine (which is one of the most heavy class in use), I'd bet for a memory issue.
Wouldn't you have different settings for the PHP memory_limit (maybe the default 8M on your test server, and 16M on the production machine) ?

5
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/14 9:09

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Sorry for the delay, I was out until today.

The values were different, but that wasn't it. I tried upping the memory value to 16, 32, 64M. No difference.

I compared the rest of the values in httpd.conf and php.ini with those in the production machine. Virtually identical except for Linux/Win issues (different modules and so on).

Thanks for your suggestion anyway!

6
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/14 9:23

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Wow, no wonder I'm not getting errors in my PHP log. Not even the initial GET for the article gets registered in Apache's access.log

I'm getting desperate here :(. That Ubuntu distro is calling me louder and louder! ;)

7
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/14 16:22

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Got all the way down to fetchArray at mysqldatabase.php. If I try to print_r or whatever with the result object, Apache dies. If I do anything with the hometext var, Apache dies. However, if I delete the text smarty tag from the template, I get the page (sans the main content, obviously).

The text is about 16KB, which should be more than manageable in a TEXT column. The production machine certainly has no problems with it. I thought that perhaps the problem was when the text was processed looking for XoopsCodes, but if I'm not mistaken, at this point I'm way before that, right?.

Any ideas?. I'd start cutting the text, but if that's the problem, I'm going to grow worried just thinking that if I ever put a text a little bigger than usual, or perhaps some kind of string, the CMS is going to break on me.

Help!

8
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/14 16:33

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Ok, the magic number is 1580 chars. If I go ONE char over that, Apache dies. No effect if I take out chars from other fields (title, etc).

Where could I be having problems with that?. Is there any option in MySQL or PHP that limits the size of a query?. Now I'm totally lost, I've dealt with bigger data in this server without problems for a long time.

I don't know, I'm thinking of upgrading MySQL and see if that makes it work, but I'm a bit baffled by all this...

9
paketep
Re: Xoops reboots my Apache... help!
  • 2006/6/16 10:10

  • paketep

  • Just popping in

  • Posts: 36

  • Since: 2005/4/4 1


Anyone?

10
leostotch
Re: Xoops reboots my Apache... help!
  • 2006/6/16 15:27

  • leostotch

  • Just popping in

  • Posts: 76

  • Since: 2006/4/1 1




- Try to use PHP 4.4.2 (segfaults can also be due to bugs in PHP itself)
- If the problem is really due to the xoops/bbcode stuff, try other versions of the TextSanitizer class (ie: get the 2.0.13/2.0.14 one and see it that changes something)
- Looking in that class: the "code" tag handling is weird, see if disabling this tag (by commenting the appropriate regexp) changes something

Apart from this I don't know... I'd be a bit lot if I were in your place.

Login

Who's Online

323 user(s) are online (188 user(s) are browsing Support Forums)


Members: 0


Guests: 323


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits