Plesk: PHP handler successfully registered but not available in Plesk - plesk

I wanted PHP 5.4.45 for one of my web spaces so I've downloaded and installed it (following these instructions) but although I've registered it and had a success message, it doesn't show in the dropdown within the Plesk panel.
I've run the following command:
/usr/local/psa/bin/php_handler --add -displayname 5.4.45 -path /usr/local/php5445/bin/php-cgi -phpini /usr/local/lib/php.ini -type fastcgi -id 5.4.45-lsiv6
I had the following message:
The new PHP handler with the id "5.4.45-lsiv6" was successfully registered
However it's not available in the dropdown box.
How can I get this new version to show within Plesk?

Run
/usr/local/psa/bin/php_handler --reread
and check again.

Related

Uiautomatorviewer Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist

i can launch Uiautomatorviewer sucessfully, inspect any page/app at personal profile.
Once phone at work profile/launching any app installed under work profile then Uiautomatorviewer throws error:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
i am not sure why it behave like this suddenly, it used to work regardless personal / work profile last week.
i don't remember i change any configuration...
please help to give me clues why? i have followed many previous post suggestion to restart adb server, kill appium server, restart phone/laptop, disable enable developer options...etc. none works....
I tried to inspect personal profile now, the same error occurred:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!
updated: i used appium studio inspector and it works. I still not sure what happened to adb or uiautomator via command line? how do i debug it?
found an answer
com.android.ddmlib.SyncException: Is a directory
try doing adb shell rm -rf /data/local/tmp and rebooting the phone first. it's ok if you get rm: /data/local/tmp: Permission denied. ignore it - it's for the tmp folder itself after its content was already removed (that's what you need anyway)

VSCode Remote SSH to Linux - Connecting was canceled

I am trying to connect from my Windows 10 machine to my Ubuntu Linux server (16.04.6) using Remote SSH.
To do this I've read many different tutorials but have no success.
I am able to connect from my Windows 10 command prompt to the Ubuntu Linux server via ssh without any problems. I even used ssh-keygen to generate a private and a public key and copied the public key to the appropriate directory on the Linux Server (.ssh).
In VsCode I installed the extension Remote-SSH added my host to my configuration file c:\user.ssh\config:
Host <ip-address>
HostName <ip-address>
User <username>
Then I clicked in VSCode the button bottom left "Open a remote Window" and chosed my host. A new windows opens and VSCode is trying to connect. Then I see a window with the error message: "Could not establish connection to . Connection was canceled". This is the log.
[11:53:17.573] Log Level: 2
[11:53:17.582] remote-ssh#0.51.0
[11:53:17.583] win32 x64
[11:53:17.586] SSH Resolver called for "ssh-remote+<ip-address>", attempt 1
[11:53:17.587] SSH Resolver called for host: <ip-address>
[11:53:17.587] Setting up SSH remote "<ip-address>"
[11:53:17.648] Using commit id "5763d909d5f12fe19f215cbfdd29a91c0fa9208a" and quality "stable" for server
[11:53:17.650] Install and start server if needed
[11:53:18.624] getPlatformForHost was canceled
[11:53:18.625] Resolver error: Connecting was canceled
[11:53:18.640] ------
Again, I can connect to the same linux server via ssh from my local machine (Win 10) without any problems.
I've resolved the connection issues; possibly the ssh config was not correctly saved/accessed by VS Code?
I thought I should be able to directly set it up to point to an existing config file, but that didn't seem to work. Instead, I created a new config file in the UI, and over-wrote the contents. Shouldn't be necessary, but seemed to do the trick.
What I did was:
Add new host: => Remote-SSH: Connect to host... => Add New SSH Host...
Type in command: ssh user#host to attempt to connect
Choose platform in the command bar in the new window (Linux in my case)
Verify connected (I needed to change ssh-agent settings to store credentials)
Edit the config location: => Remote-SSH: Connect to host... => Settings
Enter config file under Remote.SSH: Config File (C:\Users\me\.vagrant\machines\default\virtualbox\config in my case)
Modify config file further, as needed
Connect through the UI: Remote-SSH: Connect to host... =>
Hope that helps!
For me it was not starting necessary SSH*. See status services using:
Get-Service SSH* on PowerShell.
I got a time out error on enabling necessary services and this helped.
A colleague of mine was with this problem. We solved just deleting his %USERPROFILE\.ssh\config file, closing VSCode, reopening it, and trying to connect again.
There was some garbage in his ssh config file.
I also found that if the value of the "Host" field includes a ")" character, then there will be an error message as follows and the VSCode keeps trying opening remote:
The terminal process "C:\WINDOWS\System32\cmd.exe /c (type "C:\Users\xxxxx_xxxxx\AppData\Local\Temp\vscode-linux-multi-line-command--ccton_---_---2-705401992.sh" | ssh -T -L 127.0.0.1:53080:/run/user/1000/vscode-ssh-remote-server-sock-1636523090 Accton_AWS_EC)2 bash) & exit /b 0" terminated with exit code: 1.
I tried the following that worked for me:
Click on View > Command Palette (alternatively press CTRL + Shift + P)
Start typing:
Remote SSH: Kill
Click on the first option that says: Remote-SSH: kill VS Code Server on Host...
From the options, click on the server you are having trouble connecting to. This will kill that VScode server.
Now just try to reconnect:
a. View > Command Palette (alternatively press CTRL + Shift + P)
b. Start typing:
SSH Remote-SSH: Connect to host...
c. Select the server.
Adding my 2 cents here, I too had lots of trouble connecting to a remote using "Remote SSH Extension of Microsoft". Unfortunately, no luck and spent a lot of time trying all ways possible.
I found another extension named "SSH Client" by cweijan. It was easy and I was able to access my remote using it.
When I had this issue it was because the extension was complaining that the pem file permissions were too open, it should be accessible just by my current user.
Yes, I would like to ~ add on top of Shivam Popat's answer.
Configure F1 ssh.add and Option to add client, and password appears.
Now, connect, and save.
From the left pane you would see icon of key. and upon clicking it will open the remote folders.
The previous problem with VScode remote SSH resolved.

How to set upload_tmp_dir in Plesk

I was trying to set upload_tmp_dir variable for one of my domain I added following entries
root#host1 /var/www/vhosts/vw-forum.pl/conf # cat vhosts.conf
php_admin_value upload_tmp_dir /tmp
Then I refreshed configuration
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain vw-forum.pl
but in the end in php info it`s showing
upload_tmp_dir no value no value
Pls advice how to fix this..
I have find out an answer it should be changed in PLesk Panel for particula domain
PHP settings tab for domain As "Additional configuration directives"
My phpinfo also shows no value in upload_tmp_dir. However, as I've learned today from the error logs, you have to manually configure Plesk to accept that respective dir in the open_basedir PHP setting.
mod_fcgid: stderr: PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (…)
I have just done so and can upload fine now, even though phpinfo still shows no value for that entry.

running web2py with GoogleAppEngineLauncher

Trying to run my web2py app from the development server using GoogleAppEngineLauncher
Not sure if the on-line tutorials are out of date or I'm just missing something, but when I follow the link to download the GoogleAppEngine pythonSDK for OSX I get a dmg for the GoogleAppEngineLauncher.
I download and use that, which installs the proper executables, however after I setup my app.yaml file and run "dev_appserver.py myApp" I get this error:
fancy_urllib.InvalidCertificateException: Host appengine.google.com returned an invalid certificate (_ssl.c:503: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed):
I don't get the error if I try and launch the app from the launcher itself, however I can't launch the app because it says the directory already exists and I don't have write permissions. I even tried chmod 777 on the myApp directory.
Should I not be using the GoogleAppLauncher?
additionally I tried using the linux SDX and received the same "certificate" error. The error message directs me to a link mentioning that I need the "ssl" module, but that is included in python 2.7.2 which I am using.
The link also mentions: "appcfg uses SSL when connecting to the Admin Console by default, unless the --insecure flag is passed." But I cannot find that flag in the help menu.
Found this answer which solves the problem.
Basically:
rm google_appengine/lib/cacerts/cacerts.txt
From the SDK

deploying gae to development server stopped working

I'm working through a test GAE Java project which was working fine but I decided to look at adding GWT to the same project. I then decided to stick with the GAE stuff I was learning and decided to remove GWT. The problem is I can't now deploy to the development server as it gives the following in the Eclipse console pane. Anyone know please how I can reset appropriate settings to how my project had them originally?
terminated test [Web Application] C:\Program
Files\Java\jdk1.6.0_37\bin\javaw.exe Usage:
[options]
Options: --help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest -s SERVER SDK version. --address=ADDRESS The address of the interface on the local machine -a ADDRESS
to bind to (or 0.0.0.0 for all interfaces). --port=PORT
The port number to bind to on the local machine. -p PORT
--sdk_root=DIR Overrides where the SDK is located. --disable_update_check Disable the check for newer SDK versions. --generated_dir=DIR Set the directory where generated files are created. --jvm_flag=FLAG Pass FLAG as a JVM argument. May
be repeated to
supply multiple flags.
I seem to have found my own answer through setting up a new dummy gae project and having a poke around, found that the 'Run As' > 'Run Configurations...' > '(x)= Arguments' > 'Program arguments' had an additional port defined prior to the rest of the argument beginning '--port=8888'. I removed the mention of '-codeServerPort 9997 ' and it now deploys to dev server and appears to be working as before.
eg
new dummy project: --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\dummy\war"
project that wouldn't deploy to dev server: -codeServerPort 9997 --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\test\war"
I faced the same issue and you know what, Workaround is just pretty simple.
I created one new appengine project with only one jsp in WAR and 'Run As' > 'Run Configurations...' >Server Tab -> Unchecked then checked Run Built-In server and then checked Automatically select any port.
Server started ..on some fishy 25334 port..i stopped that using red button on Console Terminal.
then i changed it back to 8888 and WHOA project Ran.... :)
Then i did the same with old project. deleted this new one and all is working as expected.

Resources