problem index

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
you need to search for more info about the error within your Apache error log: the 500 error is tipically related to some issues on the server and not strictly to a web app such as PMF. I guess it could be an issue with:
  • mod_rewrite;
  • some missing in your PHP environment;
  • mod_security too strong setup.
Feel free of posting here the error_log line related to the hit to the faq/index.php page.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
emamarro wrote:Thanks for reply,I asked my host about it and he replied to me:

This isn't a server error - I've never seen a script output this. Everything looks fine, the PHP file is executing correctly, I'd recommend contacting the developer for assistance with this.
I'm used to handle several hosters requests and this is the typical answer given to their Customers ;).
Let me explain a bit deeper: your site is running on a server controlled by WHM/CPanel: I know it very well, both features and bugs (!) and as any of its 3 roles, administrator, reseller, customer. The first error is that you did not declare the ErrorDocument files for your site, and this will affect your Customers experience (e.g.: if they do a typo writing an URL they'll not see the HTTP 404 error but this that means that for Error 404 you or your hoster has made an SSI page for handling the 404 errors) but this is not a code issue but it is just a configuration cleanup that will give to your site a more professional look even in managing the errors.
That said, you need to log into your CPanel account and within the main panel you need to search the section regarding Log files and download the Apache Error Logs file. Than you need to open it and search for the line with the error for index.php adn post it here because there we'll find the reason why the server is responding with an HTTP 500 error.
emamarro wrote:Would you have the file index.php to send me? Maybethe oone I have is somehow corrupted...
My email is afrodisiaco@cambiavita.org
You can make the difference between the source file and that on your server even by your own :) BUT if you did not make any change to the code (just uploaded to the server AS-IS) I can assure that it works and the issue is within the server configuration and as one of developers of PMF I can help you to read and find out:
  1. what's bad in your server;
  2. what's bad in PMF code for your server.
So my suggestion is: try to ask again for what I've asked here. If your hoster keeps on not helping you in extracting the apache error log, contact me at matteo@phpmyfaq.de.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
emamarro wrote:thank you very much for explanation,I checked logs but they are referring only to oct 8.
I asked the host how to have logs for at least 48 hours before.
No matter if you can see only those logs for the current day: just hit your PMF homepage during this day and you'll find that hit to faq/index.php even in the today logs ;).
emamarro wrote:I have another question regarding administration please:
is it possible to move entries up or down once they are already stored in db?
I would like to show them in a more logical sequence but I did not find any tool to manage them.
You can move categories up and down but you can't reorder faq entries: this feature is planned for 2.0.0 final together with sorting criteria selected among id, alphabetical and so on.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
david_de
Posts: 72
Joined: Tue Dec 13, 2005 12:09 am

Post by david_de »

You can move categories up and down but you can't reorder faq entries: this feature is planned for 2.0.0 final together with sorting criteria selected among id, alphabetical and so on.
Hi Matteo,
Will this apply to the News also? The items I post are for different events, they do not come to me in order by date of the event. I have to sort them so the dates are in order. If they are not in order people tell me they miss some of them thinking they have already passed.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
emamarro wrote:[Sat Oct 7 18:52:37 2006] [error] [client 66.249.66.47] Premature end of script headers: /home/emamarro/public_html/faq/index.php
which PHP version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
hylli
Posts: 43
Joined: Thu Jul 22, 2004 2:58 pm

Post by hylli »

is there a way to show all faqs instead of limiting to 10 per page?
You can change this in the configuration.

Hylli
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

How to configure the result page size or TopTen

Post by matteo »

Hi,
emamarro wrote:by the way..is there a way to show all faqs instead of limiting to 10 per page?
You can configure it via the Configuration page whilst if you're talking about the TopTen size you can tune it opening the [PATH_TO_PMFINSTALL]/inc/constants.php file:

Code: Select all

...
/**
 * Number of records for the Top 10
 *
 * @var const   10
 */
define('PMF_NUMBER_RECORDS_TOPTEN', 10);
...
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

HTTP 500 ErrorDocument file entry missing

Post by matteo »

Hi,
emamarro wrote:[Sat Oct 7 12:32:06 2006] [error] [client 84.140.248.143] File does not exist: /home/emamarro/public_html/500.shtml
here is the missing of the SSI page for HTTP 500 errors: you can edit it on-line by logging in the main panel and searching for the Custom Error Pages entry.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

How to start the debug of your REALLY strange issue

Post by matteo »

HI,
emamarro wrote:Operating system Linux
Kernel version 2.6.17.11-grsechg
Apache version 1.3.37 (Unix)
PERL version 5.8.7
PHP version 4.4.4
MySQL version 4.1.21-standard
cPanel Build 10.9.0-CURRENT 39
Theme cPanel X v2.6.0
This is really an up-to-date machine ;)

The Premature end of script headers means that Apache crashes while processing the PMF home index.php page. In theory there is no big differences between what coded in the admin/index.php page (and you said that you're able to access and run the backend) and that in the home index.php. The debug will be hard: first we need to be assured that if mod_security is running in you server its SecFilterDefaultAction has a status error different from 500 (my guess is yes, unfortunately).
Usually such errors needs direct root access to the server in order to be debugged: this is clearly impossible, being your account a customer one and the server shared.

So, waiting for a reply about the HTTP status used by mod_security, the only way for debugging this Apache crash is:
  1. Remove the PMF htaccess file, if you've renamed it from _.htaccess to .htaccess;
  2. Find out where the script ends using several exit(); to discover the block of code that crashes your Apache child
  3. Analize that code in order to make some questions to your hoster
To perform this rough debug you need to insert this line:

Code: Select all

exit();
starting from the begin of the page, tipically between two block of codes (see the blank lines: e.g. line # 25, 30, 34, 40, ...) and hit the page until you'll see your current error page: that will be the "wrong" block of code for your server.

Sorry, but this is the only way for finding out what's wrong in PMF for your server: my personal experience within the WHM/CPanel context is that your hoster has included some wrong modules in the last PHP/Apache recompiling update but we need to be sure of this hypothesis.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
I've just seen that you solved your issue and you've already performed a template customization ;). Would you like to share with the Community what was causing your issue?

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Post Reply