phpinfo doesnt show memcache - php

I have some trouble to enable memcache. I'm running Debian 9 and installed memcache. It looks like everything is working
~$ ps aux | grep memcached
memcache 2341 0.0 0.0 335696 2648 ? Ssl 18:57 0:01 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1
olafHus 7486 0.0 0.0 12788 972 pts/1 S+ 21:41 0:00 grep memcached
I've checked if the module is enabled:
~$ sudo cat /etc/php5/conf.d/20-memcached.ini
; uncomment the next line to enable the module
extension=memcached.so
Moreover, I also get
~$ sudo netstat -tap | grep memcached
tcp 0 0 localhost:11211 0.0.0.0:* LISTEN 2341/memcached
and finally I've run a /etc/init.d/apache2 restart, sudo /etc/init.d/apache2 reload and sudo /etc/init.d/memcached restart. But when I'm checking my localhost where a simple phpinfo() is located memcache is not listed. I've followed this instruction and put the following file to see if memcache is working
<?php
$mem = new Memcached();
$mem->addServer("127.0.0.1", 11211);
$result = $mem->get("blah");
if ($result) {
echo $result;
} else {
echo "No matching key found. I'll add that now!";
$mem->set("blah", "I am data! I am held in memcached!") or die("Couldn't save anything to memcached...");
}
?>
But it doesn't work. Does someone know what's going on and how I can make memcache work?
EDIT:
This is the output of the log
$ sudo cat /var/log/apache2/error.log
[Mon Jul 10 18:23:10.671404 2017] [mpm_event:notice] [pid 29979:tid 140044669715648] AH00489: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:23:10.671544 2017] [core:notice] [pid 29979:tid 140044669715648] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:23:27.115014 2017] [mpm_event:notice] [pid 29979:tid 140044669715648] AH00491: caught SIGTERM, shutting down
[Mon Jul 10 18:23:27.170643 2017] [mpm_prefork:notice] [pid 4817] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:23:27.170737 2017] [core:notice] [pid 4817] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:23:27.447314 2017] [mpm_prefork:notice] [pid 4817] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:23:27.536634 2017] [mpm_prefork:notice] [pid 4873] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:23:27.536680 2017] [core:notice] [pid 4873] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:26:41.201787 2017] [mpm_prefork:notice] [pid 4873] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:26:41.292588 2017] [mpm_prefork:notice] [pid 6922] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:26:41.292635 2017] [core:notice] [pid 6922] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:27:35.149322 2017] [mpm_prefork:notice] [pid 6922] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:27:35.244846 2017] [mpm_prefork:notice] [pid 6981] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:27:35.244889 2017] [core:notice] [pid 6981] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:29:32.870011 2017] [mpm_prefork:notice] [pid 6981] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:29:32.960699 2017] [mpm_prefork:notice] [pid 26042] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:29:32.960738 2017] [core:notice] [pid 26042] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:29:54.322087 2017] [mpm_prefork:notice] [pid 26042] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:29:54.416333 2017] [mpm_prefork:notice] [pid 26089] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:29:54.416371 2017] [core:notice] [pid 26089] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:32:55.998398 2017] [mpm_prefork:notice] [pid 26089] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:32:56.092397 2017] [mpm_prefork:notice] [pid 30053] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:32:56.092431 2017] [core:notice] [pid 30053] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:37:17.489919 2017] [mpm_prefork:notice] [pid 30053] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:37:17.586762 2017] [mpm_prefork:notice] [pid 30260] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:37:17.586801 2017] [core:notice] [pid 30260] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:37:21.451096 2017] [mpm_prefork:notice] [pid 30260] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:37:24.067553 2017] [mpm_prefork:notice] [pid 30343] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:37:24.067594 2017] [core:notice] [pid 30343] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:38:51.583610 2017] [mpm_prefork:notice] [pid 30343] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:38:53.488078 2017] [mpm_prefork:notice] [pid 30595] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:38:53.488121 2017] [core:notice] [pid 30595] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:39:59.404361 2017] [:error] [pid 30597] [client 127.0.0.1:38144] PHP Fatal error: Class 'Memcached' not found in /var/www/html/cache_test.php on line 2
[Mon Jul 10 18:39:59.404388 2017] [:error] [pid 30597] [client 127.0.0.1:38144] PHP Stack trace:
[Mon Jul 10 18:39:59.404394 2017] [:error] [pid 30597] [client 127.0.0.1:38144] PHP 1. {main}() /var/www/html/cache_test.php:0
[Mon Jul 10 18:40:05.482553 2017] [:error] [pid 30598] [client 127.0.0.1:38146] PHP Fatal error: Class 'Memcached' not found in /var/www/html/cache_test.php on line 2
[Mon Jul 10 18:40:05.482595 2017] [:error] [pid 30598] [client 127.0.0.1:38146] PHP Stack trace:
[Mon Jul 10 18:40:05.482607 2017] [:error] [pid 30598] [client 127.0.0.1:38146] PHP 1. {main}() /var/www/html/cache_test.php:0
[Mon Jul 10 18:46:58.898526 2017] [mpm_prefork:notice] [pid 30595] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:46:59.004874 2017] [mpm_prefork:notice] [pid 31027] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:46:59.004915 2017] [core:notice] [pid 31027] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:51:21.595950 2017] [mpm_prefork:notice] [pid 31027] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:51:21.692445 2017] [mpm_prefork:notice] [pid 31243] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:51:21.692480 2017] [core:notice] [pid 31243] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:54:33.454240 2017] [mpm_prefork:notice] [pid 31243] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:54:33.539549 2017] [mpm_prefork:notice] [pid 2072] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:54:33.539598 2017] [core:notice] [pid 2072] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:54:41.149185 2017] [mpm_prefork:notice] [pid 2072] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:54:41.244007 2017] [mpm_prefork:notice] [pid 2115] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:54:41.244039 2017] [core:notice] [pid 2115] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:54:45.901404 2017] [mpm_prefork:notice] [pid 2115] AH00171: Graceful restart requested, doing restart
[Mon Jul 10 18:54:45.922983 2017] [mpm_prefork:notice] [pid 2115] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:54:45.922999 2017] [core:notice] [pid 2115] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jul 10 18:58:37.287228 2017] [mpm_prefork:notice] [pid 2115] AH00169: caught SIGTERM, shutting down
[Mon Jul 10 18:58:37.381938 2017] [mpm_prefork:notice] [pid 2524] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Jul 10 18:58:37.381994 2017] [core:notice] [pid 2524] AH00094: Command line: '/usr/sbin/apache2'

