Jump to content

Pls help! :( - Cant read parameters


klikrzys
 Share

Recommended Posts

Hello!
 
I have strange problem with template. I made a contact form which is on my sites footer and seperate template which should handle the retrieved data. Unfortunetly I cant retrive data nor by POST nor GET. Here is my code:
 
$email = $input->get('email'); 
$topicNum = $input->get('topic'); 
$name = $input->get('myname'); 
$message = $input->get('message');

It basicly returns NULL everywhere. Only 'topic' parameter is fetched nicely!

Here is query i use:
http://test.mysite.pl/contact-response/?topic=1&email=test@test.com&myname=test&message=test
I found this in phpinfo():
_SERVER["REDIRECT_QUERY_STRING"]        it=contact-response/&topic=1&email=test@test.com&myname=test&message=test

 

Please help! I have no idea whats wrong with this Q^Q

 
Link to comment
Share on other sites

3 hours ago, klikrzys said:

It basicly returns NULL everywhere. Only 'topic' parameter is fetched nicely!

Maybe you think they are NULL but they actually are not ? How do you check the values? I recommend using TracyDebugger and doing bd($input->get('yourvar')) to check properly.

Link to comment
Share on other sites

I just tried to and i found error in tracy javascrpit file. Its on:

/contact-response/?topic=1&email=test@test.com&myname=test&message=test&_tracy_bar=js&v=2.6.3&XDEBUG_SESSION_STOP=1

On the end of this javascript file there is:

ErrorException: readfile() has been disabled for security reasons in /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.5.x/src/Tracy/Bar.php:258
Stack trace:
#0 [internal function]: Tracy\Debugger::errorHandler(2, 'readfile() has ...', '/home/kris...', 258, Array)
#1 [internal function]: readfile('/home/kris...')
#2 /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.5.x/src/Tracy/Bar.php(258): array_map('readfile', Array)
#3 /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.5.x/src/Tracy/Bar.php(198): Tracy\Bar->renderAssets()
#4 /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.5.x/src/Tracy/Debugger.php(242): Tracy\Bar->dispatchAssets()
#5 /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.5.x/src/Tracy/Debugger.php(214): Tracy\Debugger::dispatch()
#6 /home/kris/public_html/test/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php(1248): Tracy\Debugger::enable(false, '/home/kris...', NULL)
#7 /home/kris/public_html/test/wire/core/Modules.php(625): TracyDebugger->init()
#8 /home/kris/public_html/test/wire/core/Modules.php(495): ProcessWire\Modules->initModule(Object(TracyDebugger))
#9 /home/kris/public_html/test/wire/core/ProcessWire.php(674): ProcessWire\Modules->triggerInit()
#10 /home/kris/public_html/test/wire/core/Wire.php(380): ProcessWire\ProcessWire->___init()
#11 /home/kris/public_html/test/wire/core/WireHooks.php(813): ProcessWire\Wire->_callMethod('___init', Array)
#12 /home/kris/public_html/test/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessWire), 'init', Array)
#13 /home/kris/public_html/test/wire/core/ProcessWire.php(773): ProcessWire\Wire->__call('init', Array)
#14 /home/kris/public_html/test/wire/core/ProcessWire.php(573): ProcessWire\ProcessWire->__call('init', Array)
#15 /home/kris/public_html/test/wire/core/ProcessWire.php(573): ProcessWire\ProcessWire->init()
#16 /home/kris/public_html/test/wire/core/ProcessWire.php(522): ProcessWire\ProcessWire->setStatus(2)
#17 /home/kris/public_html/test/wire/core/ProcessWire.php(267): ProcessWire\ProcessWire->load(Object(ProcessWire\Config))
#18 /home/kris/public_html/test/index.php(52): ProcessWire\ProcessWire->__construct(Object(ProcessWire\Config))
#19 {main}
(stored in /home/kris/public_html/test/site/assets/logs/tracy/exception--2019-10-18--09-39--2baa181eb9.html)

I have this site on live server with config->debug = true and tracy in development mode. So i dont know what might be the problem ?

Link to comment
Share on other sites

I just got my head around the fact that i cant see the tracy bar anywhere and i got this error on PW page that im using. I went back to my local server to

checked if it worked back then and thats true. Its somehow the fault of moving site to live server ?

Link to comment
Share on other sites

Your live server must have readfile() disabled - you can check with 

var_dump(ini_get('disable_functions'));

The fact that Tracy is using the 2.5 version of the core also suggests that the live server is using an old version of PHP so I am wondering about how good the host is.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...