HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/server/php/83/src/ext/pgsql/tests/skipif.inc
<?php
// This script prints "skip" unless:
// * the pgsql extension is built-in or loadable, AND
// * there is a database called "test" accessible
//   with no username/password, AND
// * we have create/drop privileges on the entire "test"
//   database

include("config.inc");
include("lcmess.inc");

if (getenv("SKIP_REPEAT")) {
    // pgsql tests are order-dependent.
    // We should probably change that, but in the meantime do not allow repetition.
    die("skip Cannot repeat pgsql tests");
}
$conn = @pg_connect($conn_str);
if (!$conn) {
    die("skip could not connect\n");
}

function skip_server_version($version, $op = '<')
{
    global $conn;
    $pg = pg_parameter_status($conn,'server_version');
    if (version_compare($pg, $version, $op)) {
        die("skip Server version {$pg} is {$op} {$version}\n");
    }
    return $pg;
}

function skip_bytea_not_hex()
{
    global $conn;
    $out = pg_escape_bytea($conn, "\xFF");
    if (strpos($out, '377') !== false) {
        die("skip libpq or backend < 9.0\n");
    }
}

function skip_bytea_not_escape()
{
    global $conn;
    $out = pg_escape_bytea($conn, "\xFF");
    if (strpos($out, '377') === false) {
        die("skip libpq or backend >= 9.0\n");
    }
}

?>