vBulletin Search Engine Optimization
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 ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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: 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. |
|
#2
| ||||
| ||||
|
try $_SERVER['SCRIPT_NAME'] |
|
#3
| |||
| |||
|
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... |
|
#4
| ||||
| ||||
|
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 |
|
#5
| |||
| |||
|
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. |
|
#6
| |||
| |||
|
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.
|
| Thread Tools | |
| |
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 |