PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 10:18 am Reply with quote Back to top

I'm getting the following errors with the realtime stats block.
The first one is because the block is not picking up the correct
database user name. The DB user name is eldrberry_mberry.
Looks like the block is truncating that at the underscore. I
suspect fixing that will fix the rest of them.

Warning: mysql_select_db(): Access denied for user: 'eldrberr@localhost' (Using password: NO) in /home/eldrberr/public_html/modules/realtime-stats/index.php on line 46

Warning: mysql_select_db(): A link to the server could not be established in /home/eldrberr/public_html/modules/realtime-stats/index.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/eldrberr/public_html/modules/realtime-stats/index.php:46) in /home/eldrberr/public_html/modules/realtime-stats/index.php on line 48
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 10:35 am Reply with quote Back to top

That error implies that your dbuser does not have permission to access that database/table. The headers error usually implies that you need to set output_buffering to on. I don't believe there is anything wrong with the block. It's been around too long and too many people are using it.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 10:50 am Reply with quote Back to top

Well, not trying to be argumentative here but if the user didn't have access to the DB then Nuke itself wouldn't run, right? Everything else except this module seems to work fine.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 10:53 am Reply with quote Back to top

Do you have output_buffering set to on?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 10:56 am Reply with quote Back to top

Beats me. Server is at my hosting co.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 10:59 am Reply with quote Back to top

Save this code to a file and call it server.php
Code:
<?
phpinfo();
?>
Then ftp it to your web root and run it. Find output_buffering and let me know what the local and global values are.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:01 am Reply with quote Back to top

output_buffering no value no value
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 11:03 am Reply with quote Back to top

This block just uses what is in your config.php file. Please verify that your $dbuser is spelled correctly.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 11:04 am Reply with quote Back to top

You need to add a line to your .htaccess file (assuming you are on Apache)

PHP_FLAG output_buffering On
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:08 am Reply with quote Back to top

Yep, just looked at the config file and it's correct. As I said above, if it wasn't I doubt anything would be working.
View user's profile Send private message Visit poster's website
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:09 am Reply with quote Back to top

Ok, I'll try that...hang on.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 11:10 am Reply with quote Back to top

Elderberry wrote:
Yep, just looked at the config file and it's correct. As I said above, if it wasn't I doubt anything would be working.
Nuke would come up but the modules and blocks wouldn't work correctly.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:18 am Reply with quote Back to top

Well, adding that to the .htaccess kills everything. Generates an
internal server error when I try to access the site.
View user's profile Send private message Visit poster's website
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:19 am Reply with quote Back to top

Raven wrote:
Elderberry wrote:
Yep, just looked at the config file and it's correct. As I said above, if it wasn't I doubt anything would be working.
Nuke would come up but the modules and blocks wouldn't work correctly.


Well, since rest of the modules and blocks work I would assume the DB user is correct.
View user's profile Send private message Visit poster's website
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:25 am Reply with quote Back to top

Just for the heck of it I ran the server.php on another site of mine and the output_buffering on it is also no value and realtime stats runs fine on it. Strange ain't it. Very Happy
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 11:27 am Reply with quote Back to top

Elderberry wrote:
Well, adding that to the .htaccess kills everything. Generates an
internal server error when I try to access the site.
Your host doesn't allow user directives for PHP in Apache. You will need them to change output_buffering to On. The only thing I could suggest is re-ftp'ing the files. I assume you didn't make any modifications. The block is standard php nomanclature. It just takes the values from the config and uses them.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 11:32 am Reply with quote Back to top

Raven wrote:
Elderberry wrote:
Well, adding that to the .htaccess kills everything. Generates an
internal server error when I try to access the site.
Your host doesn't allow user directives for PHP in Apache. You will need them to change output_buffering to On. The only thing I could suggest is re-ftp'ing the files. I assume you didn't make any modifications. The block is standard php nomanclature. It just takes the values from the config and uses them.


