Link to home
Start Free TrialLog in
Avatar of hanrry
hanrry

asked on

how to compile PHP

sir/madam;
I'm try to learn the new language programming PHP but I don't how to compile it, it is only run when online or what and how? if I want run for testing how, should I install specific software? or same with the ASP using the IIS to run it. Thank.
Avatar of Jase-Coder
Jase-Coder

ok,
Since you want to compile I assume you are using *nix.
Download PHP from the site.

login as root and use a terminal
now unzip the package. if you get the tar.gz do the following

gunzip -d "php.tar.gz"
tar -xfv "php.tar"

go into the new php dir and type the following

./configure - -with-mysql - -with-apxs
make
make install

then that should install the php
the ./configure section of the installation will tell you if you need to install any other packages.

Also you can used PHP without being online.

where i have put - <space> - ie - -, when your installing dont include the space between the "-" so, do -- , which is to hyphens together.

If you were talking about installing on windows, you'll be able to download the binary and it requres some registry tweaking.

good luck with the installtion and learning the language.
-Jason
Go to php.net and dowload the lastest version for windows. Install it and if you have IIS installed put your php files into your wwwroot folder and run them by calling them through the server.

Like:

http://localhost/yourfile.php

You might need to configure your IIS settings to handle php, but usually the installer does.

Jase-Coder, if you noticed, hanrry said IIS.

This is windows.

And whilst I know you linux guys thinks EVERYTHING linux is cool, I'm pretty much sure that you can't compile PHP on a windows box using Linux commands.

To get PHP compiled on Windows, you need Microsoft Visual C.

But, if all that is wanted is to run PHP, then download Sambar (www.sambar.com), PHP (www.php.net) and MySQL (www.mysql.com) and install.

Total installation time should be less than 15 minutes with your first site up and working!

Richard.

RQuadling : he says will he need to install specific software or will it work like ASP&ISS. He doesnt actually explicitly say he is using IIS


>>if I want run for testing how, should I install specific software? or same with the ASP using the IIS to run it. Thank.


>>And whilst I know you linux guys thinks EVERYTHING linux is cool, I'm pretty much sure that you can't compile PHP on a windows box using Linux commands.

That is proberly one of the most pathetic things I have heard.

Also get out of your shell
>>To get PHP compiled on Windows, you need Microsoft Visual C.

There is more that one C compiler for windows.

And, I dunno if you can even compile the source in windows. :S

ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry to dissapoint but the list you read iswell out of date.

>>And whilst I know you linux guys thinks EVERYTHING linux is cool, I'm pretty much sure that you can't compile PHP on a windows box using Linux commands.

>>but hey, you're a VBA coder, so like,

could you make your mind up.

and, you seem to be abit of a idiot, each language has its own purpose. So, what is wrong with knowing VBA? I use it in MS Access. Well did use it.

I dont even use PHP. I could say haha you lame PHP programmer, you proberly use it because it is easier than the likes of PERL.

So true!

You are VERY right on the each languange has its own uses. I use VBA for word and excel so I can work out how to do it in COM. I believe that mostly though it is used for writing viruses! <GRIN>

But, none of this is to do with compiling PHP.

Richard
Read http://www.php.net/manual/en/install.windows.php#install.windows.build

This explains exactly how to build using MSVC6.

(You *could* use another one I imagine, but you'd have to modify the makefiles, etc)
Same info as on the Zend page.
Yeh true RQuadling, it has nothing to do with compling. Its stupid and childish. Although you did start the flame

>> Jase-coder uses VBA, ha ha!

;-)

I call for peace RQuadling
Fair doos!

(Fire extinguisher firing!)