vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
vBSEO Total Support Team Launches DeskPro New vBSEO Discount Level for Network Builders vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

php's $_SERVER-array is empty if I am using vBSEO - how can I get these values?

This is a discussion on php's $_SERVER-array is empty if I am using vBSEO - how can I get these values? within the Troubleshooting forums, part of the vBSEO SEO Plugin category; I tried to insert a new plugin in the "global_start"-hook-location in vBulletin and inserted the following code: PHP Code: echo  ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > Troubleshooting

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-19-2008, 09:46 AM
Junior Member
 
Real Name: Andy
Join Date: May 2008
Location: Germany
Posts: 17
php's $_SERVER-array is empty if I am using vBSEO - how can I get these values?

I tried to insert a new plugin in the "global_start"-hook-location in vBulletin and inserted the following code:
PHP Code:
echo $_SERVER['REQUEST_URI']; 
This works fine if I am opening the forum startpage in my browser - I can see the current url displayed as first line of my website.
But if I am trying to get the $_SERVER['REQUEST_URI'] value on forumdisplay-pages or member-pages, the whole $_SERVER-array seems to be empty. I guess that this is an vBSEO-issue because the problems appears on all pages that have a "virtual" subfolder (/memberlist, /members, /forumname etc).
Can you tell me how I can get the current url or other values from PHP's $_SERVER-array on these pages? I also tried to use PHP's getenv()-function but this also returns empty strings.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 08-19-2008, 02:57 PM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,547
try
$_SERVER['SCRIPT_NAME']
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 08-20-2008, 06:02 AM
Junior Member
 
Real Name: Andy
Join Date: May 2008
Location: Germany
Posts: 17
Like I said:
- $_SERVER['REQUEST_URI'] is empty
- $_SERVER is empty
- print_r($_SERVER) returns an empty array
- and this also implies that $_SERVER['SCRIPT_NAME'] is empty...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 08-20-2008, 04:14 PM
briansol's Avatar
Senior Member
vBSEO Pre-Release TeamDesign for SEOBig Board Administrator
 
Real Name: Brian
Join Date: Apr 2006
Location: Central CT, USA
Posts: 5,547
i think it's a hook location problem.

i can't get it to print in global-start, but it prints fine on forumhome complete
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 08-21-2008, 04:20 AM
Junior Member
 
Real Name: Andy
Join Date: May 2008
Location: Germany
Posts: 17
Do you actually read what I am writing? I already wrote in my first post that it is working fine on forumhome. The only problem is that $_SERVER is empty on pages with a virtual "subdirectory" inserted by vBSEO:
/members/blah.html
/members/list/blubb.html
/forumname/threadname.html
etc.
And it is not a problem with the global_start hook-location because I know for sure that globa_start is being executed on every vbulletin page. If i write
echo "test";
into the global_start-plugin instead of
echo $SERVER['whatever']
the string "test" appears on every vbulletin page, even the "vbSEOed" pages. The only issue is that the $SERVER-array is empty on vbSEOed pages whose URLs contain a virtual subdirectory.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 08-22-2008, 08:47 AM
Junior Member
 
Real Name: Andy
Join Date: May 2008
Location: Germany
Posts: 17
I was able to solve the problem. vbSEO offers a global constant called VBSEO_REQURL_FULL and this constant also contains the full url including all parameters.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Need Some index.php's removed navjotjsingh Custom Rewrite Rules 3 11-07-2007 10:54 PM
Warning: array_merge() [function.array-merge]: Argument #1 is not an array NICEGUY77 Troubleshooting 1 10-05-2007 03:05 AM
array_merge() [function.array-merge]: Argument #1 is not an array Eagle Bug Reporting 3 02-28-2007 04:49 PM
New install -- Question about default values KW802 URL Rewrite Settings 26 01-05-2007 07:09 PM
Wrong rewrite of $_SERVER['SCRIPT_NAME'] variable and others T2DMan Bug Reporting 2 08-11-2005 08:22 PM


All times are GMT -4. The time now is 10:47 PM.


Powered by vBulletin Version 3.8.0 Release Candidate 1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.