| Author |
Message |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Fri May 16, 2008 10:15 am |
|
Hi All
I have a problem with NSN GR Downloads when using PHP5. I just get a blank page when clicking the Downloads link. When using PHP4 everything works fine.
I use RN 2.20.01 and NSN GR Downloads 1.0.3 pl1 modified to get shortlink working (Fix from Montego)
Web site (running PHP4 right now)
Can anyone point me in the right direction??
Please let me know if you need additional information.
Brg. Asger |
|
|
|
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 4578 Location: Slovakia - working my way around Eastern Europe
|
Posted:
Fri May 16, 2008 1:52 pm |
|
Which version of 5.x are you using?
I ask only because I'm using NSN GR Downloads and it works fine for me with every branch version I have tried up to 5.2.3 |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Sat May 17, 2008 11:13 am |
|
Asger, actually also need to know if you got the download from If you took it from sourceforge, that version will not work.
This is working just fine for me on PHP 5.2.x. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Sat May 17, 2008 5:30 pm |
|
Hi
My Web Host uses PHP 5.2.6.
As far as i remember i dowloaded NSN GR Downloads from nukescipts (It works fine with PHP4) |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Mon May 19, 2008 5:21 am |
|
Odd... ok, try this, within config.php, please set $display_errors to true and then post any error message back to us (but, please remove any absolute path information or user-specific details). We just need to know which script is failing and how its failing (i.e., error message text). |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Mon May 19, 2008 11:04 am |
|
Hi Montego
There are no error messages displayed when setting $display_errors to true.
The admin part of NSN GR Downloads works fine if thats any help also tried to change theme to make sure it was not theme related.
I have left my site with PHP 5.2.6 enabled, so you can see the behaviour for yourself.
Brg. Asger |
|
|
|
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 4578 Location: Slovakia - working my way around Eastern Europe
|
Posted:
Mon May 19, 2008 11:26 am |
|
I see you are using mod_rewrite to shorten the links - are you using the correct ones as they are different for NSN GR Downloads than the standard downloads module. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Mon May 19, 2008 11:36 am |
|
Yes, i took the ones from montegos site. Everything works fine with PHP4, so i guess shortlinks is not the problem. |
|
|
|
 |
Guardian2003 Site Admin

Joined: Aug 28, 2003 Posts: 4578 Location: Slovakia - working my way around Eastern Europe
|
Posted:
Mon May 19, 2008 12:22 pm |
|
Unfortunately I have not updated yet to 5.2.6 so I'm not able to try it myself  |
|
|
|
 |
kguske Site Admin

