Solved

New install problem.

Posted on 2002-04-14
8
180 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

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