Notice
  • The administrator has disabled public write access.
  • Only logged-in/registered users are allowed to contribute to the forum.

Open Source Services

Development Services and Products for Open Source e-Commerce Sites

 
Notice
  • The administrator has disabled public write access.
  • Only logged-in/registered users are allowed to contribute to the forum.
Welcome, Guest
Please Login or Register.    Lost Password?
Please log in to post a question or comment about this add-on.
Go to bottomPage: 123
TOPIC: error message
#33
error message 4 Years, 6 Months ago  
Hi,

Thanks for this great mod!!

I installed everything correctly and when I go to the adsense panel I get this error message:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/globaldr/public_html/drumfactorydirect/admin/adsense_cc.php on line 273

Have you run into this before? What do I need to do to correct it?

Thanks!!

Matt
lankeeyankee
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#34
Re:error message 4 Years, 6 Months ago  
Hi Matt

thanks for your enquiry. I've been trying to replicate your problem on my machine, but can't get the error message to come up. If you could give me any further information, it would help to get to the bottom of this:

1) Is the problem still occurring?
2) Can you create/save any ad/link units?
3) What action are you performing when the error happens (is it only when you arrive in the Adsense Control Center panel for the first time in the session)?
4) Can you see any of the ad/link units you created in your front-end (store)?
5) if possible, could you send me the full URL in your address bar when the problem occurs e.g. //www.your_domain/admin/adsense_cc.php?action=cancel

Hopefully we'll be able to sort this out soon. Thanks again.

Regards

H.
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
Last Edit: 2007/11/17 17:21 By hanuman.
The administrator has disabled public write access.
 
#46
Re:error message 4 Years, 6 Months ago  
I am getting the same error as well.

error on the admin panel

<?php
$adsense_query_raw = "select name, position, pages, channel_no, layout, placement, publisher_id, active from " . TABLE_ADSENSE_CC . " order by name";
$adsense_query = mysql_query($adsense_query_raw);



if (!mysql_num_rows($adsense_query)) { ?> <--line 273
<tr>
<td class="smallText" align="center"> <?php echo ACC_NO_ADS; ?>
</td>
</tr>
<?php } else { ?>

On the main page I am getting another MySQL error

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ZenCart\includes\functions\adsense_cc.php on line 16

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ZenCart\includes\functions\adsense_cc.php on line 16

I am in somewhat of a rush to fix this error and if you have msn, yahoo or gtalk here is my contact list

saint-michal@hotmail.com
saint_zodiac@yahoo.com
archangel.michael.a@gmail.com

I believe the error has to do with the mySQL table but that is only a guess.
saintmichael
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#47
Re:error message 4 Years, 6 Months ago  
Hi saintmichael

thanks for the mail. i'd like to get to the bottom of this one too, although may not be able to sort it out quickly enough for you as i'm quite busy at the moment.

as i wrote to the original poster, if you could give me any additional info like the info i requested above, that would help narrow things down.

the error must be happening because the call to the 'mysql_query' function a few lines before is returning false. this may happen for a number of reasons.

i have not been able to get this error to appear on my own system, so it may be a version issue. so please let me know also what version of PHP and MySQL you are using, too.

Many thanks

H.
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#48
Re:error message 4 Years, 6 Months ago  
TO be blunt I am using windows hosting and I believe it is php5 and the MySQL is version 5 as well.

As for your questions

1) Is the problem still occurring?
---yes

2) Can you create/save any ad/_link_ units?
--no
3) What action are you performing when the error happens (is it only when you arrive in the Adsense Control Center panel for the first time in the session)?
--when I got the adsense panel andd on the home page.


4) Can you see any of the ad/_link_ units you created in your front-end (store)?
-no because of the MySQL errors

5) if possible, could you send me the full URL in your address bar when the problem occurs e.g. //www.your_domain/admin/adsense_cc.php?action=cancel

artbyjfrances.com/zencart/ here is a link that I am having hte error on line 16.
saintmichael
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#49
Re:error message 4 Years, 6 Months ago  
Hi H,

