How can I tell if PHP SOAP is installed?

Re: Is PHP SOAP installed? Which version of PHP SOAP do I have?

For dedicated servers, you can tell if PHP SOAP is installed by the running the following command on the console:

# php -i phpinfo | grep soap

The following outpout will confirm you have PHP SOAP installed:

soap
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

If you have a shared hosting account and need PHP SOAP, simply contact the Helpdesk to arrange a transfer of your account to a suitable server.

How to Set Up a PHP Scheduled Task in Plesk

Plesk scheduled tasks

Use Plesk Scheduled Tasks to run a PHP script, fetch a URL or execute an advanced command automatically

Choose the safest task type for the job. Run a PHP script when the file is in your hosting space, Fetch a URL when the application provides a protected web endpoint, and use Run a command only when its documentation requires one. Test once with Run Now before trusting the schedule.

TYPEPHP, URL or commandMatch the application
TESTRun Now firstCatch errors early
WATCHControl frequencyAvoid overlapping runs

Which scheduled-task type should I choose?

TypeUse it forYou provide
Run a PHP scriptA PHP maintenance, import or application task stored in the subscriptionThe script path and PHP version or handler offered by Plesk
Fetch a URLA documented web endpoint designed to be called on a scheduleThe complete HTTPS URL, ideally protected against public abuse
Run a commandAn application command that genuinely requires shell executionThe full executable path and correctly quoted arguments

How do I create the task?

  1. 1
    Open Scheduled Tasks

    Open Plesk from your hosting service, select the appropriate domain or subscription and open Scheduled Tasks.

  2. 2
    Choose Add Task

    Select PHP script, URL or command based on the application instructions. Do not translate one type into another without a reason.

  3. 3
    Set timing and notifications

    Choose a realistic interval and an email notification option. Avoid running a long task again before its earlier run can finish.

  4. 4
    Use Run Now

    Save, run a single test and examine the result. Confirm the intended database, file or application change occurred.

Make scheduled work predictable

Use full paths

A scheduled task may not have the same working directory or environment as a script you run manually.

Protect secrets

Do not place passwords or API keys directly in a command where they may appear in logs or account screens.

Log useful output

Record completion time and errors without writing customer data or credentials into a public file.

Start less frequently

Test with a conservative schedule. Increase frequency only when the task finishes reliably and the application needs it.

Scheduled-task questions

What time zone does the schedule use?

It normally uses the server time zone shown by Plesk. Check the scheduled-task screen when an exact local time matters.

Why does the task work in my browser but fail on schedule?

The scheduled environment may use a different PHP version, path, user context or working directory. Compare those details and review its error output.

How often should a task run?

Follow the application’s documentation. More frequent is not automatically better and can cause overlaps or unnecessary load.

Automate safely

Create the task, run it once and confirm the result

A successful Run Now test and useful error notifications are more important than an aggressive schedule.

Plesk 9 – Enable PHP Pear for a domain

Re: How to enable PHP Pear for a domain in Plesk

1) edit vhost.conf as such:

<Directory /var/www/vhosts/domain.com/httpdocs>
        php_admin_value include_path "/var/www/vhosts/domain.com/httpdocs/:/usr/share/pear/"
        php_admin_value open_basedir "none"
</Directory>

2) /usr/local/psa/admin/sbin/websrvmng – -reconfigure-vhost –vhost-name=domain.com

3) service httpd restart

To test pear, create a php file, eg check_pear.php

<?php
require_once 'System.php';
var_dump(class_exists('System', false));
?>

4) open check_pear.php in a browser, a ‘true’ result confirms pear is working:

bool(true)

That’s all there is to getting PEAR working on Plesk 9 Linux.

PHP 5.3 and Zend Optimizer

Ok, so you are running PHP 5.1x / 5.2x and need to upgrade to PHP 5.3x in order to support the lastest WordPress 3.x incarnations, but you have a problem – you also have Zend Optimizer (module php-zend-optimizer) installed, there is no support for the standard Zend Optimizer in PHP 5.3x (or later).

Never fear, you can resolve the problem like this in Plesk:

# yum remove php-zend-optimizer

Now you can upgrade php (using the atomic repository), as such:

#yum upgrade php

Now you should install the replacement for Zend Optimizer as follows:

yum install php-zend-guard-loader

Restart apache:

# service httpd graceful

Job done!