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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:34:10+00:00 2026-05-21T19:34:10+00:00

I have the following code: <?php if ($foo) { echo $foo; } ?> However,

  • 0

I have the following code:

<?php 
  if ($foo) {
    echo $foo;
  }
 ?>

However, my page is throwing a 500 internal server error (I know this generally means there’s an error being logged and the page is aborting prematurely) I do not have access to the error log (as the host is logging to syslog).

I can fix it by doing the following:

<?php 
  if (isset($foo) && $foo) {
    echo $foo;
  }
 ?>

but that’s not my question. Is there a server setting that would kill a page attempting to use an unset variable? AFAIK, it only logs a ‘Notice’, which is normally not enough to kill the page.

Here is the first bit of the phpinfo() output (disclaimer: I have no Windows + FastCGI setup experience)
enter image description here

Update
I added a custom error handler and simply output the $errno and $errstr. As expected, it was an E_NOTICE (8) with message ‘Undefined variable’. I’m guessing the 500 internal error has something to do with how it’s logging to the syslog.

  • 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-21T19:34:11+00:00Added an answer on May 21, 2026 at 7:34 pm

    Implement a custom error handler and you can do anything you’d like (mostly)!

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

Sidebar

Related Questions

I have the following code inside the body of my index.php page: echo Begin
I have following PHP code: if($_SESSION['msg']['login-err']) { echo '<p class=error>'.$_SESSION['msg']['login-err'].'</p>'; unset($_SESSION['msg']['login-err']); } Everything working
I have the following code: <td colspan=7height=200 valign=top> <iframe id=myframe name=myframe src=index.php?page=1 width=810 height=100
I have the following php code using the codeigniter framework $this->form_validation->set_rules('money', 'Money', 'integer|required|xss_clean'); It
I have following code in my php page. These are two tabs Inbox and
I have the following php code, which has been snipped for brevity. I am
I have the following code: http://www.nomorepasting.com/getpaste.php?pasteid=22615 Which is called by the javascript mentioned in
I have to following code: http://www.nomorepasting.com/getpaste.php?pasteid=22987 If PHPSESSID is not already in the table
I'm using php and I have the following code to convert an absolute path
I have code with the following form: <?php function doSomething{ //Do stuff with MySQL

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.