Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Warning: main(/db/db.php): failed to open stream


Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sat Jan 24, 2004 8:47 am    Post subject: Warning: main(/db/db.php): failed to open stream
Reply with quote

Hi,

I'm trying to install php-nuke-7.0

I've created a MySQL database called nuke using phpMyAdmin and the nuke.sql file - no problem

I've altered the config.php file to point to the nuke db amending the user and password details.

connecttest.php and analyze.php aren't throwing up any errors from what I can make out

http://213.106.176.88/connecttest.php
http://213.106.176.88/analyze.php

The problem I am experiencing is pointing the mainfile.php to the db.php file in the DB folder.

I am using
WinXP Pro
Apache 2.0.46
PHP 4.3.2
MySQL 3.23.57
phpMyAdmin 2.5.4

My admin.php is as follows:
http://213.106.176.88/admin.php
Errors Generated are:

Code:

Warning: main(/db/db.php): failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\mainfile.php on line 75

Fatal error: main(): Failed opening required '/db/db.php' (include_path='c:\php') in C:\Program Files\Apache Group\Apache2\htdocs\mainfile.php on line 75


Lines 67-80 of mainfile.php

Code:

if ($forum_admin == 1) {
    require_once("file:///C:/Program%20Files/Apache%20Group/htdocs/config.php");
    require_once("file:///C:/Program%20Files/Apache%20Group/htdocs/db/db.php");
} elseif ($inside_mod == 1) {
    require_once("file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/config.php");
    require_once("file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/db/db.php");
} else {
    require_once("config.php");
    require_once("/db/db.php");
    /* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
    /* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
    require_once("includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}


>>I realise that a lot of the require_once paths are probably an invalid above but nothing I change there seems to make any difference>>

My DB Folder is
C:\Program Files\Apache Group\Apache2\htdocs\db

how do I show this location in mainfile.php?

Any help would be greatly appreciated, getting close to knocking phpnuke on the head as a lost cause.

** If I move the db.php file to the Web Root and make the necessary changes to makefile.php I am able to access the admin.php page although the banner throws up errors as do any selections from that screen. **

[edit] Included code in code tags. Chris [/edit]
Back to top
View user's profile Send private message
arnoldkrg
President
President


Joined: 29 Jun 2003
Posts: 1576
Location: United Kingdom

PostPosted: Sat Jan 24, 2004 10:33 am    Post subject: db/
Reply with quote

You don't need to make any changes to mainfile.php for basic installation. all the paths in that file are relative so they should be picked up automatically if the relevant files exist. I would wipe everything and start again if I were you. The database connectivity looks fine from your conntest data so you do not need to create the database again. Copy your config file too because that seems to be OK.. Just dont mess with the mainfile for now.

One thing you should do is to turn on the GD extension in php.ini. Around line 547 change
Code:
;extension=php_gd2.dll


to

Code:
extension=php_gd2.dll

_________________
Image
Back to top
View user's profile Send private message Send e-mail
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sat Jan 24, 2004 12:20 pm    Post subject: Thanks arnoldkrg
Reply with quote

Thanks, Arnoldkrg

I'll give that a go. Just one further query should I be expanding the phpnuke archive to include the html folder to give a path of

htdocs/html/config.php

or extract the files within html to webroot to give a path of

htdocs/config.php

PS Appreciate the quick reply to my first post.
Back to top
View user's profile Send private message
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sat Jan 24, 2004 1:04 pm    Post subject:
Reply with quote

I've wiped everything from my htdocs folder
turned on GD extension
reinstalled nukephp including the html folder so the path looks like this...

C:\Program Files\Apache Group\Apache2\htdocs\html\config.php etc

I'm still getting the following error when I open

http://213.106.176.88/html/admin.php

Code:

Warning: main(db/mysql.php): failed to open stream: No such file or directory in C:\Program Files\Apache Group\Apache2\htdocs\html\db\db.php on line 53

Warning: main(): Failed opening 'db/mysql.php' for inclusion (include_path='c:\php') in C:\Program Files\Apache Group\Apache2\htdocs\html\db\db.php on line 53

Fatal error: Cannot instantiate non-existent class: sql_db in C:\Program Files\Apache Group\Apache2\htdocs\html\db\db.php on line 86


Any more help with this problem would be greatly appreciated.
Back to top
View user's profile Send private message
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sat Jan 24, 2004 5:44 pm    Post subject: Ignore this Post - Given up with Apache using IIS now
Reply with quote

thanks for your help though
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6262
Location: Outer Space

PostPosted: Sat Jan 24, 2004 9:18 pm    Post subject:
Reply with quote

Karanga wrote:
Open quoteWarning: main(): Failed opening 'db/mysql.php' for inclusion (include_path='c:\php') in C:\Program Files\Apache Group\Apache2\htdocs\html\db\db.php on line 53 Close quote


Your include path contains only c:\php. It is missing the current directory ".". Thus PHP is not looking in the current directory for the file to be included.

Find the line for the include path in your php.ini and change it to:

Code:

include_path = ".:c:\php"


i.e. put the current directory in the include path list (notice the "." for the "current directory, and the ":" as a separator of the directories in the list).

See also Fatal error: Failed opening required 'includes/sql_layer.php'.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sat Jan 24, 2004 10:15 pm    Post subject: Thanks Chris - This site is a little gem
Reply with quote

Thanks for that Chris I might give that a go tomorrow although it seems to be working nicely under IIS at the moment.

I'm glad I've found this site, it's a little gem! Quick relevant replies whilst other sites leave you dangling. Wink
Back to top
View user's profile Send private message
Karanga
Lance Corporal
Lance Corporal


Joined: 24 Jan 2004
Posts: 6
Location: MAnchester, UK

PostPosted: Sun Jan 25, 2004 12:13 am    Post subject: Back on Apache - Thanks for your help again Chris.
Reply with quote

I had a feeling it was something small but I would have never tried/figured out your suggestion.

It's only easy if you know the answer I suppose.

Laughing
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6262
Location: Outer Space

PostPosted: Sun Jan 25, 2004 9:21 am    Post subject:
Reply with quote

Glad you got it now, Karanga. Smile

If you feel like it, and want to help others, please start a new thread and describe how you got PHP-Nuke working under IIS, whether you had to do something special, if there were any pitfalls etc. There are very few documentations on this issue, so it would be great if you could give some advice for future reference.

It would be great if I could include something about PHP-Nuke and IIS in the next version of the PHP-Nuke HOWTO, which I maintain.

No obligations, of cource. Smile
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Conkers
Private
Private


Joined: 01 Mar 2004
Posts: 2

PostPosted: Mon Mar 01, 2004 11:41 pm    Post subject:
Reply with quote

I came accross this thread from Google - so I have joined your forum as I really need help.
Reading this thread I appear to be having the same problems as this person.
My website is unaccessable to views and is showing this error message:

Code:

Warning: main(db/mysql.php): failed to open stream: No such file or directory in /home/conkers/public_html/db/db.php on line 53

Warning: main(): Failed opening 'db/mysql.php' for inclusion (include_path='/usr/local/lib/php:/usr/lib/php') in /home/conkers/public_html/db/db.php on line 53

Fatal error: Cannot instantiate non-existent class: sql_db in /home/conkers/public_html/db/db.php on line 86


I have both Conntest and analyze on and both are showing that the site is okay.
I assume that the text I have highlighted in bold is in need of the same fix as already stated?

My site address is http://iancharlesphotos.net
Conntest: http://iancharlesphotos.net/conntest.php
Analyze: http://iancharlesphotos.net/analyze.php

The only problem I have is that my host is the only one with access to the php.ini file, and I am waiting for them to do something.

All help gratefully received

Ian

[edit] Included code in code tags. Chris [/edit]
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
Post new topic   Reply to topic
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 3
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

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


Powered by phpBB © 2001, 2005 phpBB Group