FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PHP! Ahhh! How to edit! What is this installer?





Neilos
OK a few questions...

(I'm a PHP noobie btw!)

PHP 5.2.10 Released! Woo hoo! I have no experience with the previous versions but bigger is better, right?

Now I'll just down load..... ummmm..... Which one?
- http://uk3.php.net/downloads.php
- I assume that I should download a version?! Or maybe not?!
- I'm running windows xp prof. so I assume I download Windows Binary > PHP 5.2.10 installer
- OR do I need to download it at all? Should I edit the code with 'Notepad' and upload it straight to my 'frihost' hosted site. This would be annoying to work on it live.

Say I manage to download something, does it matter that I run Windows and the server may run Linux?
- Does the PHP installer just install the PHP software allowing me to have it act like a server on my PC? So I will be able to access my HTML files through it or near it or what?
- How does this software work? What does it act like?

Ok, I have more questions directly relating to PHP and not the installer but I'll post them in a new post after I clear this up.

Thanks

Neilos
rvec
you shouldn't install php directly on windows. It's much easier to install a package with php, mysql and apache: http://www.wampserver.com/en/

You can install that on windows and it'll work almost the same as on linux (some small differences). On frihost there's no need to isntall php, it's already done for you.

If you want a nice php editor instead of notepad:
http://www.frihost.com/forums/vt-7995.html (I like notepad++)

and before you ask more questions read this: http://www.frihost.com/forums/vt-92218.html
there are some links to topics in which some basics are explained to other starters, you might find them helpful.
vasvaas
i use xampp, its also lot better that installing the stand alone version
Raidation
Okay, you're getting confused, and don't listen to rvec (no offense, rvec). It's better to install Apache, MySQL, and PHP seperately, so that you have more control and more understanding of how it works.

PHP is NOT a code editing IDE. That's what it looked like you thought it was...
PHP is the code parser for a server. Like a plug-in.

If you really want to install PHP, then don't use the installer.
Download the PHP 5.3 VC6 x86 Thread Safe ZIP package.
That's the most complete one.

But if you do install PHP, then you also need to install Apache
Don't download from a mirror. Download directly from their site. Wink
Go to the Win32 Binary without crypto (no mod_ssl) (MSI Installer) option for Apache 2.2.11
And install Apache server.
When you get to the server information, you don't need that, so just type in anything you want. Wink
And install.

Then, you need to install MySQL.
Choose the package that fits you and use the MSI Installer.
When you're installing, choose the following options:
-Detailed Configuration
-Developer Machine
-Non-Transactional Database Only (that is, if you're not selling or buying)
-Decision Support
-Enable TCP/IP Networking and Uncheck Strict Mode. And Check Add Firewall Exception.
-Best Support for Multilingualism
-Check Install as Windows Service and choose MySQL. And also check Launch Automatically. And include the Bin directory in Windows PATH.
-Uncheck Modify Security Settings
-And finally, press Execute.

If everything is perfect, then it should start. If not, then go to your Start Menu > MySQL > MySQL Server 5.1 > MySQL Server Instance Config Wizard

And ReConfigure with the same settings above.

Well, now that we have the installing done, time to go back to PHP. You shouldn't have done anything with that ZIP package yet. Now you need to make a folder called PHP in your C:\ Drive and extract all the files into that folder.

In your PHP folder, look for a file called php.ini-developer. Rename it to php.ini (sound familiar?).
Look for the line that starts with doc_root. Give it the value "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs" with the quotes if you installed Apache in the default directory.
Now, after that, look for the line that starts with extension_dir and give it the value "C:\PHP\ext" with the quotation marks, of course.
Now go to the lines that have the word "extension" preceded by a semi-colon and followed by a dll name.
Remove the semi-colon from the line that says ;extension=php_mysqli.dll
That will be your MySQL extension. Don't remove the semi-colon from ;extension=php_mysql.dll
The "i" in mysqli means improved.
You're almost done.
Look for session.save_path
Make sure the line does NOT precede with a semi-colon. Give it the value "C:\WINDOWS\Temp" or whatever your computer's temporary directory is.
Now you're done with the php.ini file. Smile

Next, you have to set up Apache's httpd.conf file.
Go into your C:\Program Files\Apache Software Foundation\Apache2.2\conf directory and look for the file httpd.conf
You can edit it only if you're an Administrator, so if you're not, edit it as an Administrator.
Fortunately for you, all that confusing code has already been made by the installer, so you're okay there. Smile
Look for:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
And after index.html, add index.php
Then, add this to the VERY END of the file:

LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP"

And that's it.
Next to update your MySQL server (I know, it's tiring. I don't know how long this tutorial is so far. All I know is that I'm tired.).
Go into command prompt. If you don't know how to do that, then... I can't help you.
Type in the command:
mysqladmin -u root -p password "Type in new password here with the quotation marks"

Then, you will be prompted to enter in your old password. Just press enter.
Then, you're done with MySQL. Smile

Now, back to Apache. If Apache is running, you should see a new icon in your toolbar. It should either have a red dot or a green arrow in it. Now right click it and restart it. Wait until it changes into a green arrow in the middle, then right click on it and click on Open Apache Monitor. If everything is working fine, then at the bottom, it should have the line PHP 5.3.0 or something there. Smile
If you had the red dot, then just click (not right click) on it and start apache services. Wait until it changes to a green arrow, then do the steps above.

Now you're done. Smile

That was the longest post I've ever made and I'm not going to be surprised it it's the longest post on this forum. Smile

Your server's root directory should be C:\Program Files\Apache Software Foundation\Apache2.2\htdocs

I don't care if you're not interested in this. At least I'm happy knowing that I might be helping other people.

Smile
Hogwarts
No, it's best to do what Rvec said. If you're using your localhost for anything more then development, you're doing something wrong. Installing it on Windows, too, isn't going to teach you anything about setting up a real (i.e. decent) web server anyway.
Raidation
But say you were testing on WAMP server, and everything worked fine, and then it turned out that Frihost's restrictions made it fail?

And you didn't understand the php.ini file...
Star Wars Fanatic
Raidation wrote:
But say you were testing on WAMP server, and everything worked fine, and then it turned out that Frihost's restrictions made it fail?

And you didn't understand the php.ini file...


Well if you don't understand the php.ini, then you won't be able to install all of them separately. I installed MySQL and updated Apache and PHP on my Mac, but that's me. I would recommend to most people to get a package. And if you want the experience of setting up a server, then you'd have to buy a server, you won't get any experience from installing anything on Windows XP.
noah
Get the WAMP stack as a pack and run with that.

Then, once you've figured some stuff out, try installing it your self on *nix box or VPS or something of the sort.

If you really want to mess around with it, get a *nix box and install it on there instead of on windows.
rockacola
noah wrote:
Get the WAMP stack as a pack and run with that.

Then, once you've figured some stuff out, try installing it your self on *nix box or VPS or something of the sort.

If you really want to mess around with it, get a *nix box and install it on there instead of on windows.


You don't really need a linux/unit box.. simply use a VM will make your life much easier (and cheaper too)
noah
rockacola wrote:
noah wrote:
Get the WAMP stack as a pack and run with that.

Then, once you've figured some stuff out, try installing it your self on *nix box or VPS or something of the sort.

If you really want to mess around with it, get a *nix box and install it on there instead of on windows.


You don't really need a linux/unit box.. simply use a VM will make your life much easier (and cheaper too)


Very True. I had pictured getting a separate machine, but VM will work just as well if not better.
Related topics
Anyone good with PHP-NUKE?
[Official] Best PHP Editor
Free php Editor
what is your php mysql apache installer package
Server 2 down (allways)
PHP-Nuke.. help!
Need a little help
Help
Need a simple Contact form
Edit / Delete
Installing a new wiki
PHP Text Edit
Php generator. [help] [solved]
Getting Fatal Error in php mysqli
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.