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.
The best website……
[...] entails fairly long time for building an improvement. One should have real perseverance [...]…
Informative and precise…
Its hard to find informative and precise information but here I found…
Dreary Day…
It was a dreary day here today, so I just took to messing around online and realized…
Cool blog…
[...]while the sites we link to below are completely unrelated to ours, we think they are worth a read, so have a look[...]…
UK’s leading SEO Company…
Offering a complete range of SEO services to match your budget….
Hello…
I like this blog very much so much superb info….
Cool site…
[...]below you’ll find the link to some sites that we think you should visit[...]…
Looking around…
I like to look around the web, regularly I will just go to Stumble Upon and read and check stuff out…
Informative and precise…
Its hard to find informative and precise info but here I noted…
Its hard to find good help…
I am constantnly saying that its hard to get quality help, but here is…
Just Browsing…
While I was browsing yesterday I noticed a great article about…
Income pertaining to College-Scholarships pertaining to MinoritiesMedical site…
[…]here can be a number of site backlinks for you to web-sites i hook up with since many of us experience they shall be actually worthy of checking out out[... ]…
Tumblr article…
I saw someone writing about this on Tumblr and it linked to…
News info…
I was reading the news and I saw this really interesting info…
Digg…
While checking out DIGG today I noticed this…
Wikia…
Wika linked to this site…
Wikia…
Wika linked to this site…
Wikia…
Wika linked to this website…
Random Blog News…
[...]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[...]…
Found=> Recommends Your Site…
[...]if you nеed to read a tad bit mоrе then I recommend thе following[...]…
Thanks…
Can I just say what a relief to find someone who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I …
Hello!…
An interesting discussion is worth comment. I think that you should write more on this topic, it might not be a taboo subject but generally people are not enough to speak on such topics. To the next. Cheers…
Check this……
[...] only a couple of websites that happen to be outlined below, from our opinion are definitely well worth checking out [...]…