I already redownloaded it from here and reftp'd it before I started this thread. I'm not gonna ask them to change anything as I don't think that's the problem since it works on another site that has output_buffering set the same way. No, I have not modified them in any way. Only thing I changed was the admin name variable as instructed. As you said, the module works on many sites so it wouldn't seem to be the code. It's got me stumped. Guess I'll just not use it on this site.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 11:38 am Reply with quote Back to top

I agree about the output_buffering in relation to this problem, but usually the forums won't work correctly without output_buffering. Very strange indeed.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 12:05 pm Reply with quote Back to top

As a last ditch effort I hardcoded the DB name and DB user name & password in the module and I still got the same error.

I give up.
View user's profile Send private message Visit poster's website
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 1:02 pm Reply with quote Back to top

Ok, I found it. It is in the module code. You have the following two lines:

mysql_select_db($dbname);
$db = mysql_pconnect($dbhost, $dbuname, $dbpass) or die('<br />MySQL said '.mysql_error());

They should be reversed like this:
$db = mysql_pconnect($dbhost, $dbuname, $dbpass) or die('<br />MySQL said '.mysql_error());
mysql_select_db($dbname);

My other two sites were really not working correctly. They were just showing the ip addresses without the other info as to guest/user/admin etc and warnings must be turned off so that I wasn't seeing the errors.

After reversing the order of those lines everything is hunky dorry.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 1:08 pm Reply with quote Back to top

Laughing That would be correct. As your see though, all instalations before this have worked correctly or I would have heard. There must be something in the way the defaults are working. Are the versions of Nuke the same in the 2 sites that you are working with?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Elderberry
New Member
New Member


Joined: Aug 13, 2002
Posts: 20

PostPosted: Sat Oct 04, 2003 1:15 pm Reply with quote Back to top

Raven wrote:
Laughing That would be correct. As your see though, all instalations before this have worked correctly or I would have heard. There must be something in the way the defaults are working. Are the versions of Nuke the same in the 2 sites that you are working with?

No, one is 6.7 and the one that started all this is 6.9.
I'll bet there have been others that didn't work but
they weren't as persistent as I am. Very Happy
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 1:17 pm Reply with quote Back to top

But I've had ZERO complaints. I have run and am running it on all versions since 6.5. Anyway, I will reverse the lines and test it and issue an update. Thanks!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sat Oct 04, 2003 3:57 pm Reply with quote Back to top

The update has been released. Thanks.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
PHrEEkie
Subject Matter Expert


Joined: Feb 23, 2004
Posts: 358

PostPosted: Fri Feb 27, 2004 10:43 pm Reply with quote Back to top

Don't mean to drag up an old subject, but this is still an issue, and thought I'd share what I did to fix it.

I needed to set up a new site for a friend, so I downloaded Rav's Nuke 7 bundle. I created a sub-domain on my site and uploaded everything to have a look around... everything looked great! I then went into my reseller panel and created this person's own webspace account. I uploaded the exact same package and suddenly had all sorts of issues. The two biggest were that the security graphics weren't showing up (red x's in the image placeholder) and the 'Headers already sent' error in the realtime stats block.

Now keep in mind that his webspace is on the same server as mine and is controlled by the same php.ini, etc etc.. everything was identical, but one worked and the other didn't. I spent the last two days trying code changes, re-uploading files, and nothing fixed it.

Finally, out of ideas and extremely code-weary, I terminated the webspace account, re-created the webspace from scratch, and re-uploaded the package. Built the database, pulled the site up and BAM! we now had security graphics AND the realtime stats block was no longer throwing the error.

So, to conclude, if you are 100% -sure- that your php.ini config is correct and none of Rav's advice in this thread has helped you, you might just need to get drastic. I'd start with a complete webdocs wipe and a re-upload of the Nuke package. If that doesn't fix it, have your webhost wipe your webdocs, kill your account and re-build it. Sometimes when these CPanel auto-scripts do their thing, shite can happen...
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum