How to create an index-file for Xampp - php

I apologize in advance if this issue has been posted before. My problem is that my programmer had to bail on my project due to personal reasons and left me alone with a 95% finished site. I have some basic experience with ASP classic but PHP is fairly new to me.
FireFTP scr_shot: https://www.dropbox.com/s/9lws1u0sl8k93rg/fireftp_scr_shot.jpg
To shorten it up; (with Xampp installed) I have downloaded my site to the hard-drive and is now trying to get it work on 'localhost'. Immediately I sense the absence of an index-file.
Do I need to make one myself for the use in localhost? In that case, what am I looking for?
Thank you in advance.

First if you want to make an index-file of your current website, you have to put all your pages in a folder in
xampp/htdocs/
e.g
C:\Xampp\htdocs\mywebsite
then after you make a directory just visit the url like this:
localhost/mywebsite
, remember to put an index file inside the mywebsite folder.

It turned out that there was a MYSQL-database behind the site which I had no idea about or any knowledge of how to get around.
I had the database taken off and written the code into the site-files.
Afterwards everything worked as laid out above comments.

Related

Bolt CMS wrong paths on localhost xampp

I wanted to try out bold cms on my localhost.
I have installed bolt cms on localhost/test (subfolder)
The admin section works great, but when I try to visit the actual site all the paths are incorrectly. Bolts tries to load different css and js files like this:
/test/public/test/public/theme/base-2016/css/theme.css
While it should be
/test/public/theme/base-2016/css/theme.css
Im sure this is easy to fix but for some reason i cant find a fix for this
Thanks in advance!
You need to put Bolt's public folder in your test folder. And put Bolt's other files one level up.
This is described in the docs where you can also find answers to other web server questions regarding Bolt.

Finding and Editing HTML Elements in PHP

First off sorry for being a complete newb and if this is a something I shouldn't be bothering people with, but I am fairly new to PHP and I have been tasked by my employer to make a couple of changes to a website that seems to be written primarily in PHP.
The website is ems-uk.co.uk
I have been asked just to check the location on the maps that display on the pages but I can't for the life of me find the file to edit within the file manager. I can find exactly what I need to change when I "inspect element" in Chrome but cannot find anything even close in the index.php file and there appears to be no other files for separate pages.
Hope someone can direct me in the right area and sorry again if this is the wrong arena for a question like this.
A bit of inspection suggest this is an OpenCart powered CMS/ecom site with the Kuler Moment theme (skin 3). I'm not familiar with the OpenCart dashboard but you may be able to log in and configure the google maps module from there. Failing that I would look in the theme files for the location map section.
You're looking to it wrong. PHP is server sided, you're trying to edit things client side.
You will need access to the webserver and edit code there. If you're asking this I'm not sure if its good if you're editing pages on that website though.

Magento links are not working

I have a magento theme installed on a folder: http://mysite.com/mag/
On the main folder, mysite.com it's running a website on Zen Cart, so I created a folder called "mag" where I installed magento.
It worked until now..
Only the first page is loading when I access mysite.com/mag/, but when I click on a diffrent page I-m sent to the index page from: mysite.com (and the url showed is: http://mysite.com/mag/page-like-this.html)
So where is the problem?
It worked before, and right now it doesn't work any more..
So as was discovered trough our comments you have most probably been hacked in some way. There are a lot of steps to go trough to clean a website and its impossible for us to tell you what to look for without knowing what kind of attack you where a victim of.
But, you can safely delete all those .html files since they should not be part of magento/zend framework. Also look for weird javascript that would be encrypted. One very long string of minimized javascript somewhere at the end probably of all the html files and probably your main index.php file.
There is a lot of ressources online to help you I suggest googling "magento hacked" or some such thing.
Good luck!
Here's a stackoverflow question about some such hacks on magento.

Need to manipulate my url

I'm literally just starting to throw a site together today, so I don't even have much to work with yet, but I wanted to throw this out there so I'll have the information when I get there. I'm using WAMP (not sure which version, but downloaded within the last 6 months) and CodeIgniter 2.0.3. How do you manipulate the URL to do the following:
www.mysite.com/forums ==> forums.mysite.com
www.mysite.com/pc ==> pc.mysite.com
...
Would this be something that gets done with the htaccess file or some other way? And if it is the htaccess file, can someone provide specifics? I've looked into some sites that try to explain the htaccess file and they just confuse the crap out of me. :) lol. Oh yeah, and how will that look while looking at it on my local host? Currently my url looks like:
localhost/nothingbutcards/
Thank you all very much, hope you're enjoying your weekend.
Along with the reference material provided, the below should be a good starting point. It's an HTACCESS approach.
http://terriswallow.com/weblog/2008/htaccess-redirect-a-directory-to-a-subdomain-and-force-www/
I also wanted to mention, some web hosts now have this as an option in the configuration panel. Mine does, so I can go in, specify a subdomain and the path on the site it points to, and I'm done.

Importing and accessing existing PHP application into XAMPP

I am new to PHP (have been a Java guy all my years :-) but understand the basics of it. For an existing application on which I need to fix some bugs, I need to import it into XAMPP.
I tried putting all the application folders (and files) into the htdocs folder of XAMPP. However, that does not work. The server does list the new project when I navigate to "http://localhost" but when I click on my project (that I copied), the index.php page fails to come up. It simply says page not found.
I would like to know a couple of things as listed below...
1) Is there something wrong I am doing for the project to be hosted on XAMPP?
2) One peculiar thing that I noticed was that when the application browses to http://localhost/MyProject/index.php , it gets redirected to http://www.localhost/index.php . Is there a URLRewriter (or kind) which is doing this? If yes, where I can find the same within my project?
3) How can I identify the framework that the existing code is using? I can see M-V-C named class.php files
Any pointers would be much helpful for me to start debugging and learning PHP.
Thanks!!

Categories