Urgent Help Needed- Company website down

Urgent Help Needed- Company website down

Post by Case » Wed, 09 Apr 2008 08:42:34


Hi,

My company's website is down so I'm hoping someone has seen this
bizarre problem/behavior before and can help me out
.
We have a USA and an International site. Two directories under the web
server root.
index.html in the web server root directory links to each
/usa/index.php
/intl/index.php

I include the same template files in each .php file under each
directory. My /usa directory renders correctly. But starting today my /
intl directory started exhibiting this weird behavior.

- Viewing the intl/index.php my included template at the top of the
page is all of sudden not working(the code is not included in the
file).
- Yet the same template is used in all the rest of the files in the /
intl directory and the code from the template *is* included.
- When I cut and paste the template code directly in the index.php
file, *it* renders correctly but *all* the other files stop working.
The code is not included.

I've copied the /usa/index.php file to the /intl directory, since it
renders correctly, and I see the same problem. Them template code is
not included in the file.

All permissions on the files are correct.

Any help would be greatly appreciated.

Thanks, Case
 
 
 

Urgent Help Needed- Company website down

Post by Jerry Stuc » Wed, 09 Apr 2008 11:08:49


Code and a URL would help. Otherwise we're just shooting in the dark.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
XXXX@XXXXX.COM
==================

 
 
 

Urgent Help Needed- Company website down

Post by David Quin » Wed, 09 Apr 2008 15:31:05

On Mon, 07 Apr 2008 22:08:49 -0400, Jerry Stuckle



Indeed.
But I suspect an include path problem.
HOW/WHY it suddenly happened is another matter!

Host restored php.ini from a backup?
OP replaced an .htaccess?
--
Locate your Mobile phone: < http://www.yqcomputer.com/ ;
Great gifts: < http://www.yqcomputer.com/ ;
 
 
 

Urgent Help Needed- Company website down

Post by Willem Bog » Wed, 09 Apr 2008 16:52:08

> But I suspect an include path problem.

How and why is not important. Just do not use relative paths for
inclusion unless you know what you are doing. My guesses are:
- Your config has changed (duh!)
- You added a file with the same name in another directory and _that_
file is included if you use relative paths.

Relative paths do not work with respect to the current file, they work
with respect to the called file. That is, they don't work reliably at
all. Instead of:

require_once('library/settings.php');

write

require_once(dirname(__FILE__) . '/library/settings.php');

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.yqcomputer.com/