Server Paths - PHP Perl Python and More

PHP/MariaDB/MySQL | Updated March 2026

The default path to PHP on Ultra Web Hosting servers is /usr/bin/php. But if you need a specific PHP version, or if you're looking for paths to other common binaries (Perl, Python, sendmail), this guide has them all. These paths are used in cron jobs, CGI scripts, and application configuration files.

01. PHP Paths

Version Short Path Full EA Path
Default (account setting) /usr/bin/php Uses your PHP Selector version
PHP 7.4 /usr/bin/php7.4 /opt/cpanel/ea-php74/root/usr/bin/php
PHP 8.0 /usr/bin/php8.0 /opt/cpanel/ea-php80/root/usr/bin/php
PHP 8.1 /usr/bin/php8.1 /opt/cpanel/ea-php81/root/usr/bin/php
PHP 8.2 /usr/bin/php8.2 /opt/cpanel/ea-php82/root/usr/bin/php
PHP 8.3 /usr/bin/php8.3 /opt/cpanel/ea-php83/root/usr/bin/php
Tip

In most cases, use /usr/bin/php. This automatically follows whatever version you set in cPanel > Select PHP Version, so it stays correct even if you change versions later. Only use a version-specific path if you need a cron job or script to run on a different PHP version than your website.

02. Other Common Paths

Binary Path Used For
Perl /usr/bin/perl CGI scripts, shebang line
Python 3 /usr/bin/python3 Python scripts, CGI
Sendmail /usr/sbin/sendmail PHP mail(), contact forms
Bash /bin/bash Shell scripts
MySQL/MariaDB /usr/bin/mysql CLI database access, cron backups
mysqldump /usr/bin/mysqldump Database backups via cron
curl /usr/bin/curl HTTP requests from scripts/cron
wget /usr/bin/wget File downloads from scripts/cron

03. Finding Paths Yourself

If you need to find the path to any binary on the server, use the which command in cPanel > Terminal or via SSH:

which php
which perl
which python3
which sendmail
which mysql

For PHP specifically, you can also check the version that /usr/bin/php points to:

php -v

This shows the PHP version and build info, confirming which version runs when you use the default /usr/bin/php path.

04. Using Paths in Scripts and Cron Jobs

Cron Jobs

When setting up a cron job in cPanel, use the full path to the PHP binary:

/usr/bin/php /home/yourusername/public_html/cron-script.php

To run a cron with a specific PHP version:

/usr/bin/php8.2 /home/yourusername/public_html/cron-script.php

See our Cron Job Guide for full setup instructions.

CGI Scripts (Perl)

The first line of a Perl CGI script must be the path to Perl:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello from Perl";

Make sure the file has 755 permissions and Unix-style line endings (LF, not CRLF). CGI scripts can be placed in the cgi-bin directory or anywhere under public_html. For more on CGI, see our CGI Guide.

Perl Version and Modules

Our servers run Perl 5. To check the exact version on your server:

perl -v

A wide range of CPAN modules are pre-installed. Common modules used by web applications include DBI, CGI, LWP, Net::SMTP, MIME::Lite, and many others. You can check if a specific module is installed with:

perl -MModule::Name -e 'print "Installed\n"'

For example: perl -MDBI -e 'print "Installed\n"'. If the module is missing, you'll see an error. Open a support ticket with the module name and we can install any CPAN module as long as it does not pose a security risk.

WordPress wp-config.php

Some WordPress guides reference PHP paths for custom configurations. The paths in this article apply to all Ultra Web Hosting servers. For database connection, use localhost as the host (port 3306). See our port reference.

Need a Path That's Not Listed?

If you need the path to a specific binary or library, open a ticket and let us know what you're trying to run.

Open a Support Ticket

Quick Recap: Server Paths

The paths you'll use most often:

  1. PHP: /usr/bin/php - uses your account's PHP version setting
  2. Perl: /usr/bin/perl - for CGI scripts
  3. Sendmail: /usr/sbin/sendmail - for PHP mail() and contact forms
  4. MySQL: /usr/bin/mysql - for CLI database access
  5. Use which command - to find the path to anything else

Last updated March 2026 · Browse all PHP articles · See also: Port Reference | Change PHP Version

  • 494 Users Found This Useful

Was this answer helpful?

Related Articles

Running a PHP file with a cron job

To run a PHP file from cron, use the "cron jobs" section of your control panel. Use the following...

The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE: exit 11

The error message...  The MySQL server is currently offline admin bin Cpanel/cpmysql/DBCACHE:...

phpMyAdmin - Error Incorrect format parameter

When importing a database with phpMyAdmin I receive the error "Error Incorrect format parameter"....

How to Add a User to a MariaDB/MySQL Database

PHP/MariaDB/MySQL | Updated March 2026 Every application that uses a database (WordPress,...

How Do I Update or Change My PHP Version

Hosting Control Panel | Updated March 2026 Ultra Web Hosting runs CloudLinux with multiple...



Save 30% on web hosting - Use coupon code Hosting30