Installing PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ssubha
Forum Newbie
Posts: 1
Joined: Sun Jan 26, 2003 8:53 pm

Installing PHP

Post by ssubha »

I tried installing php from a cd. i am not able to get it working. I wouldlike to know what code to add in the apache server files to enable it to work. I am working on a windowsME edition machine.

Thank you,
s.subha
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

Did you read the INSTALL instructions file?

A quick searchgave me
http://www.overnow.com/apachephp.html
where you probably want to look at step 6 (?)
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

if it is the full binary distribution (the one without installer) there should be an install.txt which you can follow by the letter to install php.
Also take a look at http://www.php.net/manual/en/installation.php

The current release of php can be found at http://www.php.net/downloads.php

http://www.php.net/get_download.php?df= ... -Win32.zip (current version; about 5,811Kb)
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

How easy to install on Win XP

Post by puckeye »

Hi all,

I have Win XP on my home computer and would like to know how easy is it to install on that machine?

I have an AMD K7 @ 1001Mhz with 256Mb of SDRAM. I have about 7-8 Gb of free space (can get more if I push myself to clean obsolete files...)

I'm not looking at creating a web server accessible to the outside, though it would be a nice feature to show clients or friends. I mainly need this for my job as a web programmer. I'm currently using Homesite to work directly on my hosted servers by ftp. It's a great tool but sometimes it can be quite slow, having to wait 2 or 3 seconds for a file to update ifself on the server is not long by itself but as many PHP programmers around I rarely need to work on a single file...

What modules aside Apache, MySQL and PHP would I need? What other modules would be a good addition while not being critical?

Thanks all

EDIT

In the category nice thing to have while not critical I will add PHPMyAdmin.
DeGauss
Forum Contributor
Posts: 105
Joined: Tue Oct 22, 2002 9:44 am
Location: Gainesville, FL

Post by DeGauss »

All you need from the Win32 Binary (zip file, not installer)

For a BASIC install, this does not include the GD library or any other PHP extension. Plain vanilla install.

php4ts.dll
php4apache.dll
or php4apache2.dll
php.ini-dist
rename to php.ini

Pop the dll's into your windows\system32 directory and put your php.ini into your windows directory.

Edit php.ini and search for ;include_path

change it to say include_path = "."

find your apache conf file.

Add the following line with the block of LoadModule directives

For Apache 1.3.*

LoadModule php4_module c:/windows/system32/php4apache.dll

or for Apache 2.0.*

LoadModule php4_module c:/windows/system32/php4apache2.dll

Then find the addtype directives and insert the following lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


You can also search for DirectorIndex and add index.php to the list of index files.
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

Thanks DeGauss,

Were would I read for more information about GD and adding True type fonts capability? Also I would need to be able to at least emulate the function mail();

Thanks for the help I wasn't sure if would install the server or not but now I think I'll give it a try.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Adding GD is a case of editing the php.ini directive extention_dir to reflect where the gd.dll is, I think it extracts from the binary into an extensions directory so you'd have something like:

Code: Select all

extension_dir =C:/php/extensions
then you just need to uncomment the following line by removing the semi-colon from in front of it, so:

Code: Select all

;extension=php_gd.dll
becomes

Code: Select all

extension=php_gd.dll
As for getting the mail() function working, you could install a mail server on your computer but the simplest method may just be to use your ISP's SMTP server - so check out the settings for that in your e-mail client and adjust the following lines in your php.ini to reflect it and your e-mail address:

Code: Select all

їmail function]
; For Win32 only.
SMTP = mail.myisp.com

; For Win32 only.
sendmail_from = me@mine.com
Mac
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

Thanks a whole bunch Mac,

I'll probably send you a few PM if I have trouble with the config... I'll probably try this over the week-end...

Thanks
shinjikun
Forum Newbie
Posts: 2
Joined: Wed Jan 29, 2003 7:30 am

gd extension is not working

Post by shinjikun »

I have serious problems trying to install the gd extensions in window$ 98. Seems like the extension is loaded, but I cannot get a single graphic.:?
I've changed the extension_dir in php.ini and uncommented the ;php_gd.dd but nothing seems to work.

The extensions only work in the loadable module version of php?
Why is another extension called php_g2.dll in the extensions dir?

I'm using
  • php 4.3.0 (binary distribution)
    Apache 2.0.43
    under window$ 98.
Thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Is GD in the list if you run the following code?

Code: Select all

print_r (get_loaded_extensions());
if so what is the code that you are trying to use to create a graphic.

There are two versions of the GD dll - the php_gd.dll which is GD version 1.8 or something like that and the php_gd2.dll which is the potentially less stable (or was when I last checked) GD version 2.

Mac
shinjikun
Forum Newbie
Posts: 2
Joined: Wed Jan 29, 2003 7:30 am

Post by shinjikun »

Allright

With this tip

Code: Select all

print_r (get_loaded_extensions());
I realise the problem wasn't the gd extension because it was correctly loaded, so I can solve my problem.

Thank you!
Post Reply