|
Edit detail for How to use PHP revision 5 of 20
changed:
-<small>Install PHP</p><p>
-<small>either install to the default location or to c:\php<br>AbelCam expects to find PHP in c:\php</small>
Install PHP</p><p>
either install to the default location or to c:\php<br>AbelCam expects to find PHP in c:\php
changed:
-<small>Use wwwroot\php\c-php-php.ini as template for c:\php\php.ini
-</small></p><p><small><img src="/img/php.gif" alt="PHP Logo" align="right">
-Start AbelCam, the PHP Logo will be shown on the <a href="web.html" target="popup" onclick="PopWin('web.html','devices', 50, 50, 800, 800); return false;">Web</a> page</small></p>
Use wwwroot\php\c-php-php.ini as template for c:\php\php.ini<br>
Changes to the default php.ini are marked with ;ABELCAM
</p><p><img src="/img/php.gif" alt="PHP Logo" align="right">
Start AbelCam, the PHP Logo will be shown on the <a href="web.html" target="popup" onclick="PopWin('web.html','devices', 50, 50, 800, 800); return false;">Web</a> page</p>
AbelCam supports the use of PHP.
To use PHP within AbelCam, install the PHP 5.3.3 zip package
from www.php.net download php-5.3.3-nts-Win32-VC9-x86.msi
5.3.3 is the current release - later versions are expected to work as well.
Install PHP
either install to the default location or to c:\php AbelCam expects to find PHP in c:\php
Use wwwroot\php\c-php-php.ini as template for c:\php\php.ini
Changes to the default php.ini are marked with ;ABELCAM
Start AbelCam, the PHP Logo will be shown on the Web page
Once PHP is enabled, you can have a look at the PHP examples in wwwroot\php: http://localhost:8080/php
A small page counter example is included.
The following environment variables are set for PHP files
Variable | Meaning,Value |
ABELDATA | %ALLUSERSPROFILE%\Seiz System Engineering\AbelCam Location of configuration files |
ACTIVECAMS | active camera numbers, separated by commas |
CAMFPS | frame rate of the current camera |
CAMNAME | name of the current camera |
CAMNAMES | names of active cameras, separated by commas |
CAMNR | active cam number |
CAMRESOLUTION | active cam resolution, eg. 320x240 |
COOKIES | cookies set for AbelCam, eg. cam="0" |
DOC_ROOT | AbelCam document root |
HTTP_REFERER | refering page, eg. http://localhost:8080/php/index.php |
OUTPUTHEIGHT | output height of current camera, eg. 240 |
OUTPUTWIDTH | output width of current camera, eg. 320 |
REDIRECT_STATUS | always set to 200 |
REMOTE_ADDR | ip address of requestor, eg. 127.0.0.1 |
REQUEST_METHOD | GET |
SCRIPT_FILENAME | script file name, eg. index.php |
SCRIPT_NAME | same as above |
SERVER_CONFDIR | installation folder, eg. C:\ProgramData?\Seiz System Engineering\AbelCam |
SERVER_NAME | AbelCam server name, eg. localhost |
SERVER_PORT | AbelCam server port, eg. 8080 |
SERVER_PROTOCOLL | always HTTP/1.1 |
SERVER_SOFTWARE | AbelCam version, eg. AbelCam 2.1.1 Pro |
ORIG_PATH_INFO | script relative to document root, eg. /php/index.php |
other environment variables set by the operating system are available as well.
|