[solved] Installing Playsms on ubuntu 16.04


(Yesmine Dis) #1

Hi,

I have followed all the steps of installation but I’m having a problem when starting playsms:
I get: " playsmsd has been started
schedule at pid
ratesmsd at pid
dlrssmsd at pid
recvsmsd at pid
sendsmsd at pid "
with empty pids

I have reviewed several times the steps but I couldn’t find the problem.
thank you for helping


(Anton Raharja) #2

May I ask which article have you followed ?

Anton


(Yesmine Dis) #3

this one : https://antonraharja.com/2016/07/22/playsms-1-4-on-ubuntu-16-04-with-php-7-0/


(Anton Raharja) #4

ok, please post the result of: playsmsd check

anton


(Yesmine Dis) #5

i get :
PLAYSMSD_CONF = /etc/playsmsd.conf
PLAYSMS_PATH = /var/www/html/playsms
PLAYSMS_LIB = /var/lib/playsms
PLAYSMS_BIN = /usr/local/bin
PLAYSMS_LOG = /var/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING =
PIDS schedule =
PIDS ratesmsd =
PIDS dlrssmsd =
PIDS recvsmsd =
PIDS sendsmsd =

with no pids


(Anton Raharja) #6

ok, looks like the daemon is not running, run this and see if you get an error:

playsmsd sendsmsd

its suppose to stay running (like hanging, with no messages) and not coming back to the shell

anton


(Yesmine Dis) #7

yes I get an error that says: DB Error: connect failed


(Anton Raharja) #8

ok, fix it in /var/www/html/playsms/config.php and then re-start playsmsd

anton


(Yesmine Dis) #9

It works now thank you :slight_smile:


(Digital Threshold) #10

Hi Anton:

I have gone through the installation of PlaySMS on Ubuntu 16.04. I followed your instructions directly and got the installation up and running (localhost/playsms). The client seems to run okay, however when you click on “Manage Gateway & SMSC” the screen shows up blank (http://localhost/playsms/index.php?app=main&inc=core_gateway&op=gateway_list). I have pasted the output from playsmsd check below. I have also posted the playsmsd.conf file below. Please help. Thanks.

PLAYSMSD_CONF = /etc/playsmsd.conf
PLAYSMS_PATH = /var/www/html/playsms
PLAYSMS_LIB = /var/lib/playsms
PLAYSMS_BIN = /usr/local/bin
PLAYSMS_LOG = /var/log/playsms
DAEMON_SLEEP = 1
ERROR_REPORTING = E_ALL ^ (E_NOTICE | E_WARNING)
IS_RUNNING = 1
PIDS schedule = 6512
PIDS ratesmsd = 6514
PIDS dlrssmsd = 6516
PIDS recvsmsd = 6518
PIDS sendsmsd = 6520

PLAYSMS_PATH="/var/www/html/playsms"
PLAYSMS_LIB="/var/lib/playsms"
PLAYSMS_BIN="/usr/local/bin"
PLAYSMS_LOG="/var/log/playsms"
#DAEMON_SLEEP="1"
#ERROR_REPORTING="0"

(Anton Raharja) #11

Try to check nginx error.log, run this before accessing the blank page, see the error if any:

tail -f /var/log/nginx/error.log

(Digital Threshold) #12

Thanks for the response, Anton. I did run the nginx check and I got the following:

tail: cannot open ‘/var/log/nginx/error.log’ for reading: No such file or directory
tail: no files remaining

By the way I used the line-by-line installation without a script shown here:
http://help.playsms.org/en/installation/installation_without_install_script.html

I am running Apache on Ubuntu 16.04 (Server version: Apache/2.4.18 (Ubuntu)), PHP 7.0.8, mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64),

I have been reading your post on https://antonraharja.com/2016/07/22/playsms-1-4-on-ubuntu-16-04-with-php-7-0/

I note that you had to edit the default config file for nginx. I have pasted my default apache config file below (/etc/apache2/sites-enabled/000-default.conf) without the commented out lines.

<VirtualHost *:80>
# - Comments here
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
# - Comments here
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
# - Comments here
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Hope this provides a better picture. Please advice. I am happy to edit files directly to get SMS Tools to work. I plan to use USB GSM modems (possibly in a dual modem configuration per machine). Any advice? Thanks in advance.


