ASP.NET server and PHP? - php

I wanted to know, is a server that supports ASP.NET and PHP on the same box common? wordpress/mediaWiki/phpBB3 seem like a nice combo but i am developing a ASP.NET project.

Most windows webhosts support PHP as well. Big drawback to PHP being lack of URL rewriting support. IIS handles multiple handlers pretty well, so running both concurrently isn't even particularly tricky.

Take a look at the Microsoft Web Platform if you want to have a drop in replacement, otherwise PHP will install into IIS as a SAPI module or, if you are using IIS 7 you can also run it as FastCGI.
php|architect is also giving away the May 2009 issue which is all about running PHP on Windows.

Using IIS will certainly help you.
Download Microsoft's PHP for IIS, here, http://www.microsoft.com/web/platform/phponwindows.aspx
This'll help you start.
Don't forget to edit php.ini either in C:/Windows, or whereever the application was installed to, in order to ensure everything is set optimally for you.
We know PHP hasn’t always run smoothly on the Windows platform, so we’ve now optimized Windows Server to support your PHP applications through a new component: FastCGI. FastCGI works as an interface between PHP engine and IIS, and it ensures that PHP runs much faster than with CGI and way more reliable than PHP ISAPI.

with IIS you can host Asp.net and PHP

Another option is the Phalanger project that integrates PHP so you can use it either separately or inside ASP.NET on IIS.
It is compiled down so it should run much faster than standard interpreted php.
Phalanger

You could use Ubuntu Server (which a variety of hosting providers offer), among other GNU/Linux distros. Take a look at http://www.google.com/search?q=ubuntu+server+hosting , then just get apt-get Mono for ASP.NET, along with PHP 5:
sudo apt-get install mono-xsp2 php5
and anything else you need.

Related

Working with PHP offline

Is there a tool or extension for a browser to working with PHP offline? I read about you need to install an Apache server.
Is there an easier way to view offline in browser to see how the PHP code executes?
XAMPP sets up a local install of MySQL, PHP, and Apache that you can develop on.
In Windows, install XAMPP or WAMP
Which are Windows Apache Mysql and Php bundles
In Linux install LAMP
Which is a Linux Apache Mysql and Php bundle
Both of which could help
Nope, simpler than xampp is not possible.
This won't be much use to you now, but there has been recent talk (and submission of code) of providing a built-in web server into PHP itself.
See the RFC at https://wiki.php.net/rfc/builtinwebserver
You could then write your script (e.g. app.php), execute php -S localhost:8000 to start the web server and then see the results in your browser at http://localhost:8000/app.php.
In the mean time, you can install Apache/PHP/MySQL/etc. on your local box, as the other answers have suggested, either manually or with a package like XAMPP.
No. PHP code must be processed by a PHP engine, and the easiest way to do so in a web environment is to use a web server. It does not need to be httpd, but it must be something.
if you are on a Mac, you have Apache installed already. the additional instructions you will need to add PHP and MySQL database server can be found here http://www.entropy.ch/software/macosx/
if you are using Windows, XAMPP is a self contained Apache/MySQL/PHP environment that runs as a stand alone application.
that should get you started. good luck

What is needed for a user to download and run a PHP application?

