Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2004, 09:27 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Problem with PHP, Server & vB3.0 (trying to get pluhnews to work)

Hi.
I have moddified PluhNews to work with vb3.0 and the results can been seen here.
www.mithan.com

Basically the code works, except there is a small problem with Global.php not loading, which means that the text isn't parsing.

The problem is, I can not get the global.php file to work, as it wont "require" properly, meaning that I cant use the following parse command:
PHP Code:
$bericht=bbcodeparse2($pagetext,"","","1","1","1"); 
in the Pluh News script.

With version 2.3.4 of vBulletin, global.php was working ok (and thus pluhnews). Now it wont work with 3.0...


The original code I had was this:

PHP Code:
chdir("/home/virtual/site22/fst/var/www/html/forum/");
require(
"./global.php");
require(
"./PluhConfig.php");
require(
"./admin/config.php"); 

Now, that same code will not work, and I have tried the following:
PHP Code:
chdir("/home/virtual/site22/fst/var/www/html/forum/");
require(
"/home/virtual/site22/fst/var/www/html/forum/global.php");
require(
"./PluhConfig.php");
require(
"./includes/config.php"); 
and a LOT of other variations.

PS:
chdir switches properly as tested with
PHP Code:
echo(getcwd()); 
I even followed through the vB3.0 code and added some absolute URL's into global.php, config.php, db_mysql.php and init.php to get it to keep passing through its commands. It kind of worked, but eventually ended up just causing nothing to load anyways...



Is there an issue with my Server and its settings possibly?
I am hosted by www.Dot5Hosting.com and I am wondering if they have some security settings preventing this.

I just don't get it, since vb2.3.4 was working correctly.

Alternativly:
Is there anyway I can get this code to work without calling Global.php?
PHP Code:
$bericht=bbcodeparse2($pagetext,"","","1","1","1"); 

Ideally, I would like to find out why I can not call up global.php and get it to work properly.

I had this same trouble a year ago as well. I managed to get PluhNews working, but I couldn't add a remote vBulletin login on the front page of the site. It worked on westhost.com but wouldn't work when I moved to dot5hosting.com.

Again, thanks to anybody who can help me out.
Reply With Quote
  #2  
Old 02-13-2004, 09:37 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did your functions_bbcodeparse.php?
Did you try parse_bbcode($pagetext, 'nonforum') ?

I think it might be a problem with cookies being set when the vB backend loads up ...
Reply With Quote
  #3  
Old 02-13-2004, 09:46 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kirby, thanks for the reply.

I did not try that. How would I exactly?
Im not a PHP Expert by any means...

Right now Im using this:
$bericht=$pagetext;

then outputing:
$bericht

Which gives you the unparsed code on the front of my site.
Reply With Quote
  #4  
Old 02-13-2004, 10:04 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got this working by adding:

chdir("/home/virtual/site22/fst/var/www/html/forum/");

require("/home/virtual/site22/fst/var/www/html/forum/global.php");
chdir("/home/virtual/site22/fst/var/www/html/");

To my main index.php file.

My site is broken into pieces, and I had tried that a year ago and it didn't work.

Now it did...

Weird.
Reply With Quote
  #5  
Old 02-13-2004, 11:14 PM
Mithan Mithan is offline
 
Join Date: Apr 2002
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turns out my fix didn't entirely work:

Turns out my fix didn't work

I get the following SQL Errors:
Warning: mysql_query(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 205

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 350

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 351

Warning: mysql_query(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 205

Warning: mysql_error(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 350

Warning: mysql_errno(): 6 is not a valid MySQL-Link resource in /home/virtual/site22/fst/var/www/html/forum/includes/db_mysql.php on line 351






BTW, I added (in addition to moving the global.php require to index), this code:

require_once('./includes/functions_bbcodeparse.php');
$bericht=parse_bbcode2($pagetext,"1","1","1","1"," 1");



Any ideas?
Reply With Quote
  #6  
Old 04-30-2004, 04:52 PM
Martyn Martyn is offline
 
Join Date: Dec 2001
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been having the same problem with some of my custom scripts, they all worked fine before upgrading to v3.

Can anyone shed any light?

Cheers
Reply With Quote
  #7  
Old 04-30-2004, 04:55 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Martyn
I've been having the same problem with some of my custom scripts, they all worked fine before upgrading to v3.

Can anyone shed any light?

Cheers
Try my sig, vB3 works alot differntly
Reply With Quote
  #8  
Old 04-30-2004, 05:48 PM
Martyn Martyn is offline
 
Join Date: Dec 2001
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, i've just taken a look and i've made the changes advised and I still appear to be receiving php/mysql errors.

For example...

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site3/fst/var/www/html/forums/setups/mysqltest.php on line 11

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/virtual/site3/fst/var/www/html/forums/setups/mysqltest.php on line 13

PHP Code:
<?php require_once('Connections/seatcupra.php'); ?>
<?php
chdir
("../");
error_reporting(E_ALL & ~E_NOTICE);
require_once(
"global.php");

$colname_rs_test "1";
if (isset(
$HTTP_GET_VARS['userid'])) {
  
$colname_rs_test = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['userid'] : addslashes($HTTP_GET_VARS['userid']);
}
mysql_select_db($database_seatcupra$seatcupra);
$query_rs_test sprintf("SELECT * FROM setup_photos WHERE userid = %s"$colname_rs_test);
$rs_test mysql_query($query_rs_test$seatcupra) or die(mysql_error());
$row_rs_test mysql_fetch_assoc($rs_test);
$totalRows_rs_test mysql_num_rows($rs_test);
?>
<html>
<head>
<title>MySQL/VB Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php echo $row_rs_test['photo_id']; ?>,<?php echo $row_rs_test['filename']; ?>,<?php echo $row_rs_test['caption']; ?>,<?php echo $row_rs_test['userid']; ?>,<?php echo $row_rs_test['username']; ?>
</body>
</html>
<?php
mysql_free_result
($rs_test);
?>
Any ideas?
Reply With Quote
  #9  
Old 05-12-2004, 09:50 PM
Martyn Martyn is offline
 
Join Date: Dec 2001
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone?
Reply With Quote
  #10  
Old 05-22-2004, 04:41 AM
Jujimufu's Avatar
Jujimufu Jujimufu is offline
 
Join Date: Apr 2003
Location: Magicant
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would be interested in this as well, I have the same problem.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:56 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.11454 seconds
  • Memory Usage 2,278KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete