473,407 Members | 2,326 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,407 software developers and data experts.

Writing a custom server.

Hello, I am writing a custom server(www), and I need to use php.

Right now I have it set up to just envoke php on the command line if the
requested document ends in .php.

I assumed that all i would have to do is set the QUERY_STRING environment
varible for php to be able to use 'GET' data. But it doesn't set anything.

Does anyone know what environment varibles I need to set, so that php will
put my data into either
$_POST, or $_GET

btw, I have register_globals on too, but that doesn't work either.
Jul 16 '05 #1
3 2083
At a guess you'll probably need to set REQUEST_METHOD so it knows to
check QUERY_STRING.


When I set REQUEST_METHOD I get security errors.... I haven't been able to
get around them.
I did what it said, and turned force_cgi_redirect to off. Still didn't fix
the problem


I just checked and they wernt security errors, but it says it can't file the
file.

Jul 16 '05 #2
Hi,

octopi wrote:
At a guess you'll probably need to set REQUEST_METHOD so it knows to
check QUERY_STRING.


When I set REQUEST_METHOD I get security errors.... I haven't been able to
get around them.
I did what it said, and turned force_cgi_redirect to off. Still didn't fix
the problem


I just checked and they wernt security errors, but it says it can't file the
file.


Is that, "can't find the file"? In that case set SCRIPT_NAME and
PATH_TRANSLATED. You really ought to ensure you're setting most of the
variables in the CGI spec to make sure everything else works.

I'm midly surprised it was necessary to write a custom server as there
are web servers for almost every occasion out there. :-)

Regards,

Luke

Jul 16 '05 #3
octopi:
Hello, I am writing a custom server(www), and I need to use php.

Right now I have it set up to just envoke php on the command line if the
requested document ends in .php.

I assumed that all i would have to do is set the QUERY_STRING environment
varible for php to be able to use 'GET' data. But it doesn't set anything.

Does anyone know what environment varibles I need to set, so that php will
put my data into either
$_POST, or $_GET


Try looking at the PHP source code. There are modules for the different
servers supported by PHP, and you should be able to glean something helpful
from it.

André Nęss
Jul 16 '05 #4

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

Similar topics

1
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not...
7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
6
by: Joe Bonavita | last post by:
What is the safest way to create a file on the server? I'm looking for something like: secureconnection(); // create the file disconnect();
6
by: Rob Nicholson | last post by:
I've decided that we're just going to have to bit the bullet and write our own server control with client side JavaScript to handle a specific requirement. Anyone know where in MSDN is the chapter...
5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
2
by: Nathan Sokalski | last post by:
I am an ASP.NET developer who would like to start learning about writing ASP.NET custom controls using VB.NET. I already have a reasonable amount of knowledge with making ASP.NET pages, and am...
6
by: JeffDotNet | last post by:
Writing to a registered source in the Application event log I have an asp.net framework 2.0 app that I created on a winxp machine and now I am deploying it to IIS6 on a win server2003 machine. ...
4
by: Daniel Regalia | last post by:
Happy monday to all who read this... How would I go about creating a custom dll in VB.net 2 that I can use to make custom functions (extended stored procedures) for SQL2000/2005? Is there an...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...
0
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,...
0
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,...
0
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...
0
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...

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.