I uninstalled it right away since it was messing up my live site so I never got a chance to really use it. THe error occurred in both the admin section as well as the client side/ live site page. I haven't had the time to go back and install it on a live test server on my remote host. Once I do I will post back the results. It seems that since it's a "header/seesion has already been output" error that it could very well be incompatible with one of the 50 or 60 mods that I have on my live site.

We are running php 4.4.7 and mysql 4.1.22-standard-log.

I am still in the very early stages of learning, but I have noticed that most of zencart code uses zen_db instead of mysql_ in the code. Could this be a part of the problem?

Thanks again for your hard work!

matt
lankeeyankee
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#50
Re:error message 4 Years, 6 Months ago  
Hi guys

I have a possible reason for the problems you have encountered. You will notice that the sql script supplied with the contribution creates a DB table called 'zc_adsense_cc'.

If, during the course of your ZenCart installation, you chose a different table prefix than the default 'zc_', or if you chose not to have a table prefix at all, then running the sql script will result in the errors you have had.

To check if this is your problem, browse your database and take a look to see if all tables have the same prefix and if it is 'zc_' or not.

If this is your problem, then just drop the current zc_adsense_cc table and adjust the sql script to reflect your choice of table prefix. If you chose to have no prefix, just name the table 'adsense_cc'.

Hope this helps. Let me know how it goes.

H.
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#52
Re:error message 4 Years, 5 Months ago  
Hi H,

That isn't the problem. When I go to myphpadmin and look at the table prefix it is correct. Your SQL file didn't specify zc_ as a prefix. I haven't tried the module yet, I set it up on a test site but haven't played around with it yet. But there are 4 identical error messages displayed across the top of the main page where the expages bar goes in my template, in the top of the left and right sideboxes, and at the top of the footer. Hopefully that might shed some light on the problem.

This is the line that is creating the error message:

if (mysql_num_rows($adsense_units_query)) {

I don't know much about php and mysql yet, I am learning though! but I thought that zen database calls are zen_db instead of mysql_. I could be showing my ignorance here!

Matt
lankeeyankee
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#72
Re:error message (actually no error message) 4 Years, 5 Months ago  
I have 2 sites with adsense_cc installed. The first works fine, but the second has nothing between the "bof/eof" adsense_cc comments.

I have the same adsense ads set up in admin, adds in same place, etc.

The two sites are http://conradstreasuretrove.info (works) and http://conradsjewelry.com (does not work)

Anybody have any ideas?
cparvin
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#73
Re:error message (actually no error message) 4 Years, 5 Months ago  
Hi there cparvin

Thanks for your enquiry. The missing code you refer to is generated in the following files:

includes/templates/YOUR_TEMPLATE/common/tpl_header.php
includes/templates/YOUR_TEMPLATE/common/tpl_footer.php

the code in tpl_header.php should be:

Code:


<!--//BOF adsense cc//////////////////////////////////////////////// -->
<?php
include(DIR_WS_FUNCTIONS . 'adsense_cc.php');
$ads = get_adsense_info(ACC_HEADER);
$placements = getPlacements($ads);
for($i=0; $i < count($placements); $i++) {
create_ad($placements[$i], $ads);
}
?>
<!--//EOF adsense cc////////////////////////////////////////////// -->



and the code in tpl_footer.php should be:

Code:


<!--//BOF adsense cc//////////////////////////////////////////////// -->
<?php
$ads = get_adsense_info(ACC_FOOTER);
$placements = getPlacements($ads);
for($i=0; $i < count($placements); $i++) {
create_ad($placements[$i], $ads);
}
?>
<!--//EOF adsense cc////////////////////////////////////////////// -->



Please check these files first to see if the code is present. If it is, then the likelihood is that the setup is somehow incomplete. Ensure the ad unit is set to Active in Admin, and that in the 'pages' field you have entered something like 'index' or 'main_page'.

If this is not the problem, please send me all your settings relating to the specific ad unit (doing a screen capture is probably easiest) and I'll try to help you further.

regards

h.
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 123