Guest Posted March 12, 2007 Posted March 12, 2007 Hi! We had a fully functional oscommerce install... until we had to move webhosts.. First problem was the register_globals thing, which we applied the patch for.. now we get this: Error! Unable to determine the page link! When clicking on any product, or link on any page. Also, at the top of every page: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/install) is not within the allowed path(s): (/tmp:/usr/share/pear:/home/fhlinux173/e/ellecorsets.co.uk/user) in /home/fhlinux173/e/ellecorsets.co.uk/user/htdocs/catalog/includes/header.php on line 15 Its almost as if the config is wrong and that the files are not where OScommerce expects them to be.. yet all seems to be right :/ Can anyone suggest anything? Am preparing a horrible backup plan of Zen cart :/ http://www.ellecorsets.co.uk/catalog
GemRock Posted March 12, 2007 Posted March 12, 2007 Line 15 in Header.php is for checking whether the install folder is still there for security reason, so if you have deleted (and you should) that folder, that checking is no longer needed: // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } You either comment out the above or delete them all together. The error of 'Unable to determine page link' on your site is obviously coming from the lagnguage box at the right column. So, as you only use one languge, there is no need to have that box. A quick fix to try is to comment out this line in column_right.php: include(DIR_WS_BOXES . 'languages.php'); or if you do not offer other currencies, then delete the following: if (substr(basename($PHP_SELF), 0, 8) != 'checkout') { include(DIR_WS_BOXES . 'languages.php'); include(DIR_WS_BOXES . 'currencies.php'); } Just took a look at your site. It seems you site may have some other problems as well. Good Luck! Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
♥Vger Posted March 12, 2007 Posted March 12, 2007 "Unable to determine page link" comes from having enabled "Use Search Engine Friendly URL's" on a server which doesn't support them. So set it back to false and that error will go away. Vger
GemRock Posted March 12, 2007 Posted March 12, 2007 The error "Unable to determine page link" may be caused by "Use Search Engine Friendly URL's" (one the reasons). But from what I saw at the site, it did not seem to come from that when pointing to a link and looked at the status bar, as far as I could remember. The page rendering actually stopped at the languages box. But I could be wrong. Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
Guest Posted March 12, 2007 Posted March 12, 2007 Thanks guys, I've tried the stuff above and am still getting the issue (tho I did comment out the install folder check (tho it was deleted anyway) and it got rid of that warning) Now I've duplicated the entire installation onto my own personal virtual webserver and its working fine, so I'm thinking this is a web hosting issue, but I need to try and pin down whats happening. real site: http://www.ellecorsets.co.uk/catalog virtual: http://sulaco.no-ip.org/catalog phpinfos http://www.ellecorsets.co.uk/phpinfo.php http://sulaco.no-ip.org/xampp/phpinfo.php Further advice much appreciated! :)
GemRock Posted March 12, 2007 Posted March 12, 2007 Two things: register_global is Off; register_long_arrays is Off, both of which are not particularly desirable for osc, altho you may think there's some work arounds there. There may be more... Ken commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
Iggy Posted March 12, 2007 Posted March 12, 2007 Thanks guys, I've tried the stuff above and am still getting the issue (tho I did comment out the install folder check (tho it was deleted anyway) and it got rid of that warning) Now I've duplicated the entire installation onto my own personal virtual webserver and its working fine, so I'm thinking this is a web hosting issue, but I need to try and pin down whats happening. Further advice much appreciated! :) I just ran into this. Try doing a global replace of (individually in any files they appear in) $HTTP_SESSION_VARS $HTTP_SERVER_VARS $HTTP_POST_VARS $HTTP_GET_VARS $HTTP_ENV_VARS $HTTP_COOKIE_VARS with $_SESSION $_SERVER $_POST $_GET $_ENV $_COOKIE HTH, Iggy Everything's funny but nothing's a joke...
Guest Posted March 12, 2007 Posted March 12, 2007 Is there any easy way to do this/identify the files? I tried searching through the catalog for "files containing" but it didnt come up with anything,
♥Vger Posted March 13, 2007 Posted March 13, 2007 I'm sorry Iggy but getting a site to be Register Globals 'off' compatible is a whole lot more than just replacing Globals with Super Globals. If it was that easy then making any website Register Globals 'off' compatible would be a doddle. Unfortunately it also affects the way that functions and arrays are handled. It would be far easier to go through every page and make sure that all normal globals are specifically declared, thus making them work with Register Globals 'off' than it would be to only use Super Globals. --------------------------------------------------------------- Now, about this particular issue. I was wrong about it being caused by using "Search Engine Friendly uRL's" because when it is that which causes the problem it only happens on pages with cPaths and does not happen on static pages such as Shipping or Conditions etc. It happens on all pages on your website. And the error occurs when the page tries to load the Currencies box. As Gem Rock said earlier you can try commenting out the Language and Curencies boxes and see if that helps - but you do have other problems: 1. Register Globals is 'off' and osCommerce is not written to work with Register Globals 'off' in php.ini 2. Register Long Arrays is 'off' and osCommerce is not written to work with Register Long Arrays 'off' in php.ini 3. There were reported problems with PHP v 5.1.6 and some versions of Zend Optimizer, but these should have been resolved. Unfortunately you are hosted with Fasthosts so don't bet on it. Vger
Iggy Posted March 13, 2007 Posted March 13, 2007 I'm sorry Iggy but getting a site to be Register Globals 'off' compatible is a whole lot more than just replacing Globals with Super Globals. If it was that easy then making any website Register Globals 'off' compatible would be a doddle. Unfortunately it also affects the way that functions and arrays are handled. Vger My fault. I should have specified that replacing those values would fix the register_long_arrays Off issue. Register Globals can be handled with one of the RG contribs. Iggy Everything's funny but nothing's a joke...
Iggy Posted March 13, 2007 Posted March 13, 2007 Is there any easy way to do this/identify the files? I tried searching through the catalog for "files containing" but it didnt come up with anything, I used BBedit's find and replace function on the entire catalog folder. If you're on a Mac I suggest it. I'll let the PC folk suggest a windows analog. Iggy Everything's funny but nothing's a joke...
♥Vger Posted March 13, 2007 Posted March 13, 2007 Text Pad has the best 'Find and Replace' function I've come across on a PC. One other thing I forgot to mention which is going to cause you problems. The character set for osCommerce is defined as en-iso-8859-1, but your server has en_US.utf-8 defined as the language - which means that's what is set in php.ini. Some en-iso-8859-1 characters won't be readable by utf8 and will appear as question marks. If this happens in the code then this could be one of the causes of your problems, and this can happen because if you open files on your PC then the setting in the editor you use on your PC will likely be for Windows 88591 (en-iso-8859-1). Vger
♥Vger Posted March 13, 2007 Posted March 13, 2007 If you intend to persevere on this server then your best solution is to make all of your website and database utf8. Download and install EditPad Pro and set the default encoding to utf8. Open every osCommerce file, click on the Convert tab and then save the file. Make sure that the database is also encoded utf8 and upload all files (now saved as utf8). You also need to change the character set definition in includes/languages/english.php and any other languages you use) to utf8. Vger
Guest Posted March 13, 2007 Posted March 13, 2007 This totally sucks. to hell with it, I'm going to cancel the hosting with them. Note that a google search for "OScommerce compatible web hosting" has them as the top hit :/ Any recommended UK hosts? Thanks
bugmenot Posted March 23, 2007 Posted March 23, 2007 This totally sucks. to hell with it, I'm going to cancel the hosting with them. Note that a google search for "OScommerce compatible web hosting" has them as the top hit :/ Any recommended UK hosts? Thanks no UK, but Germany is near by ;-) Sauer CS (Babelfish) 100 MB, 5GB traffic, MySQL, PHP5, CGI, SSI, SSL, Cronjobs, unlimited subdomains, installation of osCommerce done by provider if wanted (little extra cost), 0,99 euros/month I'm there for about a year now, and can't complain... (btw you can include my ID when signing up, if you like: 1301 ;) ) .
Recommended Posts
Archived
This topic is now archived and is closed to further replies.