Ako na vlastný server – V. (PHP)

V následujúcej časti nášho seriálu sa pozrieme na inštaláciu PHP na distribúcii Debian. Ukážeme si ako prepojiť PHP a MySQL, ďalej prácu PHP pod Apache2. Pozrieme sa aj na nebezpečné PHP funkcie pre Váš server.

Ako prvé si nainštalujeme PHP5
apt-get install php5 php5-common
Keď už máme základné PHP nainštalované, odporúčam nainštalovať aj následovné knižnice pre PHP a modul pre Apache2.
apt-get install libapache2-mod-php5 php5-curl php5-dev php5-gd php-pear php-mail php5-mysql
PHP v Apache zapneme spustením príkazu
a2enmod php5

Konfigurácia PHP5
Konfiguračný súbor pre PHP nájdeme v priečinku /etc/php5/apache2/php.ini.
V php5 je dôležité mať zapnutý safe mod, ktorý je defaultne vypnutý.
safe_mode = On
safe_mode_gid = On

Pokiaľ sa jedná o verejnú službu (webhosting) pre bezpečnosť je veľmi dôležité upraviť disable_functions.
disable_functions = proc_nice, proc_terminate, proc_get_status, proc_close, shell_exec,proc_open,ini_alter,dl,system, leak,shell_exec, proc_open, syslog,link,readlink,symlink,error_log,ini_restore,openlog,passthru,socket_create,
socket_write,shmop_close,shmop_delete,shmop_open,shmop_read,shmop_size,shmop_size

Ďalej odporúčam nastavenia
; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = Off

a
register_globals = Off

Užitočné nastavenia
Maximálnu veľkosť upload súboru meníme v upload_max_filesize.
Maximálna veľkosť odoslaného súboru cez POST post_max_size.

