WHMAPI1 Addpkgext Package Extensions Key Value (cPanel) - api

I am trying to run this WHMAPI1 command using the shell to add package extensions to a package using the guide https://api.docs.cpanel.net/openapi/whm/operation/addpkgext/
We have created 3 Package extensions and working well on the WHM interface, but we need to activate these extensions from WHMAPI calls.
The command we are using is :
whmapi1 addpkgext name=samplepackage _PACKAGE_EXTENSIONS='ext1=value ext2=value ext3=value'
On the guide, it clearly says we can use Key=Value pairs in the command but when we run the above command, it returns -
metadata:
command: addpkgext
reason: Package extension value is invalid.
result: 0
version: 1
I am getting the same result when I use "addpkg", "editpkd", or "modifypkg" API functions.
Can anyone help me sort this?
Thanks!

Related

SystemTap semantic error when trying to run dvorak-qwerty script

I found this repo with a systemtap script for letting me use QWERTY ctrl-shortcuts on my dvorak layout. Unfortunately, I can't get it to work, but I don't think it has to do with the script itself. I'm running Pop OS and I think that it's because the linux-image I need with all the debug symbols doesn't exist.
The script says I need to install linux-headers-$(uname -r) linux-image-$(uname -r)-dbg
For me, this turns into linux-headers-5.11.0-7620-generic linux-image-5.11.0-7620-generic-dbg
linux-headers-5.11.0-7620-generic exists and I'm able to download it using apt-get.
linux-image-5.11.0-7620-generic-dbg can't be installed using apt-get. I can install
linux-image-5.11.0-7620-generic, but that's not the same thing. I've spent time looking online for it and adding different keys to apt-get, but I haven't been able to find anything with that name. If the problem is not having the correct linux-image package installed, I need help being pointed in the right direction as to where I can get it.
I tried following the directions here, and I've also searched this to no avail. I tried downloading and installing linux-image-4.4.0-142-generic-dbgsym_4.4.0-142.168_amd64.ddeb but that also didn't work.
If this isn't the problem, I've provided the output of the script. Any help is appreciated.
peyton#pop-os:~/scripts$ sudo stap -g -v dvorak-qwerty.stp
Pass 1: parsed user script and 477 library scripts using 116428virt/91336res/7612shr/83628data kb, in 140usr/30sys/168real ms.
semantic error: resolution failed in DWARF builder
semantic error: resolution failed in DWARF builder
semantic error: while resolving probe point: identifier 'module' at dvorak-qwerty.stp:152:7
source: probe module("evdev").function("evdev_events") {
^
semantic error: no match
semantic error: resolution failed in DWARF builder
Pass 2: analyzed script: 2 probes, 0 functions, 1 embed, 0 globals using 119016virt/94812res/8680shr/86216data kb, in 10usr/0sys/7real ms.
Pass 2: analysis failed. [man error::pass2]
Tip: /usr/share/doc/systemtap/README.Debian should help you get started.
Yes, debuginfo downloading has been a pain on many distros. However, if you're running Debian kernels, see: https://wiki.debian.org/Debuginfod for instructions on using a new automated system. Generally: https://sourceware.org/elfutils/Debuginfod.html .

Installing Google Adwords Api Library (using docker)

Googles documentation on installing the library, found here: https://github.com/googleads/googleads-php-lib/blob/master/README.md#getting-started, instructs us to copy adsapi_php.ini, as constructed here: https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/adsapi_php.ini, to your home directory.
I filled out the necessary variables in the .ini, and I am using docker so I have placed this file inside my container at /var/www/home/node/ and when I run the command composer require googleads/googleads-php-lib I am given the following error in the command prompt:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for googleads/googleads-php-lib ^37.1 -> satisfiable by googleads/googleads-php-lib[37.1.0].
- googleads/googleads-php-lib 37.1.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/php.ini
- /usr/local/etc/php/conf.d/adsapi_php.ini
- /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
I assumed the issue was my adsapi_php.ini was simply in the wrong location as it contains what I believe is necessary to avoid the above issue, but I have tried placing it in several different places and yet I always get the same error.
Any help would be appreciated!
Just try to edit php.ini inside docker (docker exec -t {container} bashand enable there the extenstion soap

TcServer create a cluster-node template based on tomcat-8

I am using TcServer Release 3.1.0 on a Windows Environment, specifically the "cluster-node" template, the problem consist that when I run the command to create the server it's based on tomcat-7, and I need it to be based on tomcat-8, here is the command that I am using it:
tcruntime-instance.bat create myserver1 --template cluster-node
and here is the message that i get from the command prompt:
Applying template 'base-tomcat-7'
Reading on the documentation it says that depends on the tc Runtime version to select between "base-tomcat-7" or "base-tomcat-8" to be used by the instance, so any ideas to make mandatory apply the base-tomcat-8?
Thanks in advance.
That tc Server version defaults to tc Runtime 7. You need to pass in the --version parameter specifying the 8.0.XX version along with the templates you want.

unable to install activemq-web-console in Fuse service mix

"Error executing command: URL [mvn:org.apache.activemq/activemq-web-console/5.4.0/war] could not be resolved."
is thrown up when i do features:install activemq-web-console
i am using fuse 4.3
removed the old Url for activemq from features:removeUrl and added the new one
mvn:org.apache.activemq/activemq-karaf/5.4.0/xml/features
and re-installed activemq features . if u are unable to install mvn url's then,u must add the fuse repo's to your maven settings xml.
apart from this there is a well known bug
Add the following lines to etc/system.properties
webconsole.type=properties
webconsole.jms.url=tcp://localhost:61616
webconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
webconsole.jmx.user=smx
webconsole.jmx.password=smx
this would make ur console work
For newbie follow these steps:
1. list all features using following command:
karaf#root> features:listurl
2. you can remove url using following command:
features:removeurl
you can find the url to remove in the above removeurl command from the step 1 where you list urls.
add url that you want to using following command:
features:addurl <>
and then follow steps that are mentioned by sanre6 above.

PHP clone keyword vs clone() command line CLI issues

I have been using the clone keyword to duplicate objects like so:
$x = clone $obj;
as per the manual.
This works fine when accessed by browser. phpinfo() reports PHP version 5.2.6.
However when run by cron or from the CLI I get
"Parse error: syntax error, unexpected T_VARIABLE"
from the clone keyword.
php -v reports PHP 4.4.9 (cli)
Is this error from a version conflict?
If I use clone() in my scripts like so:
$_SESSION['user'] = clone($userObject);
I get odd intermittent problems with the $_SESSION['user'] which do not occur when using the clone keyword.
Does this make any sense to anyone?
Any advice?
It seems that the clone $foo keyword is only available on PHP 5 and newer.
Also, if you're still using PHP 4.4.9, that may be a bigger problem.
Turns out the server has 4 and 5 installed and the CLI reports 4.4.9 simply due to PATH order:
From support:
"Running the "php -v" command in the shell will always return V4. That's because we have two separate installs for PHP on your server. One for V4 and one for V5, and the PHP 4 interpreter shows up in your PATH environment variable first. If you'd like to use V5 through the shell you'll need to be sure to use the full path"