pinacoteca Posted June 20, 2009 Share Posted June 20, 2009 Hello. From a year I installed on my website "OsCommerce" and I never had problemi.From two days, after trying to make changes as administrator of "Pinacoteca Online Store" (the name of store) I no longer access the site at address(http://www.giovannidionisivici.com/catalog/index.php). I get an error page of this type: (Warning: require(DIR_WS_LANGUAGES/FILENAME_DEFAULT) [function.require]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\giovannidionisivici.com\httpdocs\catalog\index.php on line 33 Fatal error: require() [function.require]: Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\giovannidionisivici.com\httpdocs\catalog\index.php on line 33[/color]). I tried to ask the support of the server (Plesk) whether it was a mistake but I have recommended to address the developers of the software. I can access the administration pages (http://www.giovannidionisivici.com/catalog/admin/login.php) but not to the public pages of the site "OsCommerce". I would by its advice on what to do to solve the problema. Regards.Giovanni Giovanni Link to comment Share on other sites More sharing options...
MrPhil Posted June 20, 2009 Share Posted June 20, 2009 It looks like two of your files are damaged or missing: includes/configure.php which should define DIR_WS_LANGUAGES as includes/languages includes/filenames.php which should define FILENAME_DEFAULT as index.php Look around in those files to see what happened. You should not be seeing either of the macro names (DIR_WS_LANGUAGES or FILENAME_DEFAULT). They should be replaced by the actual definition of the names. Link to comment Share on other sites More sharing options...
pinacoteca Posted June 21, 2009 Author Share Posted June 21, 2009 It looks like two of your files are damaged or missing: includes/configure.php which should define DIR_WS_LANGUAGES as includes/languages includes/filenames.php which should define FILENAME_DEFAULT as index.php Look around in those files to see what happened. You should not be seeing either of the macro names (DIR_WS_LANGUAGES or FILENAME_DEFAULT). They should be replaced by the actual definition of the names. Hello, I looked at the files of which you speak and are apparently good, both in 'includes/configure.php' that 'includes/filenames.php' values (DIR_WS_LANGUAGES that FILENAME_DEFAULT) are valid. But the error continues. In the administration page, which I open, there is this error log: (Warning: error_log(/var/log/www/tep/page_parse_time.log) [function.error-log]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\giovannidionisivici.com\httpdocs\catalog\admin\includes\classes\logger.php on line 49 Parse Time: 0.032s) Bye,Giovanni Giovanni Link to comment Share on other sites More sharing options...
MrPhil Posted June 21, 2009 Share Posted June 21, 2009 If the two files are OK (configure.php and filenames.php), could it be possible that for some reason they're not being included/required into the current page? Compare the failing page to a fresh copy and see if you can spot any differences. You might also temporarily add a line to each of them: echo "I am within configure.php<br/>"; and echo "I am within filenames.php<br/>"; You should get those two messages. If you don't, you're not including the files for some reason. Note that these messages may cause other errors, such as "can't send headers, headers already sent". Don't freak out over that -- we just need to see if you're including those two files. If not, you've got some digging to do. It's possible that your host changed PHP versions, and your existing code doesn't work right, now, or you've been hacked and your files are thoroughly messed up. Maybe get a directory listing of all your files and look at the dates they were last updated -- anything done recently that you can't account for? Can you compare your files to a fresh copy of osC (a matching version)? Can you account for all the differences as your changes or known contributions installed? As for the admin error, that file is defined during database setup in table "configuration" under configuration_title="Log Destination". Note that the error log message shows that you're trying to write to /var/log/www/tep/page_parse_time.log, while you're running on a Windows/IIS server which wouldn't have such a directory. You may need to do some manual configuration to use the correct directory for a Windows/IIS system. It may be settable in the Admin section, or you may have to use a database tool such as phpMyAdmin to edit the entry. Link to comment Share on other sites More sharing options...
pinacoteca Posted June 21, 2009 Author Share Posted June 21, 2009 I created a directory '/ log' in the file system and I have inserted a .log file(page_parse_time.log),I modified with 'phpmyadmin' the row of the table 'configuration' on 'configuration_title' (log Destination) with the address of the folder you created / log, but nothing changes. I tried to insert the two lines "echo ..." in the configure.php file and filename.php but when recall the page / catalog / index.php is not nothing but the usual error message. Hi,Giovanni If the two files are OK (configure.php and filenames.php), could it be possible that for some reason they're not being included/required into the current page? Compare the failing page to a fresh copy and see if you can spot any differences. You might also temporarily add a line to each of them: echo "I am within configure.php<br/>"; and echo "I am within filenames.php<br/>"; You should get those two messages. If you don't, you're not including the files for some reason. Note that these messages may cause other errors, such as "can't send headers, headers already sent". Don't freak out over that -- we just need to see if you're including those two files. If not, you've got some digging to do. It's possible that your host changed PHP versions, and your existing code doesn't work right, now, or you've been hacked and your files are thoroughly messed up. Maybe get a directory listing of all your files and look at the dates they were last updated -- anything done recently that you can't account for? Can you compare your files to a fresh copy of osC (a matching version)? Can you account for all the differences as your changes or known contributions installed? As for the admin error, that file is defined during database setup in table "configuration" under configuration_title="Log Destination". Note that the error log message shows that you're trying to write to /var/log/www/tep/page_parse_time.log, while you're running on a Windows/IIS server which wouldn't have such a directory. You may need to do some manual configuration to use the correct directory for a Windows/IIS system. It may be settable in the Admin section, or you may have to use a database tool such as phpMyAdmin to edit the entry. Giovanni Link to comment Share on other sites More sharing options...
germ Posted June 21, 2009 Share Posted June 21, 2009 Warning: require(DIR_WS_LANGUAGES/FILENAME_DEFAULT) [function.require]: failed to open stream: No such file or directory in C:\Inetpub\vhosts\giovannidionisivici.com\httpdocs\catalog\index.php on line 33 Fatal error: require() [function.require]: Failed opening required 'DIR_WS_LANGUAGES/FILENAME_DEFAULT' (include_path='.;./includes;./pear') in C:\Inetpub\vhosts\giovannidionisivici.com\httpdocs\catalog\index.php on line 33 When you get UPPER CASE ERRORS like that it's because those constants aren't getting defined. Regardless of what you may think... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
MrPhil Posted June 22, 2009 Share Posted June 22, 2009 I created a directory '/ log' in the file system and I have inserted a .log file(page_parse_time.log),I modified with 'phpmyadmin' the row of the table 'configuration' on 'configuration_title' (log Destination) with the address of the folder you created / log, but nothing changes. So what is the new value in the database for the "Log Destination"? Is it an existing and writable directory and file? I tried to insert the two lines "echo ..." in the configure.php file and filename.php but when recall the page / catalog / index.php is not nothing but the usual error message. If you have new lines echo "I am within xxxxxx.php<br/>"; and they're on their own lines between <?php and ?>, and you don't see that message, it means that the files (filename.php and configure.php) are not being included in the page! Look through the code and see if the include (or require) statements have been removed or commented out, perhaps by a botched contribution install. Link to comment Share on other sites More sharing options...
pinacoteca Posted June 22, 2009 Author Share Posted June 22, 2009 Hi. I solved the problem comes from PHP version used by server: OsCommerce requires version 4.3 while the server was using that version 5.Changing the version to 4.3, now run.Thanks and regards.Giovanni So what is the new value in the database for the "Log Destination"? Is it an existing and writable directory and file? If you have new lines echo "I am within xxxxxx.php<br/>"; and they're on their own lines between <?php and ?>, and you don't see that message, it means that the files (filename.php and configure.php) are not being included in the page! Look through the code and see if the include (or require) statements have been removed or commented out, perhaps by a botched contribution install. Giovanni Link to comment Share on other sites More sharing options...
MrPhil Posted June 22, 2009 Share Posted June 22, 2009 That's surprising... I thought a number of people were running it on PHP 5. I know that MySQL 5 causes problems, but I hadn't heard of PHP 5 causing them. Anyway, PHP 4.3 is terribly obsolete; I think that the last in the 4-series was 4.4.9 (and PHP 4 is no longer supported). I would suspect that your server has some odd misconfiguration of its PHP 5, rather than osC being incompatible with it. However, if dropping back to 4.3 fixes it for you, that's better than nothing. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.