Related

PHP 7, huge array not loading

Alright, I use WAMP and I have this massive array. When using PHP 5.6.40, it loads no problem. When using PHP 7.4.0, the page does not load and I get this error: ERR_CONNECTION_RESET. Then I reduce my array to a few lines and it loads then. What's the problem? I am very much sure there is no incorrect syntax in my code. Any ideas? Please share
Apache error log:
[Sat Jul 11 10:07:00.171208 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00428: Parent: child process 12132 exited with status
3221225725 -- Restarting.
[Sat Jul 11 10:07:00.296215 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00455: Apache/2.4.41 (Win64) PHP/7.4.0 configured -- resuming
normal operations
[Sat Jul 11 10:07:00.296215 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00456: Apache Lounge VS16 Server built: Aug 9 2019 16:46:32
[Sat Jul 11 10:07:00.296215 2020] [core:notice] [pid 10472:tid 416]
AH00094: Command line:
'c:\wamp64\bin\apache\apache2.4.41\bin\httpd.exe -d
C:/wamp64/bin/apache/apache2.4.41'
[Sat Jul 11 10:07:00.298216 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00418: Parent: Created child process 9976
[Sat Jul 11 10:07:01.231269 2020] [mpm_winnt:notice] [pid 9976:tid
332] AH00354: Child: Starting 64 worker threads.
[Sat Jul 11 10:07:01.831303 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00428: Parent: child process 9976 exited with status 3221225725
-- Restarting.
[Sat Jul 11 10:07:01.971311 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00455: Apache/2.4.41 (Win64) PHP/7.4.0 configured -- resuming
normal operations
[Sat Jul 11 10:07:01.972311 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00456: Apache Lounge VS16 Server built: Aug 9 2019 16:46:32
[Sat Jul 11 10:07:01.972311 2020] [core:notice] [pid 10472:tid 416]
AH00094: Command line:
'c:\wamp64\bin\apache\apache2.4.41\bin\httpd.exe -d
C:/wamp64/bin/apache/apache2.4.41'
[Sat Jul 11 10:07:01.974311 2020] [mpm_winnt:notice] [pid 10472:tid
416] AH00418: Parent: Created child process 10388
[Sat Jul 11 10:07:02.813359 2020] [mpm_winnt:notice] [pid 10388:tid
332] AH00354: Child: Starting 64 worker threads.
If you are confident that you have allocated enough memory, you can also try increasing the stack size in the Apache config. For example like so:
<IfModule mpm_winnt_module>
ThreadStackSize 6553600
</IfModule>

page isn't working after installing ioncube

I've downloaded a wordpress template and it needs to have Ioncube installed, I did as what digital ocean said on my vps and the right version for my php7.0 is installed (as I can see the result in phpinfo(); )but now when I go to my wordpress template page and it gives me the error
This page isn’t working
yourhost.com is currently unable to handle this request.
HTTP ERROR 500
this is my log
[Thu Nov 09 06:25:02.686651 2017] [mpm_prefork:notice] [pid 9032] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 06:25:02.686691 2017] [core:notice] [pid 9032] AH00094: Command line: '/usr/sbin/apache2'
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
[Thu Nov 09 06:25:50.830177 2017] [mpm_prefork:notice] [pid 9032] AH00169: caught SIGTERM, shutting down
Failed loading /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: /usr/lib/php/20151012/ioncube_loader_lin_7.0.so: cannot open shared object file: No such file or directory
[Thu Nov 09 06:25:51.971658 2017] [mpm_prefork:notice] [pid 11316] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 06:25:51.971857 2017] [core:notice] [pid 11316] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 06:29:29.356068 2017] [mpm_prefork:notice] [pid 11316] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 06:29:30.508534 2017] [mpm_prefork:notice] [pid 31764] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 06:29:30.508625 2017] [core:notice] [pid 31764] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 06:53:32.691037 2017] [mpm_prefork:notice] [pid 31764] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 06:53:33.737673 2017] [mpm_prefork:notice] [pid 3759] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 06:53:33.737757 2017] [core:notice] [pid 3759] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 06:56:32.551814 2017] [mpm_prefork:notice] [pid 3759] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 06:56:32.752382 2017] [mpm_prefork:notice] [pid 14853] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 06:56:32.752490 2017] [core:notice] [pid 14853] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 07:01:24.790695 2017] [mpm_prefork:notice] [pid 14853] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 07:01:25.989824 2017] [mpm_prefork:notice] [pid 18452] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 07:01:25.989955 2017] [core:notice] [pid 18452] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 07:01:31.080510 2017] [:error] [pid 18456] [client 5.232.32.241:24228] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:01:33.950712 2017] [:error] [pid 18455] [client 5.232.32.241:45501] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:01:36.156017 2017] [:error] [pid 18457] [client 5.232.32.241:35511] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:02:49.758464 2017] [:error] [pid 18479] [client 5.232.32.241:19653] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:09:30.678341 2017] [:error] [pid 18457] [client 5.232.32.241:46475] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:09:36.741121 2017] [:error] [pid 18459] [client 5.232.32.241:13475] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:09:59.726341 2017] [:error] [pid 18456] [client 5.232.32.241:18124] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:10:01.693749 2017] [:error] [pid 18480] [client 5.232.32.241:14882] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:10:09.060585 2017] [:error] [pid 18455] [client 5.232.32.241:16883] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:10:09.893809 2017] [:error] [pid 18458] [client 5.232.32.241:57989] PHP Fatal error: The file /var/www/html/wordpress/30693_Avada-7/avada522/wp-content/themes/$
[Thu Nov 09 07:14:15.677688 2017] [mpm_prefork:notice] [pid 18452] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 07:14:16.566425 2017] [mpm_prefork:notice] [pid 18910] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 07:14:16.566549 2017] [core:notice] [pid 18910] AH00094: Command line: '/usr/sbin/apache2'
[Thu Nov 09 10:24:33.989899 2017] [mpm_prefork:notice] [pid 18910] AH00169: caught SIGTERM, shutting down
[Thu Nov 09 10:24:34.142330 2017] [mpm_prefork:notice] [pid 317] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Nov 09 10:24:34.142433 2017] [core:notice] [pid 317] AH00094: Command line: '/usr/sbin/apache2'
please help me solve it
I figured it out, although it says you need an ioncube_7, but I should install go with php5.6

