Page 1 of 1

Major Banner Module Problem!

Posted: Sat Jul 01, 2006 10:49 pm
by Bob
All apologies to anyone whose read my problems concerning "banners_module", but I need some help

I uploaded the module, (the latest version 2.07?) onto my upgraded CMSMS. Once I did that, my entire site went to crap..
Anytime I went to anypart of my site (admin, user, whatever), all I would get is a warning  (please see my last post regarding Banners for the actual warning thing). At that point, there was no way to view "www.mysite.com", no admin, no index, no nothing!

This has happened before, and I deleted the module, and was able to carry on as usual, except that I hope to use a module such as "Banners".

This time, I can't even delete the directory or files (Modules/Banners) from my server using FTP or my Control Panel. I'm told I don't have permissions. Basically, I can't get rid of any folder or file relating to "Banners", plus a few new obscure folders that won't delete.

I'm using a Mac, FireFox as my browser, a Unix Server. As of now, I'm trying to delete the entire site (I have a back up of both files and the MySQL)

Please, any help would be greatly appreciated.

Re: Major Banner Module Problem!

Posted: Sun Jul 02, 2006 5:42 am
by Dr.CSS
are you able to see the site/folders with FTP?

Re: Major Banner Module Problem!

Posted: Sun Jul 02, 2006 3:49 pm
by Bob
yeah, I was able to see them in Fetch (FTP Client), but could not change permissions or delete them.
Currently I'm trying to wipe out the whole CMS MS so I can start from scratch. But "Banners" is still not letting me delete all files and folders within.

My service provider told me I had to write a PHP script (?) to get rid of them, which leaves me clueless.

Re: Major Banner Module Problem!

Posted: Sun Jul 02, 2006 11:38 pm
by Bob
This is what my Service Provider told me:

If you are running php scripts that create files and folders, they will not be owned by you, hence your user id cannot delete them.

Is this normal for the various modules to add onto CMS MS? I really want ot continue using CMS MS, but if the modules cause this much havoc, I don't know how I can use this CMS for my clients.

Again, any help is greatly appreciated

Re: Major Banner Module Problem!

Posted: Mon Jul 03, 2006 1:16 am
by Dr.CSS
i've created diff. sites inside diff folders, each having its own DB on my web site and i've never had any problem controlling any aspect of my sites.
your hosting service must be running some thing strange, i don't think it has anything to do with CMSMS or the modules behavior :..
i've set up this system on other peoples sites and had no problems :..
may i suggest a move to another provider :..
BTW who are you using?

www.multiintech.com/
www.multiintech.com/cmsite/
www.multiintech.com/ruth/
www.multiintech.com/debra/
www.multiintech.com/old/  my first site, static hand coded pages :..
www.mit-computers.com/ almost unmodified CMSMS install for checking default setups


all administered from the same FTP client (FileZilla) logged into multiintech.com...
my package is 5$ month, $29.94 billed every 6 months includes tax, with 50 gigs of space, 500 gigs monthly transfer, 10 FTP accounts, scripts supported include Perl, Python, PHP3,PHP4, PHP5, 25 100mb. MySQL Databases, Domain Access with or without "www", 1000 email accounts pop3 or imap with 2gigs space, 2000 email aliases, webmail, forwarding, auto responding, spam and virus protection, firewalled and daily backup, 24/7 phone or email support,,,
multiintech has the most used space in its DB but it's only 2.7mb. so far :..

Re: Major Banner Module Problem!

Posted: Mon Jul 03, 2006 2:14 am
by Bob
Thanks Mark,

Yeah, I've done the same, diff sites in diff folders with diff databases (MySQL) on my server. The Server is WebQuarry, which maybe not as good as yours, or has more of one thing than another (I thinnk I have unlimited monthly transfers, but only 5 subdomains)... Anyhooo, they treat me pretty good I think, and usually, if I want more space, they'll give it just ot keep the business. And they cover all a lot of the stuff you mentioned like Perl, MySQL, PHP on Unix Servers. I use Fetch for my FTP or if that doesn't work for some reason, I'll use their Control Panel, which is really user friendly (Please keep in mind, I'm a total newbie)

The point is, this (not being able to delete the files) has never happened before with "Banners" Mod. Actually, I never got it (Banners Mod) to work... it would give me that
"Fatal error: Cannot redeclare class banners in /home/username/domains/mysite.com/public_html/modules/Banners/Banners.module.php on line 30"
But I used to be able to delete the files and carry on, with the site working. This time, I can't even delete them (same server I've been using for 2 years or more.)

