User Tools

Site Tools


programming:php

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programming:php [2017/06/14 14:03] – ↷ Page moved from php to programming:php skipidarprogramming:php [2023/11/02 07:11] (current) skipidar
Line 194: Line 194:
 $toolbar = @file_get_contents($ROOT.'/templatesubs/partners/toolbar.php'); $toolbar = @file_get_contents($ROOT.'/templatesubs/partners/toolbar.php');
 </sxh> </sxh>
 +
 +
 +====INSTALLATION, CONFIGURATION====
 +
 +This Page is about tips and fallpits while configurating PHP:
 +
 +===Find out, which User Account PHP uses===
 +**Problem:** Find out, which User Account PHP uses, e.g. to grant permissions for a Folder.
 +<code>
 +<?php
 +echo 'Name des Benutzers: ' . get_current_user();
 +?>
 +</code>
 +
 +
 +===Install modules===
 +
 +<code>
 +sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json
 +</code>
 +====Usage====
 +
 +===Findout the path to the current directory===
 +When including other files, they can't be refered relatively to the current dir. To do so use
 +<code>
 +define('__ROOT__', dirname(__FILE__));
 +$path = (__ROOT__ . '/relative/path.php');
 +</code>
 +
 +
 +=== Php Script as a cron job ===
 +<code>
 +*/20 * * * * /usr/bin/php -q -f /home/scripts/humblebundle/index.php > /dev/null
 +</code>
programming/php.1497449027.txt.gz · Last modified: (external edit)