vb.org Archive

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

testbot 03-01-2009 10:35 PM

yea, same error.

i removed everything except the necessities and still same error.

PHP Code:

<?php
error_reporting
(E_ALL & ~E_NOTICE);

// # DEFINE IMPORTANT CONSTANTS
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''cforumstats');

// # REQUIRE BACK-END
$curdir getcwd();
chdir('/home/***/public_html/community');
require_once(
'global.php');

// # START MAIN SCRIPT
$navbits = array();
eval(
'print_output("' fetch_template('cforumstats') . '");');
chdir($curdir);
?>


Lynne 03-01-2009 10:38 PM

You have removed necessary stuff. You should start off with one of these (get it working with a basic template) and add from there - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

testbot 03-01-2009 11:16 PM

Quote:

Originally Posted by Lynne (Post 1757998)
You have removed necessary stuff. You should start off with one of these (get it working with a basic template) and add from there - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.

both ways work. i used that link to create it originally. you can see it in the first post.

either way, this link works http://www.ampprod.com/community/cforumstats.php

but if i do 'include /home/***/public_html/community/cforumstats.php' or add the code directly into a module on my main site it gets the following error.

PHP Fatal error: Call to a member function query_first_slave() on a non-object in /home/***/public_html/community/includes/functions.php on line 1368

Lynne 03-01-2009 11:21 PM

That query is right after a plugin. Have you tried disabling your plugins to see if that fixes the issue?

testbot 03-01-2009 11:56 PM

Quote:

Originally Posted by Lynne (Post 1758052)
That query is right after a plugin. Have you tried disabling your plugins to see if that fixes the issue?

sorry if this is a dumb question i'm not sure what you mean. what query is right after what plugin?

Lynne 03-02-2009 03:21 AM

The one you are getting an error on...
Quote:

PHP Fatal error: Call to a member function query_first_slave() on a non-object in /home/***/public_html/community/includes/functions.php on line 1368
Line 1368 of functions.php is where the problem is and this is the line:
PHP Code:

    $user $vbulletin->db->query_first_slave(

This is just above there:
PHP Code:

    $hook_query_fields $hook_query_joins '';
    (
$hook vBulletinHook::fetch_hook('fetch_userinfo_query')) ? eval($hook) : false


Dismounted 03-02-2009 05:00 AM

Please post the actual PHP file you are using (and any associated templates).

testbot 03-02-2009 05:19 AM

1 Attachment(s)
Template (cforumstats)
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" style="background-image:none;padding:0px;margin:0px;background-color:none;">
<head>
<title></title>
$headinclude
</head>
<body style="background-image:none;padding:0px;margin:0px;background-color:#000000;">
<div style="width:100%;background-color:none;">
$cybtopstats
</div>
</body>
</html>

attached 'cforumstats.php'

working url: http://www.ampprod.com/community/cforumstats.php

testbot 03-03-2009 02:12 PM

Quote:

Originally Posted by testbot (Post 1758229)
Template (cforumstats)
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]" style="background-image:none;padding:0px;margin:0px;background-color:none;">
<head>
<title></title>
$headinclude
</head>
<body style="background-image:none;padding:0px;margin:0px;background-color:#000000;">
<div style="width:100%;background-color:none;">
$cybtopstats
</div>
</body>
</html>

attached 'cforumstats.php'

working url: http://www.ampprod.com/community/cforumstats.php

nothing?

Lynne 03-03-2009 03:02 PM

So you have a page that works fine as a standalone page. Exactly what code are you using to put it somewhere else? What hook location, what code, etc.


All times are GMT. The time now is 11:19 PM.

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.01186 seconds
  • Memory Usage 1,750KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete