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
Related
I am running Laravel on Homestead, and whenever I run any php artisan XXX command, the file named -1 is created in the root directory of the app.
Contents of the file are similar to these ones:
Log opened at 2017-12-22 13:54:00
I: Connecting to configured address/port: 10.0.2.2:9000.
E: Time-out connecting to client. :-(
Log closed at 2017-12-22 13:54:00
I am 99% sure it is related some changes I made in my failed attempts to make XDebug breakpoints work with artisan commands. I have exported some shell variables, as recommended in this answer, but when I run export -p I don't see any of them.
Did anyone have a similar issue? What setting can be causing such behavior?
Following the suggestion of LazyOne, I found the answer:
It seems that paths in .ini file have to be absolute. So instead of:
xdebug.remote_log=~/code/xdebug.log
I had to set it to:
xdebug.remote_log=/home/vagrant/code/xdebug.log
and now it works as supposed to.
I'm working on websocket. I came across this article, and simply downloaded their file and try running it in my localhost.
https://www.sanwebe.com/2013/05/chat-using-websocket-php-socket
What I understand is, they want to sue local server's websocket server.
But I have problem in starting up the server. I'm using windows 10 with wamp 2.2. As I checked webscket is enabled in my php.ini's extention.
I followed this example to cmd the right path to start it but to no avail:
https://www.sanwebe.com/2013/05/chat-using-websocket-php-socket/comment-page-1#comment-5593
It says 'php.exe' is not recognized as an internal or external ...
I then searched online again, thus set the path to my php folder in the system's environment variable. The path is: C:\wamp\bin\php. Then I closed the cmd and relaunched. Nothing worked out. The same error shows up.
This is what I did on cmd:
1) cd C:\wamp\bin\php
2) php.exe -q C:\projects\myfolder\server.php
Please help me to connect to wamp server's websocket to run the example I've downloaded.In the console, the error shown is:
WebSocket connection to 'ws://localhost:9000/demo/server.php' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I found the answer from this site: http://rodrixar.blogspot.my/2011/07/how-to-run-php-sockets-in-wamp.html
I did the following,
1) open cmd
2) cd C:\wamp\bin\php\php5.6.19
3)php.exe -q C:\projects\mysite\server.php
4) Firewall open up and allow access for CLI
5) now connection made already..
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 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.
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.