(Yesmine Dis) #13

Hi,

I’m having the same problem when trying to manage Gateway and SMSC.
Any help?

Thank you


(Anton Raharja) #14

So you’re using Apache2 instead of Nginx:

I am running Apache on Ubuntu 16.04 (Server version: Apache/2.4.18 (Ubuntu)), PHP 7.0.8, mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64),

ok, let see, try to also install these:

apt install php7.0-cli php7.0-mysql php7.0-gd php7.0-imap php7.0-curl php7.0-mbstring php7.0-mcrypt

restart apache2 and try again, restart correctly

anton


(Digital Threshold) #15

Hi Anton:

I did the install, several of them had already been installed with the initial install. In any event, I did the complete install and restarted the server. Still got a blank screen when I click on Gateway & SMSC. Shut down and started again, still the same thing.

Please let me know if you have any other thoughts on how to fix this. What is interesting is that all the other menu items and sub-menu items work. This is the only one that does not work. Thanks


(Anton Raharja) #16

since you’re using Apache, check apache error.log:

tail -f /var/log/apache2/error.log

anton do the test, open the menu, see if you catch something on error.log

anton


(Digital Threshold) #17

Hi Anton:

I checked the apache error log file and there is a consistent error that is generated whenever an attempt is made to use that menu item. The error message is shown below. Hope this helps. Thanks.

[Mon Aug 01 12:29:30.583272 2016] [:error] [pid 3165] [client ::1:34674] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in /var/www/html/playsms/lib/fn_core.php:823\nStack trace:\n#0 /var/www/html/playsms/plugin/core/gateway/fn.php(197): core_xml_to_array(’<?xml version="…’)\n#1 /var/www/html/playsms/plugin/core/gateway/gateway.php(210): _gateway_display()\n#2 /var/www/html/playsms/inc/app/main.php(33): include_once(’/var/www/html/p…’)\n#3 /var/www/html/playsms/index.php(34): include(’/var/www/html/p…’)\n#4 {main}\n thrown in /var/www/html/playsms/lib/fn_core.php on line 823, referer: http://localhost/playsms/index.php?app=main&inc=core_welcome

[Mon Aug 01 12:33:25.748427 2016] [:error] [pid 3167] [client ::1:34678] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in /var/www/html/playsms/lib/fn_core.php:823\nStack trace:\n#0 /var/www/html/playsms/plugin/core/gateway/fn.php(197): core_xml_to_array(’<?xml version="…’)\n#1 /var/www/html/playsms/plugin/core/gateway/gateway.php(210): _gateway_display()\n#2 /var/www/html/playsms/inc/app/main.php(33): include_once(’/var/www/html/p…’)\n#3 /var/www/html/playsms/index.php(34): include(’/var/www/html/p…’)\n#4 {main}\n thrown in /var/www/html/playsms/lib/fn_core.php on line 823, referer: http://localhost/playsms/index.php?app=main&inc=feature_sms_autoreply&op=sms_autoreply_list

[Mon Aug 01 13:06:00.454679 2016] [:error] [pid 3165] [client ::1:34982] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in /var/www/html/playsms/lib/fn_core.php:823\nStack trace:\n#0 /var/www/html/playsms/plugin/core/gateway/fn.php(197): core_xml_to_array(’<?xml version="…’)\n#1 /var/www/html/playsms/plugin/core/gateway/gateway.php(210): _gateway_display()\n#2 /var/www/html/playsms/inc/app/main.php(33): include_once(’/var/www/html/p…’)\n#3 /var/www/html/playsms/index.php(34): include(’/var/www/html/p…’)\n#4 {main}\n thrown in /var/www/html/playsms/lib/fn_core.php on line 823, referer: http://localhost/playsms/index.php?app=main&inc=core_user&route=user_config&op=user_config


(Anton Raharja) #18

ok, try to install this:

sudo apt install php7.0-xml

restart the apache2 again, re-test, watch the log too

anton


(Digital Threshold) #19

Anton:

That did the trick. It’s working. Thanks for the help. By the way do you have a good reference on configuring SMS gateways (especially SMS Tools)? A good tutorial will be helpful to get the team going with the configuration and management of the settings on the software and also settings for USB GSM modems. I note that the online manual was not completed. Any tips will be helpful. Thanks for the help!