• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

run php page on browser

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello everyone,
i have installed the php , apache ,iis as well
also i am able to run my php page on command prompt
but have no idea how to run the php page on server
please help
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to get php running with Apache or IIS, you need to let the web server know about the php module.

You can google "configure php with apache" will give you the steps. Similarly for IIS.

When you do get php running, make a page like:


to see your settings.
 
sparsh khandelwal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey thanks for your reply
last night i installed the apache that time it was working good
but after ask the above question i run the same (localhost:8080)
now it ask for user name and password
up to my knowledge best i have not set any username and password
what is that , why so ?

also configure tomcat-users.xml with the above code and try to access with username = admin , password=admin
still not working
please help
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why suddenly we are talking about Tomcat? Apache and Tomcat are 2 different servers and Tomcat doesn't need Apache or PHP to run.

The default page of Tomcat shouldn't need a username/password. Only if you want to look at application listing then it prompts. And yes tomcat-users.xml is the place to set passwords.
 
sparsh khandelwal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your reply
first i don't know that apache and tomcat are different
i have tomcat and iis on my system
but when i try to open localhost:8080 , it prompt me for username and password
but yesterday it prompt me to the webpage
 
Ranch Hand
Posts: 71
PHP Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Port 8080 is the typical HTTP port for Tomcat. IIS and Apache use port 80 by default (you need to change one of them to use a different port to get both to work).

If the web page on port 8080 is prompting for a password, then you configured Tomcat to require logon credentials.

I think you would be much better off installing only one server at a time on your PC and learning how to use that one correctly before attempting to install another. Having three servers installed appears to be adding to your confiusion.
 
sparsh khandelwal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for your reply
installed the xampp and working good now
according to that you need to make your files in htdocs folder , and then you need to give the same path in url
is it possible to double the file on the desktop and open it in web browser ?
 
Nick Charles
Ranch Hand
Posts: 71
PHP Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, you cannot double-click on a .php file and open it in a browser. Browsers do not understand PHP, you must run .php pages through a PHP engine.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic