Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 02:30 am EST
Geeklog Forums
Huge problem when using function "auto delete" or "auto archive" articles on WIndows/IIS!
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
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
17
13
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/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
12
13
Quote
Status: offline
zeb
Forum User
Newbie
Registered: 09/19/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.
Thnx!
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.
Thnx!
18
10
Quote
Status: offline
THEMike
Forum User
Moderator
Registered: 07/25/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
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
14
11
Quote
Status: offline
THEMike
Forum User
Moderator
Registered: 07/25/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):
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:
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
Open system/classes/story.php find (at line 1455 to 1464 in function DisplayElements):
Text 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:
Text 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
16
12
Quote
Status: offline
zeb
Forum User
Newbie
Registered: 09/19/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
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
16
14
Quote
All times are EST. The time is now 02:30 am.
- 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