vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Website Intergration with vB 3.8 (https://vborg.vbsupport.ru/showthread.php?t=211461)

ScottC2105 04-18-2009 09:17 AM

Good morning everyone. I have a problem with this code:

Code:

$dir = getcwd();
chdir(/home/USERNAME/public_html/forum);
require './global.php';
chdir($dir);

I am using it as Choo told me to, to get the current users username etc but I have noticed it only works on www.domain.com not just domain.com. Anyway to fix this?

EDIT: Again, fixed it. You must goto vBulletin Admin -> vBulletin Options -> vBulletin Options -> Cookies and HTTP Header Options -> Cookie Domain and set it from (blank) to .DOMAIN.com.

--------------- Added [DATE]1240073997[/DATE] at [TIME]1240073997[/TIME] ---------------

Right, everything is going good. Thank you all for the help. I have a problem with the code that includes global. I am now getting an error like so:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes)

Is there anyway I can get around this without having to edit php.ini?

Thanks.

wolfstream 04-23-2009 08:43 PM

Quote:

Originally Posted by Floris (Post 1793122)
I recommend browsing the mods directory for your version and see if any modification comes close to what you want. They're great examples to get started.

This doesn't really "teach" anything, but it lets the user simply add code without understanding what they're doing.

Quote:

Originally Posted by ScottC2105 (Post 1793819)
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 77824 bytes)

Is there anyway I can get around this without having to edit php.ini?

you can try to adjust it in .htaccess by adding
Code:

php_value memory_limit 25M
which will raise the memory limit to 25 meg, or you can raise it higher, but remember NOT all webhosts look kindly at that. In fact, many will disable the ability to do so


All times are GMT. The time now is 03:55 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.01310 seconds
  • Memory Usage 1,716KB
  • 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
  • (2)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
  • (2)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