Looking for some advise on setting up Unoconv on IIS.
I am trying to run this via PHP but I get the following error.
Verbosity set to level 3
Using office base path: C:\Program Files\LibreOffice
Using office binary path: C:\Program Files\LibreOffice\program
DEBUG: Connection type: socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
DEBUG: Existing listener not found.
DEBUG: Launching our own listener using C:\Program Files\LibreOffice\program\soffice.exe.
LibreOffice listener arguments are ['C:\\Program Files\\LibreOffice\\program\\soffice.exe', '--headless', '--invisible', '--nocrashreport', '--nodefault', '--nofirststartwizard', '--nologo', '--norestore', '--accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext'].
LibreOffice listener successfully started. (pid=8808)
Failed to connect to C:\Program Files\LibreOffice\program\soffice.exe (pid=8808) in 6 seconds.
Connector : couldn't connect to socket (WSAECONNREFUSED, Connection refused)
Error: Unable to connect or start own listener. Aborting.
If I run the following command in CMD unoconv --listener prior to running the PHP script to convert the file everything works as expected, but I do not want to manage the listener creation process myself as unoconv should do this.
If I switch the App Pool Identity to LocalSystem everything works the listener gets created and file conversion work, but this is giving too much access.
Any Ideas as to what I need to configure to get this to work via the usual ApplicationPoolIdentity ?
Thank you
Ged
Give NAME_OF_YOUR_MACHINE\IIS_IUSRS permissions on the relevant folders and try to use AppPoolIdentity
Related
I want to create a new project in PhpStorm, but I can't figure out why I can't add a PHP Interpreter in PhpStorm 2020.1.1.
First some info:
All is starting from my Synology NAS DS415+ with latest DSM 6.2.3-25426.
Installed on NAS:
Web Station
MariaDB 10
phpMyAdmin
PHP 7.2
PHP 7.3
Apache HTTP Server 2.4
SSH-connection is added successfully in PhpStorm.
Z-driveletter is /web-folder.
So, first things first. I created a /composer folder inside my /web folder. Composer.phar is selected in path as you can see.
Then I would select a PHP Interpreter.
I will add a new interpreter, so I click on +-sign.
Because of all is installed on my NAS, I select "From Docker, Vagrant, VM, WSL,Remote,..."
Then I select SSH because I can access my NAS through SSH.
Within SSH configuration I select mine. Test Connection => Successfully connected!
Now, I needed to enter the PHP interpreter path. I've searched on my NAS and found these paths:
/volume1/#appstore/PHP7.3/usr/local/bin/php73
/volume1/#appstore/PHP7.2/usr/local/bin/php72
However, I can NOT browse to these paths or enter one of these paths in the input-field.
Do or did I something wrong?
Could anyone help to get this works?
Update - 06/23/2020
I've created a phpinfo file.
What I've see is that my PHP.ini file path = C:\Windows.
I think that's not the intention? I need my NAS PHP.ini!
How can I configure this?
Update - 06/27/2020
I've created a log file that you can find over here:
2020-06-27 13:41:49,202 [13856671] DEBUG - sh.config.OpenSSHConfigService - Failed to parse OpenSSH configuration file: C:\Users\User\.ssh\config
java.io.FileNotFoundException: C:\Users\User\.ssh\config (System can't find specified file)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
at java.base/java.io.FileReader.<init>(FileReader.java:60)
at com.intellij.ssh.config.OpenSSHConfig.parseFile(OpenSSHConfig.java:91)
at com.intellij.ssh.config.OpenSSHConfigService.a(OpenSSHConfigService.kt:57)
at com.intellij.ssh.config.OpenSSHConfigService.a(OpenSSHConfigService.kt:52)
at com.intellij.ssh.config.OpenSSHConfigService.getConfig(OpenSSHConfigService.kt:29)
at com.intellij.ssh.RemoteCredentialsUtil.connectionBuilder(remoteCredentialsUtil.kt:33)
at com.intellij.ssh.RemoteCredentialsUtil.connectionBuilder$default(remoteCredentialsUtil.kt:27)
at com.intellij.ssh.RemoteCredentialsUtil.connectionBuilder(remoteCredentialsUtil.kt)
at com.intellij.ssh.ui.unified.SshCredentialsEditorEx$1.a(SshCredentialsEditorEx.java:68)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
2020-06-27 13:41:58,050 [13865519] DEBUG - ellij.ssh.SshConnectionService - Creating sftp channel within SshjSshConnection(<crc32=1xag9ud>#<crc32=hwmx1i>)#54eb5487
2020-06-27 13:41:58,061 [13865530] WARN - net.schmizz.concurrent.Promise - <<chan#16 / open>> woke to: Opening `session` channel failed: open failed
2020-06-27 13:41:58,061 [13865530] DEBUG - ellij.ssh.SshConnectionService - Creating sftp channel within SshjSshConnection(<crc32=1xag9ud>#<crc32=hwmx1i>)#2c5f9c31
2020-06-27 13:41:58,062 [13865531] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem
2020-06-27 13:41:58,069 [13865538] WARN - net.schmizz.concurrent.Promise - <<chan#6 / chanreq for subsystem>> woke to: net.schmizz.sshj.connection.ConnectionException: Request failed
2020-06-27 13:41:58,069 [13865538] INFO - tesdk.ui.CreateRemoteSdkUIUtil - Request failed
com.jetbrains.plugins.webDeployment.CustomFileSystemException: Request failed
at com.jetbrains.plugins.remotesdk.RemoteSdkUtil.checkInterpreterAndCreateHelpersDir(RemoteSdkUtil.java:360)
at com.jetbrains.plugins.remotesdk.RemoteSdkUtil$1.lambda$run$0(RemoteSdkUtil.java:297)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:255)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.intellij.ssh.SshTransportException: Request failed
at com.intellij.ssh.impl.sshj.SshjSshConnection.openChannel(SshjSshConnection.kt:52)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:67)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:171)
at com.intellij.ssh.ConnectionBuilder.openSftpChannel(ssh.kt:141)
at com.jetbrains.plugins.remotesdk.RemoteSdkUtil.checkInterpreterAndCreateHelpersDir(RemoteSdkUtil.java:356)
... 8 more
Caused by: net.schmizz.sshj.connection.ConnectionException: Request failed
at net.schmizz.sshj.connection.channel.AbstractChannel.gotResponse(AbstractChannel.java:405)
at net.schmizz.sshj.connection.channel.AbstractChannel.handle(AbstractChannel.java:192)
at net.schmizz.sshj.connection.ConnectionImpl.handle(ConnectionImpl.java:130)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:500)
at net.schmizz.sshj.transport.Decoder.decodeMte(Decoder.java:159)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:79)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:231)
at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
Maybe that could be more informative.
I'm having trouble getting my worker process to update in Heroku. I have a worker dyno set in my Procfile that is connected to a Redis instance; I cannot see changes that I make to this file after deploying.
I've tried:
Resetting the dyno using heroku ps:restart worker.1 -a [appname]
Restarting all dynos using heroku ps:restart -a [appname]
Changing the contents of the file so the size is different
Changing the Procfile to point to a different PHP file
Nothing works. It looks like it picked up some of my changes overnight (maybe during reboot?) but I can't force it to pick up the changes... any ideas?
Logs to the rescue... I had an issue with my required include file paths, which was causing the build to fail. It was defaulting to the last successful build, which is why it looked like it was caching.
I was able to find this by watching the logs during the build:
heroku[worker.1]: Starting process with command `php bin/worker.php`
heroku[worker.1]: State changed from starting to up
heroku[worker.1]: Process exited with status 255
app[worker.1]: PHP Warning: require_once(../vendor/autoload.php): failed to open stream: No such file or directory in /app/bin/worker.php on line 9
app[worker.1]: PHP Fatal error: require_once(): Failed opening required '../vendor/autoload.php' (include_path='.:/app/.heroku/php/lib/php') in /app/bin/worker.php on line 9
heroku[worker.1]: State changed from up to crashed
Once I solved the build errors it no longer 'cached' and everything worked properly.
The include path that worked:
require_once(__DIR__ . '/../vendor/autoload.php');
I hope someone can help me out with this issue I'm facing.
I've made a fully functional project on a local server and would now like to deploy it to Bluemix Cloud Foundry.
I've followed the tutorial: https://console.eu-gb.bluemix.net/docs/starters/upload_app.html
But when I'm trying to push it through terminal with following commands
cf push app_name -b https://github.com/cloudfoundry/php-buildpack.git -s cflinuxfs2
cf push app_name -b https://github.com/cloudfoundry/go-buildpack
cf push app_name -c start_command
cf push app_name -m 512m
But non seems to work, since every single time I get the following error
Staging failed: Buildpack compilation step failed
-----> Composer command failed
FAILED
Error restarting application: BuildpackCompileFailed
It is a PHP app build with PHPStorm on Symfony and Doctrine if that matters.
I am fairly new to all server/setup/deployment configurations as well as command line.
EDIT 1
I figured out this part thanks to this link: https://support.run.pivotal.io/entries/109600943-cf-push-ing-a-symfony-app-fails-with-Composer-command-failed-
It seems that by default the buildpack assumes that you want all of the files you push to be public. Because of this assumption, it takes all of your files and moves them into the doc root of either HTTPD or Nginx.
By creating the file .bp-config/options.json in the root of your project. Then inside options.json add
{
"WEBDIR": "web"
}
This will tell the buildpack that you have a specific directory to use for the doc root, so it will just use that instead of moving everything into the default doc root.
However...
This brings me a new issue and returns the following error
FAILED
Error restarting application: Start unsuccessful
If i enter the recent log the terminal provides me this:
2016-08-25T02:53:40.62+0200 [App/0] OUT Could not open input file: app.php
2016-08-25T02:53:40.62+0200 [App/0] ERR
2016-08-25T02:53:40.69+0200 [DEA/211] ERR Instance (index 0) failed to start accepting connections
2016-08-25T02:53:40.72+0200 [API/9] OUT App instance exited with guid abb206b3-b8ea-4269-b248-ec7b35f7098a payload: {"cc_partition"=>"default", "droplet"=>"abb206b3-b8ea-4269-b248-ec7b35f7098a", "version"=>"b6c3c871-5484-4f12-9d84-657cf6eacfbf", "instance"=>"c11566bdabe5458d9bfc4965c9c1aa85", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1472086420}
2016-08-25T02:53:40.72+0200 [API/3] OUT App instance exited with guid abb206b3-b8ea-4269-b248-ec7b35f7098a payload: {"cc_partition"=>"default", "droplet"=>"abb206b3-b8ea-4269-b248-ec7b35f7098a", "version"=>"b6c3c871-5484-4f12-9d84-657cf6eacfbf", "instance"=>"c11566bdabe5458d9bfc4965c9c1aa85", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1472086420}
2016-08-24T16:41:14.03+0200 [DEA/135] OUT Starting app instance (index 0) with guid abb206b3-b8ea-4269-b248-ec7b35f7098a
2016-08-24T16:41:26.26+0200 [App/0] ERR bash: start_command: command not found
2016-08-24T16:41:26.26+0200 [App/0] OUT
2016-08-24T16:41:26.35+0200 [DEA/135] ERR Instance (index 0) failed to start accepting connections
2016-08-24T16:41:26.38+0200 [API/6] OUT App instance exited with guid abb206b3-b8ea-4269-b248-ec7b35f7098a payload: {"cc_partition"=>"default", "droplet"=>"abb206b3-b8ea-4269-b248-ec7b35f7098a", "version"=>"5ebd6d77-68c4-4901-b9a8-b5cecfa4cddb", "instance"=>"7b5b555ae68645f4a2c09b73c0adbcb3", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1472049686}
EDIT 2 (updated error msg)
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
I have a fedora Instance runnig in an Amazon EC2. The problem is, I have a php already installed, but I want to update (PS: Somebody already gave to me the instance with the php installed). When I try the command: yum update php an error message appears.
Setting up Update Process
Setting up repositories
Cannot find a valid baseurl for repo: updates-released
Error: Cannot find a valid baseurl for repo: updates-released
I tried to uncomment the baseurl line in the yum repositorie files, but a new error appears.
Setting up Update Process
Setting up repositories
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.
Cannot open/read repomd.xml file for repository: updates-released
failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from updates-released: [Errno 256] No more mirrors to try.
The error that you are getting sounds like it's a connection or DNS related issue -- see if you can ping 'download.fedora.redhat.com,' then see if you can use wget to attempt to get the file.
Also, your /etc/yum.repos.d/ directory may contain a repository file with an invalid repository in it -- I'm not sure if they're still publishing updates for Fedora 4 (it was released around 2004ish). Your best bet is to make sure that the version in /etc/fedora-release matches with the version in that repository configuration file.