Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: My index.php file size is increasing dramatically

  1. #1
    Join Date
    Apr 2007
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default My index.php file size is increasing dramatically

    Dear friends,

    I have just notices that my index.php file size has incresed from 47K to 775K , what could be the reason ? I think this will take a hell lot of time to open from slower internet connection user. Is this something like hack attempt or my own coding mistake ? Any help would be greatly appreceated.

    Thanks

  2. #2
    Join Date
    Jul 2007
    Location
    Azerbaijan, Baku
    Posts
    144
    Thanks
    11
    Thanked 27 Times in 25 Posts

    Default

    Open your index.php file and look.

    Or copy it here

  3. The Following User Says Thank You to allahverdi For This Useful Post:

    linux1880 (08-07-2008)

  4. #3
    Join Date
    Apr 2007
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thank you allahverdi,

    What I have noticed after opening file in dreamweaver is, its has 377031 lines and there are lot of empty spaces between the lines. I am not sure why this is happening, Is there anyways to tidy up all the javascript, php and html code ? Please help me.

    also I am not sure what is causing all this. Thank you.

  5. #4
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Ah, well. No file should be that long. Nor should it be growing. This either sounds like some weird bug, or some weird hack attempt. Without seeing the file in question, I can't really say.

  6. The Following User Says Thank You to blm126 For This Useful Post:

    linux1880 (08-07-2008)

  7. #5
    Join Date
    Oct 2006
    Posts
    183
    Thanks
    0
    Thanked 11 Times in 11 Posts

    Default

    Well if they didn't change anyything I don't see how it could be a hack attempt. Sounds like something from his editor.

  8. The Following User Says Thank You to motormichael12 For This Useful Post:

    linux1880 (08-07-2008)

  9. #6
    Join Date
    Apr 2007
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    I don't know how dreamweaver is causing this. If that was a hack attempt also I am wondering how people would attempt to hack at index.php, there are no other codes than few php includes.

    Could it be dreamweaver itself?

  10. #7
    Join Date
    Apr 2007
    Posts
    52
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Sorry but I don't want to post my private file in public. I have posted it one time and google search was bringing this error page of my site just below my web homepage. I don't think any webmaster would post thier original index.php file in any public forum.

  11. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    More than likely, it is either the editor or the the way it is being uploaded to the server. I lean more towards the editor as I have never seen a case like this with the way a file is uploaded. As for the hack attempt conclusion, I have not seen any cases to where a hack attempt would just place a ton of empty space in your file to make it so large that it would take forever to load. Usually a hack attempt would try to replace the index page altogether to either promote or redirect to their site. Try using notepad or another "plain text" editor and see if that fixes it.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  12. #9
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default

    I had a friend who had a problem like that once, but it was his own coding mistake. He'd used a loop which would never end.

    PHP Code:
    <?php
        
    while (1) {
            echo 
    "<br>\n";
        }
    ?>
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  13. #10
    Join Date
    Oct 2006
    Posts
    183
    Thanks
    0
    Thanked 11 Times in 11 Posts

    Default

    Try creating it and then after saving open it in wordpad or notepad and make sure it is how it is supposed to be.

    http://www.experts-exchange.com/Web_..._21254965.html

    One answer is this:
    When you say 'blank lines', do you mean totally empty lines in the source-code, or lines like this:

    <p>&nbsp;</p>

    Either way, if you have all the pages organised into a DW Site, you could use the Find/Replace tool sitewide. The tool can use regular expressions

    To get rid of blank lines (or lines containing only spaces) in source, replace
    <Shift+Enter>
    \s*<Shift+Enter>

    with

    <Shift+Enter>

    To get rid of lines with only <p>&nbsp;</p> (<p> tag may have attributes), replace

    <Shift+Enter>
    \s*<[pP][\s\S]*>&nbsp;</[pP]>\s*<Shift+Enter>

    with

    <Shift+Enter>

    I'd suggest running this on a test page first, to make sure you get the results you expect.
    And also this in reply:
    Apologies if I patronise, but you realise I meant to press Shift+Enter in the box, not to actually type "<Shift+Enter>"? Shift+Enter renders a line-break in the box. To match your blank lines it should be

    <Shift+Enter>
    \s*<Shift+Enter>

Bookmarks

Posting Permissions

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