473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Minimal Install - CGI

Hello,

I am trying to do a "minimal install" using PHP as CGI. For my app
there is no need for the server to be modified - I'm not trying to get
the server to recognize a PHP file and automatically call the PHP
executable.

The environment that I am currently working on is Win32 (XP) with
Apache up an running and seemingly working correctly. (It serves up
pages and will execute and display my "hello.exe" - a simple "hello
world").

What I think I should be able to do is simply copy the php4ts.dll,
php.exe, and php.ini into the cgi-bin directory. The php.ini file is
the "php.ini-recommended" that came with the PHP.

I created a phpinfo.php in the CGI directory and it looks like this:

#!c:\www\cgi-bin\php.exe
<?php
print ("Content-type: text/html\n\n");
print ("PHP Works!");
?>

The result I get is : "The page cannot be displayed" with a page title
of "Cannot find server".

It appears that the PHP program is being found, because if I change
the server directive to look for a non-existent php.exe
(#!c:\www\cgi-bin\php-blah.exe) I get an "Internal Server Error"
instead.

From the command line I get:

C:\www\cgi-bin>php.exe phpinfo.php
Content-type: text/html
X-Powered-By: PHP/4.3.4

Content-type: text/html

PHP Works!

(Interesting that it's printing out the Content-type automatically)

Any ideas?

Thanks!
Christopher
Jul 17 '05 #1
1 2966
I discovered my problem. The PHP.exe that needs to be executed is the CLI
version. I will be ecstatic if the PHP developers ever decide to give PHP a
compile option.

-CF


"ChronoFish " <de**@chronofis h.com> wrote in message
news:teSpb.1090 $oB3.260@lakere ad03...
Hello,

I am trying to do a "minimal install" using PHP as CGI. For my app
there is no need for the server to be modified - I'm not trying to get
the server to recognize a PHP file and automatically call the PHP
executable.

The environment that I am currently working on is Win32 (XP) with
Apache up an running and seemingly working correctly. (It serves up
pages and will execute and display my "hello.exe" - a simple "hello
world").

What I think I should be able to do is simply copy the php4ts.dll,
php.exe, and php.ini into the cgi-bin directory. The php.ini file is
the "php.ini-recommended" that came with the PHP.

I created a phpinfo.php in the CGI directory and it looks like this:

#!c:\www\cgi-bin\php.exe
<?php
print ("Content-type: text/html\n\n");
print ("PHP Works!");
?>

The result I get is : "The page cannot be displayed" with a page title
of "Cannot find server".

It appears that the PHP program is being found, because if I change
the server directive to look for a non-existent php.exe
(#!c:\www\cgi-bin\php-blah.exe) I get an "Internal Server Error"
instead.

From the command line I get:

C:\www\cgi-bin>php.exe phpinfo.php
Content-type: text/html
X-Powered-By: PHP/4.3.4

Content-type: text/html

PHP Works!

(Interesting that it's printing out the Content-type automatically)

Any ideas?

Thanks!
Christopher

Jul 17 '05 #2

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

Similar topics

2
2327
by: jeuxal_com | last post by:
Hi, I need to add a python program (web updater+extras) with a window application. The same thing as the Online Lord of the Ring game (http://lotrtcg.decipher.com/). When you install their application, it create a subdirectory with very few python files*.dll,*.pyd,*.pyc.: _socket.pyd _sre.pyd _tkinter.pyd (laucher.pyc)
2
2163
by: jeuxal_com | last post by:
Hi, I need to add a python program (web updater+extras) with a window application. The same thing as the Online Lord of the Ring game lotrtcg.decipher.com. When you install their application, it create a subdirectory with very few python files*.dll,*.pyd,*.pyc.: _socket.pyd _sre.pyd
2
1484
by: | last post by:
To return a minimal price of a bottle of vodka stored in field "price" I can call MIN function . However this price ignores the size of the bottle. Bottle types and sizes are stored in a different table called "Bottles" Suppose I wanted to get a product with the minimal price per litre. Obviously I have to multiply the bottle price by...
1
2650
by: arvee | last post by:
I would like to develop .NET applications using Oracle as a DBMS, but the dang thing (Oracle) is huge! What is the minimal installation with regards to RAM? Standard? Standard One? Personal? Are there optional components that can be eliminated? Thanks.
0
1529
by: Khue Pham | last post by:
Hi All, I'm building an embedded system and in need of bringing mySQL into my embedded controller. Here is what I need: + A minimal mySQL database configuration that supports: -> API for C program -> multi-process/concurrency (one process can read the database meanwhile other processes can write into it instantaneously) -> Support PHP
1
2071
by: Tom | last post by:
I need a very, very minimal LaTeX system on Windows. I only need to have the possibility to get DVI files out of my tex files (with minimal fonts). An I need it without any installer (no settings in registry and no or less enviroment variables). I know this was asked a few time here but I haven't found any suitable information yet. I posted...
8
1604
by: Victor B. Berdin | last post by:
Hi everyone, I'm trying to make PostgreSQL 7.4 to work on a minimal Linux (2.4.22/libc-2.3.1) environment comprised of selected libraries and the latest busybox. So far, the binaries: "initdb", "pg_ctl" and "initlocation" (initlocation: not really required) won't work, and terminates with the "SIGSEGV" message. All other pg...
6
1665
by: G.Ashok | last post by:
Hello, My WindowsApp is using only few of the .NET framework .DLL files. When I install my app on the clinet machine, I just want to install only required/used .DLL files of the framework not the whole framework. Because ..NET framework's isze is too big (20 MB like). And after installing it expands up to 100MB. etc. with all ASP.NET blah...
1
4065
by: Thomas Troeger | last post by:
Hi, I'd like to put the python library and interpreter on a small embedded Linux x86 compatible device where disk space is an issue. I played around with the minimal Python interpreters, but was not entirely happy with them, so my question is, is there an (preferably easy) way to put the interpreter and a cut-down version of the python...
0
7695
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
7612
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
7922
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. ...
0
7964
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...
0
5218
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...
0
3653
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
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
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...

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.