Websocket, Ratchet, Autobahn, can't connect - websocket

im facing following issue:
I open up the WS server on the live-server -> running
I open up my project on my localhost -> can connect to WS server
I open up my project on the live-server ( www.myproject.com ) -> can't connect to WS server
Any idea? Do i need to open any ports?

Try with wss:// . If there is a proxy in the middle it may be interfering.
Also, have you mapped the TCP port you are using for WebSockets to the server where the app runs? If you ate using a non standar port (like 80 or 443) it may be not mapped.

Ok,
adding this to my .htaccess ( in the web folder ) actually solved it. I was adding it cuz of another error..but it solved this problem as well.
RewriteBase /
DirectorySlash Off
# remove trailing slash
RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]
Strange.

Related

Can't force phpMailer to send mail from nginx server

I use actual version of phpMailer (downloaded yesterday from github). It sends mails from my local computer (Win10, xampp 7.4.3) and can't send it from server (centOs7, nginx, php7). Both computers in one LAN behind the same firewall.
I suspect php.ini configuration, but what should be configured exactly?
Thanks for any help.
The solution:
# sudo setsebool -P httpd_can_sendmail 1
The tracking of my search:
Switch on the DebugMode in phpMailer (for each new PHPMailer object):
$mail = new PHPMailer\PHPMailer\PHPMailer();
$mail->SMTPDebug = 4;
Checking out 'Console' tab output in Chrome DevTools:
SMTP ERROR: Failed to connect to server: Permission denied (13)
Googling for the error text - https://stackoverflow.com/a/50302148/9751142
Hope this helps anybody else.

Untrusted Host in symfony call

I installed a symfony application in a centos server that it is behind a proxy and when I try to reach it from an external pc I receive this error: Untrusted Host "192.168.43.218" and below that in public/index.php (line 37) $response = $kernel->handle($request);
I tried to follow this guide but nothing happens...Also my index.php is different than the one in the example. How can I solve this?
Solved, I had to insert in framework.yaml the trusted_hosts: ['192.168.43.218', '192.168.43.218'] command (the ip of the server)

oh-storm and zend server: Cannot accept external Zend Debugger connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'

I try to debug with PhpStorm (2016.3.1) and Zend Server 9.01 with Z-Ray. Everything has the newest Version and installed locally onto my MacBook.
For making it simple, I created a new directory, with one file (index.php) in it.
Into PhpStorm into
Prefferences - Language&Frameworks - PHP - Servers, there is one Server:
Host: zf3-test2.dev
Port: 10088
Debugger: Zend Debugger
Prefferences - Language&Frameworks - PHP - Debug - Zend Debugger
Debug Port: 10137
Settings broadcasting port: 20080
Can accept external connection: checked
Ignore Z-Ray system requests: unchecked
Into my /etc/hosts I set
127.0.0.1 zf3-test2.dev
Into Zend Server I created a virtual host.
<VirtualHost *:${port}>
DocumentRoot "/usr/local/zend/apache2/htdocs/zf3-test2/"
<Directory "/usr/local/zend/apache2/htdocs/zf3-test2/">
Options +Indexes +FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
AllowOverride All
</Directory>
ServerName ${vhost}:${port}
# include the folder containing the vhost aliases for zend server deployment
Include "${aliasdir}/*.conf"
</VirtualHost>
So now, when i call into the browser the address http://zf3-test2.dev:10088 , my site opens and works fine.
I read this instructions:
http://files.zend.com/help/Zend-Server/content/debugging_in_phpstorm_using_zend_server.htm
I created a breakpoint.
I activate into PhpStorm "Start Listening for PHP Debug Connections".
Then I right klicked onto the index.php and choosed "Open in Browser - Chrome"
The file opens into chrome, and there I klicked into the z-Ray line onto the Debug sign, and choosed "Debug current page".
I shortly get a window with this text:
Die Seite zf3-test2.dev funktioniert nicht
zf3-test2.dev hat keine Daten gesendet.
ERR_EMPTY_RESPONSE
Into PhpStorm into Event Log I get two times the same message:
Cannot accept external Zend Debugger connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'
Then into chrome, the page will be shown.
So no Debugging is possible at the moment.
What can I do to fix it?
Thanks for help and greetings.
I ran into the same problem when trying to set up Zend Debugger with Zend Server 9.01. I found a bug on youtrack WI-34697 that gave me the idea to try upgrading to zend server 9.1 and that worked for me. Unfortunately the upgraded process deletes all of your zend server settings, so I don't know if there was a bug in zend server or a problem with my configuration.

Unable to Retrieve Directory Using ProFTPD(WHM)

Well, after looking for many solutions. I came here now.
I am setting up WHM/cPanel for hosting website. Everything was going smooth but I am stuck on FTP connection (Server sent passive reply with unroutable address. Using server address instead.)
Server Details:
CentOS Linux release 7.2.1511 (Core)
WHM/cPanel Version 11.58.0.13
FTP Server: PureFTPD
Acutal error while connecting
To fix this issue and get FTP working you need to open up more numbered ports so FTP can connect. I assume you are using CSF.
Login to WHM then go to CSF >> Firewall Configuration >>
allow TCP_In 30000:50000 and TCP_Out 30000:50000
Once you made the changes Restart the firewall
Now you need to make changes in FTP config file to use these ports, you will find this file to this location /etc/pure-ftpd.conf
Now you will see a line as follows and you will need to uncomment it
# Port range for passive connections replies. - for firewalling.
PassivePortRange 30000 50000
Restart FTP Service and should work.

Winginx 504 Gateway Time-out

I have downloaded and installed winginx server on my windows platform and everything is working fine accept when I try to import a database dump using phpadmin I get this error message:
"504 Gateway Time-out"
Does somebody know how to fix this when using winginx?
This is a wrong configured nginx server. Try to replace localhost:xxxx with 127.0.0.1:xxxx in all configuration files.
Some of them are located in Winginx\conf such as:
tools-adminer.conf
tools-phpmemcachedadmin.conf
tools-phpmyadmin.conf
tools-rockmongo.conf
The other configuration is accessible through the workbench.
Having just experienced this I guess you didn't select to install PHP 5.3 (who needs that now).
The line that you need to update in each of these files is
fastcgi_pass 127.0.0.1:9054;
The 9054 is the port userd for PHP 5.4

Resources