TinyPortal

Development => Support => Installation => Topic started by: jarrodavisoftware on February 20, 2009, 10:50:51 PM

Title: Error trying to use download manager
Post by: jarrodavisoftware on February 20, 2009, 10:50:51 PM
When I try to use the download manager in any way, I get this error. This is a new install.

Link to my site: http://pyrogine.jarrodavisoftware.com
SMF version: 1.1.8
TP version: 1.0 beta3
Theme name and version: default
Mods installed: TP | media gallery
Related Error messages: Fatal error: Cannot redeclare tpdownload() (previously declared in /home/jarrodav/public_html/pyrogine/Sources/TPmodules.php:2055) in /home/jarrodav/public_html/pyrogine/Sources/TPdlmanager.php on line 1517
Title: Re: Error trying to use download manager
Post by: G6Cad on February 20, 2009, 10:53:14 PM
This error probably generates because of a bad update from an earlier version of TP ? = duplocate code in some or more files.

Check the manual install instructions and follow the steps and make sure the code and files are there and are correct.

How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 20, 2009, 11:04:05 PM
Hi, thanks for the reply. Ok, I will check over everything. Thanks again.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 20, 2009, 11:22:10 PM
hmm...

1. cleaned the install folder
2. cleaned the database
3. manually installed smf 1.1.8
4. install tp beta 3
5. click on download, and I get the same error
6. out of frustration, uninstalled beta3 (via pkg mgr) and I installed beta 2 and it
works as expected.

Note: the beta3 install was not an upgrade. I created the subdomain, installed smf + beta 3 fresh all today.
Title: Re: Error trying to use download manager
Post by: Renegd98 on February 20, 2009, 11:31:02 PM
Did you manually install TP Beta 3 or just manually install SMF? You should of manually installed TP Beta 3.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 20, 2009, 11:57:06 PM
Yes, I tried the manual install.

Looking at the sources, function tpdownload($memID) is define in TPmodules.php and there is function TPdownload() defined in TPdlmanager.php. This is not the case in beta 2. I'm just getting my feet wet with PHP, is it  a case sensitive language, if so then this should not be a problem I guess, but if it is then... I don't know is why I'm asking.

i renamed tpdownload($memID) to tpdownload1($memID) and all the calls in the file it was located in. Now, when I click on download it works as expected. What I'm not sure about yet is if tpdownload in TPmodules.php is being called any other place.

Title: Re: Error trying to use download manager
Post by: Renegd98 on February 21, 2009, 12:04:22 AM
This is the first I have heard of this problem as TP Beta 3 works fine for me on many sites.  I am thinking you may have some left over files from a different TP install.
Title: Re: Error trying to use download manager
Post by: Xarcell on February 21, 2009, 12:05:21 AM
Normally a redeclare is a duplication of code in the package manager installation or something done manually.

Can you be a little more specific with what your doing to cause the error? I visited the link and didn't have any problems browsing the downloads.


Title: Re: Error trying to use download manager
Post by: Xarcell on February 21, 2009, 12:06:28 AM
As Renegd98 says, that could be the case too.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 01:43:35 AM
Hi guys, thanks for the reply and info. Well, this is the thing:

1. jarrodavisoftware.com and the subdomain pyrogine, got created today on a brand new dedicated server, so there has never been any thing left over from a previous install.

2. I created this domain in whm, created the subdomain in cpanel, so at this point, fresh site install with empty directory listing. I created the database from cpanel

3. I uploaded and extracted sfm 1.1.8 via the file manager in cpanel and ran the installer and it installed.

4. I then went to the package manager, installed tpb3 by selecting it from my local HD and it installed without any visible issues.

5. So now I have a default smf+tp installation. Note, I've not changed any settings at the moment.

6. I go to frontpage, click on [download] in the sitemape section and bam, I get that redeclaration error.

7. It (seems to be) working now (I can use all the functionality) because I renamed one of the tpdownload functions and that seem to solve the problem for me. I'm a software developer so I naturally jumped in and started looking at the code is why I was asking if php is a case sensitive language. I have this  >.< much experience with php (only coded a few basic plugins for Joomla) so I really do not know a great deal about it. I know I almost went nuts with the same type of error when coding that joomla plugin so I've seen it before.

The fact that Renegd98 has tpb3 running then means something is going on with my server. Maybe the php.ini settings needs to be tweaked. I can only set file permission to 755 because of the security mod (I forget the name, suec something), but I didn't notice any visible permission related issues. So at this point I'm clueless and so far there seems to be no other people that has reported this problem.

Some facts:
1. new server, new domain, it never had smf and tp on it.
2. smf 1.1.8 installs and run ok
3. tpb2 installs and run ok
4. tpb3 does not
5. tpb2 dos not seem to have those two functions with the same name
6. for tpb3 I renamed one of them and now it seems to work ok for me.
Title: Re: Error trying to use download manager
Post by: Renegd98 on February 21, 2009, 01:56:47 AM
OK, something weird is going on.  I just checked the 2 files you mentioned and I find a

functionTPdownloadme()   in TPdlmanager

and

function tpdownload($memID) in TPmodule

