Reopening a session in PHP

session_start(); … session_write_close(); … ini_set(‘session.use_only_cookies’, false); ini_set(‘session.use_cookies’, false); ini_set(‘session.use_trans_sid’, false); ini_set(‘session.cache_limiter’, null); session_start(); // second session_start This will prevent php from calling php_session_send_cookie() a second time. See it working. Though restructuring the scripts still seems to be the better option… For PHP 7.2+, you will basically need to re-implement session cookies to avoid errors and … Read more

How to secure the ASP.NET_SessionId cookie?

To add the ; secure suffix to the Set-Cookie http header I simply used the <httpCookies> element in the web.config: <system.web> <httpCookies httpOnlyCookies=”true” requireSSL=”true” /> </system.web> IMHO much more handy than writing code as in the article of Anubhav Goyal. See: http://msdn.microsoft.com/en-us/library/ms228262(v=vs.100).aspx

My Laravel 5.2.10 Sessions wont persist

Laravel’s middleware class \Illuminate\Session\Middleware\StartSession is responsible for starting your session. Before L5.2, this ran on every request because it was part of the global middleware stack. Now, it’s optional because L5.2 wants to allow for both a web UI and an API within the same application. If you open up app/Http/Kernel.php, you’ll see that the … Read more

Yahoo Finance Historical data downloader url is not working

I recently wrote a simple python script to download the history of a single stock. Here an example how to invoke it: python get_quote_history.py –symbol=IBM –from=2017-01-01 –to=2017-05-25 -o IBM.csv This will download IBM historical prices from 2017-01-01 to 2017-05-25 and save them in IBM.csv file. import re import urllib2 import calendar import datetime import getopt … Read more