View Full Version : Deleted Index.php, uh-oh
Corndogman
January 9th, 2010, 03:21 PM
So my brother accidentally deleted the index.php file for our website, which means that instead of our main page showing, it shows all of our file directories. I created a new one, just with a little message that says the site is down so people down see the site files. I need to know how to create a new one that will tell it to display the actual site/ or somehow restore the old one.
I googled a bunch and couldn't find anything, so I figured some of you guys could help.
Lightning
January 9th, 2010, 03:31 PM
No. It's kinda impossible.
jcap
January 9th, 2010, 03:32 PM
Either you have to recode it from scratch, use the default one of whatever CMS you use (if any), or restore from a backup you should have made.
Corndogman
January 9th, 2010, 03:52 PM
\ use the default one of whatever CMS you use (if any),
Any Idea where I could find that? Also, I thought I had a backup, but I realized that was from my old host/domain so the site looks totally different.
Rook
January 9th, 2010, 03:54 PM
If you feel the site was that important sometimes you can talk with the hosting company (and probably pay them) if they have a backup you can use to restore the site. Otherwise like jcap said you're left to recode it.
Just curious what was the site?
Cojafoji
January 9th, 2010, 05:27 PM
check some of the massive indexing sites, you know, the one's that do that whole "internet archive" thing. The code is probably fucked if they have it, but hey, it's somewhere to start.
http://www.archive.org/web/web.php
also, back up your stuff man. you NEVER know when shit like this'll happen.
CrAsHOvErRide
January 9th, 2010, 05:45 PM
Server Sided code (probably 75% if it was a CMS) cannot be retrieved though archiving.
Cojafoji
January 9th, 2010, 06:52 PM
Server Sided code (probably 75% if it was a CMS) cannot be retrieved though archiving.
yes, i know. just saying, it's a starting point. every little bit helps in this kind of a situation...
CrAsHOvErRide
January 9th, 2010, 06:57 PM
It was directed at him to not get a wrong impression ^^
Corndogman
January 9th, 2010, 09:22 PM
If you feel the site was that important sometimes you can talk with the hosting company (and probably pay them) if they have a backup you can use to restore the site. Otherwise like jcap said you're left to recode it.
Just curious what was the site?
Well, its for a local paranormal investigating group that I'm in, and I don't pay for it, the founders of the group do. I'm sure they'd like it to be up and running. ghosthunterssrq.org is the url.
check some of the massive indexing sites, you know, the one's that do that whole "internet archive" thing. The code is probably fucked if they have it, but hey, it's somewhere to start.
http://www.archive.org/web/web.php
also, back up your stuff man. you NEVER know when shit like this'll happen.
Nothing turned up in the archive. I could of sworn I made a backup of it, but idk where it is. Most likely it was on my flash drive that died.
Anyways, thanks for the help guys. I'll see if my host can do anything about it, but if not I guess I'll be learning Php. Keep the suggestions coming if you have any.
Cortexian
January 9th, 2010, 10:43 PM
Well, its for a local paranormal investigating group that I'm in
No great loss then!
You really should talk to the web host.
Matooba
January 10th, 2010, 10:31 AM
If you only deleted the index.php, why not google your site, then go to the cache for the index.php and save page?
P.S. Backup Backup Backup.....
CrAsHOvErRide
January 10th, 2010, 11:33 AM
If you only deleted the index.php, why not google your site, then go to the cache for the index.php and save page?
P.S. Backup Backup Backup.....
Read my previous post.
=sw=warlord
January 10th, 2010, 01:17 PM
Read my previous post.
Would this be the layout you had before?
I found it on google cache (http://66.102.9.132/search?q=cache:IsVBcAxzTv4J:www.ghosthunterssrq.or g/index.php%3Fp%3D1_9_Links+ghosthunterssrq.org/index.php&cd=1&hl=en&ct=clnk&gl=uk&client=firefox-a)
You might want to download the page and see if you can use it.
jcap
January 10th, 2010, 01:35 PM
Judging by the cache, you absolutely won't be able to recode it. You are using a CMS. The index.php you had was probably stock or one that came with the theme you are using.
Your best bet (if you can't get a backup) is to go to the control panel where you would normally post a new article so you find what CMS you are using. Then you can go to their website, download the CMS, and upload only the index.php to see if it works.
If that fails, then your next bet would be to do an upgrade. Hopefully they would have a later version than the one you were running available for download. Usually an upgrade requires replacing 100% of the previous version's files (not including your own custom files), and then after you run the upgrade installation it should work.
Archive services won't help with jack, unless you just want static content.
Matooba
January 10th, 2010, 10:56 PM
Read my previous post.
Oops sorry :(
Phopojijo
January 11th, 2010, 01:42 AM
PHP is a programming language that runs ON THE SERVER... and generates HTML that the website sees. Since it runs on the server... you can have multiple users interact with it at the same time... in fact, there's nothing saying that any two users will see exactly the same webpage. (in fact they usually DO NOT see the same page).
Downloading the PHP that a website sends you is NOT the same thing as downloading the PHP file that is on the serve.
When you access a PHP file... it gets executed... sees who you are... login and such... and writes the PHP file it sends you... which is just HTML.
Only option is finding out what CMS you were using (Drupal, Joomla, etc.) and updating it. Luckily none of your website's stuff is actually stored there... so you didn't lose any posts or anything.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.