unable to configure phpstorm 9 debug on mac - phpstorm

I am trying to configure phpstorm debug. My php files from my remote server which is on example.com have GET calls and its not working .I have installed chrome extension but when I try to debug php on chrome .Nothing happens. The path where phpstorm in local/bin/php and xdebug is installed in /usr/local/etc/php/5.5 . Under Interpreters /usr/bin/php : php version is 5.5.27 and debugger is not installed.But when I enter php --version in terminal I get :
Zend Engine v2.5.0,
with Xdebug v2.3.3,
I have installed MAMP pro and have added /Applications/MAMP/bin/php/php5.5.10/bin/php in PHP Interpreter .I can see xdebug 2.2.4 .But I would like to debug single php on server not php-webapp. How can I do that?
I am trying to configure it for more than a day but it's not working.I really appreciate any help.

Related

CodeSniffer not working on PhpStorm/MacOS but it work in Docker

I use PhpStorm 2021.3 on MacOS (Apple Sillicon M1). I'm not sure the problem is with PhpStorm but PHP Code Sniffer doesn't work.
When I type this command it doesn't show any errors in the code and I'm sure I got some.
vendor/bin/phpcs
The only thing that appears in the console is Time: 38ms; Memory: 8MB
CodeSniffer is installed by composer.
On the other hand, if I enter this same command in Docker (with Laravel Sail, in bash), I do get a list of errors/warnings in my code.
Going back to PhpStorm, I tried to configure the IDE to work with PHPCS in Docker, but it still doesn't work, and I don't know where to look.
PHP_CodeSniffer version 3.6.2 (stable) by Squiz
How to make CodeSniffer work, either through PhpStorm or automate it in PhpStorm and Docker?

Installing Siremis stuck on Database Configuration

I have install Kamailio 4.3.4 on Ubuntu 16.0.5 LTS. I want to install Siremis 4.3.0 but stuck on Wizard step 2 (Database Configuration) there is message "Something went wrong". I found error 500 action=update on console inspect element. I have try installing Siremis 5.1.0 and still not working stuck on step 2.
My Apache ver 2.4.10, My Php ver 7.0.33, Mysql 14.14
Please any advise
Sounds like one of the dependencies is not met:
Check your permissions are set:
make prepare24
make chown
Check Mod Rewrite is enabled:
a2enmod rewrite
service apache2 reload
Check PHP Mod is Enabled in Apache
On 16.04 installing PHP doesn't automatically add the PHP Apache mod, should be a package like libapache2-mod-php, you can verify that Apache is actually parsing PHP files by setting up a PhpInfo page.
Remove the Lock File & Try Again
When you run the installer a lockfile is created to prevent running the installer multiple times.
Once we empty the database with:
mysql> drop database siremis;
We can remove the lockfile and try again (from the Siremis directory):
rm install.lock
I did a writeup on installing Siremis on Ubuntu 18.04 which works fine.

How to set PHP_IDE_CONFIG while debugging PHP CLI using PhpStorm

I've configured Xdebug and PhpStorm properly, and have used Browser Debugging Extensions and successfully tested a PHP CLI server LaravelFly which speeds up Laravel.
sudo php /vagrant/www/zc/vendor/scil/laravel-fly/bin/fly start
But I failed to test it using PHPUnit today:
sudo php -dxdebug.remote_host=192.168.1.108 vendor/bin/phpunit --stop-on-failure
I added this to Vagrant Ubuntu .zshrc
export PHP_IDE_CONFIG="serverName=zc.test"
but it still does not work and PhpStorm response the same error messag.
In the picture above, I found that $_SERVER['PATH'] is not same with the $PATH of my vagrant user, then I got it.
I removded sudo
php -dxdebug.remote_host=192.168.1.108 vendor/bin/phpunit --stop-on-failure
Now it works!

PhpStorm & Xdebug - cant get to work debugger with CLI script

This is my first post here, I post because after reading through X articles googling can't get PhpStorm, Xdebug work with CLI scripts.
Already tried to follow advices from:
PHPStorm + XDebug Setup Walkthrough
https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
PHPStorm + XDebug + Vagrant
and few blogs that I've found online, but still nothing...
I had it working, but after destroy vagrant recently and now can't fully restore this feature.
SETUP:
I'm running Symfony project on Vagrant.
Debugging of "webpages" on my server works just perfectly.
When I try debug CLI Command I prequisite it with:
export XDEBUG_CONFIG="XDEBUG_SESSION=1"
export PHP_IDE_CONFIG="serverName=vagrant"
XDEBUG.INI (on Vagrant):
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=192.168.0.133 (ip I get from ifconfig -a on Vagrant)
xdebug.remote_port=9000
xdebug.max_nesting_level=2500
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.idekey="PHPSTORM"
Any help much appreciated. Digged through X articles on web but in my eyes all configurations look ok, no idea what to do...
Set xdebug.remote_connect_back to be 0.
This option prevents you from using right IP address when you are doing Remote CLI debugging. Since it's a CLI debug, the IP will always be local (vagrant machine) while you need another one.
This option works OK when debugging over browser as request comes from your "real" computer. But when doing CLI debug .. request will be local to Vagrant machine.
When this option is set to 1 (as it is done now) it ignores the setting from #2 below.
xdebug.remote_host=192.168.0.133 (ip I get from ifconfig -a on Vagrant) -- this should be an IP of your computer where PhpStorm is running as seen from Vagrant machine.
Combination of those 2 above will do the job for you.

How to deploy on a remote machine using hudson's WAS Builder Plugin?

I have a hudson build server (Windows) that does not have Websphere installed. I created a Hudson node that I connect to via SSH. I also installed the WAS Builder Plugin to run jython scripts on the AIX machine. The job that uses the WAS Builder Plugin is tied to the AIX box.
I run into errors. Does anybody know, whether that setup might work or if a different setup will work for the WAS Builder Plugin?
EDIT:
I get following Error Message:
[test] $ cmd /c call /tmp/hudson9035964108103168395.bat
FATAL: command execution failed
java.io.IOException: cmd: not found
at java.lang.UNIXProcess.fullPath(UNIXProcess.java:372)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:178)
at java.lang.ProcessImpl.start(ProcessImpl.java:114)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:466)
at hudson.Proc$LocalProc.<init>(Proc.java:149)
at hudson.Proc$LocalProc.<init>(Proc.java:121)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:633)
at hudson.Launcher$ProcStarter.start(Launcher.java:268)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:778)
at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:754)
at hudson.remoting.UserRequest.perform(UserRequest.java:114)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:270)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:810)
Finished: FAILURE
I am wondering whether that plugin can be executed on a slave, especially in my case where the master is on Windows and the slave on AIX.
Check Here Hudson Deploy Websphere Plugin
Why dont you remotely trigger builds on Hudson via the hudsonurl:8080/jobs/jobname/build?token=TOKEN url. That way you dont have to depend on BAT files.
Finally I got it to work. I upgraded the plugin to Version 1.4 and to the newest Hudson server 1.355. That seemed to do the trick.