So ive been using xampp for a virtual server for an app ive been making. I dont know much about xampp but its been working fine all along. I have been using my php files in the htdocs folder. Today the ip address changed from 192.168.64.2 to 192.168.64.3 and now all my files are missings. Is there any way to recover these files. I'm using a Mac Book.
Any help at all is appreciated
Don't use your network internal IP. You are using DHCP and it's gonna change periodically. Just use http://127.0.0.1 or http://localhost. If you had your website URL declared as http://192.168.64.2 at some config file, just replace it for the values provided above.
Related
I uploaded a php script to a subdomain that I own, for testing and customizing purposes before it goes live (I had planned on moving everything over to the root domain when done).
Someone then suggested that I work on in Xampp instead as it is all locally installed and therefore much faster, etc.
Thing is, I had already customized the script a lot (mostly CSS but also uploaded graphics via the admin panel, etc) while it was up live on the web host, so I would like to run a copy of the most up-to-date version of it in Xampp and continue customizing it from there.
I downloaded a copy of all my files by FTP into htdocs > Test folder. I also downloaded a copy of the database via phpmyadmin and imported it via phpmyadmin into my localhost.
The big problem I have is when I try to access the scritp via localhost, the url immediately reverts back to the live url. How do I set it to link to the local host copy instead?
Thanks.
Based on AbraCadaver's suggestion, I found the answer lied in changing the URL parameters in config.php
Thanks
Im trying to read a file inside a shared folder within my local network. Opening the file and navigating towards the file in both the windows explorer and the browser works perfectly fine. However im trying to read the file inside a PHP file and i cant seem to get it to work. After some troubleshooting I think the problem is that the shared folder is inside a diffrent ip segment then my apache server(if it got one when installed on the computer).
Im doing a file_exists() to check if the file is there and i can reach it, but i cant seem to acces the file or the filepath within PHP. The path is formatted as \\computer\share\file as it should be with a network location. The problem(as far as i know) is that the server runs on 192.168.10.x and the file im trying to acces is on 192.168.1.x
I have to questions about this,
Is it possible for Apache acces to multiple local networks like 192.168.1.x aswell as 192.168.10.x?
If this is possible do i have to change any setting or policies within Apache or my shared drive?
I hope I informed you enough about my problem, if anything isnt clear feel free to ask and ill be happy to inform you with any information required.
Thanks in advance
I have spent some time designing a wordpress/phpbb site, and hosting it on localhost using xampp. I would like to soon host my website on a real domain, but I am not sure what I would have to do and change in order to make it a success. Is it possible to just use the files I have placed in htdocs inside the xampp directory?
Thanks for your help, and sorry if my question is confusing or badly explained.
Yes it is, that's the point of XAMPP - website prototyping. I assume that by real domain you mean a hosting service. If you also use MySQL make sure you copy all data to the new database and check PHP dependencies with the new host.
I'm new to PHP and everything, so I'm trying to learn some things.
I'm currently developing my first PHP site in Dreamweaver using MAMP and Localhost.
I have already bought my domain name, and built a smaller html site just to act as a "holding site" before the PHP one gets put up. I'm wandering if instead of using localhost, that I could use a subdomain of that domain. So instead of going to localhost/mysite I could go to test.mysite.com.
Tell me if I'm wrong, but I shouldn't have to upload any files to GoDaddy because I'm using MAMP as the server. Right?
Keep in mind, this isn't permanent. I'm not planning on hosting my site on my computer using MAMP. I'm just wandering if it's possible and how to do it if it is.
Any suggestions, comments, or answers are greatly appreciated.
Thanks.
- Ryan
MAMP is not the server. MAMP adds server capabilities to your computer, but you can't use MAMP to mimmic any server.
What I recommend you is working on your computer, with MAMP and using localhost as the "test address". After the page is finished in your localhost, and everything work fine, you can upload your page to your server (with FTP). This way you avoid having to upload your files via FTP every time you make a change in your code.
And welcome to the PHP World. Countless mugs of coffee and restless night await you.
You can create some folder on web server(on your paying hosting) and upload all files from your test localhost folder. Everyting would work perfectly if you type: https://yourwebsite.domain/yourfolder. If you want to set it to view like http://yourfolder.yourwebsite.domain you must from Control Panel set up an some subdomain. Subdomain is make something like this: you enter name of subdomain and folder which is mapped to that subdomain. For example, you set up subdoman http://test.web.com and map that to http://web.com/testfolder.
I hoppe that I help you.
I have installed wordpress on my IIS server using web plaform intaller, everything is working fine when i am working on localhost.
when when i am trying to browse from external or another pc, the links are stayed http://localhost/page.php, which should be http://myserver/page.php
even the styling is not applied because of that.
how do I change the Path and make it work??
Thanks
You will have saved in the database that your site url was http://localhost. To access it from everywhere, I'd use your IP address instead, that way you should be able to see it on your local and external machines.
Do a quick export of your db, open in a text editor.
Find/ replace 'localhost' and change it to whatever your computer's IP is.
Import your changed sql file. Should be all good :)