Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


rogerwhitfield last won the day on December 20 2012

rogerwhitfield had the most liked content!

About rogerwhitfield

Profile Information

  • Real Name
    Roger Whitfield
  1. A few years ago I managed to get both remote and local images to work at once, I posted the information on this forum in case anyone else found it useful. Now I have upgraded to OSC 2.3.4 Bootstrap I have found some small differences that need to be addresses to make the modification work, these are as follows:- The images are displayed using a routine in includes/functions/html_output.php, to enable remote images you need to make the following modifications: I located this function on line 73:- //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $responsive = true, $bootstrap_css = '') { if ( (empty($src) || ($src == 'images/')) && (IMAGE_REQUIRED == 'false') ) { return false; } and then added the following directly after it:- // check to see if image is external or internal (check for http) and modify $src // check to see if image is external or internal (check for http:) and modify $src added by RW 12-09-2016 to support remote images $mystring = $src; if ( substr($mystring, strlen(DIR_WS_IMAGES), 4) == 'http') { // use remote file $src = substr($mystring,(strlen(DIR_WS_IMAGES))); } else { if (file_exists($src)) { // use local file } else { // Use no image file $src = DIR_WS_IMAGES . 'no_img.jpg'; } } Basically this looks at the image source variable $src and checks to see if the first thing after the image path is html, if it is then it is a remote image and the local image path is removed from the variable $src so that the image can be found online, if it is a local image then it is displayed as usual. Finally I added the last bit so that if the image is missing then it displays the no_img.jpg (you will need to make sure you have a file in images with this name. Now this worked fine on OSC 2.3.3 but on the newer version it wouldn't work, the reason was because I was using DIR_WS_IMAGES to point to the images folder, however this is not defined so you need to edit includes/configure.php and add the line:- define ('DIR_WS_IMAGES', 'images/'); assuming that your local images are stored in the images folder, if they are stored elsewhere then just change the path to match the location. I have done this because I have a variety of products from different suppliers, some products are entered manually and we have local images for them and others are supplied via an automatic feed that supplies a url to the image. This modification allows me to just dump the url into the image field and display the image correctly. If anyone else has the same requirement then please feel free to use, or to improve this code. I have attached the complete working html_output.php file.
  2. I have a recent backup of all the files. I started by copying the files extracted from the old server and ran into this problem so I replaced the files from the backup and got exactly the same issue. The backup was taken 3 days before the server problem and when the server was working correctly. As a test I have installed a fresh copy of 2.3.3 and 2.3.4 and Bootstrap, each of these installations work correctly so I think I will have to give up on resurrecting the old website and instead start making modifications to the Bootstrap version. Its a shame I can't get the old site working as its quite a long job to modify the site the way I want it but I guess that's life.
  3. I have opened the header.php file in dreamweaver and it seems intact, I tried restoring from my local backup but I get exactly the same errors. I changed the file permissions to 777 temporarily just to check to see if it was a permissions error but it made no difference so I changed it back. My site is quite heavily customised so upgrading to a newer version is something that needs to be planned for and at the moment I am just trying to get something back online. The server crash was actually caused by a corruption in the use partition, it didn't really crash it just wouldn't restart, so I am sure that the web files that were in the var partition are all fine. I guess I could always try installing the latest version just to see if I get the same problems. I may give that a go next week.
  4. I have recently suffered a server failure, the server is only accessible in recovery mode so I have copied all the files off it onto a new server. Before the server failure the OSCommerce site was working correctly but after the change I am getting the following error messages:- Notice: Undefined variable: data in /var/www/vhosts/ on line 64 Notice: Undefined variable: data in /var/www/vhosts/ on line 237 Parse error: syntax error, unexpected end of file in /var/www/vhosts/ on line 111 After I transferred the files I made sure that the owner and group were changed, and that the correct file permissions were set, I am using the same .htaccess file as on the previous server. I am running OSCommerce 2.3.3 and php, I think the old server was running a similar version. Server is Centos x64 as was the previous server. I have tried setting the file permissions for the two boxes mentioned above to 777 but that has made no difference. The MySQL server was restored from a backup. The backup was two years old but I don't think that this is a database problem. My money was on it being a file permissions or ownership problem but that does not seem to be the case, so I am at a loss as to what has caused a perfectly good website to throw this error! In my mind the only thing that has changed is the server, so surely this is a configuration issue, but I cannot think of anything else to change to resolve these errors, if anyone could give me some pointers it would be very much appreciated. Thanks.
  5. Thanks Mark, I can now see what is happening on github, and my frustrations are subsiding. I think I will go to work and re-schedule some time next week. George - The PR thing was ony an observation not a criticism, the most important thing is always the code, and I have nothing but admiration for the team.
  6. I have taken today off work to spend time installing and assessing V3, will it be released today or should i go to work and re-book the time out for next week? I think if you provide a countdown you should stick to it, you must have known some days ago that you wern't going to make the deadline, a quick update of the countdown page would have kept us all in the loop. I don't want to seem ungrateful, because i really do appreciate all the hard work that everyone is putting into this project, but missing your own launch date rather than altering the date is a PR no no. I upgraded my server to PHP5.3 in anticipation, anyone who rents a root server or cloud server can do the upgrade themselves, it is only those with a hosting account on a shared server that will suffer. If your hosting provider doesn't support 5.3 vote with your feet.