[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 581
  • Last Modified:

PHP small app

I have wamp installed on my pc.  I am in process of learning php and apps.  Someone sent me a test app, that has a mysql db, php and js code.  How do I set this up so I can view it as an application on my local computer?  Right now I can open each form only and most of the php forms are showing commands in the browser.
0
Jack_son_
Asked:
Jack_son_
  • 3
  • 2
  • 2
  • +4
7 Solutions
 
Marco GasiFreelancerCommented:
"and most of the php forms are showing commands in the browser. "

Yes, of course.: php applications runs within a sewrver and are used through the browser. If you look within the test app directory tree, you should find a file called index.php: open that file typing in youir browser http://localhost/<your-test-app-folder>/index.php and you shoud see the main page of that application. Without knowing the app, I can't tell you more than this.

Cheers
0
 
Jack_son_Author Commented:
There is not one included.
0
 
Julian HansenCommented:
you need to provide more detail of the files that came with the app.

1. Is php setup and working? create a file with the following code

<?php
phpinfo();
?>

Open in new window


Save as test.php in the webroot of the apache server and then browse to this file - if you get the php info page comming up then php is installed and working - if not then you need to look at the docs on how to do that

2. Check that MySQL is installed and working. The PHP app will need to connect to this so somewhere you will need to setup the connection parameters (server, username, password, db) - this can be in an external configuration file or in one (or more) of the php files.

The above steps are the basic requirements before you can move forward.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Marco GasiFreelancerCommented:
I'm, sorry, but I don't know nothing about that app, so I can't tell you anything -  and this isa true for each other expert you can find here or in some other forum or web community.

Who sent you that app? Why can't you ask him for explanations? Can you provide the list of files of the app? There is no readme file included? No text file at all? What that app is supposed to do?

If you can't answer to these questions, can you zip the app and post it here, so we can take a look at it?

Cheers
0
 
Dave BaldwinFixer of ProblemsCommented:
With WAMP, if you install an application in it's own directory under the web root at "C:\wamp\www", WAMP will list it on the home page at "http://localhost".

For PHP to work properly, it must be run thru the web server.  For the MySQL DB to be usable, you must import it into MySQL.  The easiest way is to use phpMyAdmin which is linked on the WAMP homepage.

You need more than just WAMP and sample application.  The book that I recommend is from Sitepoint called "PHP and MySQL, Novice to Ninja".  http://www.sitepoint.com/books/phpmysql5/
0
 
Ray PaseurCommented:
If you get a Mac and install MAMP you can store your scripts in htdocs.  You can open MAMP and go to localhost to see the information in your web root.  Click on the name of the script to run it.  It's easier than it sounds!
0
 
rinfoCommented:
First you have to include all your files in a directory and copy that directory in C:\wamp\www ( assuming that wamp is installed on C Drive.)
In the notification area there will be an icon for the wamp server.
Right click on it to get the context menu.
In the context menu select localhost.
When you select that it will open a browser and there all the folders and files in www directory will be displayed.
Double click on the directory name in which you have all your files.
If there is an index.php file there double click on that and it will run the application.
In case there is no index.php double click on the file name which you think could be the home page of your application and it will run the application.
0
 
Mohamed AbowardaSoftware EngineerCommented:
If you are having trouble with MAMP, you might install AppServ:
http://www.appservnetwork.com/index.php

After you install AppServ, you can go to http://localhost or http://127.0.0.1 to access your local server, you should be able to put your files in the directory C:\AppServ\www
0
 
Jack_son_Author Commented:
yes, actually it appears to be the wamp server that is the issue.  When I go to any folder under www, it displays the files as a list and when I click on a php file they come up in a strange format, not straight code, but showing classes, etc.
0
 
Marco GasiFreelancerCommented:
Uninstall wamp and install xampp (http://www.apachefriends.org/it/xampp.html) It works fine in my Win 7 and I suggest you to give it a try.

Cheers
0
 
Mohamed AbowardaSoftware EngineerCommented:
AppServ works well on Win 7 as well, you should get the local server to work instantly after you install it.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now