Jump to content

Recommended Posts

hello, i know this is a 'mambo' problem but i have posted there with no reply so thought i might try here since it is php code and i'm new to both. if not appropriate to post here i understand.

this is running apache4.2/php5, 5.1 build 2600/mysql on winxp

 

the problem occurs in a php file, install2.php, invoked as part of the mambo install. the installation is running the prior php file ok, it is called, 'install1.php', install1 is basically a form collecting info about the current installation. install1.php invokes install2.php on the form submit

in install2.php, after a define the 2nd+3rd lines in the file are:

require_once( 'common.php' );

require_once( '../includes/database.php'

 

the errors i'm getting are:

Warning: require_once(../includes/database.php) [function.require-once]: failed to open stream: No such file or directory in C:\apache2\htdocs\mambo\install2.php on line 15

 

Fatal error: require_once() [function.require]: Failed opening required '../includes/database.php' (include_path='.;C:\php5\pear') in C:\apache2\htdocs\mambo\install2.php on line 15

 

the errors appear to be complaining that php can't find database.php, it is present, in the same directory as common.php, that directory is mambo, c:/apache2/htdocs/mambo, the mambo directory is where all the php files are

 

my php is installed in c:\php (not c:\php5)

i can invoke phpinfo () ok

 

since i'm new to php, i don't understand why the first require_once statement uses a different 'path' structure than the 2nd require_once statement, when both target files are in the same directory?

 

so if anybody can suggest reasons or things to try i'd much appreciate. and 2ndly also, why the 2 different path statements for files in the same directory?

thanks, bbxrider

Link to comment
https://forums.phpfreaks.com/topic/40067-require_once-problem/
Share on other sites

I have mambo (v4.5.5) and database.php is in mambo/includes/ but common.php is mambo/installation/

 

From what I read from your post you say common.php and database.php are in the same folder, which is the mambo folder.

 

You sure you moved files to the server correctly?

Link to comment
https://forums.phpfreaks.com/topic/40067-require_once-problem/#findComment-193857
Share on other sites

thanks for the reply, when i unzipped the mambo download, mambov4[1].5.5.zip, to a mambo directory that i created, all the files unzipped to that one place, there was no 'includes' directory created from the unzip, should there be one?

from there i just copied all the mambo files to the apache2/htdocs/mambo directory, so again i have no includes directory there. all the php files are simply in the mambo directory. sounds like i need to create an includes directory and figure out what belongs in there?

yes?

Link to comment
https://forums.phpfreaks.com/topic/40067-require_once-problem/#findComment-193866
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.