Hi there, I have an Oscommerce site that is not working 100% on my live server but is perfect on my local Apache server.
Some of the issues I am experiencing are...
1. On the front end my Manufactures drop down is not going to the selected option
2. On my Admin section : Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/xxx.co.za/httpdocs/temp/admin/includes/application_top.php on line 133
- The file it is looking is there.
3. On the Admin Section my titles don't display correctly HEADING_TITLE
4. On the Admin Section, if I go into my categories section if I click on the folder next to the categories it does not open.

All of these issues work perfectly on my local server.

I hope these are related because I desperately need this to work quickly.

    view your sorce code on the live server, and search for warning messages, if you see one,
    lets change the code not to visible the errors/warnings

    (hide the warnings if you think your code is ready)

    // Turn off all error reporting
    error_reporting(0);

    and copy all the files, not just the index files.

    HEADER_INDEX error comes from becouse your php could not included, where you DEFINE that string.

    and i tell these thing without seing the site.

      So do you think that my version of php is not the same as that on the server so there for my queries are not being recognised?

        Warning: include(includes/languages/english/) [function.include]: failed to open stream: No such file or directory in /var/www/vhosts/xxx.co.za/httpdocs/temp/admin/includes/application_top.php

        on line 133

        This is a file, or you wanted to include a whole folder?
        i think you couldn't able to include a whole folder.

        hello,jjozsi

          Thanks, I still don't understand why I don't have this issue on my local server.

            A default install of an apache server on WINDOWS really
            has differences from a welled configured and optimized UNIX installation.

            Try to send a letter with mail() on a default (for example easyphp ) install on WINDOWS 🙂

            And while you troubleshooting, let's enable the error reporting.

            This forum is to ask for help, but we aren't oracles, so lets attach some
            kind of a source code or URL if you don't want to get crooked counsels.

            hello,
            jjozsi.

              It seems that it does have something to do with my configure file. I have checked with my hosting company for the absolute path but still not winning. I checked the configure file of a site that I did some time ago which works on a different server. This configure file does not have any absolute paths.

              www.tvr.co.za/temp/admin

              <?php
                define('HTTP_SERVER', 'http://www.tvr.co.za/temp/');
                define('HTTP_CATALOG_SERVER', 'http://www.tvr.co.za/temp/');
                define('HTTPS_CATALOG_SERVER', 'http://www.tvr.co.za/temp/');
                define('ENABLE_SSL_CATALOG', 'false');
                define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/tvr.co.za/httpdocs/temp/');
                define('DIR_WS_ADMIN', '/tvr.co.za/httpdocs/temp/admin/');
                define('DIR_FS_ADMIN', '/var/www/vhosts/tvr.co.za/httpdocs/temp/');
                define('DIR_WS_CATALOG', '/tvr.co.za/httpdocs/temp/');
                define('DIR_FS_CATALOG', '/var/www/vhosts/tvr.co.za/httpdocs/temp/');
                define('DIR_WS_IMAGES', 'images/');
                define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
                define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
                define('DIR_WS_INCLUDES', 'includes/');
                define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
                define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
                define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
                define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
                define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
                define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
                define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
                define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
                define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
                define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

                hello,
                What is your (php)code in these lines:
                132.
                133.
                134.

                I saw a link on the site:

                http://www.oscommerce.com/community.php/bugs

                i think the method you've make links is unthinking a little bit. I think that is one mistake.
                is there a folder called community.php in your site root?

                jjozsi

                  // include the language translations
                    require(DIR_WS_LANGUAGES . $language . '.php');
                    $current_page = basename($PHP_SELF);
                    if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {
                      include(DIR_WS_LANGUAGES . $language . '/' . $current_page);
                    }
                    Liz_SA;10898685 wrote:
                    // include the language translations
                      require(DIR_WS_LANGUAGES . $language . '.php');
                      $current_page = basename($PHP_SELF);
                      if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {
                        include(DIR_WS_LANGUAGES . $language . '/' . $current_page);
                      }

                    And DIR_WS_LANGUAGES has defined in a file you're wanted to include ?

                    Try to print

                    echo DIR_WS_LANGUAGES . $language . '.php';

                    before you include.

                      Thank you... I replaced the code with
                      require(DIR_WS_LANGUAGES . 'english.php');
                      It sorted out my errors.
                      My Headings are still displaying incorrectly though!

                        From the mentioned url, the last post:

                        Unfortunately, I am not sure what I did to get myself up and running but I
                        can tell you my steps and hopefully it works for you also.

                        1. First of all I went to the configuration file and manually wrote down all
                          the defined variables and what their defined paths were. It was here that
                          I realized some of my paths were not correct. The path for the
                          DIR_WS_INCLUDES variable for example was looking for an 'includes' directory
                          in the includes directory ('includes/includes/application_top.php').

                        Fixing the paths in the configuration gave the ability to get to
                        Admininstration Tools interface. I could do some configuration but I
                        still had problems with many of my links. So I tried some further
                        debugging.

                        1. I entered the following code sample in my catalog/index.php and my
                          admin/index.php file right after the require('includes/application_top.php')
                          statement.
                          echo "The DIR_WS_CATALOG_IMAGES is: " . DIR_WS_CATALOG_IMAGES . "<br/>";
                          echo "The DIR_WS_INCLUDES is: " . DIR_WS_INCLUDES . "<br/>";
                          echo "The DIR_WS_BOXES is: " . DIR_WS_BOXES . "<br/>";
                          echo "The DIR_WS_FUNCTIONS is: " . DIR_WS_FUNCTIONS . "<br/>";
                          echo "The DIR_WS_CLASSES is: " . DIR_WS_CLASSES . "<br/>";
                          echo "The DIR_WS_MODULES is: " . DIR_WS_MODULES . "<br/>";
                          echo "The DIR_WS_LANGUAGES is: " . DIR_WS_LANGUAGES . "<br/>";
                          echo "The DIR_WS_CATALOG_LANGUAGES is: " . DIR_WS_CATALOG_LANGUAGES . "<br/>";
                          This is to verify what was being put into the defined variables. There may
                          be a quicker, easier way to do it but I am lazy and did what I knew to do
                          without opening a php book.

                        Found some more errors and some links were fixed but others were not.
                        I tried to follow the variable to see if other variables were using it
                        by using the find command: This command finds all files containing the
                        expression between the ''. As far as I know this works only for Unix/Linux
                        systems. Make sure to do this only in the catalog and admin directory. If you
                        do it in the root directory it will take a long time going through all the files on
                        your system.
                        find . -type f -print | xargs fgrep 'DIR_WS_CATALOG' /dev/null
                        find . -type f -print | xargs fgrep 'HEADER_TITLE_ONLINE_CATALOG' /dev/null

                        This is a useful tool but it didn't help me much in finding out why my
                        links were so crazy. I think another osMember has written about it, I am
                        monitoring his replies.

                        1. Finally, I thought I would try to remove my catalog
                          folder and reinstall using the web installer just to get fresh
                          configure.php files (maybe I made a mistake when i changed some path
                          variables). I cleared out my /tmp directory, cleared my cache and
                          history in my Mozilla browser, restarted my server of course. This time
                          when I used the web installer, I changed the name of my database but
                          left everything else the same and go figure, the installation worked
                          without me having to change the configuration file. All of my paths were
                          correct and also the links.

                        So, there you are. I don't know what happened.

                          Sorry... being a real pain.
                          On the Admin Section, if I go into my categories section if I click on the folder next to the categories it does not open.
                          Do you think this is related?

                            Liz_SA;10898696 wrote:

                            Sorry... being a real pain.
                            On the Admin Section, if I go into my categories section if I click on the folder next to the categories it does not open.
                            Do you think this is related?

                            while you don't check if the defined variables located into a (real,live) path, it won't show good links.

                            i'm not good at portal installing 🙁

                              Just to follow up, to fix the catagory folder button on my Admin section and to fix the manufacturer drop down I did the following.
                              Add these two lines to the htaccess file
                              php_flag register_globals on
                              php_flag register_long_arrays on

                              Now I just need to get my headings to display correctly.

                                php_flag register_globals on

                                this is the worst thing that you could do! i won't suggest to do that.
                                Your site won't be safe from the hacker attacks!

                                  5 months later

                                  I am sure that you have sorted the problem, but just it case someone with the same problem finds this issue- I had the same message and found that it was an issue with PHP versions. I had enabled php 5 with

                                  AddType x-mapp-php5 .php (in .htaccess)
                                  To run a recent upgrade. The upgrade scrambled things and when I restored things I got the message as above.

                                  Once I removed the line from .htaccess the error message vanished.

                                  Hope this is useful to someone.

                                    Write a Reply...