Skip to content

Tag: debugging

PHP autologout inactive users

first time poster here, finally decided to make an account here after i used too many hours of my workday trying to solve this problem yesterday. so i have this “sessionCheck.php” script that is supposed to logout the user if he is inactive see code below. Right now the variable $inactive = 15; wh…

PhpStorm built-in server: Debug incoming requests

I am (locally) hosting a PHP script with PhpStorms built-in Server. Is there a way to debug an incoming HTTP request? I know that there is the “PHP HTTP Request” run-configuration, which allows you to perform a request and debug it, but somehow my problem only occurs when the requests is coming fr…

How to return a line number in a PHP script

Is it possible for a PHP script to return a line number in which some command is called? I’m having trouble describing what I want so maybe an example. I have PHP code that calls MySQL on many occasions. In line 49 is: The text “line 49” I wrote manually. Is it possible to get this number &#…