I have installed the phalcon in windows by adding phalcon_dll to xampp/php/ext and added extension in php.ini file now when i checked whether it installed or not i did <?php phpinfo(); ?> then i can able to see that it is installed..
Now i want to create a new skelton application through cmd when i type phalcon it should show the components as per documentation but its sayin this:
C:\Users\Amerytrech-Waheed>phalcon
'phalcon' is not recognized as an internal or external command,
operable program or batch file.
im tryig do like this: https://www.tutorialspoint.com/phalcon/phalcon_environmental_setup.htm
but little confused what are all need to add in system variables.?
and what is the alternate solution to create skelton?
Step 5 in the very document you pasted states:
After downloading the package, set the path variable in the system properties
it then explicitly shows you an image that shows the path to add, separated by a semicolon.
;C:\phalcon-devtools-master
So if you are unclear on where to set this.
Right click Computer -> Properties -> Advanced -> Environment Variables -> Path then add the path mentioned above to the very end of the path string.
Related
I try to get this done from github. https://github.com/binance-exchange/php-binance-api
I installed Xampp (latest version: 7.2.3) on a win 10 machine. Xampp is running. (at least not mysql, because it has an error while starting, but mysql is not needed). I downloaded the files from github and puttet them into my htdocs in a new folder called "binance". I downloaded the install-file for composer from here: https://getcomposer.org/doc/00-intro.md#installation-windows Installed it and choosed the php.exe out of my xampp folder inside the installation-process.
Composer starts out of the console, and it works. I put this command into the cmd:
php composer.phar require "jaggedsoft/php-binance-api #dev"
It installs some folders and files, into my project-directory. it's right.
Inside of the files downloaded from github, there is a file called:
php-binance-api-test.php
Inside this file, there are different lines like:
require 'vendor/autoload.php';
file_put_contents( getenv("HOME") . "/.config/jaggedsoft/php-binance-api.json"
But he is not able to find ".config/jaggedsoft/" because there is no folder named .config. There is also no file named php-binance-api.json only one called php-binance-api.php
I would be really thankful, if someone may try to get this run an tell me, what I have done wrong.
I have had the same problem on my Ubuntu server and I could solve it by setting HOME directory at the top of my scripts as:
putenv("HOME=/var/www/html/");
My config is at a directory of
/var/www/html/.config/jaggedsoft
File name is php-binance-api.json and file content is:
{
"api-key": "ApiKeyHere",
"api-secret": "ApiSecretHere"
}
I'm trying to configure Spatie/Browsershot for a project, written in Laravel but after completing all of the steps, I still get one error:
'node' is not recognized as an internal or external command, operable program or batch file
A have installed the latest versions of node and npm and the both of them exist in the PATH and work on cmd as well.
Like it's written in the official documentation on GitHub, I've ran:
npm install puppeteer
composer require spatie/browsershot
In the code I've written:
use Spatie\Browsershot\Browsershot;
//Method to generate some random id
$unique_id = uniqid('img_');
//The path to the node and npm folders
$path_node = realpath('C:\\"Program Files"\\nodejs');
$path_npm = realpath('C:\\Users\\Hristo\\AppData\\Roaming\\npm');
//The $content is actually a stored HTML code
Browsershot::html("$content")->setScreenshotType('jpeg', 100)
->setNodeBinary($path_node)
->setNpmBinary($path_npm)
->save("$unique_id.jpeg");
Program Files is with double quotation marks, otherwise Laravel throws me an error because of the white space in between the two words.
I'm not sure about the paths, are they correctly written? (the problem with the backslashes in windows)
This little snippet helped me with the problem. As long as OS environmental variables are pointing to the node.exe file you can put this into your code
->setNodeBinary('PATH %~dp0;%PATH%;') //~dp0 : fetches current directory path in windows
Hope you get it solved
If you can run node -v and get the version of your node. Then, the error was caused by the space between "Program Files". To solve this:
Create a new folder in your local disk (C:), i.e. Programs
Move your the Node folder to the folder you just created.
Change the Node "Path" in the "User Variable" inside the "Environment Variable" i.e. C:\Programs\nodejs. NOTE: ONLY THE DIRECTORY CONTAINING THE .exe FILE IS NEEDED NOT THE FILE.
You can then use the path for the "setNodeBinary" i.e. "C:\Programs\\nodejs\\node.exe". NOTE: THE .exe FILE IS REQUIRED HERE
This should be able to solve the issue.
Composer uses %APPDATA%\Composer directory by default for global packages.
So I need to add %APPDATA%\Composer\vendor\bin path to my user PATH environment variable.
Can I change installation directory to something like C:\php\composer? How can I do it?
On Windows, when global install of a library / package is done, composer stores the package in a Composer directory inside windows **application data folders** which by default is C:\Users{user name}\AppData\Roaming`.
To change this folder to say C:\php\composer, create a COMPOSER_HOME environmental variable with the value set to C:\php\composer.
The steps below explain how environmental variables are added in Windows. * Press Windows Key + Pause Break then click Advanced system Settings
(source: w3guy.com)
Click the Environmental variables button.
(source: w3guy.com)
Under System variables, click New... button and add the environmental variable like so:
(source: w3guy.com)
You might want to restart your PC for this to take effect.
Credit: http://w3guy.com/change-composer-global-package-install-folder-windows/
I found an answer in the source code: https://github.com/composer/composer/blob/master/src/Composer/Factory.php#L45
So environment variable COMPOSER_HOME must be defined as C:\php\composer.
Go to folder
(C:\Users(your user)\AppData\Roaming\Composer )
Then create new folder (vendor)
and
in vendor create (bin) and copy (C:\composer\composer.phar) to (bin) .
I am trying to include this path to the zend framework, but failing:
include_path = ".;C:\ZendFramework-1.11.11\ZendFramework-1.11.11\library"
should the Zendframework reside in a different folder?
UPDATE
It works now.. I typed zf show version.
I want to set the thing to as an environmental variable, which means that no matter from where I will type the command in the command line... zf show version will work..
I went to to the environment variables by clicking the right button on my computer, and then navigating to Environment variable and setting the path like this.
zf show version
variable name: Temp
variable path: %USERPROFILE%\Local Settings\Temp;C:\xampp\php;
Basically, I want to set C:\xampp\php as a default so that I wont need to navigate to the directory each time i start the command line
No, Zendframework doesn't have to reside in a different folder.
Your include_path is right and should has worked.
Is it that your path Zend library path is not right?
what is the error your got?
I am new to the Zend Framework. I read the Zend Framework document. Here I saw to work Zend Framework must include the path in my php.ini, I believe that this is done because in my php info I saw include path is C:\www\zend_frame\library
Also in document it says that to create a project I must run:
C:\> zf.bat create project quickstart
I want to create a project in C:\wamp\www
In my command shell I ran:
C:\>wamp\www> zf.bat create project quickstart
But I got an error message (see below).
Then I tried another way:
C:\>wamp\www> C:\wamp\zend_frame\bin\zf.bat create project quickstart
Here I got the same error:
Php.exe is not recognised as an internal or external command, operable program or batch file
I also set the path in My Computer settings
The Zend Framework zf.bat script assumes that it can run "php.exe" without specifying the full path to that executable, and it will be found because you have set your PATH to include that directory:
SET PATH=%PATH%;C:\wamp\bin\php
Depending on the version of WAMP, the php.exe may be in a subdirectory for the version of PHP. In that case you need to use a command something similar to this:
SET PATH=%PATH%;C:\wamp\bin\php\php5.3.0
You should be able to figure it out from here.