helmut2509
Members-
Posts
110 -
Joined
-
Last visited
Everything posted by helmut2509
-
$config->sessionExpireSeconds does not work
helmut2509 replied to helmut2509's topic in General Support
-
$config->sessionExpireSeconds does not work
helmut2509 replied to helmut2509's topic in General Support
if(!session()->isLoggedin) session()->redirect(config()->loginUrl); -
In my PW-Application there is currently no session timeout. I want to set the user session to 60 minutes which means that after 60 minutes of inactivity the user will be redirected to the homepage. so I added the following entry to my config.php: $config->sessionExpireSeconds = 120; (120 seconds is just for testing). But after five minutes of inactivity I am still logged in, there is no redirection. Is there anything wrong or did I miss something? In php.ini I have the entry: session.cookie_lifetime = 3600
-
thanx for the tip. I will try this.
-
Hello, I am just going to write a class to process data in my pw app. My question: where should I store the class files? should I use a separate directory? Or should I integrate the class in a module? there are certainly different approaches and I am not sure which one to use... thanx for your help.
-
I use $view->render , where $view is the instance of a template.
-
thanks. I guess the bug is most probably related to a multiple including of a script.
-
I checked the entire project folder: there is only ONE declaration of this function!
-
When calling a page, I get the error (logged in /logs/errors.txt):"Cannot redeclare myfunction..(previously declared in...)" It seems there is a second declaration of this function, but where? I already added the namespace Processwire and switched off template compiling, but to no avail. (PW version 3.0.42) any ideas?
-
Bug when passing numeric zero to template
helmut2509 replied to helmut2509's topic in General Support
$view is an instance of \ProcessWire\TemplateFile -
Hello, I just found out that, when passing a (numeric) zero with "$view->myVar=0" to a template then the corresponding template variable $this->myVar is empty, it has no value. This even occurs when I convert the value to a string: (string) 0 Strings and numeric values other than zero are handled correctly. I think this is a bug which should be fixed?! regards, Helmut
-
thanks for the tip. In my google search result the above link did not appear ;-((
-
In my PW app I have now a php script which caters to the upload of files. It does not directly belong to the UI and therefore I did not store it in the templates folder, but in a custom folder. My question is: how do I get access from this script to the Pw API? Can I leave it in the custom folder?
-
you are right, I have made a stupid error. thanx, guys!
-
In the function I wrote wire('session')->set('number', '12345'); and outside the function I tried : echo $session->number ...but this variable was empty....
-
Hello, I want to use the $session variable in functions, inside a template. According to the API this variable is available only in templates. But all values of the $session variable get lost, even when I use 'global $session'. is there any workaround for this problem?
-
I found it: there was still another dll-entry in the php.ini I had to comment out. Now it works like a charm. But I still do not understand, why and where these components have been referenced and why this error occurred simoultaneously with a json syntax error...and only sporadically. very strange!
-
This is my code: if(!isset($session->sprachen)){ $action = 'fetchdata/sprachen'; $resultJson = sendData($webserviceUrl,$action,$params); echo "sprachen vom webservice:".$resultJson.'<p>';//correct json string. after the string comes //the error message "Unable to load dynamic library '/usr/lib/php/20151012/php_openssl.dll'" $session->sprachen = json_decode($resultJson,true); echo "json-error-code-sprachen=".json_last_error().'<p>';//here json error 4 occurs (syntax error?!) echo "sprachen22:<pre>";print_r($session->sprachen);echo " count-sprachen=".count($session->sprachen)."</pre>";//$session->sprachen is empty! }
-
I guess the error is somehow related to the $session-object (of PW). When I logout and then login again, all works fine (in the majority of cases). But then at subsequent calls of one page the error occurs again.
-
that's already done..... But I wonder from where this extension is called??? My php code is in no way related to soap!
-
It's not a third party webservice, it' my own ;-)
-
Hello, In my pw app I am using a webservice to fetch data for a selectbox. Sporadically (not always!) I cannot json_decode the json string I get from the webservice, I get json error code 4 (syntax error). When this occurs I also get the following error message: "Severity: Core Warning Message: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_soap.dll' - /usr/lib/php/20151012/php_soap.dll: cannot open shared object file: No such file or directory". ....though I do NOT use a soap function! the strange thing is that I fetch always the same data and sometimes it works, sometimes it does not work. Any suggestions?
-
that's the solution. thanx abdus!
-
Unfortunately this does not work. In both cases I get the error: " Uncaught Error: Call to undefined function ProcessWire\\wire() in...."
-
Hello, I want to access the $config variable outside the template directory. so I tried $config = wire('config'); ...but got this error: " PHP Fatal error: Uncaught Error: Call to undefined function wire() " What do I have to do?