This code worked for years - it was written for PHP 5.xx. I cleaned it up for PHP 7 and it worked OK until last week it started returning the text PHPSESSID from an external random number php file. I double checked the code and it isn’t showing any errors on the online PHP 7 testing site.
When a PHP script wants to retrieve the value from a session variable, PHP automatically gets the unique session identifier string from the PHPSESSID cookie and then looks in its temporary directory for the file bearing that name and a validation can be done by comparing both values.
Does anyone have any idea why, this would fail and instead return the text PHPSESSID as the reply to a call for a number? Does that appear if the external php script fails? Or is there something wrong with the server installation temp file? The file otherwise works OK and reads and writes information to a SQL database.