1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A Problem with Code Editor

Discussion in 'General Discussion' started by editor, Apr 13, 2009.

  1. editor

    editor New Member

    Joined:
    Apr 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin, Ireland
    Hello,

    When I open a PHP file with code editor, there appears a small window on the upper left hand corner. Then this small window is extended to the whole screen wide and all the code is on one single line. How to get back the previous settings, where the code was in order with line numbering on? This problem occurs with index.php files (not other php files) and with both browsers of FF and IE.

    Thanks
    Editor
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    What's the full version information of the cPanel/WHM server. Include full version number (xx.xx.x), build (E, C, R, S...) and build number? This will help me attempt to replicate this issue.
     
  3. editor

    editor New Member

    Joined:
    Apr 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin, Ireland
    cPanel Version and Build

    I have a cPanel version 11.24.4-STABLE and its build is 35075. There is also this info; cPanel Pro 1.0 (RC1). This is a shared web hosting package.

    Regards
    editor
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    I just installed 11.24.4-STABLE 35075 on a server and was unable to replicate this issue.

    However, did you at any time edit the index.php files then upload them from a computer using FTP? This sounds like an instance where a file was uploaded but in binary rather than ASCII mode. That would explain the content being crammed onto a single line.

    You may want to contact your hosting provider about this, they may be able to provide further insight as they would have access to the files. If they need assistance from us, they're welcome to contact us.
     
  5. editor

    editor New Member

    Joined:
    Apr 13, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Dublin, Ireland
    The Single Line Problem in Code Editor

    Yes, previously I have edited these index.php files by using Evrsoft First Page 2006 and transferred to the server by using Filezilla FTP program. Noticed that this is quite clumsy way to edit these files. Does Evrsoft First Page 2006 change these index files somehow, although they are saved as PHP files? What should I do in order to get rid off this problem?

    Regards
    editor
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,288
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, TX
    These issues can arise when there's a mis-matching of newline characters with the OS.

    Each OS has it's own character (or combination of characters) to indicate a new line of text in a plain text file such as a .php file. If you are transferring files from a Windows system to a *nix system, if you use ASCII mode FTP, your FTP client will automatically translate all the Windows-style newline characters to Unix-style newline characters. If you transfer in Binary mode, this translation does not occur. This can result in weird characters being displayed on screen, no newline characters being detected (everything on one line) and various other symptoms.

    Sometimes simply downloading the file in ASCII mode with your FTP client then re-uploading it can resolve this issue. However, this may not always work.

    I recommend you let your hosting provider take a look at the file. While I'm merely speculating, your hosting provider will be able to let you know what is the exact issue you are experiencing.
     

Share This Page