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

  • Home
  • SEARCH
  • 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 9158439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:14:47+00:00 2026-06-17T13:14:47+00:00

I have the following basic code: <?php //http://localhost/error_log.php echo write to the error_log; error_log(error_log

  • 0

I have the following basic code:

<?php

    //http://localhost/error_log.php
    echo "write to the error_log";
    error_log("error_log entry");
    //error_log("error_log entry",0);

?>

When I navigate to this page, I see write to the error_log in the browser. It even appears in the access_log /var/log/apache2/access.log.

[my ip here] - - [18/Jan/2013:09:18:54 +0000] "GET /error_log.php HTTP/1.1" 200 314 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"

but when I check the error_log i.e. /var/log/apache2/error.log, I don’t see either of the error_log messages.

Why are these not getting entered into the error_log?

  • 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-06-17T13:14:48+00:00Added an answer on June 17, 2026 at 1:14 pm

    You call it without a second parameter, this means default is 0

    0   message is sent to PHP's system logger, using the Operating System's system logging mechanism or a file, depending on what the error_log configuration directive is set to. This is the default option.
    

    Now it depends on the configuration of error_log.

    If here is not “stderr”, php will not log into the apache error log.

    It seams to be “syslog” of this php send your log message to the syslog.

    Now it depends on how you rsyslog.d is configurated.

    But have look at folling logs

    tail /var/log/syslog
    tail /var/log/messages
    tail /var/log/php
    tail /var/log/php.log
    

    You message should be in one of them.

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

Sidebar

Related Questions

I have the following PHP code which simply grabs a URL behind HTTP-Basic authentication
I have the following simple code: http://jsfiddle.net/QUBCq/ You can see that I have 3
I have been following a tutorial on how to write a basic tile map
I am using Emacs with php-mode.el: http://php-mode.sourceforge.net/php-mode.el.html I have the following lines in my
I currently have this code. <?php $username = 'EMAIL ADDRESS'; $password = 'EMAIL ADDRESS';
I've seen related posts on other forums about this (see: http://www.mrexcel.com/forum/showthread.php?t=372534 ), but I've
I have a PHP preg_match_all and REGEX question. I have the following code: <?php
In my root .htaccess file I have the following Wordpress code: RewriteRule ^index\.php$ -
Hi I am hitting std::out_of_range: basic_string::substr in the following code. Have been trying hard
Say I have the following basic if-statement: if (A ~= 0) % do something

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.