Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-14-2009, 07:14 PM Forum Error
Junior Talker

Posts: 4
Trades: 0
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.
Donz is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-14-2009, 07:33 PM Re: Forum Error
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
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.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 03-14-2009, 07:44 PM Re: Forum Error
Junior Talker

Posts: 4
Trades: 0
^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'),
');
Donz is offline
Reply With Quote
View Public Profile
 
Old 03-14-2009, 08:13 PM Re: Forum Error
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
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'),
); 
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 03-14-2009, 08:30 PM Re: Forum Error
Junior Talker

Posts: 4
Trades: 0
^Thanks, but it didn't work. still gives the same error. Do you know anything else that might work?
Donz is offline
Reply With Quote
View Public Profile
 
Old 03-14-2009, 09:54 PM Re: Forum Error
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
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?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 03-14-2009, 10:21 PM Re: Forum Error
Junior Talker

Posts: 4
Trades: 0
It didn't work, so I just uninstalled it. Thanks though.
Donz is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Forum Error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40293 seconds with 12 queries