首页 > 解决方案 > 在 Oscommerce 中出现管理员错误后将 v2.2 升级到 v2.3.4.1

问题描述

在前台商店完全运行后,我已将 OSCommerce v2.2 升级到 v2.3.4.1。但管理员收到如下错误:

警告:在 /home/inceptio/public_html/curtispayments/test-os/admin/includes/functions/html_output.php 中使用未定义的常量 ENABLE_SSL - 假定为“ENABLE_SSL”(这将在 PHP 的未来版本中引发错误)在线14

警告:无法修改标头信息 - 标头已由 /home/inceptio/public_html/curtispayments/ 中的(输出开始于 /home/inceptio/public_html/curtispayments/test-os/admin/includes/functions/html_output.php:14)发送第 25 行的 test-os/admin/includes/functions/general.php

我已经在我的网站上启用了 SSL。另外,在两个 configure.php 文件中添加以下代码

define('ENABLE_SSL', true);

当我在管理员 configure.php 中插入上面的代码时,我得到了:

此页面无法正常工作

管理员:https ://inceptionsystem.com/curtispayments/test-os/admin/

正面:https ://inceptionsystem.com/curtispayments/test-os/

我该如何解决这个问题?有没有人建议非常感谢?

谢谢

标签: phpssloscommerce

解决方案


OK 很容易找到这样的文件和行 在 bash shell 中的存储根目录中创建一个文件 您必须在“目录”上方的目录中 将其复制并粘贴到 bash shell

BA=$(cat <<-ENDBA
#!/bin/bash
file="allcode"
catalog="catalog"
today="\`date -u +\"%Y%m%d%H%M%S\"\`" 
if [ -s "\$file" ]
then 
   echo "File \$file exists and is not empty "
   FILE="\$file_pre_\$today"
   echo "Preserving older allcode File to: \$FILE"
   mv \$file \$FILE
   echo "....creating New \$file file"
else
   FILE="\$file"
   echo " file \$file does not exist, or is empty "
   echo "....creating file \$file"
fi
grep -I  -n  -r "." \$catalog  | egrep  -e ".php*:" -e ".js:" -e ".sql:" -e ".css:" -e ".xml:" -e ".crt:" -e ".ht*:" >\$FILE
ENDBA
)
BL=$(cat <<-ENDBL
#!/bin/bash
if [ \$# -eq 0 ]; then
    echo "No arguments provided"
    echo -n " Enter Search String "
    read search
    if [ -z "\$search" ]
    then 
        exit 1
    else
        echo " Searching for string \$search "
    fi
else
  search=\$1
  echo " Searching for string \$search " 
fi
cat allcode | egrep -e \$search| egrep  -e ".php*:" >\$search.found 
#cat allcode | egrep -e "\$search"| egrep  -e ".php*:" -e ".js:" -e ".sql:" -e ".css:" -e ".xml:" -e ".crt:" -e ".ht*:">\$search.found
echo -n "Matching Lines Found "; wc -l \$search.found
cat \$search.found | sed -e "s/:.*/:/g" | sort -u>\$search.files
echo -n "Matching Files Found are "; wc -l  \$search.files
#comment out line 7 and un-comment line 8 for looking in all code not just PHP
ENDBL
)
echo -e "$BL" >bl
echo -e "$BA" >ba
sudo chmod u+x ba bl
./ba
#now all  your code is backed up and you can search it

希望我把所有的逃脱都弄对了:(


推荐阅读