bbxrider Posted February 25, 2007 Share Posted February 25, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/40067-require_once-problem/ Share on other sites More sharing options...
wildteen88 Posted February 25, 2007 Share Posted February 25, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/40067-require_once-problem/#findComment-193857 Share on other sites More sharing options...
bbxrider Posted February 25, 2007 Author Share Posted February 25, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/40067-require_once-problem/#findComment-193866 Share on other sites More sharing options...
wildteen88 Posted February 25, 2007 Share Posted February 25, 2007 Is the mambo folder just full of just files? What unzip software did you use to uncompress the zip. Quote Link to comment https://forums.phpfreaks.com/topic/40067-require_once-problem/#findComment-193884 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.