Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:02 pm EST

Geeklog Forums

errors with static pages


Status: offline

Dan Burton

Forum User
Newbie
Registered: 04/29/09
Posts: 7
Can anyone help me on how to sort this error..
I get this warning.
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/sharky/public_html/site2/site2aP5Grgz/system/lib-webservices.php on line 520

Info from line 520
$entry_element = $atom_doc->getElementsByTagName('entry'->item(0);

Dan


 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Which PHP version are you on? I actually thought this was fixed and should have happened on PHP 4 anyway ...

Disable the Webservices in the Configuration:

Configuration > Geeklog > Miscellaneous > Webservices

bye, Dirk
 Quote

DAN

Anonymous
Many thanks for that.
All sorted.

Dan
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Could you please answer my question about the PHP version (and Geeklog version, while you're at it) you're running on? Otherwise, I still don't know whether this is a bug in Geeklog or not ...

bye, Dirk
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello,

I get the same error message today on a fresh geeklog 1.5.2sr4 and php 4.4.9

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: cordiste

I get the same error message today on a fresh geeklog 1.5.2sr4 and php 4.4.9


Works for me Confused Well, tested with 1.6.0b3 on PHP 4.4.9 ...

Ben, could you please check that plugins/staticpages/services.inc.php has this piece of code:
Text Formatted Code
    if ((PHP_VERSION > 4) && (! $_CONF['disable_webservices'])) {
        require_once $_CONF['path_system'] . '/lib-webservices.php';
    }
in function service_submit_staticpages?

And if it does, could you add some debug code there to see if it really tries to load the lib-webservices.php on PHP 4? That's the only way I can see this error occuring - but it shouldn't happen!?

Thanks.

bye, Dirk
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Hello,

code is there as it is a fresh geeklog 1.5.2sr4 install and debug give me nothing but

Text Formatted Code
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/another/geeklog/system/lib-webservices.php on line 520


Can we solve the problem with

Text Formatted Code
 
    $entry_element = $atom_doc->getElementsByTagName('entry');
    $entry_element->item(0);
 

where

Text Formatted Code
    $entry_element = $atom_doc->getElementsByTagName('entry')->item(0);


::Ben




I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Maybe
Text Formatted Code
    $entry_element = $atom_doc->getElementsByTagName('entry');
    $entry_element = $entry_element->item(0);

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: cordiste

code is there as it is a fresh geeklog 1.5.2sr4 install and debug give me nothing but


Right, of course. So maybe comment out the require_once line?

I'm just wondering why the check for > PHP 4 appears to be failing.

Attempting to fix the syntax isn't really an option - the code in lib-webservices is written for PHP 5 and simply should not be loaded on PHP 4.

bye, Dirk
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
So maybe comment out the require_once line?


static page is save.

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Okay, how about:
Text Formatted Code
    if (version_compare(PHP_VERSION, '5.0.0', '>=') &&
            (! $_CONF['disable_webservices'])) {
        require_once $_CONF['path_system'] . '/lib-webservices.php';
    }

Does that work or does it still throw an error?

bye, Dirk
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
It is working :shakehands:

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Implemented in 1.6.0b3 now. Thanks for testing!

bye, Dirk
 Quote

All times are EST. The time is now 06:02 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content