[Solved]:Fatal error: Failed opening required include/config [Solved]:Fatal error: Failed opening required include/config
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]:Fatal error: Failed opening required include/config

Started by COCOA, March 14, 2004, 03:27:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

COCOA

Hi.

I was using and updating pictures, and adding more themes on my album.
Then, all of sudden, this error showed up, and I can't do anything about it.

Fatal error: Failed opening required 'include/config.inc.php' (include_path='.:/usr/local/lib/php') in ~cut~albumcpg/include/init.inc.php on line 135

This message partially cut just in case, but if you need full message to give me an advice, I will resubmit.

It was working just fine. I was just checking all updated new themes to see what I like, then it happens.

I appreciate your advice.

Thanx.

hyperion

Hello, COCOA.

This isn't your fault.  Your host has changed PHP's library directive to get all includes from the library listed.

You will need to alter the code in init.inc.php like so:

From:

// Include config and functions files
require 'include/config.inc.php';
require 'include/functions.inc.php';


To:


// Include config and functions files
require (realpath('include/config.inc.php'));
require (realpath('include/functions.inc.php'));


This will happen in a few other locations (includes and requires) throughout the code, but you should be able to find them as they arise using the error line number.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

COCOA

Hi hyperion

Thank you for the reply.
I have been working on it, but still shows error message.
It changed though.

Fatal error: Failed opening required '' (include_path='.:/usr/local/lib/php') in /home/sites/~cut~albumcpg/include/init.inc.php on line 135

It is still on the same line "135", but I don't know what exactly I need to change.
I read your message again and again, but I just can't figure it out.

Thanx

COCOA

I was checking the server's FAQ, and found out that there was a same problem about a month ago.
Still, any ideas would help, but I will wait for tomorrow to see how it works since there was no problem sometime today, and suddenly this happens.

(I am sure I will be back asking more solution though...)

hyperion

Yes, you will have to change most of the files -- not just the one example I gave you.  In this case now, the line is in the index file, near the very beginning. Just open each file, and you will find most of these statements within the first few lines.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

COCOA

Hi

Thank you for the advice.
I did few things, but still didn't work. So I deleted everything, and installed over again.
Right now, it is working. Yeei!
I will do some testing and see if I can find what the problem was.

Thank you for your help, hyperion. :D

LilyTiger

Hi!

I've got the same problem as Cocoa:

When I try to start index.php I only get this error message:

Fatal error: Failed opening required '' (include_path='.:/usr/share/pear') in /SUSE5-a2/array2/web/user/ie005/coppermine/include/init.inc.php on line 135

I added require (realpath('include/config.inc.php')); and require (realpath('include/functions.inc.php')); to include/init.inc.php
and require (realpath('include/init.inc.php')); to index.php but there's still this error message.
Re-installing Coppermine didn't help either :(

Btw: I installed Coppermine on my university's webspace with PHP version 4.2.2 and GD Version 1.6.2 or higher.

I hope someone can help me.
Thanks!

hyperion

You will have to replace the statements in a number of other places, too.  

If the realpath statement is not working for you, you can try a .htaccess file (if the server is apache -- this is by far the easiest of the three methods), or you can use the full path directly.
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

LilyTiger

Thanks for your answer! But it still doesn't work.

I got this error message when I tried to use the full paths in init.inc.php:
Fatal error: Failed opening required '/SUSE5-a2/array2/web/user/ie005/coppermine/include/config.inc.php' (include_path='.:/usr/share/pear') in /SUSE5-a2/array2/web/user/ie005/coppermine/include/init.inc.php on line 135

So back to require(realpath... and the error message I mentioned above.


The next thing I tried was this .htaccess:

 php_value include_path .:/SUSE5-a2/array2/web/user/ie005/coppermine/include/

Et voilĂ :
Fatal error: Failed opening required '' (include_path='.:/SUSE5-a2/array2/web/user/ie005/coppermine/include/') in /SUSE5-a2/array2/web/user/ie005/coppermine/include/init.inc.php on line 135

*Sigh* Do I put the wrong path in the files or what?


Well, the next step will be to put the require(realpath... statements in other files, but I don't know which ones. In the ones in the root directory or in those in the include directory? Or in all concerning files?? I just need to know where to start.

I hope you can help me again.
Thanks in advance!

COCOA

Hi LilyTiger

Have your script ever worked with the same server?
In my case, it was working just fine, then suddenly it showed error with no change was made.
So, I erased everything from the server and from my computer, and download the script again.
Then, it worked!

So, I don't know why it happened, but so far, it is working fine.
If you could use the album once, then quit working, you may want to delete everything and install again.

If it never worked, have you contacted the web server if they have special requirement?
And sometimes, the server will not let us use CGI or PHP.
I wonder if your university server won't let you use any.

Good luck!

LilyTiger

Hey Cocoa

No, Coppermine has never worked on that server, at least not for me.
But I could try and download it again indeed, thanks for that tipp. Maybe I'll try another version.

Well, if that won't help either I think I'll have to contact the guys that run the Uni server. As far as I know CGI and PHP are enabled there but surely there could also be another reason why Coppermine doesn't work.

I really hope I'll get Coppermine working soon, it looks very good and I don't really want to use another album software if I don't have to.

hyperion

LilyTiger,

No, you have done all you need to do to fix the include path issue using the .htaccess file. Something else is causing this problem. Now I would try checking the files permissions, existance, etc. The uni's server people may be able to offer some insight into this behavior, so I would definitely talk to them.

-Hyperion
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)