jaymax Posted January 29, 2010 Share Posted January 29, 2010 O/S FreeBSD 7.2-RELEASE FreeBSD 7.2-RELEASE #0 Platform Architecture i386 PHP Version 5.2.12 I am installing a program and am getting the following error conditions, all php, in my logs, they are error log PHP Warning: require(includes/languages/.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/local/www/apache22/lall/market/catalog/admin/includes/application_top.php on line 157, referer: http://lall.com/market/catalog/install/install.php?step=4 PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/local/include/php:/usr/local/bin/php:/usr/local/etc/php:/usr/local/lib/php:/usr/local/share/deplate/lib/php') in /usr/local/www/apache22/lall/market/catalog/admin/includes/application_top.php on line 157, referer: http://lall.com/market/catalog/install/install.php?step=4 Access log "GET /market/catalog/admin/index.php HTTP/1.1" 302 - "GET /market/catalog/admin/login.php HTTP/1.1" 500 - "GET /favicon.ico HTTP/1.1" 304 - Would someone advise on how to correct Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/ Share on other sites More sharing options...
akitchin Posted January 29, 2010 Share Posted January 29, 2010 the error is quite straightforward: the file you're asking it to require doesn't exist. that makes sense, since you're asking it to fetch "includes/languages/.php" - i doubt you have a file called ".php" in that directory. Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/#findComment-1003791 Share on other sites More sharing options...
jaymax Posted January 29, 2010 Author Share Posted January 29, 2010 Indeed the problem defined is straight forward, but the solution ? in the file /usr/local/www/apache22/lall/market/catalog/admin/includes/application_top.php, line 156-165 referenced in the error log // include the language translations // include the language translations // include the language translations require(DIR_WS_LANGUAGES . $language . '.php'); require(DIR_WS_LANGUAGES . $language . '.php'); $current_page = basename($PHP_SELF); $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $language . '/' . $current_page); } There is a disturbing reproduction of lines of code, so my thinking is that there maybe some file corruption here. Probably another copy of this file from another source might provide a solution. If someone has a copy of this single file I'll be receptive of receiving it. Alternately, is there a module or an option for the 'function' that I failed to 'include' in the configuration ? './configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-fastcgi' '--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php' '--with-zend-vm=CALL' '--enable-debug' '--enable-zend-multibyte' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.2' Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/#findComment-1003828 Share on other sites More sharing options...
akitchin Posted January 29, 2010 Share Posted January 29, 2010 it's tough to say without knowing the application that you're trying to install - the error seems to be in the code for the application itself. i'm moving this to third-party applications, as that is where the issue is. Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/#findComment-1003834 Share on other sites More sharing options...
jaymax Posted January 30, 2010 Author Share Posted January 30, 2010 The program is oscommerce-2.2.r2.a,2 Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/#findComment-1004352 Share on other sites More sharing options...
Scanjo Posted February 19, 2010 Share Posted February 19, 2010 I'm real new to PHP scripting but it looks to me like the $language variable may not be getting set properly. The error message shows the directory and the extension but that variable appears to be null. Maybe you could throw an ECHO in there to check $language contents? If it IS null then the problem likely lies elsewhere. If it's set with a form then there may be a problem with the form... As I said I'm new to this. Consider it food for thought till you get another response. Quote Link to comment https://forums.phpfreaks.com/topic/190260-functionrequire-error/#findComment-1014634 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.