PDA

View Full Version : Need help...


PixelFx
07-22-2003, 06:31 AM
I'm trying to get a copy of my vbhome page to load from a sub directly.

aka

vbhome installed in www.URLcom/root

but then make a copy of the vbhome index.php put it in a sub directory

example:

URL/dir/index.php
or
sub.url.com/dir/index.php

and have it load from the vbhome global in the www.url.com/root.

I've tried everything I can think of just about, but I'm still new to php so wondering if you guys can make a suggestion, I've been stumpt by this for 3 days now.

basically vbhome has a way to do multi home pages, which is cool if your pages.php are in the same directy as the vbhome root.

I can get that to work fine, but the min I tried to do the same in a sub directory nothing works and I get lots of errors.

Does this make sence?

I've tried,

require_once( "../../global.php" );
require_once( "./global.php" );
require_once( "url/global.php" );

etc nothing worked...

I'm guessing I'm just missing something simple, but need help ...

corsacrazy
07-22-2003, 06:53 AM
wil they not help over at http://www.teckwizards.com ? try a serch there for subdomain im sure ive seen it

PixelFx
07-22-2003, 07:04 AM
I've tried for the last week at techwizards, but Teck is closing that site august 1st, and the place seems to be a bit of ghost town, with people waiting for vb3.0...

:(

corsacrazy
07-22-2003, 07:26 AM
:( vb2 is dying here aswell :( the majority are stayng on 2 i think i know i am ! my site has got too many small hacks that i cant even remember so i woodnt upgrade risking a loss of things :(

PixelFx
07-22-2003, 08:19 AM
it will be interesting to see how many hacks and how fast they come out once vb3.0 comes out, however, I could really use some help to figour the above out ;)

noppid
07-22-2003, 12:55 PM
Try using the absolute path...

"/home/sitename/public_html/dir/include_file.php"

NTLDR
07-22-2003, 01:07 PM
If you only want one copy of the file and are using Linux create a symbolic link to it:

cd /path/to/page.php
ln -s /path/to/global.php ./global.php

PixelFx
07-22-2003, 06:45 PM
ntlr how would I write that?



require_once( "ln -s /path/to/global.php ./global.php" ); ?



thank you for your help

NTLDR
07-22-2003, 06:58 PM
You need to do that on the Linux command line via SSH.

Just change the path to global.php to match where it is on your server :)

PixelFx
07-22-2003, 07:12 PM
NTLDR I tried the SSH above, nice, I need to learn SSH better :), however

When I tried it it gave me this error

Warning: main(./forum/admin/config.php) [function.main]: failed to create stream: No such file or directory in /home/sku/public_html/global.php on line 744

Fatal error: main() [function.main]: Failed opening required './forum/admin/config.php' (include_path='.:/usr/local/lib/php') in /home/sku/public_html/global.php on line 744

below line 744



// +--------------------------------------------------------------
// | Initialize script
// +--------------------------------------------------------------
require_once( './' . $adminpath . '/config.php' );



I can't change the global as it would effect the rest of my site.

any ideas?

thank you

NTLDR
07-22-2003, 07:18 PM
Ah yes, I forgot that global.php included some other files.

If you set $adminpath to the full path to the admin directory and then change the require lines to:

require_once($adminpath . '/config.php' );

(ie remove the: './' . at the start)

This should allow it to work on all the pages.

PixelFx
07-22-2003, 07:47 PM
WOOT!!!! thank you got it..

I had to change the requred path in the vbhome global.php for a few other $adminpaths to get it to work. since it would chance my vbhome home to work... next to getting art to link up and style ..

I had to change


require_once($adminpath . '/db_' . $dbservertype . '.php' );


and


require_once($adminpath . '/functions.php' );


in the vbhome global to get it to work.... drools... I've been trying to figour this out for almost a week now..

the ssh really helps.. thank you :)

demo: http://games.shukenja.com/ac/index.php

I had a bit of an issue with the images but got that sorted out next fun is adding styles.