Parse error:

38 views
Skip to first unread message

Sajid P

unread,
Jun 29, 2013, 10:01:19 PM6/29/13
to easy...@googlegroups.com
Hi

installed EasyAPNS

however my error log is showing the following


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_VARIABLE or '$' in /home/rabeta/public_html/pn/src/php/classes/class_DbConnect.php on line137


Below is my code line 137 is 

$this->DB_USERNAME = $'hello';

* Constructor. Initializes a database connection and selects our database.
* @param string $host The host to wchich to connect.
* @param string $username The name of the user used to login to the database.
* @param string $password The password of the user to login to the database.
* @param string $database The name of the database to which to connect.
*/
function __construct($username, $password, $database, $host)
{
$this->DB_USERNAME = $'hello';
$this->DB_PASSWORD = $'hello';
$this->DB_DATABASE = $'apns';
$this->DB_HOST     = $'localhost';
}



Does anyone know wat the issue is?

when the app runs fine but does not store anything in the DB

I follwed that video how the chap did it on the website

Monkey Problems

unread,
Jun 29, 2013, 10:21:26 PM6/29/13
to easy...@googlegroups.com
*/
function __construct($username, $password, $database, $host)
{
$this->DB_USERNAME = $'hello';
$this->DB_PASSWORD = $'hello';
$this->DB_DATABASE = $'apns';
$this->DB_HOST     = $'localhost';
}
should be
*/
function __construct($username, $password, $database, $host)
{
$this->DB_USERNAME = $username;
$this->DB_PASSWORD =  $password';
$this->DB_DATABASE = $database';
$this->DB_HOST     = $host;
}
then when you instantiate $apns = new APNS('yourusername', 'yourpassword','apns', 'localhost');

I would suggest learning PHP before trying to use it http://www.homeandlearn.co.uk/php/php2p1.html
Reply all
Reply to author
Forward
0 new messages