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

includes in php as cgi

I am in the process of moving a site to a new server.

On the old server, these two functions:

<?include("header.shtml");?>

and

<?include("footer.shtml");?>

allowed me to successful include a simple header and footer on every
page of the site.

However: on the new server, php is installed as cgi.

What function will allow me to successfully include the header and
footer files with this configuration? The host swears that shtml works
perfectly as an include for the php installed as cgi configuration --
but I cannot get it to work with this standard command.

Anybody have any ideas?

Jun 21 '07 #1
7 1394
ma********@gmail.com wrote in news:1182451556.344094.198280
@c77g2000hse.googlegroups.com:

However: on the new server, php is installed as cgi.

What function will allow me to successfully include the header and
footer files with this configuration? The host swears that shtml works
perfectly as an include for the php installed as cgi configuration --
but I cannot get it to work with this standard command.

Anybody have any ideas?
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Jun 21 '07 #2
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Thanks for responding Good Man!

Nope, that didn't work either....but you did provide an important
clue.

I was using

<?include("header.shtml");?>

and you suggested

<?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.

Still no luck.

Thanks anyway.

Any other ideas?

Jun 21 '07 #3
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Thanks for responding Good Man!

Nope, that didn't work either....but you did provide an important
clue.

I was using

<?include("header.shtml");?>

and you suggested

<?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.

Still no luck.

Thanks anyway.

Any other ideas?

Jun 21 '07 #4
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Thanks for responding Good Man!

Nope, that didn't work either....but you did provide an important
clue.

I was using

<?include("header.shtml");?>

and you suggested

<?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.

Still no luck.

Thanks anyway.

Any other ideas?

Jun 21 '07 #5
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Thanks for responding Good Man!

Nope, that didn't work either....but you did provide an important
clue.

I was using

<?include("header.shtml");?>

and you suggested

<?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.

Still no luck.

Thanks anyway.

Any other ideas?

Jun 21 '07 #6
it shouldn't make a difference, but perhaps double-check the path? It may
require the full server path to the file, ie:

<?php include("/path/to/include.php"); ?>

as oppposed to

<?php include("include.php"); ?>
Thanks for responding Good Man!

Nope, that didn't work either....but you did provide an important
clue.

I was using

<?include("header.shtml");?>

and you suggested

<?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.

Still no luck.

Thanks anyway.

Any other ideas?

Jun 21 '07 #7
In article <11*********************@p77g2000hsh.googlegroups. com>,
<ma********@gmail.comwrote:
><?php include("header.shtml");?>

I tried that, too -- but no luck. I also tried the path...and the
server path.
Still no luck.
Thanks anyway.
Any other ideas?
Well, the php include directive is suppose to include other php
code. It appears (and I'm guessing) that you are including an HTML
file, which should be output rather than executed as PHP.

Why not just say
<?php readfile("header.shtml"); ?>

That's what you should do if the file you're reading is simply text
or HTML that you want to output.
See http://us.php.net/manual/en/function.readfile.php

If that doesn't work, then I think your next step is to contact your
hosting services tech support; after all, they are the ones who seem
to have provided a broken implementation of php.

-A
Jun 22 '07 #8

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

Similar topics

2
by: Joe Mowry | last post by:
First off, I'm posting this question for a friend that doesn't have access to the news groups. Problem: Using PHP as the base and has several PHP < includes > for various functions, all this...
4
by: Patrick | last post by:
I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file, responsible for generating the <HEAD/> section of the HTML ...
12
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc...
6
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server...
3
by: Jeff | last post by:
I have an asp page. Now I know this is sortof OT, but I am not sure of the forum to get an answer. I have an include on this asp page <!-- #include file=\forum\includes\consts-inc.asp --> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
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.