Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5961431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:57:50+00:00 2026-05-22T18:57:50+00:00

I have a php script that searches a database based on some filters and

  • 0

I have a php script that searches a database based on some filters and echoes back the number of results. I request this file with ajax, to be able to display the number of results the search returns right after the user changes some selects.

This works just fine on a local host, but it doesn’t on a production server, and since I had no idea what was wrong (no visible errors) I called the php script directly, to see whether it has any errors or not. what I get is <!-- SHTML Wrapper - 500 Server Error -->
[an error occurred while processing this directive]

The php includes 2 files, the database connection info, and some initialization stuff. I used relative path, and both files are at the correct location, with correct permissions.

I checked the error log, and since there’s nothing in there. I googled this, but nothing concrete came up, and ATM I have no idea how to get around this.
Please advise!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:57:51+00:00Added an answer on May 22, 2026 at 6:57 pm

    Step 1: Enable Error Printing in PHP

    In order to find out the bug, enable errors for your PHP.

    From http://www.bradino.com/php/error-reporting/:

    ini_set('display_errors',1);
    error_reporting(E_ALL|E_STRICT);
    

    If that doesn’t work, edit php.ini (see http://php.net/manual/en/errorfunc.configuration.php) and set:

    display_errors=1
    

    If you don’t know where your php.ini is located use:

    <?php phpinfo(); ?>
    

    And locate “configuration file (php.ini) path”. For visual instructions, see: http://www.php-scripts.com/20050909/8/

    Step 2: Debug your Apache / Web Server Log

    If you still don’t get any errors in PHP, the problem has to be with web server:

    If you are using Apache, locate access.log and error.log and see if they contain messages related to this issue.

    Hint: tail -f xxx.log allows you to track changes in a log in real-time (very useful for debugging).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery script that searches a php file that produces an XML
I have a PHP script that creates an entry into a mysql database. The
I have a PHP script that runs as a CGI program and the HTTP
I have a PHP script that needs to determine if it's been executed via
I have a PHP script that initialises an image gallery. It loops through all
I have a PHP script that can encode a PNG image to a Base64
I have a PHP script that sends critical e-mails. I know how to check
I have a PHP script that processes file uploads. The script tries to organise
I have a PHP script that pushes the headers to allow a file to
Specifically I have a PHP command-line script that at a certain point requires input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.