PARSE ERROR

Hi Guys,

 

           for some reason when I click on a profile, I'm getting the following error

 

"Parse error: syntax error, unexpected T_STRING in /home/public_html/social/templates/base/scripts/BxBaseProfileView.php on line 1"

 

anyone got any idea on what this is and how to fix it?...

 

I'm guessing this is the first part of the code:

 

***************************************************************************/bx_import('BxDolProfile');bx_import('BxDolProfileFields');bx_import('BxDolPageView');bx_import('BxDolPaginate');bx_import('BxDolSubscription');bx_import('BxDolCmtsProfile');bx_import('BxTemplVotingView');class BxBaseProfileView extends BxDolPageView { var $oProfileGen;  var $aConfSite; var $aConfDir; function BxBaseProfileView(&$oPr, &$aSite, &$aDir) {  $this->oProfileGen = &$oPr;  $this->aConfSite = $aSite;  $this->aConfDir  = $aDir;  parent::BxDolPageView('profile'); }  function genBlock( $iBlockID, $aBlock, $bStatic = true, $sDynamicType = 'tab' ) {        //--- Privacy for Profile page ---//     $oPrivacy = new BxDolPrivacy('sys_page_compose_privacy', 'id', 'user_id');        $iPrivacyId = (int)$GLOBALS['MySQL']->getOne("SELECT `id` FROM `sys_page_compose_privacy` WHERE `user_id`='" . $this->oProfileGen->_iProfileID . "' AND `block_id`='" . $iBlockID . "' LIMIT 1");        if($iPrivacyId != 0 && !$oPrivacy->check('view_block', $iPrivacyId, $this->iMemberID))

 

thanks in advance.

Quote · 2 Feb 2010

No php coders out there that know what this string error is?

 

Seems to be a misplaced/missing character somewhere in an array - but where is line 1? - it would help if they were numbered Frown

 

Can I just upload a new BxBaseProfileView.php file, or is there someting written to it during install/activity?

 

Any help greatly appreciated.

Quote · 3 Feb 2010

1.  You gave 4 hours and 33 minutes for this to get an answer, in the middle of the night (US Time) and when alot of the coders who are awake happen to be at their day jobs.  Please understand all of us who help out around here do it for free and can not always spend 24/7 on here waiting for a question.

 

2.  If you used a good FTP Program and Text Editing Program then you would be able to see the line numbers.  I highly recommend WinSCP with Notepad++ if you have the means to get them.  Most do, as they are free.

 

3.  Line 1 of templates/base/scripts/BxBaseProfileView.php reads as follows:

 

<?

in a good file.

 

Unfortunately your line one reads as:

 

***************************************************************************/bx_import('BxDolProfile');bx_import('BxDolProfileFields');bx_import('BxDolPageView');bx_import('BxDolPaginate');bx_import('BxDolSubscription');bx_import('BxDolCmtsProfile');bx_import('BxTemplVotingView');class BxBaseProfileView extends BxDolPageView { var $oProfileGen;  var $aConfSite; var $aConfDir; function BxBaseProfileView(&$oPr, &$aSite, &$aDir) {  $this->oProfileGen = &$oPr;  $this->aConfSite = $aSite;  $this->aConfDir  = $aDir;  parent::BxDolPageView('profile'); }  function genBlock( $iBlockID, $aBlock, $bStatic = true, $sDynamicType = 'tab' ) {        //--- Privacy for Profile page ---//     $oPrivacy = new BxDolPrivacy('sys_page_compose_privacy', 'id', 'user_id');        $iPrivacyId = (int)$GLOBALS['MySQL']->getOne("SELECT `id` FROM `sys_page_compose_privacy` WHERE `user_id`='" . $this->oProfileGen->_iProfileID . "' AND `block_id`='" . $iBlockID . "' LIMIT 1");        if($iPrivacyId != 0 && !$oPrivacy->check('view_block', $iPrivacyId, $this->iMemberID))

 

The reason for this is simple, you did not have your FTP Client set to Binary mode when you uploaded your files and they are now compressed. 

Your solution:

Can you guess?

 

Go ahead, take a couple of guesses. 

 

I'm happy to wait.

 

Take your time.

 

Would you like to poll the audience? 

 

How about call a friend.

 

Perhaps you'd like to call your brother, I hear he's quite knowledgeable.

 

I'll tell you if your right after you guess.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Go ahead.  Take a guess....

 

 

 

 

 

 

 

 

Is that your answer?

 

 

 

 

 

 

 

 

 

Your Final Answer?

 

 

 

 

 

 

 

Alright.  Your correct.  Upload a fresh copy of templates/base/scripts/BxBaseProfileViews.php only after you set your FTP Client to Binary only transfers.  This will help to protect you against this problem in the future.  I'm willing to bet you have lots of other files that will do this to as you go through your site.  Have fun and don't let the server bugs bite.

Quote · 3 Feb 2010

Dude, go to bed you have way too much time on your hands to be posting things like that.  lol

sup
Quote · 3 Feb 2010

Hi mydatery,

thanks for reply.

 

1. Apologies, on U.K time and the post had disappeared into the ether.

2. Haven't heard of the text prog but will give it a try - using FTP Pro, thought that automatically selected the upload mode?...obviously not.

3. The file actually does begin with <?php then the rest (Boonex bit) was commented out, so assumed the coding started (line 1) following the end /

 

Will upload a fresh copy and see what happens, many thanks.

Quote · 3 Feb 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.