(Windows 7 OS) - I am working through Apache's log4php. This page
http://logging.apache.org/log4php/quickstart.html
seems to be for PHP run in a console window, rather than PHP run by an Apache webserver. I am however interested in logging in the latter context.
Under "Advanced example" the code logs as expected to the log file. But where it also says "This produces the following output in the console: INFO - We have liftoff", I am trying to find where this output is actually going. It didn't log to the browser or to any of the inbuilt Apache log files.
I found the following question to do with PHP stdout/output: PHP stdout on Apache - and then I ran (using BASH for Windows) the following command after shutting down the installed Apache service (to run Apache instead in the "foreground"):
httpd -D FOREGROUND -k start
No joy... this did not result in logging that "liftoff" message to the browser either. Nor has it logged to any of the inbuilt Apache log files. Any ideas where/if I can find the console output?
where does Apache console output go when Apache is run as a service?
2.9k Views Asked by mike rodent At
1
There are 1 best solutions below
Related Questions in PHP
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in APACHE
- Special access rule in an .htaccess file for IP addresses, authorized only for one directory structure
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Cannot load modules/mod_dav_svn.so into server
- How to ignore case in regexp mapping in a .htaccess rewrite rule?
- Oracle Http server ISNT-07551
- I cant access file directory with PHP local host on XAMPP. it just shows one of the files I have in my visual studio code
- Apache Reverse Proxy: only one proxy directive is working. Second one is ignored
- Issue with Django --> Apache WSGI deployment
- changing the node version used by apache web server
- Apache: How can I redirect to a subfolder with a URL param but serve required content via the main URL?
- Why/How does Apache auto-include "DHE" TLS1.2 ciphers while nginx needs "dhparams" file?
- Set up MX records in apache/Ubuntu to point to external mail server
- How to proxy to another port?
- Php can not upload file out of /var/www/html even after disabling Selinux
- Serve static site on S3 + CloudFlare with Apache retaining the source URL
Related Questions in CONSOLE
- How can I reintroduce username an password on git using fedora?
- How to scroll to the bottom of console window in PyCharm2019 automatically?
- Time usage saved from a process is not properly stored/shown
- Python Console commands
- C#: creating an array and appending console input to each value
- some CSS property working on chrome's console but not on firefox
- Why does throwing an error in any browser developer console not get caught by window.addEventListener('error')?
- Program won't run without print statement - Java
- C# GUI/WPF App, open the "new" W11 Console
- A str, Segment or object with __rich_console__ method is required
- How can I get the new Xcode console output?
- How to Disable Live Reload Enabled Error in Console While Refreshing Web Page?
- Why is my cursor in a random far-away place in Visual Studio Debug Console
- Nodejs - why console.log in a secondary method does not show up
- How can you print out different strings in different coordinates?
Related Questions in LOG4PHP
- How to use log4php on PHP 8.2?
- log php errors on console using log4php but it display on browser as well
- log4php can't find my custom appender class
- Unable to install log4php using composer
- Log4php separate output for levelRange doesn't work
- how to create custom log file using Log4PHP in laravel5.5
- log4php: [LoggerAppenderFile:default]: Null value given for 'file' property. Expected a string. Property not changed
- What is the best way to add logging to static methods in utility classes?
- Why this log4php config leads to outputting duplicates in log files
- How the errors of log4php of Apache happen unexpectedly?
- log4php doesn't seem to save log into the folder
- Internal Server Error if logging two events in php
- log4php + PHP 7 - catching and logging Throwable
- Allow instantiated class to access class include in creator
- How Can i use log4php inside exec()
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The
LoggerAppenderConsoledoes log to STDOUT, optionally to STDERR.In the usual Apache context you don't have a console, so it is wrong to log to one. The usual way is to log to any of the logging facilities that are present: Files, syslog, PHP
echo, databases, PHPtrigger_erroretc.If you want to have a visible output in this example with minimum changes, change the
LoggerAppenderConsoletoLoggerAppenderEcho. This closely resembles the output you would experience on the console, but now inside the generated HTML.Or you simply run the script on the command line on Windows. It would only need the path to the PHP executable, like
C:\Whatever\Path\php.exe script.php.