Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6915975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:32:35+00:00 2026-05-27T09:32:35+00:00

This might sound a bit silly. I have to update a website with a

  • 0

This might sound a bit silly.
I have to update a website with a new interface, and although I received the old code I am lost. (As far as I know, I received the complete website, phpPgAdmin included)

Most of the files are .cmt but I’m pretty sure it’s PHP, index.cmt for instance is

<?
include_once('redirected.php');
exit();
function get_lang_from_ip() {
    $client_ip = $_SERVER['REMOTE_ADDR'];
    $client_hostname = gethostbyaddr($client_ip);

    if ($client_ip != $client_hostname) {
        $dom_arr = split('\.',$client_hostname);
        $lang_id = ($dom_arr[sizeof($dom_arr)-1] == 'hu') ? 'hu' : 'en';
    } else {
        $lang_id = 'hu';
    }
    return $lang_id;
}

function set_target() {
    $valid_lang_arr = array('hu', 'en');
    if (isset($_GET['lang_id']) && in_array($_GET['lang_id'], $valid_lang_arr)) {
        $lang_id = $_GET['lang_id'];
    } elseif (isset($_COOKIE['lang_id']) && in_array($_COOKIE['lang_id'], $valid_lang_arr)) {
        $lang_id = $_COOKIE['lang_id'];
    } else {
        $lang_id = 'hu'; //get_lang_from_ip();
    }
    setcookie('lang_id', $lang_id, time()+3600*24*365, '/');
    return $lang_id;
}

header('Connection: close');
header('Location: /'.set_target().'/');
?>

The .php files however don’t begin with the <? short opening tag, but with <?php instead. And most importantly, the .cmt files are not parsed, if I navigate to the index.cmt I see the code in the browser, and thus I can’t even put the old layout back together.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:32:36+00:00Added an answer on May 27, 2026 at 9:32 am

    You can make a .htaccess file, and include the following:

    AddType application/x-httpd-php .cmt
    

    That should allow PHP to be executed on .cmt file extensions.

    Please note that this fix can only be used on Apache web servers or others that support .htaccess.


    Although, if possible, I’d recommend that you change all .cmt file extensions to their appropriate counter part, .php.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am a bit new to javascript. This question might sound a bit too silly,
This question might sound a bit stupid but here it goes. I have two
This might sound like a bit of a silly question but I been looking
This might sound a bit of an odd question but I know what I
OK, this might sound a bit confusing and complicated, so bear with me. We've
This might sound like a little bit of a crazy question, but how can
This might sound like a reaaaally dumb question but... why do browsers have a
This might be a bit on the silly side of things but I need
This might sound a bit un-realistic, but I've recently had to study the database
This might sound a bit dumb. I always had this impression that web.config should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.