How do I work with PDT and WAMP - php

I have installed PDT for Eclipse and WAMP server. I want to know how do i start writing code in PHP now? What should I do so that WAMP gets all my PHP files? Thanks!

WAMP works by reading the www directory, usually under C:\wamp\www. If you place your own index.php file there you will see it in the browser when you start WAMP and go to http://localhost
In terms of PDT for Eclipse you can simply create your project at C:\wamp\www. Now all your code will exist in the www directory thus giving WAMP access to your project code and allowing you to test your code.

Related

Wordpress index.php doesn't load on local server

I have a working wordpress site online, running on an Ubuntu 16.04 VPS. I've typically just edited the files via FTP, but I'm trying to get more organized. I'm setting up a development machine with VirtualBox running Ubuntu 16.04 (with Windows as the host OS) so I can experiment. I'm having trouble getting wordpress to load.
I've copied the website files into the VM. I have PHP 7.0.12 installed in the VM. I have the database copied over and it's running fine in the VM. I start the PHP server with
cd /path/to/website/public
php -S 0.0.0.0:8080
When I visit localhost:8080 from Chrome in Windows, I get a Page not found error in chrome. However, I create a public/info.php file with <?php phpinfo(); ?>, and then visit localhost:8080/info.php, I get the correct PHP info page.
I also tried configuring Nginx inside the VM like I have it on the real server. I get the exact same results as with the built in PHP server.
When I visit localhost:8080/wp-admin, I get redirected to the admin page of the live server.
Any idea on what I'm missing or how I might go about debugging the issue?
When move WordPress to another domain, Instead of directly copying Database, we have to use Database migration plugins or manually updating content on DB.
https://wordpress.org/plugins/wp-migrate-db/
https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs
Then use this updated DB and copied files. That will solve your issue.

How to install php on windows 8.1 64-bit?

After studying html, css and Javascipt i have decided to study php.
But when i tried to do the first hello world example i found that its not working
<?php
echo "hello World";
?>
it shows like this:
After exploring a lot i found that i need to install php before studying it.
I explore a lot and couldn't find any sutable php for my windows 8.1 (64-bit).
I even installed xampp.
But failure
Please some one provide me link to download php for windows 8.1 (64-bit) and please guide me how can to install php and run it.
You should put your php files in c:/xampp/htdocs folder.
Then open your xampp control panel.
start apache and mysql application.
then open your browser goto http://localhost/yourphpfile.php.
Then you will get the output.
I think you should be following a good tutorial to learn php though.
Install Xampp on your windows
Open control panel of xampp
Run apache and Mysql
Inside the folder htdocs in C:\xampp create a new folder for your php work
Create Index.php file as the main file
Go to your favorite browser and search localhost/after the slash add your folders name so that you can go to that folder

bitnami install, Document root, windows machine

just downloaded bitnami and executed install on my windows machine.
How do i open my php.info page? Localhost takes me to bitnami welcome page.(index.html)
Where is my Document root?
I am trying to follow along in Tuts Plus "Php Fundamentals" where Jeffrey Way is using MAMP. His htdocs file is empty after He downloaded MAMP and was setting it up. I understand Bitnami is not MAMP but they should be similar?
I love the frameworks you can Select to bitnami that come preinstalled which is why I went this route but something as simple as showing php.info should be a breeze but I need some guidance to opening php.info on my local machine in Bitnami.
thx
Bitnami developer here.
Your Document root is located at /apache2/htdocs. There you can place a simple php file called example.php with the following content
<?php phpinfo(); ?>
and then you'll find your phpinfo at http://yoursite.com/example.php
You may find this documentation page useful:
https://wiki.bitnami.com/Infrastructure_Stacks/BitNami_AMP_Stacks

Phpinfo.php browser trying to download instead of running

HI I am trying to configure IIS7 to run PHP on a windows 2008 server machine.
I have followed this guide, php running on IIS7
Everything went well and I am sure it was working!!
However now when I try and run phpinfo.php the browser wants to download the page rather than running the script.
The handler mapper is configured the same as the the example. fastCGI/CGI is installed and enabled.
a normal index.html open no problem.
I have checked permissions, created a new empty site apart from phpinfo.php
I developed the site on my pc in a xampp environment where everything work great. First time I have tried to convert a site from xampp to IIS.
Their is no entry in the MIME Types, I am wondering if the WEB.CONFIG file is the issue but I don't know enough about what the file should/shouldn't contain.
thanks for any help
you can use http://php.iis.net/ to install php into your IIS setup. It comes with a manager to help you easily implement php in to your iis server and is way easier then trying to configure it manually. Hope this helps.

Running PHP on a Windows 2008 R2 server

I am very new to web development and I have decided to learn the ropes of php with mysql. I am currently taking an online course from Lynda.com teaching me on concepts of php and mysql.
I have installed the WAMP server on windows 2008 box and I can start all the apache services and when I go to http://localhost it opens up the WAMP webpage and when I click on phpinfo() it takes me to my php page showing me the version (5.5.12)
I have also configured IIS using this link but no luck when I open my php file I get the source code display in my internet explorer with all the html formatting. Its just a simple "hello world" file and the file extension is *.php
Ok, I think I know where I was going wrong.. I had created folder on my desktop and then saved the php file in it and was browsing to that file from IE.
What I need to do is browse using http://localhost... so I placed the same file in the www folder under the WAMP directory and then did http://localhost/helloworld.php and it opened up!
But there should be away I can use files from my desktop instead of placing the files in the www folder...

Categories