Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osCommerce 2.3.3 .htaccess file issues with (Apache) xampp 1.8.1 win32 VC9


dumpster

Recommended Posts

Posted

osCommerce 2.3.3 .htaccess file issues with (Apache) xampp 1.8.1 win32 VC9

 

Hello all.

 

I'm an old COBOL programmer in need of assistance. I know a little about HTML and CSS but not enough to venture off the Bunny hill. I know nothing about PHP or servers and related software.

 

In several attempts to create a development environment for osCommerce 2.3.3 using xampp 1.8.1 as a pseudo server on my Windows Vista 64 Professional machine, the install of xampp goes fine as well as the install of osCommerce . The problem lies in running the osCommerce software after installation. osCommerce runs but the store and admin images do not display nor is there any style sheet/web site formatting. The problem is related to the .htaccess files which are installed within directories in osCommerce. For example, if I remove/rename the .htaccess files in the images folders within catalog and catalog\admin, the images display as one would expect. If I remove/rename the .htaccess file within the catalog\ext folder, the style sheet/formatting for the store web site seems fine. I found one obscure thread to the above and that individual seemed fine with simply deleting the .htaccess files.

 

http://www.oscommerce.com/forums/topic/389386-need-help-with-xampp-oscommerce-installation-css-style-not-working/

 

Deleting files which were most likely installed with osCommerce for a reason, doesn't sound like a proper solution to me and even if fine for my development environment, what's to happen when I move a non altered catalog folder and all sub folders which contain .htaccess files, to my live web server/host? Are deleting such files opening the door to security issues? I want to do things the right way.

 

Within xampp I noted a possible issue/resolution as described above:

 

http://www.apachefriends.org/en/faq-xampp-windows.html#vista

Pictures and style-sheets are not displayed!

 

Sometimes there are problems with displaying pictures and style-sheets. Especially if these files located on a network drive. In this case you can enable (or add) one if the following lines in the file "\xampp\apache\conf\httpd.conf":

EnableSendfile off

EnableMMAP off

 

I tried the above with no luck and now figure the correct solution would seem to be in some little xampp, osCommerce or .htaccess setting to resolve path issues and/or privileges... but that's just a guess as what I'm seeing in the .htaccess files presently, reads like gibberish to me. I have UAC turned off as was recommend by Apache and I tried moving the osCommerce catalog folder directly under c:\xampp\htdocs\xampp as well as to a sub-folder to that path I created called osc. I haven't yet tried the above on my Windows 7 laptop as I would prefer to resolve issues properly and develop on my Vista desktop.

 

I can't be the only person, save one, who encountered this issue, can I? Any insight would be appreciated.

 

Thanks,

 

Edward

Posted

Since it's on your local machine just rename the .htaccess files to something else.

 

After transferring to your online host when development it done rename them back and fight any battles with them then.

 

Fighting them on your local mahine is a waste.

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 >

Posted

Hello Jim,

 

Thanks for the reply and believe me, after 12 frustrating hours yesterday, I couldn't agree more... and that was the game plan this morning. However, I'd like to know what the issue is... not only for my local machine but just in case I encounter similar issues with my online host in future. A preemptive post, if you will. :-) Plus, maybe this topic will prove useful to those who come after me who are encountering similar issues. I certainly couldn't find anything related (save that one post) or a resolution yesterday.

Posted

I also have this problem and I am an online user...

Do not want to delete the .htaccess files for security reasons...

 

If someone have a solution or a explanation about this issue, I want want to know it seconds (not first because of my friend above) :)

Posted

My suggestion is to forget about using *AMPP on a PC, and use a test installation (say, /dev directory) on your real host (if you already have one). People seem to have all sorts of problems installing and using *AMPP stacks, especially on Windows. Even if you get it working, and you get osC working, it's even money that when you move your code back to the real host, you forget to update some configuration somewhere, or that different PHP or MySQL versions between your *AMPP and the real host server cause difficult-to-diagnose problems. If you want to, you can use a copy of your real store's database so there's no chance of messing up your real store. As long as you don't have any links to /dev, search engines probably won't index it, but you can add password protection to /dev for extra peace of mind. The only downside to doing this is that the edit/test cycle may take a little longer because you have to upload an edited file to the host (unless you use the hosting File Manager editor for minor changes).

Posted

I also have this problem and I am an online user...

Do not want to delete the .htaccess files for security reasons...

 

Blindly deleting .htaccess files is always stupid. These files are there for a purpose. If they are causing problems, the correct solution is to find out what command(s) within the .htaccess are causing errors or other problems, understand what's going on, and fix or comment out those commands (if you're sure that won't cause a security problem). Temporarily renaming or deleting an .htaccess file may help in diagnosing that the problem is coming from there, but is never a permanent solution. Even on a local machine (*AMPP), the .htaccess may still be doing something useful for you (e.g., SEO rewriting of URLs). On a local machine, you may be able to do without security-related stuff, since no one but you will be accessing the site, but understand first which commands that is before removing/disabling them.

 

"I also have this problem" means what? No images? No CSS? Something else? Those could be .htaccess URL rewrite problems, or they could be something else.

Posted

I have had .htaccess cause strange problems.

 

Mine is 17k, well stocked.

 

That i have done in the past is make a copy, then take the first quarter and see if it works.

And then consistently add back to it till it stops working, and fine tune the adds and deletes until the culprit is found.

 

Its usually something obscure, so i'll just remove it or comment out the line.

But keep the original line above it in commented form.

 

I wouldnt waste time with .htaccess on a local server.

There are some security forums that regularly update the file, and it should only be used on a live server.

 

I have a 2.2 production site, and a 2.3 test site running on my server (as well as Drupal WP and half a dozen others.

Advise installing in a subdirectory but disable .htaccess before install. After its installed you should be able to use the test site again. this, again, is for web hosting.

 

You can move between local and remote servers, annd remote to local with the main files to change being the config files in the /include subdirs - but other procedures are also important, such as keeping ..htaccess away from local servers, and turning off ALL caching between moves. there will be more than one if you use some addons, like some of the SEO modules.

And of course, dont forget the database.

 

What appears to be causing the problems with .htaccess (and possibly other system security functions) is that during an *internal* install the script will be writing from one file to another setting up the configuration files, and possibly a couple other things.

For any website this is the ultimate nightmare scenario, so step SHOULD be taken to block the process.

Its usually done in .htaccess, though i haven a clue offhand as to which part does it!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...