vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problem with PHP, Server & vB3.0 (trying to get pluhnews to work) (https://vborg.vbsupport.ru/showthread.php?t=61532)

Mithan 02-13-2004 09:27 PM

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.

Andreas 02-13-2004 09:37 PM

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 ...

Mithan 02-13-2004 09:46 PM

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.

Mithan 02-13-2004 10:04 PM

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.

Mithan 02-13-2004 11:14 PM

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?

Martyn 04-30-2004 04:52 PM

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

Zachery 04-30-2004 04:55 PM

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 :)

Martyn 04-30-2004 05:48 PM

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?

Martyn 05-12-2004 09:50 PM

Anyone?

Jujimufu 05-22-2004 04:41 AM

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


All times are GMT. The time now is 07:33 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.02059 seconds
  • Memory Usage 1,767KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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