473,606 Members | 2,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_global s on too, but that doesn't work either.
Jul 16 '05 #1
3 2092
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_redir ect 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_redir ect 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
3926
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 using server-side session features. The way I have typically done this in the ASP world was with cookies. Another way to handle this is with a keyed record in a database, but the cookie strategy reduces the number of times I need to hit a...
7
4736
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 and is defined in an assembly common to the client and server components. The custom class merely defines three (3) constructors -- the null constructor; one with a string parameter; and one with a string and innner exception parameter -- that...
6
1165
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
1222
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 on writing your own server controls? I can find lots of individual references but not the "root" :-) Thanks, Rob.
5
2519
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 "Enlighten.LinkMad.Businesslogic". In one of my frontend websites I use this type to authenticate a user who is trying to login. The following excerpt is from the web.config of the particular site showing the reference to the custom provider, allowing .Net to do...
8
3885
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 need to avoid the extra round-trip to the client. I've tried Passing the page name, the full URL, and the instance of the handler class to the Transfer method, but everything gets me the same error 500. Any help would be appreciated.
2
1130
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 looking for a book specifically on writing controls. Here are some things I would like the book to talk about and my preferences as to how I would like it to be shown/explained: 1. I want it to use VB.NET for the examples, since that is what I write...
6
3393
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. This application has to write to the application event log. After deployment of the application I have verified that my source “MySource” exists in the Application event log. I then wrote some text to the event source in a forms app and...
4
1991
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 example out there of one I can model mine after? Thanks ~Dan Regalia
0
8016
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
8440
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8431
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
8096
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
8306
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...
1
5966
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1557
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1300
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.