PHP

big-o

December 11, 2016 Books, C/C++, Documentation, Javascript, PHP No comments

https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/

ubuntu cronjob error “MIB search path”

December 30, 2014 cronjob, Linux, PHP, Servers config/admin No comments

running cronjobs (shell scripts) on Ubuntu 14.10  (using crontab -e) generate error: “MIB search path” and a list of errors like:


Cannot adopt OID inUCD-SNMP-MIB:dskUsedHigh::={dskEntry16}
Cannot adopt OID inUCD-SNMP-MIB:dskUsedLow::={dskEntry15}
Cannot adopt OID inUCD-SNMP-MIB:dskAvailHigh::={dskEntry14}
Cannot adopt OID inUCD-SNMP-MIB:dskAvailLow::={dskEntry13}
Cannot adopt OID inUCD-SNMP-MIB:dskTotalHigh::={dskEntry12}
Cannot adopt OID inUCD-SNMP-MIB:dskTotalLow::={dskEntry11}
Cannot adopt OID inUCD-SNMP-MIB:dskPercentNode::={dskEntry10}
Cannot adopt OID inUCD-SNMP-MIB:dskPercent::={dskEntry9}
Cannot adopt OID inUCD-SNMP-MIB:dskUsed::={dskEntry8}
Cannot adopt OID inUCD-SNMP-MIB:dskAvail::={dskEntry7}
Cannot adopt OID inUCD-SNMP-MIB:dskTotal::={dskEntry6}
Cannot adopt OID inUCD-SNMP-MIB:dskMinPercent::={dskEntry5}
Cannot adopt OID inUCD-SNMP-MIB:dskMinimum::={dskEntry4}
Cannot adopt OID inUCD-SNMP-MIB:dskDevice::={dskEntry3}
Cannot adopt OID inUCD-SNMP-MIB:dskPath::={dskEntry2}
Cannot adopt OID inUCD-SNMP-MIB:dskIndex::={dskEntry1}
Cannot adopt OID inUCD-DISKIO-MIB:diskIOTable::={ucdDiskIOMIB1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLoggingGroup::={nsConfigGroups2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsDebugGroup::={nsConfigGroups1}
Cannot adopt OID inUCD-SNMP-MIB:snmperrErrMessage::={snmperrs101}
Cannot adopt OID inUCD-SNMP-MIB:snmperrErrorFlag::={snmperrs100}
Cannot adopt OID inUCD-SNMP-MIB:snmperrNames::={snmperrs2}
Cannot adopt OID inUCD-SNMP-MIB:snmperrIndex::={snmperrs1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsTransactionTable::={nsTransactions1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogStatus::={nsLoggingEntry5}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogMaxLevel::={nsLoggingEntry4}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogType::={nsLoggingEntry3}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogToken::={nsLoggingEntry2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsLogLevel::={nsLoggingEntry1}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendResult::={nsExtendOutput1Entry4}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutNumLines::={nsExtendOutput1Entry3}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutputFull::={nsExtendOutput1Entry2}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutput1Line::={nsExtendOutput1Entry1}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendOutLine::={nsExtendOutput2Entry2}
Cannot adopt OID inNET-SNMP-EXTEND-MIB:nsExtendLineIndex::={nsExtendOutput2Entry1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyStart::={netSnmpNotifications1}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyShutdown::={netSnmpNotifications2}
Cannot adopt OID inNET-SNMP-AGENT-MIB:nsNotifyRestart::={netSnmpNotifications3}
Cannot adopt OID inUCD-SNMP-MIB:laErrMessage::={laEntry101}
Cannot adopt OID inUCD-SNMP-MIB:laErrorFlag::={laEntry100}
Cannot adopt OID inUCD-SNMP-MIB:laLoadFloat::={laEntry6}
Cannot adopt OID inUCD-SNMP-MIB:laLoadInt::={laEntry5}
Cannot adopt OID inUCD-SNMP-MIB:laConfig::={laEntry4}
Cannot adopt OID inUCD-SNMP-MIB:laLoad::={laEntry3}
Cannot adopt OID inUCD-SNMP-MIB:laNames::={laEntry2}
Cannot adopt OID inUCD-SNMP-MIB:laIndex::={laEntry1}

the problem is in the php5-snmp library/module. The easiest way to fix it – uninstall the module:

sudo apt-get remove php5-snmp

Symfony APIs bundles

November 2, 2014 PHP, Symfony No comments

1. https://github.com/schmittjoh/JMSSerializerBundle
Installation instructions: http://jmsyst.com/bundles/JMSSerializerBundle

2. https://github.com/FriendsOfSymfony/FOSRestBundle

3. https://github.com/nelmio/NelmioApiDocBundle