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

Home Posts Topics Members FAQ

communication between php and webserver

Hi,

can anybody point me to some reading on how communication between the webserver and php is
established?

I'd like to make php available to my own webserver software.

Andreas
Aug 16 '05 #1
5 1676
Andreas Thiele wrote:
Hi,

can anybody point me to some reading on how communication between the webserver and php is
established?

I'd like to make php available to my own webserver software.

Andreas

What kind of server-software are you using?
IIS? Apache?
Aug 16 '05 #2

"Bert Melis" <bert.melis@off site_remove_thi s_.be> schrieb im Newsbeitrag
news:43******** *************** @news.skynet.be ...
Andreas Thiele wrote:
Hi,

can anybody point me to some reading on how communication between the webserver and php is
established?

I'd like to make php available to my own webserver software.

Andreas

What kind of server-software are you using?
IIS? Apache?


No, I wrote one myself. It is a simple server, now capable of serving html pages, jpg and gif files.
I wrote it for standalone delivery of my application. In this case I don't want to require the user
to install a full blown apache or other web server.

Now I want to implement php support into my server program.

I already called the php.exe with i/o redirection from my program. This works if I don't need any
parameters. I'd like to further extend this and pass parameters to php. But how?

For example, my server obtains the request "GET /test.php?value1 =a&value2=b". Now I need a way to
hand over value1 and value2 to php.exe. Is this possible?

(I thought of something like "php -q test.php value1=a value2=b", but this won't work for obvious
reason)

Isn't there any reading on this topic available?

Googling didn't help me much yet.

TNX

Andreas
Aug 16 '05 #3
If your software runs on Windows, the easiest way is to implement the
ISAPI interface then use the existing PHP ISAPI module.

Aug 16 '05 #4
Andreas Thiele wrote:
"Bert Melis" <bert.melis@off site_remove_thi s_.be> schrieb im Newsbeitrag
news:43******** *************** @news.skynet.be ...
Andreas Thiele wrote:
Hi,

can anybody point me to some reading on how communication between the webserver and php is
establishe d?

I'd like to make php available to my own webserver software.

Andreas


What kind of server-software are you using?
IIS? Apache?

No, I wrote one myself. It is a simple server, now capable of serving html pages, jpg and gif files.
I wrote it for standalone delivery of my application. In this case I don't want to require the user
to install a full blown apache or other web server.

Now I want to implement php support into my server program.

I already called the php.exe with i/o redirection from my program. This works if I don't need any
parameters. I'd like to further extend this and pass parameters to php. But how?

For example, my server obtains the request "GET /test.php?value1 =a&value2=b". Now I need a way to
hand over value1 and value2 to php.exe. Is this possible?

(I thought of something like "php -q test.php value1=a value2=b", but this won't work for obvious
reason)

Isn't there any reading on this topic available?

Googling didn't help me much yet.

TNX

Andreas

http://www.php.net/manual/nl/features.commandline.php --> register_argc_a rgv

Can you get your answer here?
Aug 16 '05 #5
Thanks for you hints.

ISAPI includes CGI. I did not know that both are a common standard and not especially dependent on
php. I choode CGI because it was easier to implement and more portable in my programming context.
Performance is not an issue for me.

CGI basically is setting environment variables. On Windows this can be illustrated by a tiny batch
(*.bat) file. It reflects the minimum set of variables I found and the subtle ^ escape of the
&-sign.

@echo off
set REDIRECT_STATUS =CGI
set REQUEST_METHOD= GET
set SCRIPT_FILENAME =test.php
set QUERY_STRING=va lue1=a^&value2= b
e:/programme/php/php.exe

Well I don't write it into a batch. I open a pipe to cmd.exe, transmit these lines and collected the
output to send it to the client brower. This way, now my server has a minimalistic support for php.

Andreas
Aug 16 '05 #6

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

Similar topics

2
2711
by: david | last post by:
Hello all, let's me explains my long problem: I'm doing an intranet with a media part. So im must be able to upload files on a ftp server AND have a record of informations about this file and meta date in a MySQL database, shown in a php page. So the first thing i was doing was:
1
1253
by: Linda | last post by:
I am developing an application over the web(intranet app). Now my problem has to do with secure communication between browser and webserver. I want to enable secure communication using https. Are there any alternatives other than buying certificate for virtual directory ? Thanks for all your time :-)
1
8593
by: alederer | last post by:
Hallo! I have the following situation: A db2 v6.1 client on AIX 4.3 (db2level reports U469703) and a OS/390 database version 6.1 . In some situations, I get the following error in my db2 CLI application: SQL30081N A communication error has been
3
43236
by: Tim Reynolds | last post by:
I support a .Net application running on a SERVER accessing MF Db2 data. Occasionally, we have some type of connection problem that we have been unable to debug up to this point. We typically receive one of these IBM.Data.DB2.DB2Exception messages: ERROR SQL30081N A communication error has been detected. Communication protocol being used: ‘TCP/IP'. Communication API being used: ‘SOCKETS'. Location where the error was detected:...
4
2354
by: Sa¹o Zagoranski | last post by:
Hi! I'm writing a simple 3D First person shooter game. It is a multiplayer game, where all the players connect to one server.
12
2797
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
3
1502
by: Jean Pierre MERX | last post by:
I'm usually making my tennis reservations through a Web server (http://t22-srtm-0171717070.paris.fr/srtm/jsp/web/index.jsp#). The drawback is that you have to get up early in the morning in order to get your preferred courts/timeslots... I would like to have a short program which will: - Connect to the Web server at a pre-defined time with my identification data (user/pwd). - Reserve my favorite tennis court at the preferred time. -...
1
2057
by: swissclash79 | last post by:
Good morning everybody I have a question regarding configuring mappings in the development webserver. I am currently implementing a proxy server that is lied between the clients and a customer's webapplication. This proxy is responsible for security aspects (authentication/authorization) that is not handled by the webapplication itself. For that I created a class that implements IHttpHandler and registered it in the webproject's...
1
6931
by: mpc | last post by:
hello, how does one run a PHP page with a python webserver? Lets say i have a simple python web server running /path/webserver.py #!/usr/bin/env python from BaseHTTPServer import HTTPServer from CGIHTTPServer import CGIHTTPRequestHandler serve = HTTPServer(("",8080),CGIHTTPRequestHandler)
0
9724
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
9604
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
10379
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...
1
10394
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
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
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3015
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.