vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Chdir (https://vborg.vbsupport.ru/showthread.php?t=49471)

Kamui Shirou 02-28-2003 01:59 PM

Chdir
 
HI folks. I do have little problems with this hack.
https://vborg.vbsupport.ru/showthrea...&pagenumber=10

I do not having probs with get it working on my server ( where the forum is placed) but get it working on another server where the site is placed. It has sometihing to do with the various directions.

on the server, where the board is, this code workz perfectly (i have to include the global.php and set the chdir)

PHP Code:

<?php
chdir
("/is/htdocs/28554/www.mangaboard.com/forums/");
require(
'global.php');
?>

But with the same settings placed on the other server the code runs into this error message

Warning: ChDir: No such file or directory (errno 2) in /homepages/45/d72897891/htdocs/vashXT/laststyle2/index2.php on line 2

Fatal error: Failed opening required 'global.php' (include_path='.:/usr/local/lib/php') in /homepages/45/d72897891/htdocs/vashXT/laststyle2/index2.php on line 3

Hope you are able to help. thx

amykhar 02-28-2003 02:03 PM

The chdir on the other server needs to be
chdir("/homepages/45/d72897891/htdocs/vashXT/laststyle2/forums/");

or something pretty darn similar depending on the subdirectory your forums are in.

Kamui Shirou 02-28-2003 02:48 PM

oh you missunderstood me.
the site and the forums are on different servers.
the full path to the forum is
is/htdocs/28554/www.mangaboard.com/forums/
and the path to the site is something like
/homepages/45/d72897891/htdocs/vashXT/laststyle2/

and that causes the problems

Sebastian 03-01-2003 07:25 AM

so you are installing that hack twice on two different servers? The path is not correct, did you double check it?

You don't have to use full path, if your forums is located in the webroot like: /main root/forums/

then you could do:

PHP Code:

chdir("../forums/");
require(
"global.php"); 

you cannot have a .php file in the line of chdir (change directory)..

I see you have index.php in chdir();

Kamui Shirou 03-01-2003 12:39 PM

nope. i only install this hack one time. but on different servers.
ah. just have a look.
i uploaded the page on the server the forum is placed on for testing:
http://www.mangaboard.com/test/animeshock/index2.php

nad here is the tets page on the server where the main page is normally placed:
http://www.shamanking.org/nokx/laststyle2/index2.php

Darren Lewis 03-02-2003 02:16 PM

Hi, you can't use chdir if the directories you're changing from and to are on different physical servers. To use the hack on different servers would require a complete rewrite so that it didn't use the vbulletin global.php file.

It would work using the full server path, if you had something like
home/htdocs/www.site1.com
home/htdocs/www.site2.com
as the directories are on the same server.


All times are GMT. The time now is 11:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete