Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page Blank Except For 1 Line of Code?


Guest

Recommended Posts

I've tried (and tried and tried) searching the forums and the search engines, but I cannot find the answer anywhere, so I am asking here...

 

Does anyone know why this code (and this code ONLY) would appear on the home page of an oscommerce installation:

<?php header('Location:catalog/'); ?>

 

All other pages have nothing but code showing, same as with the admin area.

 

Also, if the code is checked in the browser, it looks pretty much empty, however, all the code appears to be there when I check the index.php page in the file manager?

 

The person whose website this is says they did nothing to it, so I have no idea what may have gone wrong. It was fine not too long ago :/

Link to comment
Share on other sites

That appears to be a redirect; header redirect to the catalog.

 

I can't say for sure but I would say maybe a hacker got some sort of injecting into the htaccess file in which case its not executing php

Link to comment
Share on other sites

Thank you for the responses. No, he wasn't using a commercial template. And maybe I'm getting a little closer to figuring this out....is there something in the .htaccess file I can change to correct this?

Link to comment
Share on other sites

From Catalog:

# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#    SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1

From Admin:

# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#    SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>
# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter
# AcceptPathInfo On
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
# php_value session.use_trans_sid 0
# php_value register_globals 1
AuthName "osCommerce Admin Access"
AuthUserFile /home/content/84/7507484/html/catalog/admin/.htpasswd

Link to comment
Share on other sites

Only the admin has active code which is asking for your password.. they look fine. I'm not sure what else I could say without looking at the files, or possibly contacting your host asking why scripts aren't being run.

Link to comment
Share on other sites

Can you send me a link to the site so I can take a look at it. Just the URL maybe I maybe able to spot something.

 

As far as charges go I don't require anything unless I have to physically do something, sharing knowledge I have no problem with. :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...