TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
"Disallowed key characters in global data" when starting cron
  • Hello, I have a cron controller that executes fine when I start it manually in my browser, but when I set it in my cpanel as a cron job, the cron daemon sends me an email that it gets an error "Disallowed key characters in global data". Does anyone have idea what does this mean and how to fix this? :S

    EDIT: Not only the cron controller, but every other controller that I try to set as a cron job in the cpanel returns the "Disallowed key characters in global data" error :S

  • I saw this topic but it didn't help me... Any concrete solutions?
  • outlawbt we can guess what your problem might be, but with about 30 seconds of debugging you can be 100% sure what the problem is. Find the exit('Disallowed key characters in global data.'); line in the Input.php library and change it to exit('Disallowed key characters in global data: '.$str); and it will show you what your invalid key is. Having good debugging skills will take you a long way in the programming world :)
  • Posted By: Isaiah

    outlawbtwe can guess what your problem might be, but with about 30 seconds of debugging you can be 100% sure what the problem is. Find theexit('Disallowed key characters in global data.');line in the Input.php library and change it toexit('Disallowed key characters in global data: '.$str);and it will show you what your invalid key is. Having good debugging skills will take you a long way in the programming world :)


    Oh, yes of course... now i'm ashamed that i didn't thought about that... Thanks for the great tip ! I was so frustrated and was thinking the wrong way all the time.
    So, now the result is this:
    Disallowed key characters in global data: /home/fdhrts8c/public_html/index_php

    This is the exact string i give to the cron job ( php /home/fdhrts8c/public_html/index.php ), but except index.php it converts it to index_php ? :S I'm confused now..
  • I have the same problem in my controller. I changed the debug message in Input.php library and the new message returns: 'Disallowed key characters in global data. amp;_Power_CO_,_LTD_'

    What I am posting is an XML file that looks like this

    <?xml version="1.0"?>

    Measurement & Power, CO LTD
    Graz


    18680425;18924835;19178915
    {276C66A4-ACC3-4184-9950-3BFDCEEE1D45}
    00-13-D4-9F-65-E8





    I figured out that the problem is in & character. This character is being tranformed by xml parser on the client into "&" and this is then posted to my controller. Why is this giving me the "Disallowed key characters in global data" error? I tried few tests and posted manualy character "&", "&" and the whole xml string to the controller and it works fine. I don't get "Disallowed key characters in global data" error.

    How to solve this?

    Jume
  • Not sure if you have fixed this by now, but I am going to post this for future reference.

    I had this issue, and with some help from the guys on IRC, figured out the problem was that the cron was running in cgi SAPI. The solution was to located the php builds on the system (there was 2), and find which one was running as cli.

    To find php do this:
    whereis php

    then find the php executables in bin directorys. Do /path/to/php --version
    if should say something like (version may be different obviously):
    PHP 5.2.9 (cli) (built: Apr 22 2009 00:36:07
    if it says PHP 5.2.9 (cgi) (built: Apr 22 2009 00:36:07, then you need to look for the one that says cli. point your cron with full path to the cli php command.

    That solved my problem.
  • Posted By: jexmex

    Not sure if you have fixed this by now, but I am going to post this for future reference.

    I had this issue, and with some help from the guys on IRC, figured out the problem was that the cron was running in cgi SAPI. The solution was to located the php builds on the system (there was 2), and find which one was running as cli.

    To find php do this:
    whereis php

    then find the php executables in bin directorys. Do /path/to/php --version
    if should say something like (version may be different obviously):
    PHP 5.2.9 (cli) (built: Apr 22 2009 00:36:07
    if it says PHP 5.2.9 (cgi) (built: Apr 22 2009 00:36:07, then you need to look for the one that says cli. point your cron with full path to the cli php command.

    That solved my problem.



    Worked for me

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion