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

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 2961
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**@chronofish.com> wrote in message
news:teSpb.1090$oB3.260@lakeread03...
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
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...
2
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,...
2
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...
1
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...
0
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...
1
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...
8
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",...
6
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...
1
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...
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...
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
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.