Jump to content
xisto Community
Sign in to follow this  
Nik

Php Language Requirement what is the requirement to run PHP program

Recommended Posts

I want to learn PHP language. But I don't know what is the requirement to run PHP program.And tell me what will be the extension of PHP program if I use PHP5, and what will be the extension of PHP program if I use PHP4.

Share this post


Link to post
Share on other sites

All you need to run PHP scripts is what can be downloaded and installed from the PHP website. However, if you want to run your scripts in a browser, you'll need a web server that PHP supports. The extension for your PHP scripts can be anything, but what is considered appropriate is "*.php". If you want to separate your PHP 4 scripts from your PHP 5 scripts, then you may give your scripts the extension .php4 and .php5. PHP will work with either, just make sure you don't try to do things that are incompatible with each version when you try to mix in code with different versions.

Share this post


Link to post
Share on other sites

You must also take notice that not all server have support for the file extension *.php4 and *.php5 since they the standard extension was *.php. Depending on who was hosting your website, you may encounter restrictions on different PHP disk commands like writing, moving and renaming files. Php can run on all Apache system and Apache compatible system, it can also run above IIS and much more. When writing your file, take into consideration that filenames on Apache/Linux are case sensitive while filenames on IIS and Windows Operating system is not. It will save you time figuring out why you can't load http://forums.xisto.com/no_longer_exists/ when you typed http://forums.xisto.com/no_longer_exists/ (see capital 'L')

Share this post


Link to post
Share on other sites

the first thing to do, is to download a local server that support PHP files. the most common one and easy to use in my point of view is xampp. it is a package containing APACHE, MYSQL, PHP and PERL. you will get them all by only install xampp which is easy to install. and it is free and supports windows, linux, mac os, and solaris. you can download it from here http://forums.xisto.com/no_longer_exists/ you finished downloading it, you will get an orange icon "xampp control panal" every time you want to run php in your local machine you should double click on that icon and run mysql and apache, and there are other future you could read about them later. and you should write your php files in an editor that support php to reduce syntax errors and you should save your work in htdocs folder in xampp folder in your local C:, usually it should be in this path (C:\xampp\htdocs). for example if you create a php file and named it test.php, then you should save your file in htdocs folder. when you finished programming you can show it in your browser by typing this in your browser (LOCALHOST/test.php). that's all for running php in your local machine. if you have any questions feel free to ask.about the extensions, i think you should use .php either you use php4 or php5 for not getting any errors that may happening because of incompatibility.

Share this post


Link to post
Share on other sites

You can also use WAMP, it is easier to use than apachefriend's XAMMP. XAMMP can be enabled and automatically run using services but you will be stuck at it running everytime you boot until you remove the service. You can also use the control panel and stop using services which is good but.. the control panel does not work pretty well sometimes.

WAMP server on the other hand have a one click shortcut that will run all the server stuffs when you load them and you can easily unload all. unlike XAMMP where you need to individual upgrade each component if you want to duplicate your server settings, on WAMP you can have all the versions of PHP, MYSQL and APACHE that you want and as many as you want. You only need to download the installer module and WAMP will setup for you.

You can swap php version, mysql version and even apache version using mouse clicks on it system tray menu. you can even enable and disable server modules without touching you server configuration. your PHP error log is also one click away unlike on XAMMP where you need to load them from the logs directory.

The only thing where XAMMP beats WAMP is its default component of FTP service and mail service and a preset SSL setting. SSL module and setting on the hand can be easily installed and activated on WAMP server. Things to note, FTP and MAIL services are not needed when you are testing your website locally and in fact the only thing that you may need is to have SMTP service to be active which is also subject on your ISP's rules if they allow your connection to open port 25 and 2525 or any port mapping that accepts mail service. If they don't allow the mail ports to be active on your account then MAIL won't work.

http://www.wampserver.com/en/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.