I'd like to develop a PHP application that users would download and then could run. The application will have a web service.
I assume they will need Apache, but my main question is what is needed for PHP to run on their machine? Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
Is anything else required that I did not mention?
Thank you,
They will need a web server with a compatible version of php. That's it.
Are you asking what is required to run a .php file on a windows machine? Do you mean like an executable or a web server script?
If like an executable need the php files:
Download the php installer from http://windows.php.net/download/, and then you can run php.exe script.php
If like a web site:
You need a webserver (like apache) and the php.exe files. I would suggest if testing to download a prebuilt webserver like XAMPP (download from http://www.apachefriends.org/en/xampp-windows.html)
It depends on the application. At a minimum it will need PHP.
Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
PHP. Presumably as difficult as it is for you, but it depends on the platform. OS X comes with it. Most Linux variants either come with it, or allow it to be installed with one command to the package manager. Windows users will have to download it seperately.
As for other things that might be needed…
If it has a GUI, it might need PHP-GTK.
If it expects to be accessed via HTTP then they will need a webserver which supports PHP. This could be Apache, IIS, or one of numerous other servers.
(It isn't clear if, when you say "The application will have a web service.", you mean "The application will access a web service" or "The application will provide a web service". If the latter, then a web server will be needed).
If you use any non-core modules, then they will be needed as well.
You need to describe your proposed application a bit better. Is there a reason the application must be in PHP? It may be possible, but it's certainly not common to code and distribute a desktop application written in PHP.
There are a few options.
If you are just writing a script (command line, etc) you don't need a webserver. You just need PHP installed to run it (there are even downloadable installers for it).
If you are writing a web-based tool, then you will need your users to have a webserver if they are meant to run it on their physical machines. And you don't need a framework...
just think of it as a Webserver + PHP as a plugin. Some webserver options: Apache, nginx, lighttpd
Try having users install WAMP, MAMP, or Zend Server CE all of which are free and come with both a webserver and PHP.
If you really want a deployable PHP script/tool, maybe look into something like PHPDock, which gives your users a single installable app (embedded server, php). NuSphere PHPDock
Honestly, it's not the greatest language to use for this type of deployment, but it's certainly fun to try to figure out! Sorry for not linking out also, don't have enough rep points for all of the links I had intended to supply.
Actually you can run php script without the need to have a webserver installed.
Just install php and then from command line:
$ php myscript.php
If you really want you can even build GUI application with php even though I would not suggest it.
Cheers Andrea
you could also try to use quercus.
Quercus is Caucho Technology's fast,
open-source, 100% Java implementation
of the PHP language (requires JDK
1.5).
This way you only will need a jvm+quercus. It also is platform independent this way because it runs in the JVM.

Hosting a php application on a Windows Server system. Any issues / advice?

We've built a php application that we need to host on a Windows Server 64 bit platform (due to another software being present that we need to access).
However, our php application has been built on a linux environment.
Is there anything we need to be watchful of when running apache and this php application on a Windows environment?
Mostly any PHP script is cross-platform and normally you don't care about platform, but there are some platform-specific things like absolute paths (C:/www | /var/www/) and shell commands. If you don't use them then it will work. If not, it will not take much time for fixing.
There may be some good reading here on the official PHP documentation on running PHP on Windows.

What's a Robust but Simple Apache / PHP / MySQL Installer for Windows Vista

I tried easyphp but i think it's not enough, I want an Apache / PHP / MySQL installer which has the latest PHP and MySQL version, and with curl and htaccess support.
Opensource solutions are preferred, should be windows vista compatible.
I have never heard of a PHP / mySQL emulator. What purpose would such a tool serve?
If you are looking for a ready-made installer package for Windows, containing everything necessary to install and run PHP, XAMPP is probably one of the best ones around.
WAMP Server is excellent, easy to install and easy to configure:
http://www.wampserver.com/en/index.php
If you want the last version of each piece of software, and to really do it the way you want, the best solution is to download an install each component separatly :
Apache : http://httpd.apache.org/
MySQL : http://dev.mysql.com/downloads/
And PHP : http://www.php.net/downloads.php
Of course, you'll have a bit more work to plug all those together than if using WAMP or anything like that -- but it also mean you'll know more about how they work and can be configured, which is always nice to know ;-)
Never heard of PHP or mySql emulators before. To run a php script you will need a webserver and the PHP engine to parse and execute the script. This cannot be emulated by another engine besides PHP.
I would suggest using Acquia Dev Desktop.
It installs Apache, MySQL & PHP with one click. Most importantly, unlike many other WAMP stacks, it works well under Windows Vista (32- or 64-bit). And as an extra, it installs Acquia Drupal for you as well, so if you ever want to get into Drupal development, you have everything you need to do so.
Get it at http://network.acquia.com/documentation/acquia-drupal-stack
I'm a BitNami developer and I personally suggest to use BitNami WAMPStack. It is free, it also includes phpMyAdmin for managing the MySQL databases and GUI management tool for the servers. Per your requirements, it is open source, compatible with Windows Vista and Windows 7, includes curl and htaccess support and we keep it fairly up to date.
XAMPP Lite USB
"XAMPP Lite" is an additional extra small XAMPP edition. Configured with relative paths you can use it on usb devices.

How to work with PHP on Windows XP?

I want to do a sample program in PHP on Windows XP.
Do I need any special software to get this to work?
I am afraid that I simply open notepad type the PHP program and save it with php extension. Then I open it with the browser as a HTML file. But it does not work.
Please help
Thanks in advance
However you decide to install a webserver and php (or just php and use it in the console like someone mentioned):
Check out the PHP Manual, especially the Getting Started section.
Apache (Very, very easy)
Check out the WampServer getting started presentation.
Download and install WampServer.
And you are ready to go.
Microsoft (Not tested this myself)
Check out PHP on Windows.
Download and install the Microsoft Web Platform Installer.
Let me know how that work out... (never tried it myself, since WampServer is so easy)
You need to have a web server with PHP installed on your PC to make this work.
I highly recommend installing wampserver on your computer. It is a Windows installer that will put PHP, MySQL and Apache in your computer and let you manage all the services and such very easily. If you have problems getting it to work, you can also try out XAMPP, although I've never used it myself.
Some answers containing the hint for using wamp.
You should better use the Zend Server Community Edition.
This is also free and can be downloaded here:
http://www.zend.com/de/community/zend-server-ce
This contains Apache, Mysql, PHP and some Zend related Tools.
Benefit: its much better preconfigured than wamp.
Another easy one to set up (though it takes extra config to support PHP5) is easyPHP
you can simply install PHP, and then run the program and redirect the output
php foo.php > output.html
and then use any browser to open up that html file.
Since you have IIS on the windows cd I would suggest you go to control panel, install/uninstall programs and click on windows components and install IIS. Then install ASP.NET 3.5 from www.asp.net and finally install Phalanger from http://www.php-compiler.net/
That will give you the benefit of both worlds, you can program in ASP.NET using PHP as the language, you can use only PHP if you prefer that or you can mix using ASP.NET/C# on some pages and PHP on other pages within the same application.
I use XAMPP, works out of the box with his installer and is more than enough for a simple developer windows environment.
The simplest way - use www.microsoft.com/web platform installer. get the whole stack to run PHP all from one place.
i would like to share that before starting PHP we have to set environment for that and then we can start working with PHP.
http://code.freefeast.info/php-tutorials/setting-up-the-environment-for-php-php-tutorial/

Categories