473,513 Members | 3,895 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

beginner question about exec()

I have a small custom 404 page in PHP. When this page is triggered I'd
like some information about the requesting client, including its reverse
IP. I would like the 404 page to be returned to the client's browser
immediately, after invoking another function or script that takes care
of the lookup & email duties. The 404 page doesn't care about the return
value of the second script at all, it's fine if it fails. It looked to
me like exec() is appropriate here, is that correct? Am I thinking about
it wrong?

Thanks.

Jul 17 '05 #1
1 1747
Peter <ph****@speakeasy.net> writes:
I have a small custom 404 page in PHP. When this page is triggered I'd
like some information about the requesting client, including its reverse
IP. I would like the 404 page to be returned to the client's browser
immediately, after invoking another function or script that takes care
of the lookup & email duties. The 404 page doesn't care about the return
value of the second script at all, it's fine if it fails. It looked to
me like exec() is appropriate here, is that correct? Am I thinking about
it wrong?


What happened when you tried it?

Have your PHP page use exec() to invoke a script that takes a while
to execute and see what happens. The script could sleep for a few
seconds to simulate delays from DNS lookups or other work. If the
results are acceptable then use exec(); if the results aren't
acceptable then either use another mechanism to invoke the script
or think of a way to make the script give acceptable results with
exec(). You'll probably need to know something about how your
system manages processes.

If you're having trouble, then post what you tried, what happened,
what you'd like to happen, and what kind of system you're using.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
Jul 17 '05 #2

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

Similar topics

1
1165
by: Adonis | last post by:
I wrote a small webserver and a small html parser to parse some elements, in which contain python code, now before I go any further your thinking "not another web application server" and before being routed to Twisted, Zope, Webware, Mod_Python, etc., this is a learning project, it is for my amusment and better understanding. Nevertheless,...
3
3882
by: Shrii | last post by:
1.I read a unicode file by using codec 2.I want to pass that string to exec() statement 3.But one of my character (U+0950) in that string is not showing properly in the output got by that exec() statement could anyone help me to get proper output. ? somesh
0
1863
by: antonio | last post by:
Hi, I have one trouble about exec sql define. Here's an example: EXEC SQL DEFINE INTSIZE 2; EXEC SQL DEFINE I_(x,y) char x; EXEC SQL TYPE CUSTOMER_RECORD IS STRUCT { I_(cno,2)
3
10352
by: elRoyFlynn | last post by:
This is a odd problem where a bad plan was chosen again and again, but then not. Using the profiler, I identified an application-issued statement that performed poorly. It took this form: exec sp_executesql N'SELECT col1, col2 FROM t1 WHERE (t2= @Parm1)', N'@Parm1 int', @Parm1 = 8609 t2 is a foreign key column, and is indexed.
14
1805
by: japin0 | last post by:
Hi, I am a absolute beginner in ASP ..I do have a bit of exposure to .VBS and other scripting languages. I need your guidance, where do I start? I had been to MS website Quick start guide but it says we need a basic web building experience to undrestand.. Can you please refer to a guide or a website which can cater my need? rgards
2
1179
by: Hul Tytus | last post by:
panix.user.html, comp.infosystems.www.authoring.html question about #exec Are there any obvious errors in the html code below? All except the #exec command function as would be expected, but there is no action from exectst.cgi - a compiled c program that's shown under the html code. This is being tested from one of panix.com's shell...
4
2349
by: Michael | last post by:
Hi, I'm having difficulty finding any previous discussion on this -- I keep finding people either having problems calling os.exec(lepev), or with using python's exec statement. Neither of which I mean here. Just for a moment, let's just take one definition for one of the
2
1104
by: findu_2005 | last post by:
Hi, When I run the following command on sql server: exec ('print "OK"') go This message appears: Server: Msg 128, Level 15, State 1, Line 1
4
2534
by: CorfuVBProgrammer | last post by:
Hello All . . . I need some help about exec command. I have create an executable that return the System Drives. It is based on DOS and does not need any parameter. I have create my php script that executes the executable i've create and the source code is the following :
0
7270
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...
0
7178
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...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7125
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3252
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...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.