473,670 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2467
On 13 Jan 2005 10:15:15 -0500, Jerry Sievers <je***@jerrysie vers.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.andyhsoftwa re.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***@jerrysie vers.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
332
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 you José Flores ..
11
7017
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 "output". At the end of the program, I want to open the outputfile.txt automatically using notepad.
3
8823
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 don't think I made any changes to either page other than changing the user control that creates the header). Server Error in '/myApp' Application. ---------------------------------------------------------------------------- ----
5
5659
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 comes into action, my program it's halted and su takes over. Because of this, I can't get my program to write the password su asks. I habe no idea on how to get C to communicate with other running processes such as su, but I understand it can be...
8
3216
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 responsive at all times during production. I'm experiencing some problems with my application not responding or responding slow. I suspeced the problem had to do with high CPU utilization
0
2661
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 isolated it to the OnSortCommands presence. When I use a code behind it doesn't fire any events on the back end and the global error handler grabs it. I put together a very simple example to illustrate the problem below. If anyone has an idea of...
3
1530
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 new image to a directory. I'm running as user "nobody" and have the target directory set to "nobody:nobody", and I've tried chmodding the directory to both 755 and 777 with no luck. If I run my script from the command line, it executes
4
5019
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
16414
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 coding error The type or namespace name 'HttpWebRequest' does not exist in the namespace 'System.Net' (are you missing an assembly reference?) C:\Documents and Settings\user\My Documents\Visual Studio...
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.