Solved

New install problem.

Posted on 2002-04-14
8
178 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
Comment Utility
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
Comment Utility
Yes to all. I uploaded it to a server, and it ran OK.
0
 
LVL 5

Expert Comment

by:andriv
Comment Utility
You said it ran OK, does that mean the problem is solved.
0
 

Author Comment

by:GaryZ
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 5

Accepted Solution

by:
andriv earned 100 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks. I'll give that a try.

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



0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now