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 6359957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:35:13+00:00 2026-05-24T23:35:13+00:00

I have a script that produces a report. For most widgets* it produces a

  • 0

I have a script that produces a report. For most widgets* it produces a report with no problem. For a particular widget it exits in the middle during a mysql query and a 500 is returned to the browser. By inserting writes to the php_error log I know the exact last line to be executed and it’s always the same line. It’s not a timeout because other widget reports run longer (and it bombs out in about 10 seconds).

Also, I’ve tried running the query it’s trying to run in phpadmin and it runs OK.

When this abort occurs I see nothing appear in php_error.log, nothing in apache’s error log and when I surround the offending statement with a try/catch, no exception is caught.

Is there somewhere else I can look that might show what error is occurring?

* by widget I’m not referring to a UI component. I’m using widget in the sense of fictional product from a fictional company

addendum ======================================================================
Since it was requested I posted the code although I think the problem isn’t the code since it works in all but this once case. The problem is more likely in the data for this particular case.

error_log('['.__FILE__.']['.__LINE__."] check");

$table = new metrics_sessions();

//here I print out the SQL statement that will eventually be executed
error_log('['.__FILE__.']['.__LINE__."] check: "."guider_slug=? ".($effective_mindate!=null?" and date>'".$effective_mindate."'":"").($effective_maxdate!=null?" and date<'".$effective_maxdate." 23:59:59'":"").($effective_version!=0 && $effective_version!="all"?" and version=".$specific_version:"").($effective_campaign!==null && $effective_campaign!="all" ?" and campaign='".$effective_campaign."'":"")." order by date");

// BELOW IS THE LAST LINE I SEE IN PHP ERROR
error_log('['.__FILE__.']['.__LINE__."] check"); 

try {

    $sessions = $table->Find("guider_slug=? ".($effective_mindate!=null?" and date>'".$effective_mindate."'":"").($effective_maxdate!=null?" and date<'".$effective_maxdate." 23:59:59'":"").($effective_version!=0 && $effective_version!="all"?" and version=".$specific_version:"").($effective_campaign!==null && $effective_campaign!="all" ?" and campaign='".$effective_campaign."'":"")." order by date",array($param_gslug));

    error_log('['.__FILE__.']['.__LINE__."] check");

}catch(Exception $e){

    error_log('['.__FILE__.']['.__LINE__."] check");
    error_log('Caught exception: '.$e->getMessage());
    error_log('File: '.$e->getFile());
    error_log('Line: '.$e->getLine());
    error_log('Trace: '.$e->getTraceAsString());

}

error_log('['.__FILE__.']['.__LINE__."] session count: ".count($sessions));
  • 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-24T23:35:14+00:00Added an answer on May 24, 2026 at 11:35 pm

    Check for error supression operators (@) in your code and the code you are calling.

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

Sidebar

Related Questions

I have an awk script that processes a csv file and produces a report
I have a PHP script that produces a .CSV export file from a MySQL
My problem is I have a php script that produces an RSS feed. It
I have a php script that only produces logs to the client. When I
I have a Ruby script that produces a Latex document using an erb template.
I have a force-download script that produces good results with PDF and plain text,
I have a jquery script that searches a php file that produces an XML
I have a script that produces a lot of output. The script pauses for
I have a script which produces text output. That script grabs content from a
I have a PHP script ( script A ) that makes a query to

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.