Coder Social home page Coder Social logo

Comments (6)

patrickpr avatar patrickpr commented on August 21, 2024

Hi,
trap_in.php is a php interpreted script which needs to be executed by PHP.

So your snmptrapd.conf should contain : traphandle default < php binary > < trap_in with path >

See doc : https://github.com/patrickpr/trapdirector/blob/master/docs/01-install.md#snmptrapd-configuration

If you can't make it work, send me your snmptrapd.conf so I have a look.

/Patrick

from trapdirector.

bitboy85 avatar bitboy85 commented on August 21, 2024

Hi,
i ran into the same issue using the automated installation script.
It put the following line into snmptrapd.conf
traphandle default -a /usr/share/icingaweb2/modules/trapdirector/bin/trap_in.php

system is raspbian buster.

from trapdirector.

patrickpr avatar patrickpr commented on August 21, 2024

Hi,

There should be php binary with path instead of '-a' : can you send me the options you used with the script ?
For a quick fix, replace '-a' by php binary with path.

from trapdirector.

bitboy85 avatar bitboy85 commented on August 21, 2024

Hi,

i already replaced it and it worked :)

i used the command line provided in the configuration section
Automatic installation As user root, execute this script : /usr/share/icingaweb2/modules/trapdirector/bin/installer.sh -c all -d /usr/share/icingaweb2/modules/trapdirector -p -a www-data -w /etc/icingaweb2

from trapdirector.

patrickpr avatar patrickpr commented on August 21, 2024

Hi,
I will make some checks so that the value of php binary is never empty (because then the script uses '-a' as value of php binary...).
What is the result of the following command on your system :
echo '<?php echo PHP_BINARY . "\n"; ?>' | <insert your php binary here>

Because it seems that this pre-defined constant (PHP_BINARY) is empty in your case.

from trapdirector.

bitboy85 avatar bitboy85 commented on August 21, 2024

Hi,

this is the result. As said, i'm using raspbian buster with default packages sources.

 echo '<?php echo PHP_BINARY . "\n"; ?>' | php
 /usr/bin/php7.3

from trapdirector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.