 |
|
|
03-14-2009, 07:14 PM
|
Forum Error
|
Posts: 4
|
Okay so I have this forum, and I am trying to install something on it, but when I tried to install it I got this error:
Quote:
|
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/apate0/public_html/forums/antispam/asacp.php on line 38
|
Here is line 38 of asacp.php:
Quote:
|
public static $profile_fields => array(
|
It looks right to me, but I don't know. Quick replies are greatly appreciated. 
|
|
|
|
03-14-2009, 07:33 PM
|
Re: Forum Error
|
Posts: 2,815
Name: Matt
Location: Irvine, CA
|
That error message often results from a missing semi colon.
Can you post more of the code surrounding that line?
The syntax looks wrong to me.
=> to me, implies that $profile_fields is a key in an array.
I think it should be
public static $profile_fields = array (
but without seeing more of the code I can't say for sure.
|
|
|
|
03-14-2009, 07:44 PM
|
Re: Forum Error
|
Posts: 4
|
^Thank you for you quick reply! Here is the code:
Quote:
public static $profile_fields => array('
'icq' => array('lang' => 'UCP_ICQ', 'db' => 'user_icq', 'field_type' => FIELD_STRING),
'aim' => array('lang' => 'UCP_AIM', 'db' => 'user_aim', 'field_type' => FIELD_STRING),
'msn' => array('lang' => 'UCP_MSNM', 'db' => 'user_msnm', 'field_type' => FIELD_STRING),
'yim' => array('lang' => 'UCP_YIM', 'db' => 'user_yim', 'field_type' => FIELD_STRING),
'jabber' => array('lang' => 'UCP_JABBER', 'db' => 'user_jabber', 'field_type' => FIELD_STRING),
'website' => array('lang' => 'WEBSITE', 'db' => 'user_website', 'field_type' => FIELD_STRING),
'location' => array('lang' => 'LOCATION', 'db' => 'user_from', 'field_type' => FIELD_STRING),
'occupation' => array('lang' => 'OCCUPATION', 'db' => 'user_occ', 'field_type' => FIELD_STRING),
'interests' => array('lang' => 'INTERESTS', 'db' => 'user_interests', 'field_type' => FIELD_STRING),
'signature' => array('lang' => 'SIGNATURE', 'db' => 'user_sig', 'field_type' => 'disabled'),
');
|
|
|
|
|
03-14-2009, 08:13 PM
|
Re: Forum Error
|
Posts: 2,815
Name: Matt
Location: Irvine, CA
|
Try:
PHP Code:
public static $profile_fields = array(
'icq' => array('lang' => 'UCP_ICQ', 'db' => 'user_icq', 'field_type' => FIELD_STRING),
'aim' => array('lang' => 'UCP_AIM', 'db' => 'user_aim', 'field_type' => FIELD_STRING),
'msn' => array('lang' => 'UCP_MSNM', 'db' => 'user_msnm', 'field_type' => FIELD_STRING),
'yim' => array('lang' => 'UCP_YIM', 'db' => 'user_yim', 'field_type' => FIELD_STRING),
'jabber' => array('lang' => 'UCP_JABBER', 'db' => 'user_jabber', 'field_type' => FIELD_STRING),
'website' => array('lang' => 'WEBSITE', 'db' => 'user_website', 'field_type' => FIELD_STRING),
'location' => array('lang' => 'LOCATION', 'db' => 'user_from', 'field_type' => FIELD_STRING),
'occupation' => array('lang' => 'OCCUPATION', 'db' => 'user_occ', 'field_type' => FIELD_STRING),
'interests' => array('lang' => 'INTERESTS', 'db' => 'user_interests', 'field_type' => FIELD_STRING),
'signature' => array('lang' => 'SIGNATURE', 'db' => 'user_sig', 'field_type' => 'disabled'),
);
|
|
|
|
03-14-2009, 08:30 PM
|
Re: Forum Error
|
Posts: 4
|
^Thanks, but it didn't work. still gives the same error. Do you know anything else that might work?
|
|
|
|
03-14-2009, 09:54 PM
|
Re: Forum Error
|
Posts: 2,815
Name: Matt
Location: Irvine, CA
|
I just noticed an extra comma at the end of the line, here is the fixed version:
PHP Code:
public static $profile_fields = array(
'icq' => array('lang' => 'UCP_ICQ', 'db' => 'user_icq', 'field_type' => FIELD_STRING),
'aim' => array('lang' => 'UCP_AIM', 'db' => 'user_aim', 'field_type' => FIELD_STRING),
'msn' => array('lang' => 'UCP_MSNM', 'db' => 'user_msnm', 'field_type' => FIELD_STRING),
'yim' => array('lang' => 'UCP_YIM', 'db' => 'user_yim', 'field_type' => FIELD_STRING),
'jabber' => array('lang' => 'UCP_JABBER', 'db' => 'user_jabber', 'field_type' => FIELD_STRING),
'website' => array('lang' => 'WEBSITE', 'db' => 'user_website', 'field_type' => FIELD_STRING),
'location' => array('lang' => 'LOCATION', 'db' => 'user_from', 'field_type' => FIELD_STRING),
'occupation' => array('lang' => 'OCCUPATION', 'db' => 'user_occ', 'field_type' => FIELD_STRING),
'interests' => array('lang' => 'INTERESTS', 'db' => 'user_interests', 'field_type' => FIELD_STRING),
'signature' => array('lang' => 'SIGNATURE', 'db' => 'user_sig', 'field_type' => 'disabled')
);
If that doesn't fix it, could you post the following:
What version of PHP are you using?
What is the line right before the one in question?
Is the constant FIELD_STRING set?
|
|
|
|
03-14-2009, 10:21 PM
|
Re: Forum Error
|
Posts: 4
|
It didn't work, so I just uninstalled it. Thanks though. 
|
|
|
|
|
« Reply to Forum Error
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|