lunes, 28 de mayo de 2012

problemas con tildes

Para solucionar este problema tienes varias soluciones.




Una es cambiar las vocales con tilde por su respectivo en HTML.



á --> á


é --> é


í --> í


ó --> ó


ú --> ú


ñ --> ñ

jueves, 24 de mayo de 2012

playsms+smstools+huawei E1556+Ubuntu

Primero
#sudo bash

#apt-get update
#apt-get upgrade
#apt-get install apache2 mysql-server make gcc sendmail lynx wget curl
#apt-get install php5 php5-cli php5-cgi php-pear php-db phpmyadmin


#apt-get install usb-modeswitch usb-modeswitch-data

#reboot

ahora la data caard deberia verse.
#ls /dev/ttyUSB*

#apt-get install smstools

#pico /etc/smsd.conf
 poner esto:
#-------------------------------------------------------------------------------------------------------------------
#
# /etc/smsd.conf
#
# Description: Main configuration file for the smsd
#

devices = GSM1
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
stats = /var/log/smstools/smsd_stats
loglevel = 5
#delaytime = 10
#errorsleeptime = 10
#blocktime = 3600
stats = /var/log/smsd_stats
#stats_interval = 3600
#stats_no_zeroes = no
#checkhandler = /usr/local/bin/smscheck
receive_before_send = no
# autosplit 0=no 1=yes 2=with text numbers 3=concatenated
autosplit = 3
# store_received_pdu 0=no, 1=unsupported, 2=unsupported and 8bit, 3=all
#store_received_pdu = 1
#validity = 255
#decode_unicode_text = no
#internal_combine = no
# You can specify here an external program that is started whenever an alarm occurs.
# alarmhandler = /path/to/an/alarmhandler/script
# Specifies what levels start an alarmhandler. You can use value between 2 and 5.
# alarmlevel = 4
# eventhandler = @EVENTHANDLER@
#blacklist = /etc/smstools/blacklist
#whitelist = /etc/smstools/whitelist

#[queues]
# Commented lines are examples for germany
# D1 = /var/spool/sms/D1
# D2 = /var/spool/sms/D2
# O2 = /var/spool/sms/O2
# EPLUS = /var/spool/sms/EPLUS
# QUAM = /var/sppol/sms/QUAM
# MOBILCOM = /var/spool/sms/MOBILCOM
#OTHER = /var/spool/sms/OTHER

#[provider]
# Commented lines are examples for germany
# D1 = 49160, 49170, 49171, 49175, 49151
# D2 = 491520, 49162, 49172, 49173, 49174
# O2 = 49176, 49179, 49159
# EPLUS = 49163, 49177, 49178, 49157
# QUAM = 49150
# MOBILCOM = 49156
#OTHER = 0,1,2,3,4,5,6,7,8,9

[GSM1]
init=AT^CURC=0
init2=AT+CPMS="ME" ,"ME" ,"ME"
#init = ATE0+CPMS="SM"+CNMI=2,0,0,2,1
# # Windows: /dev/com1, Solaris: /dev/cua/a, Linux /dev/ttyS0
device = /dev/ttyUSB1
incoming = yes
#queues = OTHER
# You don't need a PIN for mobile phones
# pin = 1111
mode = new
# smsc = 491722270000
baudrate = 19200
# rtscts = yes
cs_convert = yes
# report = no
memory_start = 0
# primary_memory = memory name
# secondary_memory = memory name
# secondary_memory_max = number
# pdu_from_file = /var/spool/sms/GSM1-PDU
# sending_disabled = no
# decode_unicode_text = no
# internal_combine = no
#
#[GSM2]
#init = ATE0
# Windows: /dev/com2, Solaris: /dev/cua/b, Linux /dev/ttyS1
#device = /dev/ttyS1
#incoming = yes
#queues = OTHER
#You don't need a PIN for mobile phones
#pin = 2222
#mode = new
#smsc = 491710760000
#baudrate = 19200
#rtscts = yes
#cs_convert = yes
#report = no
#memory_start = 1
#primary_memory = memory name
#secondary_memory = memory name
#secondary_memory_max = number
#pdu_from_file = /var/spool/sms/GSM2-PDU
#sending_disabled = no
#decode_unicode_text = no
#internal_combine = no
#[GSM1]
#init =
#device = /dev/ttyS0
#incoming = yes
#pin =
#baudrate = 19200

