[solved] Error in theme footer templates?
Post new topic   This topic is locked: you cannot edit posts or make replies.   Printer Friendly Page     Forum IndexThemes
Author Message
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: [solved] Error in theme footer templates?
Posted: Thu Dec 24, 2009 10:03 am
Reply with quote

There's a slight error in footer.html in the templates folder. From line 24 should read (to stop php and sql messages being displayed to non-admin)

PHP:

{S_FOOTER}
<!-- IF
S_IS_ADMIN -->
<!-- IF
S_DEBUG_SQL --><div class="table1">{S_DEBUG_SQL}</div><!-- ENDIF -->
<!-- IF
S_DEBUG_PHP --><div class="table1">{S_DEBUG_PHP}</div><!-- ENDIF -->
<!-- ENDIF -->
</
div>

(Thanks Diz!)


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: reDesign 2
Posted: Thu Dec 24, 2009 11:27 am
Reply with quote

Not true - in fact such a change would prevent the intentional display of debugging information.

Display is already controlled within footer.php.
PHP:
if (is_admin() || CPG_DEBUG)
where S_DEBUG_PHP and S_DEBUG_SQL are generated.

_________________
DonationsPro for DragonflyCMS, SMF, MyBB, vBulletin

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Dizfunkshunal
Platinum Supporter


Joined: Mar 23, 2006
Posts: 2079

PostPost subject: Re: reDesign 2
Posted: Thu Dec 24, 2009 3:46 pm
Reply with quote

debug only shows up for me on default theme when i am logged in as admin. On rosbif site with the theme he is using it shows to everyone.
_________________
Diz Web Design Status: Open (Use of resources requires registration.)

Dizfunkshunal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Multiple Setups
Back to top
View user's profile Send e-mail Visit poster's website Yahoo Messenger
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: reDesign 2
Posted: Thu Dec 24, 2009 11:41 pm
Reply with quote

The theme's not the problem - it's clear that he has set CPG_DEBUG.

Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: reDesign 2
Posted: Sat Dec 26, 2009 10:44 am
Reply with quote

Phoenix wrote:
The theme's not the problem - it's clear that he has set CPG_DEBUG.

I don't even know how to do that?! All I did was tick the boxes on the admin pages..


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: reDesign 2
Posted: Sat Dec 26, 2009 8:31 pm
Reply with quote

The php and mysql debug info can only appear if:

You have edited footer.php and removed the existing permission checks
or
You have set "Full debugging" to "Yes" in admin.php?op=settings&s=11 (perhaps inadvertently)
or
You have directly edited the CPG_DEBUG setting in config.php which achieves the same

Theme templates do not require extra permission checks - they already exist in footer.php.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
NanoCaiordo
Developer


Joined: Jun 29, 2004
Posts: 3677
Location: Melbourne, AU

PostPost subject: Re: Error in theme footer templates?
Posted: Sun Dec 27, 2009 3:00 am
Reply with quote

What Phoenix said.
_________________
.:: I met php the 03 December 2003 :: Unforgettable day! ::.

NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL 5.1 / PHP 5.3 / NextGen()
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: reDesign 2
Posted: Sun Dec 27, 2009 8:49 am
Reply with quote

Phoenix wrote:
The php and mysql debug info can only appear if:

You have edited footer.php and removed the existing permission checks
or
You have set "Full debugging" to "Yes" in admin.php?op=settings&s=11 (perhaps inadvertently)
or
You have directly edited the CPG_DEBUG setting in config.php which achieves the same

Theme templates do not require extra permission checks - they already exist in footer.php.

I've looked and full debugging was set to yes. I've no idea what that setting does so presume that is the problem?


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: Error in theme footer templates?
Posted: Sun Dec 27, 2009 11:44 am
Reply with quote

Have turned full debugging to no and I am now getting around 24 emails an hour like this:

Quote:
On /CPGNuCalendar/view=event/id=610/BD/op=directory/cid=88.html
While executing query "SELECT uoe_id, user_id, user_name, event_id, event_date FROM chantill_cpgnucalendar_user_on_event WHERE event_id =610 AND event_date ="

the following error occured: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

In: /home/chantill/public_html/modules/CPGNuCalendar/index.php on line: 859

Guest information:
User id: 1
Username: Anonymous
Admin: No
IP: 67.195.113.250
Host: b3091018.crawl.yahoo.net

They are all malformed URLs - how do I stop them now as I wasn't getting them before


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: Error in theme footer templates?
Posted: Sun Dec 27, 2009 12:46 pm
Reply with quote

Your CPG_DEBUG issue is resolved - you'll have to address the other issue elsewhere with whoever is responsible for that sql query.

I'm certainly not familiar with it - not part of any standard release that I know of.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: [solved] Error in theme footer templates?
Posted: Sun Dec 27, 2009 1:15 pm
Reply with quote

The sql query is a mishmash from CPGNuCalendar and BD (business directory) so it doesn't actually exist. I've turned full debugging back to yes and it's stopped them again. What exactly does it do?

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: [solved] Error in theme footer templates?
Posted: Sun Dec 27, 2009 1:29 pm
Reply with quote

The query clearly does exist or you wouldn't have the problem.

Please refer it to the author of whatever hack you have applied to CPGNuCalendar.

The theme issue is done.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: [solved] Error in theme footer templates?
Posted: Sun Dec 27, 2009 1:56 pm
Reply with quote

I am getting random SQL queries, all starting with CPGNuCalendar but then having bits added on from random other modules. It is always a bot that generates them

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: [solved] Error in theme footer templates?
Posted: Mon Dec 28, 2009 12:50 am
Reply with quote

Quote:
What exactly does it do?
When CPG_DEBUG is set, errors are displayed instead of emailed - that means you expose your site issues to everyone.

As I have already stated twice, you need to address the other issue to the author of whatever CPGNuCalendar hack you are using - this topic is done.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.   Printer Friendly Page     Forum IndexThemes All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 0.5281 seconds with 16 DB Queries in 0.0727 seconds
Memory Usage: 3.02 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy