Jump to content

function.require error


jaymax

Recommended Posts

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!

 

 

Link to comment
Share on other sites

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!

 

Link to comment
Share on other sites

  • 3 weeks later...

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.  :D

Link to comment
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.