PHP websocket on SSL with proxy_wsTunnel - Apache

I have a php websocket server running but I want to connect to it via https. This is my JS: var conn = new WebSocket('wss://81.169.228.159:3671/wss2');
And this is my apache config:
ProxyPass /wss2/ ws://domain:3671/
I have proxy and proxy_wstunnel enabled.
So, what am I doing wrong?
ERROR LOG:
[Mon Mar 13 04:38:04.228450 2017] [mpm_prefork:notice] [pid 6683] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 04:38:04.228471 2017] [core:notice] [pid 6683] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 12:42:39.475641 2017] [:error] [pid 12432] [client 195.169.9.201:8546] script '/var/www/html/luukwuijster.io/phpinfo.php' not found or unable to stat
[Mon Mar 13 12:56:25.370986 2017] [mpm_prefork:notice] [pid 6683] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 12:56:26.539948 2017] [mpm_prefork:notice] [pid 26932] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 12:56:26.539972 2017] [core:notice] [pid 26932] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:06:36.280229 2017] [mpm_prefork:notice] [pid 26932] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:06:37.473220 2017] [mpm_prefork:notice] [pid 27256] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:06:37.473248 2017] [core:notice] [pid 27256] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:19:52.144983 2017] [mpm_prefork:notice] [pid 27256] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:19:53.235045 2017] [mpm_prefork:notice] [pid 27775] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:19:53.235083 2017] [core:notice] [pid 27775] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:22:21.467607 2017] [mpm_prefork:notice] [pid 27775] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:22:22.618416 2017] [mpm_prefork:notice] [pid 27911] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:22:22.618455 2017] [core:notice] [pid 27911] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:28:08.356148 2017] [mpm_prefork:notice] [pid 27911] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:28:09.546926 2017] [mpm_prefork:notice] [pid 28540] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:28:09.546964 2017] [core:notice] [pid 28540] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:35:26.856446 2017] [mpm_prefork:notice] [pid 28540] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:35:28.532498 2017] [mpm_prefork:notice] [pid 29153] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:35:28.532541 2017] [core:notice] [pid 29153] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 13:46:19.084561 2017] [ssl:error] [pid 29170] [client 208.93.152.93:54712] AH02042: rejecting client initiated renegotiation
[Mon Mar 13 13:57:14.410892 2017] [mpm_prefork:notice] [pid 29153] AH00169: caught SIGTERM, shutting down
[Mon Mar 13 13:57:16.465381 2017] [mpm_prefork:notice] [pid 29927] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Mar 13 13:57:16.465424 2017] [core:notice] [pid 29927] AH00094: Command line: '/usr/sbin/apache2'
[Mon Mar 13 14:00:03.312882 2017] [:error] [pid 29936] [client 81.169.228.159:33706] PHP Notice: Undefined index: text in /var/www/html/luukwuijster.io/slack/cronofy/huiswerk.php on line 9
I assume that you have a React\Socket\Server listening on port 8080 (aka php push-server.php). The tutorial on the ratchet website should get you up to this point.
I also assume that you have already configured and loaded the proxy and proxy_wstunnel apache modules as mentioned in the question.
Below is the config I personally use to achieve a WebSocket connection.
I use /ws/ instead of the /wss2/ mentioned in the tutorial for a better looking URL. Feel free to adjust the config as necessary.
Apache Config
#SSL (Secure)
<VirtualHost *:443>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
SSLCertificateFile /etc/httpd/ssl/.crt
SSLCertificateKeyFile /etc/httpd/ssl/.key
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
#NON-SSL (Insecure)
<VirtualHost *:80>
DocumentRoot /FILE_PATH_TO_WEBROOT
ServerName local.sitename.com
ServerAlias local.sitename.com
<Directory /FILE_PATH_TO_WEBROOT>
Options FollowSymLinks
AllowOverride all
php_flag display_errors On
Require all granted
</Directory>
ProxyRequests Off
ProxyPass "/ws/" "ws://local.sitename.com:8080/"
</VirtualHost>
Secure JavaScript Socket Connection
var conn = new WebSocket('wss://local.sitename.com/ws/');
Insecure JavaScript Socket Connection
var conn = new WebSocket('ws://local.sitename.com/ws/');

