473,378 Members | 1,495 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

stderr from "system" should be logged?

Hello. Maybe I'm just out of practice, maybe not.

Suppose we run a command using system() and this command writes to the
stderr stream. If I remember correctly, this is normally written to
the Apache error log file. log_errors is ON and error_reporting is
2047 E_ALL.

Redirecting the stderr from the system command has it showing up on
the browser output.

This is on BSD Unix, Apache 1.3.x , PHP 4.3.3

Any advice what's wrong here is appreciated.

Thanks.

--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobile http://www.JerrySievers.com/
Jul 17 '05 #1
2 2444
On 13 Jan 2005 10:15:15 -0500, Jerry Sievers <je***@jerrysievers.com> wrote:
Suppose we run a command using system() and this command writes to the
stderr stream. If I remember correctly, this is normally written to
the Apache error log file. log_errors is ON and error_reporting is
2047 E_ALL.

Redirecting the stderr from the system command has it showing up on
the browser output.
Redirecting it to what, stdout? Wouldn't that be expected behaviour?
This is on BSD Unix, Apache 1.3.x , PHP 4.3.3

Any advice what's wrong here is appreciated.


Could you give an example line of code to show what you're redirecting to
where?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Andy Hassall <an**@andyh.co.uk> writes:
On 13 Jan 2005 10:15:15 -0500, Jerry Sievers <je***@jerrysievers.com> wrote:

Redirecting it to what, stdout? Wouldn't that be expected behaviour?
Could you give an example line of code to show what you're redirecting to
where?


The test cases;

system('echo foo >&2');

Ok. What's the cause of this problem I found is that the error stream
of system commands does indeed get logged. However, the data is going
to the system wide error_log and not the virtual host specific log
where most of the PHP errors for this VH instance are written.

Interesting. Case closed... as long as the errors are being logged
somewhere, this is good enough for now.

Anyone that knows how I would get these errors into a VH specific
error_log file, please chime in here.

Thanks.

--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant
305 321-1144 (mobile http://www.JerrySievers.com/
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: José Flores | last post by:
Hello, i've tried to obtain this data but i didn't found it. The only thing i found is the "IsMetric" property in RegionInfo.CurrentRegion, but it doesn't show me the current setting. Thank...
11
by: T O | last post by:
Hi all, I am very new to C programming and have come across problem. My programme has opened and created a text document on the hard drive. The document name is stored in a string called...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
5
by: msigwald | last post by:
I'm trying to write a little C program to run under linux, which must gain root so it can then shutdown the computer. I can get the code to execute the su command via system("su"), but once su...
8
by: Henrik | last post by:
Hi Is there any way to see what the System process is doing? We have developed an application running at a production site to measure and optimize the production. The application needs to be...
0
by: JT | last post by:
This seems like it could be an asp.net bug. I am getting the following exception when I add OnSortCommand attribute to a datagrid. I have deleted the temp directories, rebooted etc and I have...
3
by: Acrobatic | last post by:
Hello I've got a simple Perl script that works fine from the command line but not from PHP via the browser. It's a conversion program that converts an image to a different format, and writes the...
4
by: Peter Kanurer | last post by:
Assume I add in VisualCSharp 2005 References to Oracle.DataAccess AND System.Data.OracleClient to an application. Does this cause problems or can they co-exist in one application ?
2
by: shalong | last post by:
Hi all, VS 2008 is complaining that HttpWebRequest class is not in System.Net namespace I have referenced System.Net and have coded "using System.Net" I think its a setup problem rather than a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.