PDA

View Full Version : counter.php error



daniel
04-09-2005, 01:20 PM
ahohoho now I am trying to install the counter and it comes up with this error when I try and go onto the counter.php


Warning: initialize_database(/counter/classes/mysqldb.php): failed to open stream: No such file or directory in d:\program files\easyphp\www\counter\counter.php on line 436

Fatal error: initialize_database(): Failed opening required '/counter/classes/mysqldb.php' (include_path='.;D:/Program Files/EasyPHP\php\pear\') in d:\program files\easyphp\www\counter\counter.php on line 436

any ideas?

Patrick
04-09-2005, 01:23 PM
Your absolute path is incorrect.

daniel
04-09-2005, 01:51 PM
sorry :(

now its saying:


Notice: Undefined index: skip_config in d:\program files\easyphp\www\counter\classes\mysqldb.php on line 24
People Online: 1
Today's Visitors: 1
Total Visitors: 1
Total Hits: 1

Patrick
04-09-2005, 01:57 PM
Your server's default error reporting level is too high. When I released this script a long time ago I forgot to add in custom error settings for such servers.

Open up counter.php:

On the very first line of the file, replace:
<?php

with:
<?php error_reporting(E_ALL ^ E_NOTICE);

daniel
04-09-2005, 02:38 PM
thanks alot :)

now one last problem to overcome, the counter won't display on my page :blink:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Daniel's World</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFF00">
<div align="center">
<h2>Audio</h2>
<p>&nbsp;</p>
<p><a href="Files/Bliss%20(Original).mp3">Muse - Bliss</a> - This is an amazing
live version of bliss, you wouldn't realise its the same band, amatures :P</p>
<?php include("/counter/counter.php"); ?>
</div>
<div align="left"></div>
</body>
</html>

thats the source of one of the pages and nothing is displayed :(

Patrick
04-09-2005, 06:26 PM
First off, the troubleshooting from the readme.txt file:
-Problem: My counter isn't showing up, instead it shows up as <?php include("counter.php"); ?>.
--Solution: Ensure that your page is a php page (.php) and that php is available on your server.

If that isn't the problem then you are welcome to PM me your ftp information and I can take a look for myself.

kirb
05-02-2005, 07:09 PM
I am also receiving the same error in the first post, but it seems that it doesn't work. It's in the root folder and then in a 'counter' folder. I've been setting it to either 'counter/' and '/counter/' but neither of them work. And abs.php says that it can't figure out the absolute path.

Patrick
05-02-2005, 07:55 PM
Do this:

Modify counter.php's absolute path setting to look like this:


$OPTION['Absolute_Path'] = dirname(__FILE__) . "/";


Problem solved.

kirb
05-07-2005, 10:55 AM
Now the script is saying that it's a bad absolute path. When I make the script show where the absolute path is, it shows it from my main server, not the subdomain I'm using. Would having the site as a subdomain stop this from working? I've tried putting the URL to the folder in it but then it gives an error that there's a 404 error with a message at the top that says that it "cannot instantiate non-existent class: main_database."

Patrick
05-08-2005, 12:44 PM
Your problem is simply that your absolute path is incorrect.

Being a webmaster, you should know what your absolute path is (you could also ask your webhost).

If all else fails, just look at php info:

<? phpinfo(); ?>