Joined: Jun 04, 2004 Posts: 4638
|
Posted:
Mon May 19, 2008 3:06 pm |
|
Sorry to jump in - have you tried it with short links disabled? I've heard of stuff written for PHP5 not working on PHP4, but not vice versa... |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Tue May 20, 2008 5:35 am |
|
Asger, yes, do please turn off ShortLinks and try again with PHP 5.2.6. I wonder if something has been changed, but, I too don't have a 5.2.6 site to test this out. I do want to rule out ShortLinks first before we go much further.
What is odd to me is that there is no <body> tag but your output has the closing body tag in it. I am not used to seeing that when a module fails over.  |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Tue May 20, 2008 9:14 am |
|
Hi Again
Seems like a shortlink issue. When i set $tnsl_bUseShortLinks = false it works fine with PHP 5.2.6.
Can any of you guys help me out with fixing the shortlinks?
I'm a noob at this and wouldn't know where to start
And thanks guys for your quick response, it's realy appriciated
Brg Asger |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Tue May 20, 2008 6:04 pm |
|
Asger, you are going to have to give me some time to get to this. I am quite busy at the moment and it seems to be just a PHP 5.2.6 issue. Unfortunately I cannot "take the hit" on my sites and upgrade to 5.2.6 atm, so I am going to have to figure out what has changed and what code within ShortLinks could be causing the issue.
Sure wish there was an error message to go on. With display errors on, can you check your Apache error logs to see if there is an error buried in there? |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Tue May 20, 2008 6:37 pm |
|
Thought of something else to try. Within the ShortLinks directory, rename or remove the file GT-Download.php and then re-enable ShortLinks. I want to see if it is ShortLinks code itself or something with the rewrite rules. I have checked the 5.2.6 change log and there are quite a bit of changes mentioned to PCRE and posix, so it has me concerned that it is 5.2.6 related. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Thu May 22, 2008 12:46 pm |
|
Hi Montego
If i rename GT-Downloads.php downloads works with PHP 5.2.6 |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Thu May 22, 2008 4:54 pm |
|
Ok, that narrows it down to a PCRE issue I think. Why don't you post for me your entire GT-Downloads.php file within code tags so that I can compare with mine. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Fri May 23, 2008 8:15 am |
|
Hi
Here is my entire GT-Downloads.php
| Code: |
<?php
/******************************************************************************
* Script: TegoNuke(tm) ShortLinks "Tap" for NSN GR Downloads v1.0.3pl1
* from http://www.nukescripts.net.
* Version: 1.0
* Author: Rob Herder (aka: montego) of http://montegoscripts.com
* Contact:
* Copyright: Copyright © 2006 by Montego Scripts
* License: GNU/GPL (see provided LICENSE.txt file)
******************************************************************************/
$urlin = array(
'"(?<!/)modules.php\?name=Downloads&op=modifydownloadrequest&lid=([0-9]*)"',
'"(?<!/)modules.php\?name=Downloads&op=NewDownloads&newdownloadshowdays=([0-9]*)"',
'"(?<!/)modules.php\?name=Downloads&op=NewDownloadsDate&selectdate=([a-zA-Z0-9+]*)"',
'"(?<!/)modules.php\?name=Downloads&op=getit&lid=([0-9]*)"',
'"(?<!/)modules.php\?name=Downloads&op=(MostPopular)&ratenum=([0-9]*)&ratetype=(num|percent)"',
'"(?<!/)modules.php\?name=Downloads&op=(NewDownloads|MostPopular)"',
'"(?<!/)modules.php\?name=Downloads&cid=([0-9]*)&orderby=([a-zA-Z0-9+]*)"',
'"(?<!/)modules.php\?name=Downloads&min=([0-9]*)&cid=([0-9]*))"', //Must make code chg to work!
'"(?<!/)modules.php\?name=Downloads&op=search&query=([/:\-\'{}()\,\._&a-zA-Z0-9+=]*)&min=([0-9]*)&orderby=([a-zA-Z0-9+]*)&show=([0-9]*)"', //Must make code chg to work!
'"(?<!/)modules.php\?name=Downloads&op=search&query=([/:\-\'{}()\,\._&a-zA-Z0-9+= ]*)&orderby=([a-zA-Z0-9+]*)"', //Must make code chg to work!
'"(?<!/)modules.php\?name=Downloads&op=search"', //Must make code chg to work!
'"(?<!/)modules.php\?name=Downloads&op=gfx&random_num=([0-9]*)"',
'"(?<!/)modules.php\?name=Downloads&cid=([0-9]*)"',
'"(?<!/)modules.php\?name=Downloads"'
);
$urlout = array(
'download-mod-\\1.html',
'download-shownew-\\1.html',
'download-seldate-\\1.html',
'download-file-\\1.html',
'download-\\1-\\2-\\3.html',
'downloads-\\1.html',
'download-sort-\\1-orderby-\\2.html',
'download-paging-\\1-\\2.html', //Must make code chg to work!
'download-search-\\1-\\2-\\3-\\4.html', //Must make code chg to work!
'download-search-\\1-\\2.html', //Must make code chg to work!
'download-search.html', //Must make code chg to work!
'download-gfx-\\1.html',
'downloads-cat\\1.html',
'downloads.html'
);
?>
|
|
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Sat May 24, 2008 6:53 am |
|
Asger, I see one difference that I'd like to try fixing. Open your GT-Downloads.php script.
=== FIND CODE ===
| Code: |
'"(?<!/)modules.php\?name=Downloads&min=([0-9]*)&cid=([0-9]*))"', //Must make code chg to work!
|
=== REPLACE WITH ===
| Code: |
'"(?<!/)modules.php\?name=Downloads&min=([0-9]*)&cid=([0-9]*)"', //Must make code chg to work!
|
=== DONE ===
If you look closely at that line, it has an extra right parenthesis on the end. I am hoping that this is what is causing the issue. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Sat May 24, 2008 11:37 am |
|
Hi Montego
That did the trick . Thank you, very much for your help
Brg. Asger |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7264 Location: Arizona
|
Posted:
Sat May 24, 2008 11:58 am |
|
Awesome! I have also updated my download... sorry about that. Guess PHP 5.2.5 and lower just ignored this error. Odd. Glad to have found it. |
|
|
|
 |
Asger New Member


Joined: Nov 02, 2006 Posts: 18 Location: Denmark
|
Posted:
Sat May 24, 2008 12:45 pm |
|
No problem , it works now. I realy appriciate your quick response and help fixing the problem |
|
|
|
 |
|
|
|
|