SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    May 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Please help me fix this!

    Ok, first let me say hello, and thanks for viewing this. I do not know very much about PHP at all, and therein lies the problem... I was editing a php document for my friends website. All I was doing was adding a line of code so that his site would include a favicon.

    I right-clicked on the website and viewed his source, and copied all the code into notepad, added the string of code for the favicon, and uploaded it to his FTP.

    Unfortunately when I did that I overwrote some of the PHP code I believe...it didn't copy that when I viewed the site source.

    I want to make it right for my friend and fix his website but I have NOOOO idea what to do... So I have turned to this forum for help...

    This is my friends website: thcklan . com

    The "recent topics" and "recent posts" at the top, the "hackers banned from our servers," and the "announcements" no longer update properly...

    It's like they are frozen at the state they were in when I copied the site's source code... I feel like an utter jack **** for ruining my buds front page.

    Please, I am asking you from deep within my heart, HELP ME, point me in the right direction, or guide me in some way to make it right to my good friend and fix his site!

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a) Ask the hosting provider to retrieve the file from the previous backup.
    b) Your friend might have the source code somewhere, ask him to upload the previous version.
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Member
    Join Date
    May 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hexburner View Post
    a) Ask the hosting provider to retrieve the file from the previous backup.
    b) Your friend might have the source code somewhere, ask him to upload the previous version.
    Thank you! I passed on the info to my friend... He has sent a message to his hosting provider, so fingers crossed there.

    also another question

    is PHP complicated to learn? can someone with basic html experience learn enough PHP to fix something like that? (in a short amt of time)

  4. #4
    SitePoint Zealot maxdream01's Avatar
    Join Date
    Feb 2011
    Location
    USA
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP is not complicated to learn but, it takes time to get good at it and helps alot if your good at html, and from what it sounds i dont think solving this problem will be too hard if you can get the original php code
    PHP is FUN

  5. #5
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by k1ll View Post
    can someone with basic html experience learn enough PHP to fix something like that? (in a short amt of time)
    No, not unless you know what code was in that file in the first place.
    There might have been heaps and heaps of PHP code, or just a couple of lines. As it's code that has been written by someone else, it might be very easy to rewrite/ replace (although it will take a lot of time) or itmight be the most complicated bit of code ever.

    Off Topic:


    It's the same as saying "I just threw the cake away and I don't know the recipe and I can't bake. Can I learn to bake quickly to replace the cake?"

    There is, of course, no cake.

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    4 Thread(s)
    If you literally copied the PHP source and only added the icon it is impossible that something could have been broken in the process. Are you certain this was not a pre-existing issue or might have changed something else in the process? The only way something could have broken is with one of those cases. Changing a favicon (HTML) isn't going to break PHP.
    The only code I hate more than my own is everyone else's.

  7. #7
    messing with my mind fristi's Avatar
    Join Date
    Feb 2009
    Posts
    292
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by k1ll View Post
    I right-clicked on the website and viewed his source, and copied all the code into notepad, added the string of code for the favicon, and uploaded it to his FTP.
    My guess form his explanation is that he viewed the source in the browser, meaning he only copied the html that the PHP outputted... and not the actually PHP code.

    The PHP never gets through to the browsers, it gets excecuted on the server and it sends it result (html, javascript, css) to the browser.
    If you want to view the PHP code you need to download the file from the ftp server and not view it through the browser`s "view source"
    To PHP or to Perl, that is the question!
    (Bucket - simpletest) User

  8. #8
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    4 Thread(s)
    Yep, that would break the entire thing.
    The only code I hate more than my own is everyone else's.


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
  •