Welcome to Geeklog Tuesday, July 23 2019 @ 06:12 pm EDT

Geeklog Forums

Huge problem when using function "auto delete" or "auto archive" articles on WIndows/IIS!


Status: offline

zeb

Forum User
Newbie
Registered: 19/09/08
Posts: 6
grumpy
Hi!

When I try to set an article to be deleted or archived automatically I get a really nice error telling me that Windows does not support negative values..., and then the whole geeklog shows this message (well not the admin interface) so what I have to do then is to edit the database table for stories and delete that post and then GL is working agian. I also get the same problem when I´m using the function for articles not to be published directly, later on so to speak.

From the beginning I only got the "normal error" telling me: "Unfortunately, an error has occurred rendering this page. Please try again later" but after chaning to ROOT debug I could se the message here down under.

I use:
* Geeklog 1.5.1rc1
* Windows Server 2003
* MySQL server 5.0
* PHP 4.x
* IIS

ERROR MESSAGE:
---------------------------- Snipp ---------------------------------

An error has occurred:
(This text is only displayed to users in the group 'Root'
2 - mktime() [function.mktime]: Windows does not support negative values for this function @ c:\inetpub\wwwroot\lib-common.php line 6045

array(6) {
["date"]=>
string(10) "1222086772"
["time"]=>
NULL
["atoks"]=>
array(3) {
[0]=>
string(10) "1222086772"
[1]=>
int(0)
[2]=>
int(0)
}
["btoks"]=>
array(0) {
}
["atok"]=>
bool(false)
["i"]=>
int(3)
}
------------------------------------ Snapp -------------------------------

The paramaters in the file "configuration.php"
- Language: Swedish
- Locale: en_GB

Everything els is "Geeklog default" so to speak.

Any good idea´s?

Regards,
Zeb

Status: offline

Dirk

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

- Language: Swedish
- Locale: en_GB


Won't help with the actual problem, but you probably want to change the Locale to Swedish_Sweden.

I'm not on Windows so can't reproduce the problem, but I'll ask someone to look into it.

bye, Dirk

Status: offline

zeb

Forum User
Newbie
Registered: 19/09/08
Posts: 6
Hi Dirk,

That would be great, it´s really frustrating this. I´ve been using Mambo and Joomla earlier on and theese cms have always been working good, almost "right out the box" but with GL I´ve been experiencing a lot of problems. Frown

Thnx!

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1356
I just tried auto delete and auto archive of stories and didn't have any problems. Specs are similar to your except geeklog 1.5.1 and PHP 5
One of the Geeklog Core Developers.

Status: offline

THEMike

Forum User
Moderator
Registered: 25/07/03
Posts: 141
Location:Sheffield, UK
I can't recreate this either...

Can you give me the content of the gl_stories entry for a story that breaks your site and the exact version of php you are running?

Have you made changes to the date format variables at all?

Thanks,

Mike

Status: offline

THEMike

Forum User
Moderator
Registered: 25/07/03
Posts: 141
Location:Sheffield, UK
Ah I think I've found a fix.

Open system/classes/story.php find (at line 1455 to 1464 in function DisplayElements):

PHP Formatted Code

        case 'expire':
            if (empty($this->_expire)) {
                $return = time();
            } else {
                // Need to convert text date/time to a timestamp
                $return = explode(' ', $this->_expire);
                $return = COM_convertDate2Timestamp($return[0], $return[1]);
            }

            break;
 


Replace with:

PHP Formatted Code

        case 'expire':
            if (empty($this->_expire)) {
                $return = time();
            } else {
                $return = $this->_expire;
            }

            break;
 


It looks like there is a bug technically, but, it doesn't bother PHP5 installs, which happen to work correctly despite the fact that DisplayElements returns false for expiry date instead of the actual expiry date. But it crashes PHP4.

If you can confirm this works, I'll book the fix in.

Mike

Status: offline

zeb

Forum User
Newbie
Registered: 19/09/08
Posts: 6
Hello!

I did the changes in the story.php file (system/classes/story.php find (at line 1455 to 1464 in function DisplayElements) and it really did the work!

Thanks Mike, I would never ever fix that kind of problem on my own! And thanks everybody else for your help! :-)

Zeb

All times are EDT. The time is now 06:12 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