테스트 사이트 - 개발 중인 베타 버전입니다

Eternal server error 500 문의드립니다. 채택완료

달려날아 5년 전 조회 2,613

홈페이지 서버를 바꾸다가 그대로 파일과 디비를 옮기고 나서 메뉴 부분에서 

Eternal server error 500 이 나오고 있습니다.

 

</p>

<p><?php

define('_INDEX_', true);

include_once('./_common.php');

?></p>

<p><script src="<a href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script> " target="_blank" rel="noopener noreferrer">https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script> </a></p>

<p>    <style>

       @import url(<a href="http://fonts.googleapis.com/earlyaccess/nanumgothic.css);" target="_blank" rel="noopener noreferrer">http://fonts.googleapis.com/earlyaccess/nanumgothic.css);</a>

       @import url(<a href="http://fonts.googleapis.com/earlyaccess/notosanskr.css);" target="_blank" rel="noopener noreferrer">http://fonts.googleapis.com/earlyaccess/notosanskr.css);</a>

        ul, li { list-style:none inside; padding:0; margin:0}

    

        

        /*메뉴박스 전체 가로 세로(총높이) 사이즈*/

        .Njins_menu_all_box {width:1000px; height:80px; top:-3px; left:320px; !important; position:relative;  margin:0 auto; overflow:hidden;}

        /*주메뉴 컬러 및 가로 세로 사이즈, 글자 세로위치, 메뉴사이 간격을 같게 할경우 width:지우고, margin-right:값을 주세요*/

        .depth_01_li {width:160px; height:36px; background:rgba(0, 0, 0, 0); !important; text-align:center; float:left; cursor:pointer;}

        /*주메뉴 마우스 오버 배경*/

        .depth_01_li:hover { background:rgba(0, 0, 0, 0)}

        /* 주메뉴 글씨크기(div), **메뉴 오버시 글씨 색상(JQuery)** */

        .depth_01_div {width:160px; height:50px; !important; box-sizing:border-box; font-size:16px; font-family: 'Noto Sans KR', sans-serif;}

        .depth_01_a:link, .depth_01_a:visited {text-decoration:none; font-family: 'Noto Sans KR', sans-serif; font-weight:bold; color:#fff;}</p>

<p>                

        /*부메뉴 박스 위치, 주메뉴 높이값과 top값이 같아야 함*/

        .depth_02_ul {top:32px; height:35px;  width:1100px; !important; position:absolute; background:rgba(0, 0, 0, 0) }

        /*주메뉴와 세로 간격, 부메뉴 컬러 및 가로 세로 사이즈*/

        .depth_02_li {margin-top:10px; height:20px; margin-right:15px; !important; float:left; }

        /*부메뉴 링크 글씨*/

        .depth_02_a:link, .depth_02_a:visited {color:#fff; text-decoration:none; font-family: 'Nanum Gothic', serif; font-size:15px; font-weight:bold;}

        .depth_02_a:hover, .depth_02_a:active {color:#fff;}

        

        .depth_01_li:nth-child(1) .depth_02_ul {left:20px; !important; position:absolute;}

        .depth_01_li:nth-child(2) .depth_02_ul {left:180px; !important; position:absolute;}

        .depth_01_li:nth-child(3) .depth_02_ul {left:340px; !important; position:absolute;}

        .depth_01_li:nth-child(4) .depth_02_ul {left:300px; !important; position:absolute;}

        .depth_01_li:nth-child(5) .depth_02_ul {left:540px; !important; position:absolute;}

    </style>

<script>

        $(document).ready(function() {

            //주메뉴 갯수

            var menu_ea=5;

            for(i=1; i<=menu_ea; i++){

                $(".depth_01_li:nth-child("+i+")").find(".depth_02_ul").css("display","none");

                

            }

            for(i=1; i<=menu_ea; i++){

                $(".depth_01_li:nth-child("+i+")").on({

                    mouseenter: function(){

                        $(this).find(".depth_02_ul").css("display", "block");

                        $(this).find(".depth_01_div").css("color", "#fff"); //주메뉴 텍스트 오버 색상

                    },         

                    mouseleave: function(){

                        $(this).find(".depth_02_ul").css("display", "none");

                        $(this).find(".depth_01_div").css("color", "#fff"); //주메뉴 텍스트 아웃 색상

                        

                    }                                            

                });

                $(".depth_01_li:nth-child("+i+")").find(".depth_02_ul").on({

                    mouseenter: function(){

                        $(this).find(".depth_02_ul").css("display", "block");

                    },         

                    mouseleave: function(){

                        $(this).find(".depth_02_ul").css("display", "none");

                    }                        

                });

            }            

        });

    </script>

        <div style="position:relative; width:1200px; height:149px; margin:0 auto; ">

            <img src="<?php echo G5_URL ?>/img/top_menu.png" width="1200" height="149" border="0" usemap="#toplinks" />

    <map name="toplinks" id="toplinks">

                <area shape="rect" coords="11,54,312,102" href="/" onfocus='blur()' />

  <area shape="rect" coords="1148,18,1183,34" href="/adm" onfocus='blur()' />

  <area shape="rect" coords="1102,17,1142,34" href="/" onfocus='blur()' />

            </map>    

    </div>

    

    <div class="Njins_menu_all_box" style="margin-top:-80px;">

<ul class="depth_01_ul">

    <?php

            $sql = "select * from {$g5['menu_table']}

                        where me_use = '1'

                          and length(me_code) = '2'

                        order by me_order, me_id ";

            $result = sql_query($sql, false);</p>

<p>            for ($i=0; $row=sql_fetch_array($result); $i++) {

            ?>

            

      <li class="depth_01_li" style="z-index:<?php echo $gnb_zindex--; ?>">

                <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="depth_01_a"><div class="depth_01_div"><?php echo $row['me_name'] ?></div></a>

                

                    <?php

                    $sql2 = " select *

                                from {$g5['menu_table']}

                                where me_use = '1'

                                  and length(me_code) = '4'

                                  and substring(me_code, 1, 2) = '{$row['me_code']}'

                                order by me_order, me_id ";

                    $result2 = sql_query($sql2);

    

                    for ($k=0; $row2=sql_fetch_array($result2); $k++) {

                        if($k == 0)

                            echo '<ul class="depth_02_ul">'.PHP_EOL;

                    ?>

    <li class="depth_02_li"><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="depth_02_a"><?php echo $row2['me_name'] ?></a></li>

                    <?php

                    }

    

                    if($k > 0)

                        echo '</ul>'.PHP_EOL;

                    ?> 

                                    

                </li>

            <? }?>                

      </ul>

</div>          </p>

<p>

 

해당 코드에서 78번째줄 부터

</p>

<p>    <?php

            $sql = "select * from {$g5['menu_table']}

                        where me_use = '1'

                          and length(me_code) = '2'

                        order by me_order, me_id ";

            $result = sql_query($sql, false);</p>

<p>            for ($i=0; $row=sql_fetch_array($result); $i++) {

            ?></p>

<p>

이부분이 잘못 되었는지 빼면 홈페이지가 먹통이 된게 풀리기는 하는데 메뉴를 가져오질 못합니다.

어떻게 조치 할 수 있을지 문의 드립니다!!

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
플라이
5년 전

500 에러라 한다면 소스 어딘가에서 문제가 발생되는 부분이 있는거 그 부분을 찾아봐야 하는 부분인데

이 소스만을 가지고는 판단이 어렵지만 메뉴가져올때 에러가 난다면 지금 _common.php 경로를 체크해 보셔야 할듯 합니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인