Solved

New install problem.

Posted on 2002-04-14
8
181 Views
Last Modified: 2008-02-20
I am running Windows 2000 and have installed IIS, MySQL and PHP.

I am now going thru a tutorial on PHP. The first program (the infamous 'Hello World') works, however, the second program returns an error.

The program is:

<html>
<body>
<?php
phpinfo();
?>
</body>
</html>

and the error is:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

I am assuming I need to do something with the install.
0
Comment
Question by:GaryZ
  • 4
  • 4
8 Comments
 
LVL 5

Expert Comment

by:andriv
ID: 6940848
Did you save it as a .php?

Are you typing the correct file name?

This is the only reasons that I can think of besides the IIS Web server not being active.
0
 

Author Comment

by:GaryZ
ID: 6941774
Yes to all. I uploaded it to a server, and it ran OK.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6942131
You said it ran OK, does that mean the problem is solved.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:GaryZ
ID: 6942254
Sorry, I meant the program ran ok when I uploaded it to my host server, but I get the error locally. Since it runs on the host server I will be using I have to assume it is coded correctly.
0
 
LVL 5

Accepted Solution

by:
andriv earned 100 total points
ID: 6942300
Does you host server require a different extension, for example .php4? If so, make sure you are using .php locally.

Also, you say the other script "hello world" did work locally, is that correct?

If yes to all of the above try:

<?
echo phpinfo();
?>

0
 

Author Comment

by:GaryZ
ID: 6942896
Got me. Just tried it again and it is working, maybe the reboot did it.

An additional question. On the host server I cannot get to the command line, so I have to create the database and add tables from script. Do you know a good site to learn this?

The tutorial I have only gives directions on how to do this from a command line.

Thanks
0
 
LVL 5

Expert Comment

by:andriv
ID: 6942923
What are you using to get the command line and what hosting company are you using.

If you want to create tables within your script you use the same mysql commands except your query will create a table:

$dbconnect = mysql_connect("host","user","password");

$mysql_select_db("dbName",$dbconnect);

$Query = "Create table tableName (prodid int(10) not null auto_increment,next field,next field)";

mysql_query($Query);
0
 

Author Comment

by:GaryZ
ID: 6942949
Thanks. I'll give that a try.

The person I am writting this for is on bright.net



0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question