I have problem in using gammu in windows. First install I success, but when I reinstall gammu I cannot read config file except declare the gammurc path at command :
gammu -c Mypath\gammurc identify
but I cannot do this :
gammu identify
it will show message:
Warning: No configuration file found!
Warning: No configuration read, using builtin defaults!
Error opening device, it doesn't exist.
do you know how to fix this in windows??
put gammurc on this folder (replace username with the windows username)
C:\Users \ username \ AppData\Roaming
and that is an example file content
[gammu]
port= com12:
connection = at115200
im use this configuration file on nokia cs-18 3g/gsm modem
You should put gammurc in bin directory.
Related
My development environment is CentOS 7. SELinux is enabled in this.
I am trying to sign a tgz file using gpg command with shell_exec() in my PHP code as below.
$signResult = shell_exec("gpg --detach-sig --output signfile.gpg --sign InputFile.tgz 2>&1");
but I am getting the below error due to SELinux.
Error: gpg: failed to create temporary file `/opt/rh/httpd24/root/usr/share/httpd/.gnupg/.#xxxx.test.com:22680': Permission denied
gpg: Fatal: can't create lock for '/opt/rh/httd24/root/usr/share/httpd/.gnupg/trustdb.gpg'
I want to know how to sign a file (tgz file in my case) using gpg command in PHP code which should create a signature file(signfile.gpg) apart from the input file(InputFile.tgz).
or
Is there a way to do it with gnupg package like,
$gnupg = new gnupg();
$gnupg->setsignmode(gnupg::GNUPG_SIG_MODE_DETACH);
I do not know how to proceed after these steps.
By default GnuPG looks for keyrings in the $HOME/.gnupg, and if it is empty then attempts to create basic keyring files. Which fails in this case due to permissions. To override this you shoulde use --homedir option.
Also you would not be able to sign until you have some secret key file generated and stored in your keyrings.
Hello I am using the chrome-php & headless-chromium packages for PHP and installed the package, on the web server I get this error:
Exception: RuntimeException: Cannot read chrome version, make sure you provided the correct chrome executable using: "chrome". Additional info: sh: 1: exec: chrome: not found
I am using a Mac and have this in my ~/.zshrc file:
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
export chrome=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
and ~/.bash_profile file:
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
In some of the solutions online relating to this issue its asking me to make Chrome executable which I have
Your web server isn't going to have access to the alias that you defined in your user's home directory.
According to https://github.com/chrome-php/headless-chromium-php, you probably want to set the environmental variable CHROME_PATH in your web server to point to your Chrome executable binary.
I am using this cmd
php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));"
output i am getting
Warning: file_get_contents(https://symfony.com/installer): failed to open stream
: No connection could be made because the target machine actively refused it.
in Command line code on line 1
i on proxy so that above cmd will not work directly .
I found some solution on stack overflow
Install Symfony on Windows behind proxy server with NTLM authentication
but its not working for me
I tried setting http_proxy and https_proxy env variable but it dint worked for me
Are there any chances of problem because of ssl ?
Can you access https://symfony.com/installer in your browser? If you can, it'll download a PHAR file for you. This file is ready to be used. You can put this in your "projects" directory and use it as:
> php symfony.phar new blog
Or you can move it to a location that's in your PATH and create a bat executable file:
#echo off
php "C:\path\to\symfony.phar" %*
Now you can use it like this:
> symfony new blog
I am running into an issue with a customer's Drupal sites. He has a number of D6 installs, and a new D7 that he's just starting on. All of these sites are on the same shared hosting package.
The problem is when running certain drush commands only on the D7 site. There are no issues on the D6 sites. The specific error for drush up on the D7 site follows:
foo#bar [~/www/foo]# drush up
Command pm-update needs a higher bootstrap level to run - you will need to invoke drush [error]
from a more functional Drupal environment to run this command.
Command pm-update needs the following modules installed/enabled to run: update. [error]
The drush command 'up' could not be executed. [error]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This may occur when Drush is trying to:
* bootstrap a site that has not been installed or does not have a configured database. In
this case you can select another site with a working database setup by specifying the URI
to use with the --uri parameter on the command line. See `drush topic docs-aliases` for
details.
* connect the database through a socket. The socket file may be wrong or the php-cli may
have no access to it in a jailed shell. See http://drupal.org/node/1428638 for details.
Drush was attempting to connect to:
Drupal version : 7.28
Site URI : http://default
Database driver : mysql
Database username : username_foo
Database name : database_foo
PHP configuration :
PHP OS : Linux
Drush version : 7.0-dev
Drush temp directory : /tmp
Drush configuration :
Drush alias files :
Drupal root : /home/foo/www/foo
Site path : sites/default
Everything I can find (and indeed the link in the error message) say the solution is to change the host value in the settings.php file from localhost to 127.0.0.1. However, this has not been the solution for us.
The frontend site has no problems connecting to the database, and drush itself seemingly does in many cases too.
drush sql-connect will generate a string that you can use to connect to MySQL.
drush sql-cli will successfully connect to MySQL
The settings.php file is definitely in a folder called default (path: www/foo/sites/default) and I get the exact same error when specifying --root and --uri options.
Drush was originally a ~5.x release, and it had the same issues. We updated to the ~7.x to try to eliminate the error. The host value in settings.php has been localhost as well as 127.0.0.1 with equally poor results.
We've verified that MySQL is available via socket from the PHP CLI. Drush is up to date and a fresh install. The Drupal 7 site is a brand new fresh install.
I'm at a loss. Why would this work with the D6 sites, but not the D7? Any suggestions?
Is your settings.php file in a folder called 'default'? If not, you might need to tell Drush where to find it by using --uri=mysite.com or -l mysite.com.
There are several ways to specify which Drupal site Drush will target. The most basic option is fairly verbose; run:
$ drush --root=/path/to/drupal --uri=http://example.com status
You can do the same thing with a slightly different syntax:
$ drush /path/to/drupal#example.com status
You can also specify the Drupal site implicitly, by setting the cwd to the folder that contains the settings.php file for your site:
cd /path/to/drupal/sites/default # or /path/to/drupal/sites/mysite.com, as appropriate
$ drush status
In all of the cases above, if settings.php is in a folder called "default", then you do not need to specify the --uri component; you may, for example, cd /path/to/drupal followed by drush status, and the correct Drupal site will be found. If settings.php is not in a folder named 'default', then you will need to either specify --uri, or cd to the folder that contains the settings.php file.
Source
According to this message:
pm-update needs the following modules installed/enabled to run: update
Drush requires Update module to be enabled, so the following command should fix the problem:
drush -y en update
I installed phabricator on openshift using a quickstart from github
https://github.com/CodeBlock/phabricator-openshift-quickstart
I got it running up fine, but I now have two issues:
1.) A setup issue that says apc.stat is enabled and that must be disabled in
/var/lib/openshift/my-user-hash/php/configuration/etc/php.ini
however I cannot access that with sudo command(sudo permission denied), even if I open it normally, I didn't find any apc.stat settings in the php.ini
2.) I can't figure out how set the local path for tracking repositories for diffusion. It says
I must give a path which should be read-writable by phabricator, I tried to give the persistent storage location ..data/ , but it gives me an exception as follows :
Unhandled Exception ("CommandException")
Command failed with error #1!
COMMAND
(cd '../data/' && HOME='/var/lib/openshift/my-user-hash/app-root/runtime/repo/phabricator/support/empty/' git cat-file --batch)
STDOUT
(empty)
STDERR
sh: line 0: cd: ../data/: No such file or directory
how do I fix this?
1) According to Num Duong answer, it seems like u currently could not resolve this issue, probably u should wait for openshift php.ini permissions policy changes.
Anyway this is minor non blocking issue.
2) Modify config file and re-deploy to openshift.
Look for available phabricator options here
U need smth like this: 'repository.default-local-path' => getenv('OPENSHIFT_DATA_DIR'),
P.S. Anyway there is one particular issue with phabricator on openshift that possibly never got resolved: cloning git repositories from OpenShift instances into Phabricator do not
work by SSH, due to permissions regarding the ssh configuration.