Web Hosting Talk







View Full Version : Is this normal ?


DungeonMaste
12-05-2002, 07:17 AM
I have a reseller accound and this is my problem.
If in a page I have this PHP command:
----------
<?php include('/ssi/toptable.php'); ?>
----------
the system takes "/" as the servers root, not my accounts root.

In html, image or file links, the "/" is my account root.

Is this normal?

Thanks.

rusko
12-05-2002, 10:40 AM
absolutely normal. you do not have an 'account' root, only your home directory ~/ however unless php is running as a cgi binary with suexec, your php scripts are executed with the uid/gid the httpd runs as, so you can not use the home dir notation to refer to *your* home dir. you should specify the absolute path, ie /home/username/blah.php

good luck,
paul

DungeonMaste
12-05-2002, 10:48 AM
Thanks. :)

Is ther any thing I can do to go around this?

In my PC where I develop the pages, I have php (winXP) and it is not the same.

The problem is that I can't test the pages in my PC. If I made to work with my server, they will not in my reseller account :mad: :bawling:

A1WebServer
12-05-2002, 02:17 PM
possibly set the include path up as a variable in a config file. In the online config file, set the variable to your server, in the offline config file, set the variable as you have it now.

rusko
12-05-2002, 05:54 PM
correct,

you need to separate all enviroment-dependent constants in a separate include file.