PHP new SoapClient causing Apache crash

I am trying to setup a SoapClient in my PHP but it keeps crashing Apache
Here is my PHP:
try{
$o_soap = #new \SoapClient(
"local/path/to/my/wsdl.xml",
array(
'exceptions' => true
)
);
var_dump($o_soap->__getFunctions());
}
catch(SoapFault $e){
die($e->faultstring);
}
Here is the Apache Log:
[Wed Mar 15 11:26:57.422962 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00428: Parent: child process 8780 exited with status 3221225477 -- Restarting.
[Wed Mar 15 11:26:58.030023 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00455: Apache/2.4.12 (Win32) configured -- resuming normal operations
[Wed Mar 15 11:26:58.030023 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00456: Apache Lounge VC11 Server built: Mar 20 2015 12:12:41
[Wed Mar 15 11:26:58.030023 2017] [core:notice] [pid 7516:tid 516] AH00094: Command line: 'httpd.exe -d C:/WEB/Apache24_32bit'
[Wed Mar 15 11:26:58.035024 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00418: Parent: Created child process 9432
[Wed Mar 15 11:27:00.031223 2017] [mpm_winnt:notice] [pid 9432:tid 532] AH00354: Child: Starting 150 worker threads.
[Wed Mar 15 11:27:02.336454 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00428: Parent: child process 9432 exited with status 3221225477 -- Restarting.
[Wed Mar 15 11:27:03.045678 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00455: Apache/2.4.12 (Win32) configured -- resuming normal operations
[Wed Mar 15 11:27:03.045678 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00456: Apache Lounge VC11 Server built: Mar 20 2015 12:12:41
[Wed Mar 15 11:27:03.045678 2017] [core:notice] [pid 7516:tid 516] AH00094: Command line: 'httpd.exe -d C:/WEB/Apache24_32bit'
[Wed Mar 15 11:27:03.061278 2017] [mpm_winnt:notice] [pid 7516:tid 516] AH00418: Parent: Created child process 9784
[Wed Mar 15 11:27:05.030913 2017] [mpm_winnt:notice] [pid 9784:tid 528] AH00354: Child: Starting 150 worker threads.
WSDL has been checked on https://www.wsdl-analyzer.com and returned no errors.
Update
Looks like it comes from the WSDL... I tried another (smaller) one and got the expected result...
Update 2
Solved using nusoap library

Wamp x64 won't work with php 5.6.16

I have installed WAMP 3, the x64 bits version that comes with both PHP 7 and PHP 5.6.16.
Thing is, it only works with version 7, but not with version 5.6.16.
If I'm on version 7 I can open localhost just fine, if I switch to version 5.6, it says "This site can’t be reached".
Apache error log:
[Fri Jul 08 18:59:42.721292 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00428: Parent: child process 8788 exited with status 255 -- Restarting.
[Fri Jul 08 18:59:42.859839 2016] [auth_digest:notice] [pid 8776:tid 652] AH01757: generating secret for digest authentication ...
[Fri Jul 08 18:59:42.936418 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00455: Apache/2.4.17 (Win64) PHP/5.6.16 configured -- resuming normal operations
[Fri Jul 08 18:59:42.936418 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00456: Apache Lounge VC14 Server built: Oct 11 2015 11:49:07
[Fri Jul 08 18:59:42.936418 2016] [core:notice] [pid 8776:tid 652] AH00094: Command line: 'C:\\wamp64\\bin\\apache\\apache2.4.17\\bin\\httpd.exe -d C:/wamp64/bin/apache/apache2.4.17'
[Fri Jul 08 18:59:43.007482 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00418: Parent: Created child process 5336
[Fri Jul 08 18:59:43.647394 2016] [auth_digest:notice] [pid 5336:tid 420] AH01757: generating secret for digest authentication ...
[Fri Jul 08 18:59:43.728167 2016] [mpm_winnt:notice] [pid 5336:tid 420] AH00354: Child: Starting 64 worker threads.
[Fri Jul 08 18:59:45.162617 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00428: Parent: child process 5336 exited with status 255 -- Restarting.
[Fri Jul 08 18:59:45.368338 2016] [auth_digest:notice] [pid 8776:tid 652] AH01757: generating secret for digest authentication ...
[Fri Jul 08 18:59:45.436406 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00455: Apache/2.4.17 (Win64) PHP/5.6.16 configured -- resuming normal operations
[Fri Jul 08 18:59:45.436406 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00456: Apache Lounge VC14 Server built: Oct 11 2015 11:49:07
[Fri Jul 08 18:59:45.436406 2016] [core:notice] [pid 8776:tid 652] AH00094: Command line: 'C:\\wamp64\\bin\\apache\\apache2.4.17\\bin\\httpd.exe -d C:/wamp64/bin/apache/apache2.4.17'
[Fri Jul 08 18:59:45.534501 2016] [mpm_winnt:notice] [pid 8776:tid 652] AH00418: Parent: Created child process 7404
[Fri Jul 08 18:59:46.217823 2016] [auth_digest:notice] [pid 7404:tid 156] AH01757: generating secret for digest authentication ...
[Fri Jul 08 18:59:46.276887 2016] [mpm_winnt:notice] [pid 7404:tid 156] AH00354: Child: Starting 64 worker threads.
What could be the reason?
First:
Check the apache logs, or run httpd.exe manually and see error response.

Categories