#----------------------------------------------------------------------------------------



#chmod -R 777 /var/spool/sms
#chown -R www-data /var/spool/sms

DESPUES INSTALAMOS PLAYSMS

playSMS Web Interface:
1.  It is important to meet all minimum requiments above
2.  Setup a system user named 'playsms' to manage playSMS
    # adduser playsms
    # passwd playsms
    Note: on some Linux distributions adduser and passwd are combined (eg: Debian and Ubuntu)
3.  On most Linux distributions actions (2) will create system user and group named 'playsms'
    with home directory /home/playsms (this directory does not mean anything to playSMS)
4.  Create playSMS web root, spool and log and set ownership to user www-data or web server user
    # mkdir -p /var/www/playsms
    # mkdir -p /var/spool/playsms
    # mkdir -p /var/log/playsms
    # chown -R www-data /var/www/playsms
    # chown -R www-data /var/spool/playsms
    # chown -R www-data /var/log/playsms
5.  Extract playSMS package somewhere (Usually in /usr/local/src)
    # tar -zxvf playsms-x.x.x.tar.gz -C /usr/local/src
    Note: x.x.x may vary according to the package name you've download
6.  Copy files and directories inside 'web' directory to playSMS web root and set ownership again to
    user www-data or apache web server user
    # cd /usr/local/src/playsms-x.x.x/web
    # cp -rR * /var/www/playsms
    # chown -R www-data /var/www/playsms
    Note: assumed your web server user is www-data
7.  Setup database (import database)
    # mysqladmin -u root -p create playsms
    # mysql -u root -p playsms < /usr/local/src/playsms-x.x.x/db/playsms.sql
    Note: you don't need to use MySQL root access nor this method to setup playSMS
    database, but this is beyond our scope, you should read MySQL manual's for custom
    installation method or howto insert SQL statements into existing database
8.  Copy config-dist.php to config.php and edit config.php
    # cd /var/www/playsms
    # cp config-dist.php config.php
    # mcedit config.php
    or
    # vi config.php
    Note: please read and fill all required fields with coutious
9.  Enter bin directory, copy playsms, playsmsd, playsmsd.php, playsmsd_start to directory default
    # cd /usr/local/src/playsms-x.x.x/bin
    # cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
    # cp playsms /etc/default/
    Note: please note the difference between playsms and playsmsd, one is a config file the other
    is a script
10. Just to make sure every paths are correct, please edit /etc/default/playsms
    # vi /etc/default/playsms
    Make sure that PLAYSMS_PATH is pointing to a correct playSMS installation path, and also make
    sure that PLAYSMS_BIN is pointing to a correct playSMS scripts (playsmsd_start, playsmsd) path.
11. Look for rc.local on /etc and its subdirectories (usualy /etc, /etc/init.d or /etc/rc.d/init.d)
    Edit rc.local and put:
    "/usr/local/bin/playsmsd_start" (without quotes)
    on the bottom of the file (before exit if theres an exit command). This way playsmsd_start
    will start automatically on boot.
    Note: you need 'root' access to do this
12. Run playsmsd_start manually
    # /usr/local/bin/playsmsd_start
    Note:
    - after that please do a ps -ax and see if ./playsmsd is running
    - stop here and review your installation steps when playsmsd isn't running
13. Browse http://localhost/playsms/ and login using default administrator user
    username: admin
    password: admin
14. At this point you should be able to login to playSMS web interface and manage playSMS