We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Relative Date Plugin: pi.relative_date.php, incompatible with PHP 5.2.9?

Development and Programming

creativearc's avatar
creativearc
49 posts
16 years ago
creativearc's avatar creativearc

We had to update our live server to PHP 5.2.9 to match our test server.

[root@myhost plugins]# php -v
PHP 5.2.9 (cli) (built: Mar 17 2009 12:04:37) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

After the upgrade, I noticed I can’t browse to Admin > Utilities > Plugin Manager; I simply get a blank screen.

I don’t get any errors directly to my httpd log (apache), but I did notice running php -e directly on the plugin throws an error:

[root@myhost plugins]# ls -l
total 92
-rw-r--r-- 1 equimed psacln 21693 May 13 07:48 pi.entries_number.php
-rw-r--r-- 1 equimed psacln 20934 May 13 07:48 pi.linklocker_stats.php
-rw-r--r-- 1 equimed psacln  3159 May 13 07:48 pi.reeposition.php
-rw-r--r-- 1 equimed psacln  1821 Jul 13 17:26 pi.relative_date.php
-rw-r--r-- 1 equimed psacln 36557 May 13 07:48 pi.textile.php
[root@ myhost plugins]# php -e pi.reeposition.php 
[root@ myhost plugins]# php -e pi.textile.php 
[root@ myhost plugins]# php -e pi.relative_date.php 
PHP Parse error:  syntax error, unexpected '}' in /var/www/vhosts/myhost.com/httpdocs/admin/plugins/pi.relative_date.php on line 81

Can someone else with 5.2.9 confirm if php displays any errors on pi.relative_date.php?

For reference, my staging server has no problem with it:

-bash-3.2$ php -e pi.relative_date.php 
-bash-3.2$ php -v
PHP 5.2.6 (cli) (built: May  2 2008 16:06:40) 
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd
       
Greg Aker's avatar
Greg Aker
6,022 posts
16 years ago
Greg Aker's avatar Greg Aker

I’m sorry, but I’m not finding where to download that plugin. By the looks of it you have a missing semi-colon on line 80, or an overall extra } on line 81.

-greg

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

Man- that plugin is familiar. But I can’t spot it either. What I’d do first- just remove the pi file from the plugins. If the plugin page then loads- you know that’s the issue (which I strongly suspect it is). In which case- Greg is dead on. Or possibly contact the author/forum thread for help with it.

And if you can link to the plugin, we could try a little replication.

For now- since this appears to be an issue with a third party plugin, I’m going to shift the thread to the third party dev. forum.

       
bmulloy's avatar
bmulloy
4 posts
16 years ago
bmulloy's avatar bmulloy

i see this too with the relative_date plugin. I got past the syntax error by changing line 1 from:

<?

to

<?php

but i still get a blank plugins page.

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

Do either of you have a link to the plugin itself? (And I may shift this to the plugins forum if it’s third party- which I think it is. But I’d like to take a look.)

       
bmulloy's avatar
bmulloy
4 posts
16 years ago
bmulloy's avatar bmulloy

weird. i can’t find the link to the original plug-in.

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
16 years ago
Robin Sowell's avatar Robin Sowell

Heh- well, I feel slightly less bad about not being able to find it either!

Hrm- was that one perhaps replaced by the addition of {relative_date} to the weblog tag as a single variable?

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

pi.relative_date.php was a plugin made by Lumis (of Image Sizer fame) a while back now.

I can’t find a link on his site for download although I did download the file some time back now so remember that is where it is from.

Perhaps Lumis will come in to this thread and let you know where it can be found now though.

Best wishes,

Mark

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.