10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I was reviewing a shell script and I found this line:
yum -y update >> >(/usr/bin/tee /var/log/file)
I have tried removing the >> directive and all that will occur is that the file will be created--nothing gets put in the file. If I put back the >> directive it works. If I remove the... (3 Replies)
Discussion started by: mojoman
3 Replies
2. Programming
I am currently using Linux CentOS and programming in FORTRAN 90 using Portland 7.1 compiler.
I am able to set in the preprocessor directives a flag called TEST. when I go to use logic in my code i can write
#ifdef TEST
execute something
#endif
Furthermore, if I want to negate the... (2 Replies)
Discussion started by: prodigious8
2 Replies
3. Shell Programming and Scripting
Firstly, I would like to apologize if this is not the appropriate sub-forum to post about GNU/BSD makefile scripting. Though my code is in C++, because I am focusing on the makefile I thought it would go better in shell scripting. Please correct me if I am wrong.
Secondly, I am not interested in... (0 Replies)
Discussion started by: AntumDeluge
0 Replies
4. Solaris
Hi All,
I am new to SUN Solaris.I have some questions regarding environment variable.:confused:
Q1. Where the environment variables available in Solaris.
Q2. What command used here.
Q3. Can a user change this .Suppose i want to change the bash to ksh can it be possible here. Or i need to... (2 Replies)
Discussion started by: jdash.ps
2 Replies
5. Shell Programming and Scripting
Hi Frinds,
I am getting following error while executing the script.
Can anybody suggest how to overcome this ?
Is environment seetting wrong ?
$ ksh hyp_incoming.csh
hyp_incoming.csh: !/bin/csh: not found
hyp_incoming.csh: /usr/local/hyperion/log/run_log.txt: cannot create... (2 Replies)
Discussion started by: deep_kol
2 Replies
6. Solaris
Hello all,
I am a bit confused not only because I am new to Solaris but because when I run "env" I get a list of variables that are not in the user .profile. Where else can the account be getting environment variables from?
Is there a .profile that applies to all accounts?
Thank you in... (4 Replies)
Discussion started by: komputersman
4 Replies
7. UNIX for Advanced & Expert Users
I have been resently working on some ksh script. One of the line in the file writes:
.. /etc/.environment dev_env
I can not understand what this mean, all I know is .environment is unix system environment file. Is ".." a command? If some one can give me some clue where can I find information... (7 Replies)
Discussion started by: zzwu3591
7 Replies
8. UNIX for Dummies Questions & Answers
I am trying to run a series of perl scripts at different times using crontab under solaris. The scripts that i am using require some specific environment variables to be specified for database functionality, but i would also like it that i can specify a few global variables for output locations.
... (8 Replies)
Discussion started by: Smitty McSmith
8 Replies
9. Shell Programming and Scripting
First of all I am using C shell.
I have a variable destDirectory that holds a path.
the path includes an environment variable($user)
when I try to execute a command within the script, the $destDirectory gets replaced with the path, but the environment variable is not replaced. I end up... (2 Replies)
Discussion started by: karyn1617
2 Replies
10. Cybersecurity
Is there a general rule I can apply when examining/editing ipfw entries?
Also, does each new entry have to have a unique rule number?
And, I think I can write a script to block code red infected machines (though I'm not sure it would do more than slim down my web server error message log),... (0 Replies)
Discussion started by: [MA]Flying_Meat
0 Replies
DL(3) 1 DL(3)
dl - Loads a PHP extension at runtime
SYNOPSIS
bool dl (string $library)
DESCRIPTION
Loads the PHP extension given by the parameter $library.
Use extension_loaded(3) to test whether a given extension is already available or not. This works on both built-in extensions and dynami-
cally loaded ones (either through php.ini or dl(3)).
Warning
This function has been removed from some SAPIs in PHP 5.3.
PARAMETERS
o $library
- This parameter is only the filename of the extension to load which also depends on your platform. For example, the sockets
extension (if compiled as a shared module, not the default!) would be called sockets.so on Unix platforms whereas it is called
php_sockets.dll on the Windows platform. The directory where the extension is loaded from depends on your platform: Windows - If
not explicitly set in the php.ini, the extension is loaded from C:php4extensions (PHP 4) or C:php5 (PHP 5) by default. Unix
- If not explicitly set in the php.ini, the default extension directory depends on
o whether PHP has been built with
--enable-debug or not
o whether PHP has been built with (experimental) ZTS (Zend Thread Safety) support or not
o the current internal
ZEND_MODULE_API_NO (Zend internal module API number, which is basically the date on which a major module API change hap-
pened, e.g. 20010901)
Taking into account the above, the directory then defaults to <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-
not>-ZEND_MODULE_API_NO, e.g. /usr/local/php/lib/php/extensions/debug-non-zts-20010901 or /usr/local/php/lib/php/extensions/no-
debug-zts-20010901.
RETURN VALUES
Returns TRUE on success or FALSE on failure. If the functionality of loading modules is not available or has been disabled (either by set-
ting enable_dl off or by enabling safe mode in php.ini) an E_ERROR is emitted and execution is stopped. If dl(3) fails because the speci-
fied library couldn't be loaded, in addition to FALSE an E_WARNING message is emitted.
EXAMPLES
Example #1
dl(3) examples
<?php
// Example loading an extension based on OS
if (!extension_loaded('sqlite')) {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
dl('php_sqlite.dll');
} else {
dl('sqlite.so');
}
}
// Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0
if (!extension_loaded('sqlite')) {
$prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX);
}
?>
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | dl(3) is now disabled in some SAPIs due to sta- |
| | bility issues. The only SAPIs that allow dl(3) |
| | are CLI and Embed. Use the Extension Loading |
| | Directives instead. |
| | |
+--------+---------------------------------------------------+
NOTES
Note
dl(3) is not supported when PHP is built with ZTS support. Use the Extension Loading Directives instead.
Note
dl(3) is case sensitive on Unix platforms.
Note
This function is disabled when PHP is running in safe mode.
SEE ALSO
Extension Loading Directives, extension_loaded(3).
PHP Documentation Group DL(3)