Apache + PHP On Debian
Thanks
11 Replies
> service httpd start
PHP and MySQL are configured by default.
@Husam:
Hi, i could use some help trying to setup php support on my debian box. Examples of what i mean can be found at
http://67.18.92.39/phpsysinfo/ orhttp://67.18.92.39/lol.php .Thanks
apt-get install php
apt-get install php-mysql
apt-get install libapachephp (or something like that)
This command should fix everything:
apt-get update
apt-get install php4 php4-mysql apache
It should ask you if you want to add the PHP module to the apache configuration, if NOT add the following to /etc/apache/httpd.conf:
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
You have to remember that Apache on Debian won't start until a hostname is set:
echo youthostname > /etc/hostname
/bin/hostname -F /etc/hostname
Then reboot the server and evrything should work.
http://www.apachefriends.org/en/xampp-linux.html
just follow the steps and take note of security procedure at the bottom of the pg.
maven
EDIT: the post that makes reference to php4 also refers to Apache 1. My bad
-Brian
@absolutefunk:
Perhaps this is a dumb question, but ain't php up to version 5? Or is it that the Debian binaries are only @ 4? Or is there something bad about version 5? I'm running 5.0.4, so I'm kinda curious
:)
I don't know of any popular distros that are installing PHP5 by default now instead of 4. Given there are PHP5 packages for all said distros, but a lot of scripts haven't been tested against PHP5, and it's not really considered a stable move yet.
@absolutefunk:
Perhaps this is a dumb question, but ain't php up to version 5? Or is it that the Debian binaries are only @ 4? Or is there something bad about version 5? I'm running 5.0.4, so I'm kinda curious
:) EDIT: the post that makes reference to php4 also refers to Apache 1. My bad
;) -Brian
PHP 5 uses a slightly diffrent syntax for OOP, which affects many scripts such as phpbb, IPB, vB etc. Because of that, PHP 4 is more suited for a production enviornment while 5 is more suited for a development enviornment.
> PHP 5 uses a slightly diffrent syntax for OOP, which affects many scripts such as phpbb, IPB, vB etc. Because of that, PHP 4 is more suited for a production enviornment while 5 is more suited for a development enviornment.
Slightly different?
PHP5 is not for development. In fact, PHP5 is a lot more productive than PHP4 for those who know OOP. It is also faster in most cases because of the improved memory management. Most people stick to PHP4 either because of old php code or simply because the new PHP5 is much harder to handle, although most php4 scripts run fine in php5 as well. PHP4 still remains at the level of scripting language rather than a programming language and that is why it was so popular … too easy to learn
@mastabog:
> PHP 5 uses a slightly diffrent syntax for OOP, which affects many scripts such as phpbb, IPB, vB etc. Because of that, PHP 4 is more suited for a production enviornment while 5 is more suited for a development enviornment.
Slightly different?:roll: OOP in PHP5 is completly rewritten and close to Java while in PHP4 it was barely existing. I've been coding in php5 since its first alpha stage in the beginning of 2003. It even has a Reflection API and a growing SPL.PHP5 is not for development. In fact, PHP5 is a lot more productive than PHP4 for those who know OOP. It is also faster in most cases because of the improved memory management. Most people stick to PHP4 either because of old php code or simply because the new PHP5 is much harder to handle, although most php4 scripts run fine in php5 as well. PHP4 still remains at the level of scripting language rather than a programming language and that is why it was so popular … too easy to learn
:)
I think he was more going for PHP4 is more proven and therefore better for 'downtime = $50k/minute' situations then PHP5