Page 1 of 1

Unreferenced Categories Bug?

Posted: Tue Jun 07, 2005 10:24 pm
by dcraig
Fresh vanilla installation of 0.8.1 (actually several reinstalls trying to understand the problem).

Created a single new entry after installation.
Added a single category.

Now any attempt to access entries (e.g., Edit Entry, exiting admin to weblog) results in an "Apache.exe - Application Error" for an attempted memory read at 0x0 followed by a "Document contains no data" alert. The error is not fatal: admin continues to run.

Now, create a New Entry (New still works) and assign it to the category.
Everything works now.

Short summary (after experimenting): it appears there must be at least one reference to each category. Orphaning a category results in the same error. Is this a known problem? Or is it just me? :?

Posted: Tue Jun 07, 2005 11:23 pm
by Oliver
I just tried, what you did, and the only result, when 'opening' the category (without entries), is a short message
No entries to print
(Page 1 of 1, totalling 0 entries)
No Apache_error... Is this, what you mean?

- Oliver

Posted: Wed Jun 08, 2005 12:14 am
by dcraig
Thanks for trying to replicate my problem.

If you were able to choose a category with no entries then you apparently didn't have the same problem. I can't even get that far since the weblog is essentially disabled once there is any unreferenced category. Meaning, even addressing serendipity/index.php gives the Apache error. Admin, serendipity/serendipity_admin.php, does still work, thus the workaround of creating a New Entry with the offending category.

I just checked and, interestingly, even once categories have at least one reference I still get the error when selecting a category from the weblog. Viewing and editing works, but selection based on categories doesn't in this case. A database problem, maybe?

Posted: Wed Jun 08, 2005 10:25 am
by garvinhicking
Which PHP, Webserver and Database versions are you using?

Posted: Wed Jun 08, 2005 12:54 pm
by dcraig
PHP 5.0.4
Apache 2.0.53 (Win32)
MySQL 4.1.12a

Database installed specifically for this project. Originally set for UTF-8, everything else defaults. I reconfigured for Latin on the off chance that was a problem. No change.

Posted: Wed Jun 08, 2005 3:29 pm
by garvinhicking
Have you looked into your Apache errorlog? You're using Apache2, so are you using the prefilter PHP forking? Anything else may cause threaded problems.

When your Apache coredumps, it's sadly a problem of PHP/Apache; Serendipity itself only relies on a functioning PHP, I'm sorry. :-/

Regards,
Garvin

Posted: Wed Jun 08, 2005 7:54 pm
by dcraig
Apache log:

[Wed Jun 08 09:38:15 2005] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Wed Jun 08 09:38:15 2005] [notice] Apache/2.0.53 (Win32) PHP/5.0.4 configured -- resuming normal operations
[Wed Jun 08 09:38:15 2005] [notice] Server built: Feb 10 2005 06:11:34
[Wed Jun 08 09:38:15 2005] [notice] Parent: Created child process 3880
[Wed Jun 08 09:38:15 2005] [notice] Child 3880: Child process is running
[Wed Jun 08 09:38:15 2005] [notice] Child 3880: Acquired the start mutex.
[Wed Jun 08 09:38:15 2005] [notice] Child 3880: Starting 250 worker threads.

Which if I understand (from the PHP Bug logs) is a generic PHP crash, forcing an Apache restart.

PHP installation docs seem to indicate that Prefork is less of an issue for Windows (in fact Apache uses a Windows specific MPM which uses Windows native threading). Besides, I'm not ready to rebuild Apache using prefork... yet.

It appears I may have to dig into the PHP to determine where it is crashing and then report it to PHP... or retreat to a 4.x version of PHP. Any tips on tracing PHP? Or which s9y modules to start with? I'm an experienced developer, but new to PHP.

Regardless, thanks for the help!

Posted: Wed Jun 08, 2005 8:03 pm
by garvinhicking
Regarding your logs it seems you have the worker MPM. That is really not suggested on PHP installations as it is not threadsafe.

What you are experiencing is the reason why Apache2 is only recommended in prefork/1.3-mode environments. When you switch to Apache1 you can stay with PHP5 and it should work then. :)

About how to trace the actual error and find out WHICH thread is failing I can sadly not be of any help. You may need to contact the PHP-dev and/or Apache mailinglist for this...

Regards,
Garvin