k1ll — 2011-05-17T20:01:02-04:00 — #1
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!
hexburner — 2011-05-17T20:11:03-04:00 — #2
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.
k1ll — 2011-05-17T20:37:09-04:00 — #3
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)
maxdream01 — 2011-05-17T20:50:38-04:00 — #4
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
immerse — 2011-05-18T05:00:39-04:00 — #5
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.
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.
oddz — 2011-05-18T05:05:16-04:00 — #6
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.
fristi — 2011-05-18T05:16:02-04:00 — #7
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.
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"
oddz — 2011-05-18T05:48:19-04:00 — #8
Yep, that would break the entire thing.