Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Header.PHP changes disappear

    First of all, I do not know anything about PHP. I have a website where I need to edit the Header.PHP file. When I go in and make a change then save the change everything looks okay. When I bring up my webpage and do a "view source" I see the change I made, but the change keeps disappearing. I recently noticed that after I "publish" the website with new changes, then the change I made will disappear in the Header.PHP file when I check it.

    For example, I have added the google meta tag to use for site verification, then go the google to verify my site and it is fine. Eventually, when I go back to google it wants me to verify the site again and the change I inserted in the Header.PHP file disappeared.

    Today, I was trying to add the "canonical link element" tag into the header.php and it disappeared also.

    Can anyone offer some help?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,509
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    Is this on a CMS system like WordPress, Joomla, or Drupal?
    And are you making the changes via their admin section, or by hand (using FTP).

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Mlseim,

    I do not believe it is any of those- the first few lines of source code is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>


    I am making changes using the cpanel in hostgator using file manager, then editing Header.PHP- then it will save change successfully.

    Thanks for any help

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,509
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    After you make some changes, try viewing it online with and without the "www." in the URL.
    See if that makes a difference. Let us know.

    I'm guessing it's a caching issue. With or without the www. in the URL might answer that.

    If you see a difference, you should try accessing and updating files using FileZilla (FTP).
    FileZilla is free, so download it and install it. You can get your FTP account info via
    your webhost control panel ... or create one using your control panel. File updates
    and transfers are so much easier using FTP (and FileZilla).


    .

  • #5
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried both URLs- that does not make a difference. I placed the code in a again, saved the Header.PHP file successfully. The code shows up when you to go to the web page and look at the source on each page I checked, but I soon as a go in the editor and do a Publish- the changes get deleted from the Header.PHP file.

    Originally, I had this site built by someone else. They set up a Web 2.0 template with most of the edits being able to be done in a special editor that was built. However, the changes I need to make are in the actual Header.PHP from the cpanel on hostgator.

    I am not sure whether the builder's of the site coded something in the site that prevents me from making changes like I am making or not. It is weird that I can make and save the change ok until I publish. I always publish my changes via the editor that they provided not from within cpanel/hostgator.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •