The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
php include in global_start plugin = no cookies!
Hi,
I have the following global_start plugin hook: ob_start(); require_once('http://www.joshandfriends.com.au:45317/dancemusic/faces/ExternalPlugin.jsp'); $included_file = ob_get_contents(); ob_end_clean(); In the ExternalPlugin.jsp when i look for the cookies of my website it returns nothing at all!!! When i place: http://www.joshandfriends.com.au:453...rnalPlugin.jsp in a browser i can see all cookies logged. I had this on my old site as well. Any ideas why i would be receiving no cookies? |
#2
|
||||
|
||||
The file 'ExternalPlugin.jsp' is being executed by your server, and the contents returned and being saved into "$included_file". The problem exists because it is your server pulling the contents of this file.
Perhaps pass along some variables? PHP Code:
- Zero Tolerance |
#3
|
|||
|
|||
Would it make a difference if i gave a relative url for example
require_once("../ExternalPlugin.jsp"); Would it then be passed the cookies in a normal request fashion? btw thanks for the reply. I will try your code this weekend see if it works for what i need |
#4
|
||||
|
||||
Depends really, some setups will allow you to use require_once with the variables too, some won't, should it fail you can use:
PHP Code:
- Zero Tolerance |
#5
|
|||
|
|||
OK tried them both. Firstly the suggestion of passing cookies as request parameters.
Their are NO request parameters of any sort received by my jsp. The request is BLANK! This is very odd as of course the cookies are empty too. This suggests that the request is somehow getting totally cleared at some point. The 2nd suggestion refused to render entirely. I imagine it was a php error. Any suggestions of where the request would be getting cleared? |
#6
|
|||
|
|||
Any other advice?
This happens on both Tomcat appserver and also Glassfish app server. Very stuck on this one |
#7
|
||||
|
||||
Because your webserver is requesting the page, not you. Webservers don't send cookies with their requests, and even if they did, they wouldn't be yours.
|
#8
|
|||
|
|||
Ok everyone we are a little further along!
a) Parameters can be passed to the jsp b) Within the plugin return "count=" . count($_COOKIES); RETURNS 0 So basically even with in the vBulletin plugin i can not access any cookies at all!!! Any ideas? Is their a particular vbulletin function i need to call to retrieve the cookies THis doesn't return anything either: $bbuserinfo['username']; even though i am logged in. THis is all in the global start hook STOP PRESS!!! I got it working with: function build_cookie_string() { return "bbsessionhash=" . $_COOKIE['bbsessionhash']; } ob_start(); require_once('http://www.joshandfriends.com.au/dancemusic/faces/ExternalPlugin.jsp?' . build_cookie_string()); $included_file = ob_get_contents(); ob_end_clean(); Thanks to everyone who helped! Josh |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|