Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: pkcf - helmikuu 16, 2006, 06:38:11 AP

Otsikko: Using ssi functions to the main site
Kirjoitti: pkcf - helmikuu 16, 2006, 06:38:11 AP
I want to use some ssi functions to my main site.I have the forum in a subdomain of the form http://forum.*.com/ and i have tried all the possible combinations for the <?php require("SSI.php"); ?> but i can't get it work.Using simply <?php require("SSI.php"); ?> and the <?php ssi_recentTopics(); ?> function i get the following errors:

Warning: main(SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Warning: main(SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Warning: main(SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Fatal error: main(): Failed opening required 'SSI.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Can anyone help me out?
Otsikko: Re: Using ssi functions to the main site
Kirjoitti: Remaker - helmikuu 16, 2006, 07:29:54 AP
You have to enter the path to the SSI.php file corectly, because SSI.php is not in folder of the
main site ;).

If you are on a shared hosting... your subdomains probably are stored as directories on your main site.
So try using
require("../forum/SSI.php");
Otsikko: Re: Using ssi functions to the main site
Kirjoitti: kegobeer - helmikuu 16, 2006, 08:13:12 AP
Lainaus käyttäjältä: Remaker - helmikuu 16, 2006, 07:29:54 AP
You have to enter the path to the SSI.php file corectly, because SSI.php is not in folder of the
main site ;).

If you are on a shared hosting... your subdomains probably are stored as directories on your main site.
So try using
require("../forum/SSI.php");


If so, that won't work, as you are entering a relative URL instead of a path to the file.  Contact your host and ask if your subdirectories can be referenced by PHP scripts.  If they can, ask them for the full path (ie: /home/www/etc/etc) to your particular subdirectory.
Otsikko: Re: Using ssi functions to the main site
Kirjoitti: pkcf - helmikuu 17, 2006, 11:39:48 AP
I have found the full path to my subdirectory /home/httpd/vhosts/*.com/subdomains/forum/ssi.php but still i get the same warnings:

Warning: main(home/httpd/vhosts/*.com/subdomains/forum/SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Warning: main(home/httpd/vhosts/*.com/subdomains/forum/SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Warning: main(home/httpd/vhosts/*.com/subdomains/forum/SSI.php): failed to open stream: No such file or directory in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Fatal error: main(): Failed opening required 'home/httpd/vhosts/*.com/subdomains/forum/SSI.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/*.com/httpdocs/index.php on line 1

Anything else i can try?
Otsikko: Re: Using ssi functions to the main site
Kirjoitti: kegobeer - helmikuu 17, 2006, 11:47:24 AP
Did you ask your host if it's even possible to access a file from a different subdomain?