After success autorization I get array with a information about user:
$authdata = array(
'logged_in' => true,
'id_user' => $checked['idUsers'],
'time_auth' => time(),
'status' => $checked['UsersStatus'],
'type' => $checked['UsersTypeAccount'],
);
Then set this array to session Codeigniter(array $checked is not empty, there is a UsersStatus and UsersTypeAccount):
$this->session->set_userdata($authdata);
After do redirect at controller profile:
redirect('profile');
This controllers checks a user session on empty/true:
if ($this->session->userdata("session_id") && $this->session->userdata("type") && (($this->session->userdata("status")){
// Return Success
}
If make var_dump() session:
var_dump($this->session->userdata("type")).'<br>'; // false
var_dump($this->session->userdata("status")).'<br>'; die(); // false
I get a false value, why type and status fields is not true in session?
Edition:
Also I have done:
var_dump($this->session->all_userdata()); die();
Response:
array(5) { ["session_id"]=> string(32) "85d9e0aa1f738c551b4ba649c36f977c" ["ip_address"]=> string(12) "46.32.174.82" ["user_agent"]=> string(109) "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36" ["last_activity"]=> int(1416142399) ["user_data"]=> string(0) "" }
So, session is created, but without fields status, type
From tutorial:
$newdata = array(
'username' => 'johndoe',
'email' => 'johndoe#some-site.com',
'logged_in' => TRUE
);
$this->session->set_userdata($newdata);
Important:
$this->session->set_userdata($authdata);
var_dump($this->session->all_userdata()); die(); // Here I get full session array.
After some a long attempts to resolve this trouble I had decided:
Update Codeigniter to version 2.2
After the code had worked:
Set session:
$this->session->set_userdata($authdata);
Get session:
$type = $this->session->userdata['type'];
$status = $this->session->userdata['status'];
$session_id = $this->session->userdata['session_id'];
It helped me, maybe someone too
Related
This question already has answers here:
How to filter a two dimensional array by value
(6 answers)
Closed 16 days ago.
I would like to search something in array of objects and remove the array position. For example, follow the array:
$audits = [{"old_values":[],"new_values":[],"event":"updated","auditable_id":"440","auditable_type":"App\\Models\\User","user_id":"433","user_type":"App\\Models\\User","url":"http:\/\/protocolo-online2\/logout?","ip_address":"127.0.0.1","user_agent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/102.0.0.0 Safari\/537.36","tags":"","created_at":"2023-02-01 09:55:00","login":"mailson.suporte"},{"old_values":{"ultimo_login":"2023-02-01 09:32:16"},"new_values":{"ultimo_login":"2023-02-01 09:55:10"},"event":"updated","auditable_id":"440","auditable_type":"App\\Models\\User","user_id":"440","user_type":"App\\Models\\User","url":"http:\/\/protocolo-online2\/login?","ip_address":"127.0.0.1","user_agent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/102.0.0.0 Safari\/537.36","tags":"","created_at":"2023-02-01 09:55:10","login":"mailson.suporte"}]
I tried to do this code:
if (($k = array_search(440, array_column(json_decode($audits, true), 'user_id'))) !== false) {
unset($audits[$k]);
}
But this way is not working!
I can do using foreach, this way:
foreach ($audits as $index => $audit) {
if($audit->user_id == 440){
unset($audits[$index]);
}
}
However if the array is start to grow up, I think that foreach is not a good method for this case.
Someone can help me?
I've had to write the array in php to make it work. But I think this example might be helpful.
This should return only the rows without the auditable_id's value to be equal to 440.
$audits = [
[
"old_values" => [],
"new_values" => [],
"event" => "updated",
"auditable_id" => "450",
"auditable_type" => "App\\Models\\User",
"user_id" => "433",
"user_type" => "App\\Models\\User",
"url" => "http://protocolo-online2/logout?",
"ip_address" => "127.0.0.1",
"user_agent" => "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
"tags" => "",
"created_at" => "2023-02-01 09:55:00",
"login" => "mailson.suporte"
],
[
"old_values" => [
"ultimo_login" => "2023-02-01 09:32:16"
],
"new_values" => [
"ultimo_login" => "2023-02-01 09:55:10"
],
"event" => "updated",
"auditable_id" => "440",
"auditable_type" => "App\\Models\\User",
"user_id" => "440",
"user_type" => "App\\Models\\User",
"url" => "http://protocolo-online2/login?",
"ip_address" => "127.0.0.1",
"user_agent" => "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
"tags" => "",
"created_at" => "2023-02-01 09:55:10",
"login" => "mailson.suporte"
]
];
$audits = array_filter($audits, function ($audit) {
return $audit['auditable_id'] != '440';
});
So this code is for my IPN for Selly.
In Selly's response on their webhook, it shows:
{27 items
"id":"9657d3ae-aad3-449f-9b5a-1accd9919698"
"product_id":"upgrade"
"email":"benzahdd55#outlook.com"
"ip_address":"127.0.0.1"
"country_code":"US"
"product_title":"Selly Pro 1 Month"
"user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWeb..."
"value":"1.0"
"quantity":1
"currency":"USD"
"gateway":"PayPal"
"risk_level":0
"status":100
"delivered":NULL
"crypto_value":NULL
"crypto_address":NULL
"crypto_channel":NULL
"crypto_received":0
"crypto_confirmations":0
"referral":NULL
"usd_value":"1.0"
"exchange_rate":"1.0"
"coupon_id":NULL
"custom":{}0 items
"created_at":"2019-12-05T13:25:39.000+00:00"
"updated_at":"2019-12-05T13:25:39.000+00:00"
"webhook_type":1
}
As you can see, it shows the "custom":{}0 items
In the shop page, I am setting the data like this:
$custom_array = array(
'custom_id' => $product_id
);
$data = array(
"title" => $productName,
"gateway" => "PayPal",
"email" => $clientEmail,
"value" => $after_coupon_value,
"currency" => "USD",
"custom" => $custom_array,
'return_url' => 'https://acchub.org/shop?product='.$productName,
'webhook_url' => 'https://acchub.org/sellywh?secret='.$secret
);
$data_curl = json_encode($data);
In my IPN page, I am doing this to get the custom field:
$data = json_decode($webhookContent);
$productName = $data->product_title;
$orderId = $data->id;
$amount = $data->value;
$email = $data->email;
$status = $data->status;
$gateway = $data->gateway;
parse_str($data->custom, $_CUSTOM);
$custom_id = $CUSTOM['custom_id'];
mail('admin#site.com', 'worked fine', $custom_id);
The above code works for the other params, such as gateway, status, email etc.
But the $custom_id field in my email I get is empty.
Ask any questions for more of the code, but this is the main concept
So it turns out Selly do not currently support the custom input in their API.
They told me to assign it as I assigned the secret in the shop (front) page.
So it would be example.com/ipn?secret=blabla&custom=51
I have created a form in Wordpress using gravity forms, which includes a file upload field. On completion of the form I am using a webhook, setup within Gravity forms elite plugin, to pass the form fields into a PHP script which then uploads the data into an external system via API.
The issue is that when I complete the form without a file uploaded it works great, all of the fields are passed into PHP variables and script runs. However when the form does include a file upload field the script fails with no output to the error log.
I have re-created the problem with a much more simple form and script to confirm that this is the issue, my test form contains two fields a field upload and single line text field. My simple test script looks like this:
<?php
$output = var_export($_POST, true);
error_log($output);
?>
When the form is submitted with no file attached the log file shows the following variables outputted:
[01-Feb-2018 21:44:36 Europe/London] array (
'id' => '1166',
'form_id' => '17',
'date_created' => '2018-02-01 21:44:34',
'is_starred' => '0',
'is_read' => '0',
'ip' => '82.**.**.246',
'source_url' => 'http://****.******.co.uk/?gf_page=preview&id=17',
'currency' => 'USD',
'created_by' => '1',
'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
'status' => 'active',
1 => 'Test No Photo',
2 => '',
)
Note: The source url and IP have been masked the actual log contains the correct IP and URL.
However, as soon as I include a file upload in the form and then send this to the script nothing is outputted to the log at all and the script does not appear to run.
It's worth noting that the request does work with Requestbin. Here is the output from there including data which comes from the upload field:
is_starred: 0
id: 1163
1: Test with Photo
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
created_by: 1
source_url: http://***.****.co.uk/?gf_page=preview&id=17
ip: 82.**.***.246
form_id: 17
status: active
currency: USD
2: http://****.***.co.uk/wp-content/uploads/gravity_forms/17-b570285e8ba734ff4ab3956428bd8eb9/2018/02/Child26.jpg
is_read: 0
date_created: 2018-02-01 20:48:20
The raw body is:
id=1163&form_id=17&date_created=2018-02-01+20%3A48%3A20&is_starred=0&is_read=0&ip=82.**.***.246&source_url=http%3A%2F%2F***.***.co.uk%2F%3Fgf_page%3Dpreview%26id%3D17¤cy=USD&created_by=1&user_agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F63.0.3239.132+Safari%2F537.36&status=active&1=Test+with+Photo&2=http%3A%2F%2Fwww.********.co.uk%2Fwp-content%2Fuploads%2Fgravity_forms%2F17-b570285e8ba734ff4ab3956428bd8eb9%2F2018%2F02%2FChild26.jpg
Again I have removed the actual domain name but the rest of the request is as shown in Request Bin.
So can anyone please help me work out why the file upload value in the post data above would cause PHP to grind to a complete stop without an error message? Is there anything I can do to access this variable from the array in PHP in the same way Request Bin does?
Do I have to somehow decode the value before I can use it in a script/output it to the log? As a side note in my actual script I don't dump all the variables to a log this is just to show it in it's most simple example, in my main script they are selected one by one and assigned to variables using var = $_POST["1"] etc.
Edit:
I have enabled the logging option in Gravity Forms, it confirms the POST data content sent is:
[body] => Array
(
[id] => 1167
[form_id] => 17
[date_created] => 2018-02-01 22:31:42
[is_starred] => 0
[is_read] => 0
[ip] => 82.**.***.246
[source_url] => http://***.***.co.uk/?gf_page=preview&id=17
[post_id] =>
[currency] => USD
[payment_status] =>
[payment_date] =>
[transaction_id] =>
[payment_amount] =>
[payment_method] =>
[is_fulfilled] =>
[created_by] => 1
[transaction_type] =>
[user_agent] => Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
[status] => active
[1] => Test No Photo
[2] => http://***.***.co.uk/wp-content/uploads/gravity_forms/17-b570285e8ba734ff4ab3956428bd8eb9/2018/02/miniserver-image.jpg
)
Is there anything about variable 2 which would cause my PHP script to crash when it dumps the POST data to a log file? (I've removed the domain and IP in the code above.)
Thanks
You can not use $_POST directly to get the payloads of webhook, use something like this:
if($json = json_decode(file_get_contents("php://input"), true)) {
print_r($json);
$data = $json;
} else {
print_r($_POST);
$data = $_POST;
}
error_log(print_r($data,true));
I want to send json data in my HTTP Header.
I am using Codeigniter PHP, so I did this in my controller:
header('Content-Type: application/json');'
This is my code:
$request = array(
'request' => $_GET['request'],
'device_id' => $_GET['device_id'],
'launch_date'=> $_GET['launch_date'],
'allowed_hours'=>$_GET['allowed_hours'],
'site_id'=>$_GET['site_id'],
'product'=>$_GET['product'],
'software_version'=>$_GET['software_version'],
'platform_os'=>$_GET['platform_os'],
'platform'=>$_GET['platform'],
'platform_model'=>$_GET['platform_model']
);
$response = array(
'response_code' =>200 ,
'device_id'=>$_GET['device_id'],
'allowed_hours'=>$_GET['allowed_hours'],
'product'=>'mlc',
'prov_ur'=>NULL
);
header('Content-Type: application/json');
echo json_encode( $response );
But when I print my header I get
A PHP Error was encountered
Severity: Notice Message: Undefined index: request
Filename: admin/license.php Line Number: 22
A PHP Error was encountered
Severity: Notice Message: Undefined index:
allowed_hours Filename: admin/license.php Line Number:
25
A PHP Error was encountered
Severity: Notice Message: Undefined index:
allowed_hours Filename: admin/license.php Line Number:
40
{"response_code":200,"device_id":"70D0D01FBAD2","allowed_hours":null,"product":"mlc","prov_ur":null}array(10)
{ ["Host"]=> string(14) "192.168.50.123" ["Connection"]=>
string(10) "keep-alive" ["Cache-Control"]=> string(9) "max-age=0"
["Accept"]=> string(74)
"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8"
["Upgrade-Insecure-Requests"]=> string(1) "1" ["User-Agent"]=>
string(110) "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"
["Accept-Encoding"]=> string(19) "gzip, deflate, sdch"
["Accept-Language"]=> string(14) "en-US,en;q=0.8" ["Cookie"]=>
string(518)
"cisession=OhhBBhVodwwf7Tb55AVsU32ClMS5cgmxBl15WHA%2BrGnvo1kiK%2B67BWeAuJVSV2MY25zZd0riHC9cyx9fiigiBuqkPMT%2FKE9d6et%2FXaE3F7I59P9%2FEzy5byQ5nEkJq5xwXoH1I7%2B7v62cQL21%2Bjfnk3AwIy4luM7N51IUuTqg7TxunoZFD1gJO84r8degY1imNpmDk2W%2FjsQPn9bQpkWJ9KVMxxViFDaELEU0rIfYmif%2BdvXjK9W%2Fj7iWQxZYE9ZGazgBTKlLO%2BJZHNdPrdmGPFTzTUROZdffpF%2Bb25bRMPEJsZ9CE2mdVuSn%2FEu678utd0lcd9bh%2BDbTDikrHP4jBFOLbZfWKT%2F9r5GkMBrLBl%2BlvPx9RbAq%2FIsjeA1V7c6JYf41TO1bG2XKT14QFHm8m0qY8HCal%2B%2BR8tZe9i3zy24%3Dcfc459942e4ef82a5554257216a19d621f446a25"
["If-Modified-Since"]=> string(29) "Thu, 01 Jan 1970 00:00:00 GMT" }
{"response_code":200,"device_id":"70D0D01FBAD2","allowed_hours":null,"product":"mlc","prov_ur":null}
in my response. I don't want to send other data in my HTTP header response.
Upadted Code as per CI
public function index()
{
$request = array(
'request' => $this->get('request'),
'device_id' => $this->get('device_id'),
'launch_date'=> $this->get('launch_date'),
'allowed_hours'=>$this->get('allowed_hours'),
'site_id'=> $this->get('site_id'),
'product'=>$this->get('product'),
'software_version'=> $this->get('software_version'),
'platform_os'=> $this->get('platform_os'),
'platform'=> $this->get('platform'),
'platform_model'=> $this->get('platform_model')
);
$response = array(
'response_code' =>200 ,
'device_id'=> $this->get('device_id'),
'allowed_hours'=> $this->get('allowed_hours'),
'product'=>'mlc',
'prov_ur'=>NULL
);
$this->output->set_content_type('Content-Type: application/json');
return $this->output
->set_content_type('Content-Type: application/json')
->set_output(json_encode($response));
echo $response;
}
The problem is that some of your $_GET variables aren't set, this will throw an error (the extra output text you have) and can be prevent by checking if they are empty first before using them.
$request = array(
'request' => !empty($_GET['request']) ? $_GET['request'] : '',
'device_id' => !empty($_GET['device_id']) ? $_GET['device_id'] : '',
'launch_date'=> !empty($_GET['launch_date']) ? $_GET['launch_date'] : '',
'allowed_hours'=> !empty($_GET['allowed_hours']) ? $_GET['allowed_hours'] : '',
'site_id'=> !empty($_GET['site_id']) ? $_GET['site_id'] : '',
'product'=> !empty($_GET['product']) ? $_GET['product'] : '',
'software_version'=> !empty($_GET['software_version']) ? $_GET['software_version'] : '',
'platform_os'=> !empty($_GET['platform_os']) ? $_GET['platform_os'] : '',
'platform'=> !empty($_GET['platform']) ? $_GET['platform'] : '',
'platform_model'=> !empty($_GET['platform_model']) ? $_GET['platform_model'] : ''
);
$response = array(
'response_code' =>200 ,
'device_id'=> !empty($_GET['device_id']) ? $_GET['device_id'] : '',
'allowed_hours'=> !empty($_GET['allowed_hours']) ? $_GET['allowed_hours'] : '',
'product'=>'mlc',
'prov_ur'=>NULL
);
header('Content-Type: application/json');
echo json_encode( $response );
Using the normal php get like below will sometimes throw some errors
$_GET['allowed_hours'];
I would recommend change to codeIgniter input class methods.
$this->input->get('allowed_hours');
Codeigniter Input Class will save you putting lot of code.
As said in user guide: With CodeIgniter’s built in methods you can simply do this:
Updated:
$request = array(
'request' => $this->input->get('request'),
'device_id' => $this->input->get('device_id'),
'launch_date'=> $this->input->get('launch_date'),
'allowed_hours'=> $this->input->get('allowed_hours'),
'site_id'=> $this->input->get('site_id'),
'product'=>$this->input->get('product'),
'software_version'=> $this->input->get('software_version'),
'platform_os'=> $this->input->get('platform_os'),
'platform'=> $this->input->get('platform'),
'platform_model'=> $this->input->get('platform_model')
);
Codeigniter has own Output Class
And
$response = array(
'response_code' => 200,
'device_id'=> $this->input->get('device_id'),
'allowed_hours'=> $this->input->get('allowed_hours'),
'product'=> 'mlc',
'prov_ur'=> NULL
);
return $this->output
->set_content_type('Content-Type: application/json')
->set_output(json_encode($response));
I am currently coding a project in which requires the user to login to the website before being able to view any information. I am currently tracking when a user is logged in or not by using a Session Variable named "usernamelogged". I believe I have all my formatting correct as well.
After logging in you're brought to the main page, in which I have set up (temporarily) to print_r() the session array. Im also using a class to help prevent session hijacking.
Login Page Relevant PHP:
<?php
include dirname(__FILE__).'/includes.php';//INCLUDES FILE
if ($count == 1) {// IF USERNAME AND PASSWORD ARE GOOD
SessionManager::sessionStart('LoginDetails', 10800, '/', 'localhost', true, $username);
$_SESSION['usernamelogged'] = $username;//Declare Session
header("location: members.php"); // Redirecting To Other Page
} else {
$error = "Username or Password is invalid";
}
?>
Here is where the problem occurs. Down below I have it print_r() the array, in which comes up with the following details:
Array ( [IPaddress] => Censored IP [userAgent] => Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 )
However you will notice that there is no "usernamelogged" in that array like there should be.
Here is the php from the page you receive after logging in:
<?php
include dirname(__FILE__).'/includes.php';
SessionManager::sessionStart('LoginDetails', 0, '/', 'localhost', true, $_SESSION['usernamelogged']);
print_r ($_SESSION);// TEMP
echo $_SESSION['usernamelogged'];
$checkses = $sql->prepare("SELECT * FROM staff WHERE username=:user");
$checkses->bindParam(':user', $_SESSION['usernamelogged']);
$checkses->execute();
$count = $checkses->rowCount();
if (!$count == 1) {
echo "Error, you're not logged in";
print_r($count);//TEMP
//header("location: login.php");
die();
}
include dirname(__FILE__).'/header.php';
?>
Finally, the class I am using for session hijacking:
class SessionManager
{
static function sessionStart($name, $limit = 0, $path = '/', $domain = null, $secure = null, $username)
{
// Set the cookie name
session_name($name . '_Session');
// Set SSL level
$https = isset($secure) ? $secure : isset($_SERVER['HTTPS']);
// Set session cookie options
session_set_cookie_params($limit, $path, $domain, $https, true);
session_start();
$_SESSION['usernamelogged'] = $username;
// Make sure the session hasn't expired, and destroy it if it has
if(self::validateSession())
{
// Check to see if the session is new or a hijacking attempt
if(!self::preventHijacking())
{
// Reset session data and regenerate id
$_SESSION = array();
$_SESSION['IPaddress'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['userAgent'] = $_SERVER['HTTP_USER_AGENT'];
self::regenerateSession();
// Give a 5% chance of the session id changing on any request
}elseif(rand(1, 100) <= 5){
self::regenerateSession();
}
}else{
$_SESSION = array();
session_destroy();
session_start();
}
}
static protected function preventHijacking()
{
if(!isset($_SESSION['IPaddress']) || !isset($_SESSION['userAgent']))
return false;
if ($_SESSION['IPaddress'] != $_SERVER['REMOTE_ADDR'])
return false;
if( $_SESSION['userAgent'] != $_SERVER['HTTP_USER_AGENT'])
return false;
return true;
}
static function regenerateSession()
{
// If this session is obsolete it means there already is a new id
if(isset($_SESSION['OBSOLETE'])){
if($_SESSION['OBSOLETE'] == true){
return;
}
}
// Set current session to expire in 10 seconds
$_SESSION['OBSOLETE'] = true;
$_SESSION['EXPIRES'] = time() + 10;
// Create new session without destroying the old one
session_regenerate_id(false);
// Grab current session ID and close both sessions to allow other scripts to use them
$newSession = session_id();
session_write_close();
// Set session ID to the new one, and start it back up again
session_id($newSession);
session_start();
// Now we unset the obsolete and expiration values for the session we want to keep
unset($_SESSION['OBSOLETE']);
unset($_SESSION['EXPIRES']);
}
static protected function validateSession()
{
if( isset($_SESSION['OBSOLETE']) && !isset($_SESSION['EXPIRES']) )
return false;
if(isset($_SESSION['EXPIRES']) && $_SESSION['EXPIRES'] < time())
return false;
return true;
}
}
Other Details:
I cut out the HTML and CSS and only gave the PHP.
I don't have any form of output before my session_start();
PHP Version 5.4.40 and Apache 2.4.12
There are no more details that I can think of.
Im happy to answer any questions I can, THANKS for reading and helping!
Edit:
As requested,
The print out of $_SERVER:
Array ( [UNIQUE_ID] => VWvIW2uWJsoAACKtzW8AAAAC [HTTPS] => on [SSL_TLS_SNI] => *Censored* [HTTP_HOST] => *Censored* [HTTP_CONNECTION] => Keep-Alive [HTTP_ACCEPT_ENCODING] => gzip [HTTP_CF_IPCOUNTRY] => US [HTTP_X_FORWARDED_FOR] => *CENSORED* [HTTP_CF_RAY] => 1ef79bdf5d900418-ORD [HTTP_X_FORWARDED_PROTO] => https [HTTP_CF_VISITOR] => {"scheme":"https"} [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 [HTTP_DNT] => 1 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8,es;q=0.6 [HTTP_COOKIE] => __cfduid=d616d6faa0ec4dd338e855665846ad2da1432945387 [HTTP_CF_CONNECTING_IP] => *CENSORED* [PATH] => /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin [LD_LIBRARY_PATH] => /usr/local/apache/lib [SERVER_SIGNATURE] => [SERVER_SOFTWARE] => Apache/2.4.12 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 PHP/5.4.40 [SERVER_NAME] => bbwatch.co.uk [SERVER_ADDR] => *CENSORED* [SERVER_PORT] => 443 [REMOTE_ADDR] => *CENSORED* [DOCUMENT_ROOT] => /home/bbwatchc/public_html [REQUEST_SCHEME] => https [CONTEXT_PREFIX] => [CONTEXT_DOCUMENT_ROOT] => /home/bbwatchc/public_html [SERVER_ADMIN] => webmaster#*Censored* [SCRIPT_FILENAME] => /home/***/public_html/members.php [REMOTE_PORT] => 35348 [REMOTE_USER] => *CENSORED* [AUTH_TYPE] => Basic [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /members.php [SCRIPT_NAME] => /members.php [PHP_SELF] => /members.php [PHP_AUTH_USER] => *CENSORED* [PHP_AUTH_PW] => *CENSORED* [REQUEST_TIME_FLOAT] => 1433127003.37 [REQUEST_TIME] => 1433127003 [argv] => Array ( ) [argc] => 0 )
Also, the printout of $_SESSION:
Array ( [IPaddress] => *CENSORED* [userAgent] => Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 ) Error, you're not logged in0