So I do not find two (2) functions with the same name...
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 02:11:03 AM
I attached a zip of the two files... maybe I have a older bugged version or something. I got it from smf site. Maybe I should have gotten it here instead.

TPdlmanger.php - 2/5/09 8:31PM

TPmodules.php - 2/15/09 8:28PM
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 02:47:36 AM
I just downloaded beta 3 from this site and sure enough, the time stamp is different. I guess the error was found and fixed and I just so happened to grab it before it got updated. Doh!

In the version I just got from this site, TPdlmaner.php -  2/18/09 12:00pm

Ah well, at least I'm not crazy, hehe. I want to thank everyone for their help and info.
Title: Re: Error trying to use download manager
Post by: Renegd98 on February 21, 2009, 03:07:16 AM
Glad we got it all solved.... Thanks for working with us and providing good information.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 04:03:13 AM
Your welcome.

I have one more small issue: If I add a new block (php block for example) and click the activate button, it will turn green, but the block does not show up. If I refresh the blocks page, it will be red. Sigh. Not sure what's going on here.  The only block displayed are the default ones activated after installation. I am also unable to turn off these already activated blocks. Please advise.

Note: I have since installed the latest build of TP 1.0 beta 3 directly from this site (DL manager works as expected).
Title: Re: Error trying to use download manager
Post by: Renegd98 on February 21, 2009, 04:11:01 AM
Are you using the default theme?
Have you tried a different browser?
Other have had this issue and cleared their cache and fixed it.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 05:05:18 AM
1. using default theme
2. tried FF3 and IE7
3. I cleared the browser cache, rebooted computer
Title: Re: Error trying to use download manager
Post by: G6Cad on February 21, 2009, 10:51:01 AM
After it turned green, did you klick the save button at the bottom of the blocks listing page ?
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 01:19:26 PM
yes, then the page refreshed and it was red again.
Title: Re: Error trying to use download manager
Post by: G6Cad on February 21, 2009, 01:22:16 PM
Then all i can suggest is for you to check your install again.

How do I manually install TinyPortal (http://docs.tinyportal.co.uk/index.php?topic=29)

Modification Instructions (http://docs.tinyportal.co.uk/index.php?topic=140)
Title: Re: Error trying to use download manager
Post by: IchBin on February 21, 2009, 03:58:08 PM
Can we see a link to a phpinfo page? Put this in a file called phpinfo.php.

<?php
phpinfo
();
?>
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 04:09:40 PM
<removed>

I removed the phpinfo link. I'm getting spammed already.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 04:35:06 PM
Is there a specific server side setting that need to be tweaked for this to work? I just got an email from my data center asking about this of which they will then try an fix.
Title: Re: Error trying to use download manager
Post by: IchBin on February 21, 2009, 04:36:52 PM
I can't remember if magic_quotes_sybase affects this or not. I don't think it does, but you can try enabling it to see if it works for you. If not, I would turn it back off. If that doesn't work, can you send me a temp admin account so I can look at it?
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 21, 2009, 10:25:44 PM
IchBin check your PM. Thanks.

I've checked and tried everything I know but nothing seems to make a difference. My site has been down for almost 5 days now. Since people are using beta 3 it would seem there something I need to do at the server, but what? I can not even make any changes. Is there any other way to activate blocks? Why not have a simple check box or something. I even tried installing the prev version and that does not work either. I know it worked on my old server so something is different, but what I wonder.
Title: Re: Error trying to use download manager
Post by: IchBin on February 21, 2009, 10:47:51 PM
Well I can't see any reason why its not working. Can you setup a test install of SMF, install ONLY the TP mod, and then see if it works? If it does, I would have to say that one of the other mods is causing a problem.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 22, 2009, 02:00:38 PM
I just tried to do this and I get the same problem. I don't understand what is going on. I read from a google search that PEAR + XML needs to be installed for ajax to work. I ask the datacenter to make sure they are. I then tried it again plus setup a temp install after I got their reply message and still does not work. I get the same issues with beta2 as well. So at this point I just don't know. It's interesting that I'm the only one it seems with this issues so this would indicate that something still not right with the server.
Title: Re: Error trying to use download manager
Post by: IchBin on February 22, 2009, 07:08:22 PM
I'm not sure what is wrong. If you'd like, I can take a closer look and try to debug what is happening? I'll need FTP access as well as the temp admin account.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 22, 2009, 07:31:38 PM
IchBin check your PM. Thanks.
Title: Re: Error trying to use download manager
Post by: jarrodavisoftware on February 23, 2009, 03:17:46 AM
Thanks to IchBin for finding this out, it looks like there was a security issue preventing ajax from property working. This has now been sorted out (in the end I had to change hosts to get it resolved). I want to give props to IchBin and all the other people that helped in this thread. Great community and happy to be a part of it.
Title: Re: Error trying to use download manager
Post by: G6Cad on February 23, 2009, 09:31:19 AM
Ichbin, was this the same i had with my host and Ajax ? if so, what settings was it that needed to be changed for it to work ?
Title: Re: Error trying to use download manager
Post by: IchBin on February 23, 2009, 04:02:50 PM
The apache module mod_security was keeping it from working. Although, I'm not sure if it was fixed by just disabling it, because he needed to move. But I'm pretty sure that was the fix.