4 099 Responses to “Ako na vlastný server – V. (PHP)”

  1. rate hovorí:

    Its hard to find good help…

    I am constantnly saying that its difficult to find quality help, but here is…

  2. internet radio hovorí:

    internet radio…

    [...]just beneath, are a lot of completely not connected internet sites to ours, nonetheless, they may be certainly really worth going over[...]…

  3. … [Trackback]…

    [...] Read More: svetserverov.sk/ako-na-vlastny-server-v-php/ [...]…

  4. Website hovorí:

    … [Trackback]…

    [...] Read More Infos here: svetserverov.sk/ako-na-vlastny-server-v-php/ [...]…

  5. pornhub hovorí:

    Hello…

    Some genuinely good blog posts on this website , appreciate it for contribution….

  6. Tumblr article…

    I saw someone talking about this on Tumblr and it linked to…

  7. Your Trackbacks…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]…

  8. pslc hovorí:

    Looking around…

    I like to browse in various places on the online world, often I will go to Digg and follow thru…

  9. Your Trackbacks…

    [...]we like to honor other sites on the web, even if they aren’t related to us, by linking to them. Below are some sites worth checking out[...]…

  10. Your Trackbacks…

    [...]just below, are some totally unrelated sites to ours, however, they are definitely worth checking out[...]…

  11. Your Trackbacks…

    [...]we like to honor other sites on the web, even if they aren’t related to us, by linking to them. Below are some sites worth checking out[...]…

  12. Your Trackbacks…

    [...]the time to read or visit the content or sites we have linked to below the[...]…

  13. lainaa 100e hovorí:

    … [Trackback]…

    [...] Informations on that Topic: svetserverov.sk/ako-na-vlastny-server-v-php/ [...]…

  14. press here hovorí:

    press here…

    [...]very few web sites that take place to become in depth below, from our point of view are undoubtedly effectively worth checking out[...]…

  15. dental implants hovorí:

    Related Sites……

    [...] Left you a trackback for your visitors to obtain more information [...]…

  16. hayden marks…

    not really relevant but i waiting at the dumb air port and the only web site i can get on to is the one here good read anyway…

  17. car check text hovorí:

    Your Trackbacks…

    [...]below you’ll find the link to some sites that we think you should visit[...]…

  18. Learn to dance cha cha…

    [...]Here is a good Weblog You might Discover Fascinating that we Encourage You[...]…

  19. backlink Service hovorí:

    Your Trackbacks…

    [...]below you’ll find the link to some sites that we think you should visit[...]…

  20. Liberar and Blackberry…

    [...]It’s excellent that men and women even now know a good deal about factor like that. Under no circumstances ever forget you’ll locate other options[...]…

  21. great find…

    If you only see on good clause line today….

  22. Websites worth visiting…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]……

  23. Gems form the internet…

    [...]very few websites that happen to be detailed below, from our point of view are undoubtedly well worth checking out[...]……

  24. Recommeneded websites…

    [...]Here are some of the sites we recommend for our visitors[...]……

  25. Cool sites…

    [...]we came across a cool site that you might enjoy. Take a look if you want[...]……

  26. Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  27. replica watches hovorí:

    replica watches…

    [...]Sites of interest we’ve a link to[...]…

  28. great find…

    If you only see on good nonfictional prose writer today….

  29. Superb website…

    [...]always a big fan of linking to bloggers that I love but don’t get a lot of link love from[...]……

  30. dogshealth hovorí:

    Online Article……

    [...]The information mentioned in the article are some of the best available [...]……

  31. cctv installers hovorí:

    cctv installers…

    [...]always a huge fan of linking to bloggers that I like but do not get a whole lot of link enjoy from[...]…

  32. cash-book hovorí:

    cash-book…

    [...]Here are some of the web pages we suggest for our visitors[...]…

  33. replica watches hovorí:

    replica watches…

    [...]please go to the web-sites we adhere to, such as this a single, because it represents our picks through the web[...]…

  34. cooper tire hovorí:

    great find…

    If you only see on good bind place today….

  35. swiss replica watches…

    [...]please go to the internet sites we follow, such as this 1, as it represents our picks from the web[...]…

  36. online billing hovorí:

    Your Trackbacks…

    [...]the time to read or visit the content or sites we have linked to below the[...]…

  37. fear of dogs hovorí:

    Your Trackbacks…

    [...]below you’ll find the link to some sites that we think you should visit[...]…

  38. rolex replica watches uk…

    [...]Sites of interest we have a link to[...]…

  39. trek hovorí:

    Your Trackbacks…

    [...]here are some links to sites that we link to because we think they are worth visiting[...]…

  40. swiss replica watches…

    [...]Every as soon as inside a although we pick out blogs that we read. Listed below would be the newest web pages that we pick [...]…

  41. replica watches hovorí:

    replica watches…

    [...]below you?ll discover the link to some web pages that we consider you ought to visit[...]…

  42. Comic Book News hovorí:

    Its hard to find good help…

    I am regularly saying that its difficult to get good help, but here is…

  43. Sites we Like……

    [...] Every once in a while we choose blogs that we read. Listed below are the latest sites that we choose [...]……

  44. Websites you should visit…

    [...]below you’ll find the link to some sites that we think you should visit[...]……

  45. You should check this out…

    [...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]……

  46. Immobilier Quimper…

    [...] We like to honor other sites on the web, even if they aren’t related to us, by linking to them. Below are some sites worth checking out. Alain Guirriec Immobilier Concarneau – 4 Avenue de la Gare – 29900 CONCARNEAU – 02 98 97 18 50 [...]…

  47. ipad reparatie hovorí:

    ipad reparatie…

    [...]very few internet websites that come about to be in depth below, from our point of view are undoubtedly well worth checking out[...]…

  48. … [Trackback]…

    [...] Read More: svetserverov.sk/ako-na-vlastny-server-v-php/ [...]…

  49. auto insurance hovorí:

    … [Trackback]…

    [...] Read More here: svetserverov.sk/ako-na-vlastny-server-v-php/ [...]…

Leave a Reply