{"id":28502606,"url":"https://github.com/systemd/php-systemd","last_synced_at":"2025-07-05T11:31:23.932Z","repository":{"id":3717899,"uuid":"4790271","full_name":"systemd/php-systemd","owner":"systemd","description":"PHP extension allowing native interaction with systemd and its journal","archived":false,"fork":false,"pushed_at":"2022-04-15T13:27:35.000Z","size":7,"stargazers_count":47,"open_issues_count":5,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-08T16:37:45.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-26T02:59:44.000Z","updated_at":"2024-10-28T17:10:58.000Z","dependencies_parsed_at":"2022-07-21T21:47:45.947Z","dependency_job_id":null,"html_url":"https://github.com/systemd/php-systemd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/systemd/php-systemd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fphp-systemd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fphp-systemd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fphp-systemd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fphp-systemd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemd","download_url":"https://codeload.github.com/systemd/php-systemd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fphp-systemd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263733373,"owners_count":23503147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T16:30:55.983Z","updated_at":"2025-07-05T11:31:23.927Z","avatar_url":"https://github.com/systemd.png","language":"C","readme":"php-systemd\n===========\n\nPHP extension allowing native interaction with systemd and journald\n\nInstallation\n------------\n\n### Prerequisites\n\n.deb based\n\n    sudo apt install php5-dev  libsystemd-dev\n\n.rpm based\n\n    sudo dnf install php-devel systemd-devel\n\n### Build\n\n    phpize\n    ./configure --with-systemd\n    make\n\n### Setup\n\n    sudo make install\n\nFedora\n\n    echo \"extension=systemd.so\" | sudo tee /etc/php.d/systemd.ini\n\nDebian (PHP 5)\n\n    echo \"extension=systemd.so\" | sudo tee /etc/php5/mods-available/systemd.ini\n    sudo php5enmod systemd\n\n### Basic Test\n\n    echo \"\u003c?php echo sd_journal_send('MESSAGE=hello world');\" | php\n\nUsage\n-----\n\nQuick example:\n\n``` {.php}\n\u003c?php\nsd_journal_send('MESSAGE=Hello world.');\n// message with priority \"3\" (warning) and identifier (also called *TAG*) set to \"appname\" \nsd_journal_send('MESSAGE=Error message','PRIORITY=3', 'SYSLOG_IDENTIFIER=appname');\"\n```\n\nNotes:\n\n-   Each argument must be in the form of a KEY=value pair, environmental\n    variable style.\n-   Unlike the native C version of journald's `sd_journal_send()`,\n    printf-style substitution is not supported. Perform any substitution\n    using PHP's `sprintf()` or similar capabilities first.\n-   The base message is usually sent in the form MESSAGE=hello. The\n    MESSAGE field is, however, not required.\n-   Invalid arguments result in nothing recorded in the journal.\n\n### Viewing Output\n\nQuick way to view output with all fields as it comes in:\n\n    sudo journalctl -f --output=json\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemd%2Fphp-systemd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemd%2Fphp-systemd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemd%2Fphp-systemd/lists"}