phalcon command shows no error no output in Phalcon devtools - phalcon

I have installed phalcon extension in xampp php 5.6 and windows 10.
phalcon extention is show in phpinfo and in cli command
php -m
But when I run any command like following, no output or error is shown.
phalcon
phalcon --version
phalcon --help
phalcon version
phalcon help

have you set your environment variables in my computer?

You can't use Phalcon like that in any command line. Phalcon is compiled as a PHP extension. It sits in your RAM once loaded. You could access its functionality through PHP code. However, if you meant the Phalcon devtools, you have to download the devtools file eithere from https://github.com/phalcon/phalcon-devtools or autoload via Composer onto your project.
If you do download it from the link above, register the directory in your Environment PATH variables. It should be ready to use.
Hope this helps...

can u try edit your code in phalcon.bat file (inside phalcon devtools folder) set your PTOOLSPATH value same as your phalcon devtools folder
#echo off
set PTOOLSPATH=C:\phalcon-devtools\
php %PTOOLSPATH%phalcon.php %*

Related

Why doesn't my new Odoo module show up on the module list?

I am using Odoo v12 on Windows.
I have followed the steps in HowTo to create a module Saadoodoo. My problem is that I have failed to make this new module appear on the Odoo module list.
I am using the below command
python.exe odoo-bin" -d SaadoIncLocal -i Saadoodoo --addons-path D:\PythonDev\Odoo
It seems Odoo simply ignores the commands and starts the server normally, as the module does not appear on the apps list (even when selecting developer mode).
I thought the issue may be in the addon path, so I added the module under the default Odoo path along with Odoo modules in C:\Program Files (x86)\Odoo 12.0\server\odoo\addons and did an apps update on Odoo interface but still problem persists. Starting and stopping the server does not help either.
What am I doing wrong?
After adding new module in the addons_path, you have to turn on debug/developer mode, goto Apps > Update modules list, remove Apps filter from search and search your module.
Don't forget to add __manifest__.py with proper data, which is important for odoo addons.
If still having problem, you can use scaffold option of odoo-bin to create empty module.
python.exe odoo-bin scaffold my_module
This is will create a empty module with all the necessary skeleton files in the current working directory, you can just move it to addons folder, rename the variables accordingly and files and you are good to go.
There could be 2 Reasons that you are not able to see the module :-
1. You have not updated the database
Two ways to update the database :-
1.1 from Terminal use this command to update the module and database
./odoo-bin -c debian/odoo.conf -d {NAME_OF_ODOO_DATABASE} -u {NAME_OF_THE_NEW_MODULE}
1.2. From frontend
By activating the developer mode by going to Setting --> under the developer tools option --> Activate the developer mode
Now go to app list and select the option update app list.
2. You have not configured the addons path in the debian/odoo.conf file
Make sure that you have added the addons_path of the custom-addons folder in odoo.conf file inside debian folder
why don't you simply use these commands
cd C:\Program Files (x86)\Odoo 12.0\server\odoo\addons
C:\Program Files (x86)\Odoo 12.0\python\python.exe C:\Program Files (x86)\Odoo 12.0\server\odoo-bin scaffold my_module --config C:\Program Files (x86)\Odoo 12.0\server\odoo.conf
Oh once your module is ready, go to the Odoo directory in windows, navigate to custom-addons and you will see a list of all the available modules. paste your new module in there. Now open the Odoo again, go to Apps, then update module list. Then search for your app in the app list. Make sure the developer mode is activated
Go to your odoo-version folder (ex: cd /home-path/odoo-09.0/10.0/11.0/12.0/13.0) where your odoo-bin file is placed (till odoo-10.0 the file is openerp-server but in later version the file is odoo-bin)
Run the command ./odoo-bin scaffold yourModuleName destinationDirectory (odoo_version >= 10)
Run the command ./openerp-server scaffold your_module_name destinationDirectory (odoo_version < 10)
please use configuration file to run odoo(it's quite easy without any mistake)
run this command: python3 odoo-bin --save --config odoo.cfg --stop-after-init
that will save odoo.cfg file open it up and add your custom module path in addons_path varibale which is defined in top of configuartion file
using mode debug, go to your apps, click update app list
Use this command to create module in odoo.
odoo-bin scaffold mynewmodule addons
directive command module-name modulepath
Have you click Update App List in menu Apps?
This is screenshot from Odoo 11, it should applied in Odoo 12 but may be different position.

Perl Package Manager (PPM) installing modules in C:\TEMP\perl---please-run-the-install-script---/

I am using ActivePerl and tried to install a module using PPM(Perl Package Manager)
The installation is happening in the folder C:\TEMP\perl---please-run-the-install-script---/.
Can anybody tell me why this is happening? And how I solve this problem so that the modules installing using PPM will move to the correct path(ie D:\Perl\lib\)
The Perl is installed in D:\Perl\
The D:\Perl\bin path is configured correctly in path env.variable.
It seems like you are using the ActivePerl zip file but have not yet ran the install.bat file - see https://community.activestate.com/forum/where-did-ppm-put-modules

Failed loading opcache.so: opcache.so: cannot open shared object file

Ive got an issues with Opcache on my apache2 logs file
The error is : Failed loading opcache.so: opcache.so: cannot open shared object file
Do you have any ideas ?
I'm running on Debian squeeze php 5.4 with Opcache
Thanks
OPcache is a Zend extension not a PHP one, and the zend_extension directive takes an absolute path of the opcache.so shareable image and not relative to the _extension_dir_.
As OPcache isn't bundled with PHP5.4, I assume that you've build OPcache with the PECL package, but however you've build it, you must use its absolute path for then Zend extension loader to find it.
My environment was Windows 10x64 / WSL Ubuntu 20.04LTS / PHP 8.1
I tried to install Laravel
I did symbolic link for php8.1 instead of 8.2 because of Laravel requirements
The problem was in extension_dir path. I just changed it from "./" to /usr/lib/php/20210902
You should find your extension dir path by yourself with
php-config --extension-dir

Can't install Apache Maven following instructions

I'm a complete novice at using the terminal. What I've trying to do is install Apache Maven, following these instructions at this website:
http://maven.apache.org/download.cgi
I've included the instructions below, a screenshot showing the folder I've unzipped, and the commands I entered into the terminal.
But it doesn't seem to be working
Typically JAVA_HOME is not installed in /usr/java by default like on some other UNIX/Linux such as Fedora for example.
On OSX, your Java installation is typically inside a sub-folder of /System/Library/Java/JavaVirtualMachines/.
Try setting JAVA_HOME like this:
export JAVA_HOME=$(/usr/libexec/java_home)
Double-check your JAVA_HOME location
echo $JAVA_HOME

Cannot run PHP CLI on WAMP on Windows 8

I have been trying on this for hours
i Get the below error
'php' is not recognized as an internal or external command,
operable program or batch file.
Steps i have done
1- I have added to Windows Environement variables C:\wamp\bin\php\php5.3.13;
2-re-installed wamp 2 times
3-Apache and php error log is clean
I have the below configuration
Windows 8 64 bit
Apache 2.2
PHP 5.3.13
Actually the php exe you run in wamp for the CLI is just php.exe
It is found in the c\wamp\bin\php\phpX.Y.Z\ folder and called php.exe
Suggest you create a little batch file to setup the path so you can use it from anywhere by just keying php, like this:
phppath.cmd
set path=%PATH%;c:\wamp\bin\php\phpX.Y.Z
php -v
Store this batch file in a folder on your path and you are golden.
You need to add php to your system path as follows:
go to system properties
chooose advance tab
check the system variables
choose Path then edit it and add at the end ;C:\xampp\php\
Note that system variables in Path are separated with ;
same thing applies to WAMP all you need is to specify your php binaries folder
seems that php-cli.exe dosent come along with WAMP, I installed XAMPP instead and CLI worked perfectly