So this is what I'm hoping to do: Delete the "banner" files, reinstall my MySQL Database back up, reinstall CMSMS, AND, get this Banners Mod to work. I don't know if any of this is possible. I work for a monthly magazine, and I'd like to retool our website using CMSMS, cuz it is really easy to use and would work for constant updates and archiving. But I gotta test all the stuff out on my own before I go revamping our current site (don't ask... It's all "Framed" with a lot of JS which I learning to despise) The Banner Mod, as well as other Mods would really be major assets/nessesities to the website.

Thanks again (in advance) for your help!

Re: Major Banner Module Problem!

Posted: Tue Jul 04, 2006 2:55 pm
by calguy1000
When uploading files via XML, the XML file is processed by php, and therefore the files are owned by the httpd process owner.  By default, these files have a permission that is using the httpd process owner's umask, which is usually 022, meaning that all newly created directories will have a permission of 755 and newly created files will have a permission of 644.  This means that only the httpd process owner, who owns those files can write or delete them, though everybody else can read.

You may have this problem not only with modules, but with images or files that are uploaded with the image manager and file manager, with the uploads module, with themes, etc.  Essentially any file that is uploaded to the server could have this issue.

Some applications, etc change the uploaded files ( or any files contained within the uploaded files ) to 777, but I view this as a security problem, and a safety issue as it could potentially allow OTHER users on your hosted system (depending upon the environment) to edit, or delete the contents of your directories. 

I have a simple little php script that will recursively change the permissions on all files within the CMS subdirectory to 777 and will send it to you if you want.  This will allow you to delete files via ftp.

I am working on the permissions for modules in the 1.0 series of things, to try to make this problem a little less cumbersome.

Re: Major Banner Module Problem!

Posted: Tue Jul 04, 2006 3:47 pm
by Bob
Thanks Cal!
Makes sense, because in the past when I tried using Banners (unsuccessfully) before, I uploaded the unzipped files. This time, thinking it would work better, I uploaded the XML file instead, hence my problems based on what you've mentioned.

Yes, please send me the script, with instructions (I'm a bit clueless).

Aside from the permissions problem, how do I get Banners to work? This is what happened when I installed it.
"Fatal error: Cannot redeclare class banners in /home/username/domains/mysite.com/public_html/modules/Banners/Banners.module.php on line 30"
Is there a patch or script that'll fix this or Should I give up on trying to use this module when I reinstall my CMSMS? Reading the forums, I know other people were able to use it, albeit with some other probs.

Thanks again!

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 12:23 am
by calguy1000
The script is attached... it's simple to use, put this in the root directory of your installation, and access it like this:

http://www.mysite.com/openpermissions.php

It recursively changes ALL permissions to 777 so use with caution.


[attachment deleted by admin]

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 7:35 am
by Bob
Thanks Cal... script worked so far as I can see.

But now what? I'm gonna reinstall CMSMS (either my old data or new stuff) but can I use the Banner Module?
Any idea of what went wrong?

I hate windows too! ;) but I'm a Mac guy

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 2:43 pm
by calguy1000
I'm not sure what's happening with the Redeclare issue, it's almost like there's another class
somewhere called Banners that's getting loaded in.

Maybe in a user defined tag, or some other script your using.  Unfortunately php doesn't tell you where the
first instance is.

I just tested the banners module on my 0.13 site yesterday and had no difficulties with it (of course).  so I'd do a hunt through all of your php files in CMS for anything containing the word "Banners"

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 3:36 pm
by Ted
Could it be that there are 2 rows in the cms_modules table for Banners?  Like it tried to reinstall it?

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 4:04 pm
by calguy1000
Yep, that could do it.

Re: Major Banner Module Problem!

Posted: Wed Jul 05, 2006 10:41 pm
by Bob
"Could it be that there are 2 rows in the cms_modules table for Banners?  Like it tried to reinstall it?"

It's possibible, I didn't look at the table (I'm assuming your talking about MySQL or PHP Tables)

Regardless, anytime I would upload the Banners Mod using FTP (upoading the unzipped folders), and then installing it thru CMSMS, it would give me that error. Then I tried the XML thru Uploads and install, and it gave me the same error, but this time installing using the XML file didn't allow me to delete the folders it created.

Anyhow, I haven't put that much into my site yet, so reinstalling it, as much as a pain it will be to get to where I was, isn't the end of the world. But I just want to be able to use the mods available. I'm gonna give it another shot.

Thanks again for all your help... I'll probably be posting for more (not related to banners)... I'm so new at this stuff.

Re: Major Banner Module Problem!

Posted: Thu Jul 06, 2006 2:43 am
by calguy1000
what you should do is 
DELETE * FROM cms_modules where module_name = "Banners";

directly on the database, then try to install the module again.