PHP Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in server/php/EnvayaSMS.php on line 38

2,308 views
Skip to first unread message

Hyd

unread,
Jan 7, 2012, 3:37:27 PM1/7/12
to envayasms
Dear,
i have some troubles to forward sms to HTTP server, what i did wrong ?
sure i miss a step...

when i try your sample i have this error :
PHP Parse error: syntax error, unexpected T_STATIC, expecting
T_STRING or T_VARIABLE or '$' in sms/php/server/php/EnvayaSMS.php on
line 38

ligne 38 is :

if (!isset(static::$request))
{
$version = @$_POST['version'];

// If API version changes, could return
// different EnvayaSMS_Request instance
// to support multiple phone versions

static::$request = new EnvayaSMS_Request();
}
return static::$request;

the only change that i did it's in index.html (bc all so some errors
of link) and the config file
require_once "../config.php";
require_once "../../EnvayaSMS.php";

do you know how to make it work...

thanks for your great work and hope you can help.

Hyd

Jesse Young

unread,
Jan 7, 2012, 3:42:10 PM1/7/12
to enva...@googlegroups.com
I'm guessing that you're using a version of PHP before 5.3. I think
replacing "static::" with "self::" should work in previous versions of
PHP. Could you try that?

Hyd

unread,
Jan 7, 2012, 4:11:24 PM1/7/12
to envayasms
Yes you are right my hosting server is in 5.2.1 I don't know how to
update...
Yes I did the change it work but now I have this matter now : "Invalid
request signature"
I put the right phone number and the pass ...

Hyd

unread,
Jan 7, 2012, 8:32:42 PM1/7/12
to envayasms
I canceled the pass verification and now it works ... i will try to
set up in different way this verification

Jesse Young

unread,
Jan 7, 2012, 9:21:36 PM1/7/12
to enva...@googlegroups.com
It may take me some time before I'm able to test the server library
with PHP 5.2, but in the meantime you could just add a secret password
as a query parameter of the Server URL, and check the password on the
server.

fan

unread,
Jan 31, 2012, 9:43:15 AM1/31/12
to enva...@googlegroups.com
Hyd,
How did you cancel the pass verification.Am also getting Invalid request signature. Can envayaSMS work together with a frontend like playsms?

Thanks,


app95100

unread,
Jan 31, 2012, 5:41:52 PM1/31/12
to enva...@googlegroups.com

Hello,

Just cancel this part

 

$phone_number = $request->phone_number;

 

$password = @$PASSWORDS[$phone_number];

 

Or set up your password and phone number  (it s better) :

 

if (!isset($password) || !$request->is_validated($password))

{

    header("HTTP/1.1 403 Forbidden");

    error_log("Invalid request signature");

    echo "Invalid request signature";

    return;

}

I don’t know playsms, sorry.

 

hyd

fan

unread,
Feb 1, 2012, 4:42:36 AM2/1/12
to enva...@googlegroups.com
Hi Hyd,

Infact i had managed to do that. The new error now is invalid action.  (gelda.org) I don't mind getting working files if it possible. and any link with detailed documentation.

Thanks,

Fanon

app95100

unread,
Feb 1, 2012, 1:05:40 PM2/1/12
to enva...@googlegroups.com

What is your php code ?

 

You have invalid action with your pc or android phone ?

Bc I made a test and it s ok for me …

 

 

From: enva...@googlegroups.com [mailto:enva...@googlegroups.com] On Behalf Of fan
Sent: mercredi 1 février 2012 10:43
To: enva...@googlegroups.com
Subject: Re: PHP Parse error: syntax error, unexpected T_STATIC, expecting T_STRING or T_VARIABLE or '$' in server/php/EnvayaSMS.php on line 38

 

Hi Hyd,

fan

unread,
Feb 2, 2012, 9:33:36 AM2/2/12
to envayasms
Hi,

the error log is:
[02-Feb-2012 17:11:51] PHP Warning: opendir(__DIR__/outgoing_sms) [<a
href='function.opendir'>function.opendir</a>]: failed to open dir: No
such file or directory in /home/gelda/public_html/index.php on line 55
[02-Feb-2012 17:11:51] PHP Warning: readdir(): supplied argument is
not a valid Directory resource in /home/gelda/public_html/index.php on
line 56
[02-Feb-2012 17:11:51] PHP Warning: closedir(): supplied argument is
not a valid Directory resource in /home/gelda/public_html/index.php on
line 72


seems unable to reach the outgoing sms directory.

What do you use as your user interface for users to send and receive
messages from their browsers?

Whats the url of your installation i take a look if you dont mind?

Thanks,

Fanon.
Reply all
Reply to author
Forward
0 new messages