Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
inoculateit
New Member
New Member



Joined: Aug 20, 2005
Posts: 10

PostPosted: Sat Aug 20, 2005 8:15 am Reply with quote

Everything setting up, but get this error all the time:

Warning: main(config.php): failed to open stream: No such file or directory in E:\W3Sites\domain\www\modules\Donations\ipn\ipnppd.php on line 25

Warning: main(): Failed opening 'config.php' for inclusion (include_path='.;c:\php4\pear') in E:\W3Sites\domain\www\modules\Donations\ipn\ipnppd.php on line 25
Debug mode activated

PHP-Nuke Treasury mod

PayPal Instant Payment Notification script

See below for status:
----------------------------------------------------------------
Connection to db - OK!
Opening connection and validating request with PayPal...
OK!
Selecting database...FAILED - err:
Executing test query...No Database Selected
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Sat Aug 20, 2005 9:14 am Reply with quote

The Nuke Treasury module has its own config.php file that must be stored in the /modules/donations directory. It seems it can't one there.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
inoculateit







PostPosted: Sat Aug 20, 2005 9:16 am Reply with quote

I have to config file there Sad

changed the info also, but then this error Sad
 
kguske







PostPosted: Sat Aug 20, 2005 9:23 am Reply with quote

I could also be a problem running on Windows. It isn't specifying a path on the include, and the directory is clearly not IN the path listed in the error message. Maybe if you change the include statement in E:\W3Sites\domain\www\modules\Donations\ipn\ipnppd.php from
Code:
include("config.php");

to
Code:
include("E:\W3Sites\domain\www\modules\Donations\config.php");
 
kguske







PostPosted: Sat Aug 20, 2005 9:37 am Reply with quote

Hmmm...it must be a Windows thing. I checked my old copy of the Treasury module, and the line in ipnppd.php is actually:
Code:
include("../config.php");

Normally, that tells PHP to look in the directory above the current directory (which should be modules/Donations. But I haven't tested this under Windows, so I assume it must not be working the same there.

Try the suggestion I gave above, even though it's generally not a good idea to hard code stuff like that, at least we can see if it works, then we know what the problem is.
 
inoculateit







PostPosted: Sat Aug 20, 2005 9:38 am Reply with quote

Got it so far now Smile

You fixed the first errors Smile

Now its just last errors...


Debug mode activated

PHP-Nuke Treasury mod

PayPal Instant Payment Notification script

See below for status:
----------------------------------------------------------------
Connection to db - OK!
Opening connection and validating request with PayPal...
OK!
Selecting database...FAILED - err:
Executing test query...No Database Selected
 
kguske







PostPosted: Sat Aug 20, 2005 9:40 am Reply with quote

that's in your modules/Donations/config.php. You can configure Treasury to use a different database (or the same database), so there are connection parameters in that additional config.php file. Something isn't right with the DB name, user or password OR the database isn't created.
 
inoculateit







PostPosted: Sat Aug 20, 2005 9:45 am Reply with quote

Database is created Sad

username & database is correct Sad
 
kguske







PostPosted: Sat Aug 20, 2005 9:55 am Reply with quote

Right. It can connect to the database, but it can't find the table. Is the table named with the same prefix as the other Nuke tables?
 
inoculateit







PostPosted: Sat Aug 20, 2005 10:00 am Reply with quote

Nope Sad

They got no prefix.
Here is what they look like in MySQL:

config
financial
transactions
translog
 
kguske







PostPosted: Sat Aug 20, 2005 10:05 am Reply with quote

Did you create these tables in a different database from Nuke? If so, is the Treasury database specified in the modules/Donations/config.php or the Nuke database?

If not (or the database is specified correctly in config.php), search ipnppd.php for
Code:
   echo "Selecting database...";

In the SQL line right before that, is that table correctly defined in your database?
 
inoculateit







PostPosted: Sat Aug 20, 2005 10:09 am Reply with quote

Here is what that section got:

if( $dbg )
{
$sql = "SELECT * FROM transactions LIMIT 10";
echo "Selecting database...";
$res = mysql_select_db($database_ipnppd, $ipnppd);
if($res)
echo "OK!<br>";
else
echo "<b>FAILED - err: $res</b><br>";
echo "Executing test query...";
$Result1 = mysql_query($sql, $ipnppd) or die(mysql_error());
if($Result1)
echo "PASSED!<br>";
else
echo "<b>FAILED</b><br>";
echo "PayPal Receiver Email: $tr_config[receiver_email]" ;
}
 
inoculateit







PostPosted: Sat Aug 20, 2005 10:11 am Reply with quote

Something must been working right.

The block shows on the frontpage, but if i change database name to test, I got errors, so the connection must be ok so far as I can see Sad
 
kguske







PostPosted: Sat Aug 20, 2005 10:18 am Reply with quote

Is the value $database_ipnppd defined correctly in the modules/Donations/config.php file? Does it match the exact name of the database in MySQL?
 
inoculateit







PostPosted: Sat Aug 20, 2005 10:22 am Reply with quote

I found the bug/error Razz

You need to go into your ipnppd.php file and change the config.php file to config.inc.php
Its on line 25

taken from: [ Only registered users can see links on this board! Get registered or login! ]

Thanks M8 anyway Smile
 
kguske







PostPosted: Sat Aug 20, 2005 10:28 am Reply with quote

Actually, you're supposed to rename config.inc.php to config.php...but either will do.
 
inoculateit







PostPosted: Sat Aug 20, 2005 11:25 am Reply with quote

But I got another problem now Sad *lol*

I just installed it locally on my own machine.

php-nuke and anything works perfectly, but the playpal thing deny me in the database!

Access denied for user: 'ODBC@localhost' (Using password: NO)

Help Smile
 
stravides
New Member
New Member



Joined: Aug 26, 2006
Posts: 5

PostPosted: Sat Aug 26, 2006 2:52 pm Reply with quote

inoculateit wrote:
But I got another problem now Sad *lol*

I just installed it locally on my own machine.

php-nuke and anything works perfectly, but the playpal thing deny me in the database!

Access denied for user: 'ODBC@localhost' (Using password: NO)

Help Smile

Thats usually when you do not specify the password and username for the database - What I had to do was copy config.inc.php to config.php and keep both....

$hostname_ipnppd = "localhost";
$database_ipnppd = "nuke";
$username_ipnppd = "youraccount";
$password_ipnppd = "Yourpassword";

Regards
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©