About Contact Charter News
all2all

MySQL and PHP

Questions about databases, PHP versions, modules, permissions and runtime errors.

Questions

How do I manage my MySQL database?

MySQL databases can be managed through phpMyAdmin and Virtualmin.

Use phpMyAdmin to browse tables, run SQL queries, import/export data and modify content. The exact address depends on your hosting server and is included in your access information.

Use Virtualmin to create databases, create users, change passwords and assign permissions. phpMyAdmin does not normally create new hosting databases.

Users with shell access can also use mysql and mysqldump for imports, exports, maintenance and scripting.

Direct external database access is normally restricted on shared hosting. If you need remote administration, use an SSH tunnel to connect securely to the MySQL service through your hosting account. Contact support if a project really needs a different remote access setup.

What are my MySQL server, database name, username and password?

For website applications such as PHP, WordPress or Perl, the MySQL server is usually:

  • localhost

The database name is defined when the database is created. It often corresponds to the domain name or hosting username, but always verify it in Virtualmin or phpMyAdmin.

The MySQL username is the database user assigned to the database. It can be checked or changed in Virtualmin.

The database password may differ from other hosting passwords. If you change it, update the application configuration as well.

How do I set permissions on my PHP and HTML files?

Permissions can be changed through an FTP/SFTP client, the Virtualmin file manager or shell access with chmod.

Recommended defaults:

  • HTML/PHP files: 644
  • directories: 755

PHP files normally do not need execute permission.

Too many permissions weaken security; too few may cause 403 errors or scripts that cannot read files. Use the lowest permissions that still allow the application to work.

How do I check which PHP version and modules are available?

Check PHP version and enabled extensions in Virtualmin, in the PHP configuration page of the hosting, or with a local phpinfo() test page.

On modern servers, PHP versions can usually be selected per hosting through PHP-FPM.

Commonly available modules include:

  • mysqli
  • PDO / pdo_mysql
  • curl
  • gd
  • mbstring
  • xml
  • zip

If a specific version or extension is required, verify it before installing a CMS, plugin or custom application. Contact support with the domain name, application name and required PHP version or module.

What permissions should writable directories have for PHP scripts or CMS uploads?

CMS systems often need write access for uploads, cache, generated files and temporary directories.

The normal directory permission is 755. In some cases, writable application directories may require 775, but only for directories that really need write access.

Do not broaden permissions recursively without understanding the impact. Depending on the setup, PHP may run through PHP-FPM or Apache integration, which influences which permissions are sufficient.

If a CMS reports write permission problems, first check the directory in your FTP client, Virtualmin file manager or shell. Contact support before applying broader permissions everywhere.

Why does my PHP page show a blank page or internal server error?

A blank page usually means PHP encountered an error while error display is disabled.

Check first:

  • PHP version compatibility
  • missing modules
  • syntax errors
  • wrong file permissions
  • exhausted memory limit
  • incompatible CMS plugin

The exact error is usually in the Virtualmin log viewer, website error log or PHP error log.

Read the exact error before changing settings. If needed, send support the domain name, exact URL and error message.

Why can’t I upload large files in PHP?

PHP upload limits are defined by server configuration.

Relevant settings include:

  • upload_max_filesize
  • post_max_size
  • max_execution_time

Check current values in Virtualmin or with a local phpinfo() page. If a project needs higher limits, contact support with the domain name, expected upload size and application concerned.

Can I run scheduled PHP scripts automatically?

Yes. Scheduled tasks can be configured through Virtualmin cron jobs.

Cron jobs are often used for CMS maintenance, backups, newsletters, imports and cleanup tasks.

Use absolute paths and test the script manually before scheduling it.

Is PostgreSQL available on hosting accounts?

PostgreSQL can be provided for projects that specifically require it, such as advanced web applications, GIS/spatial projects or frameworks that depend on PostgreSQL.

It is not activated automatically on every hosting account. Contact support before deployment if your project requires it.

Can I run Python applications on hosting?

Python can be supported depending on the hosting environment and project type.

Simple scripts, automation and CGI-style execution are easier to support than permanent application processes. Not every shared hosting setup is intended for persistent Python application servers.

If your project requires Python, contact support first with the framework, required version and expected runtime behaviour.

Is PHP-Ming / Flash (SWF) still supported?

PHP-Ming was used to generate Flash (SWF) content dynamically. This technology is obsolete because modern browsers no longer support Flash playback.

New projects should not rely on SWF output, Flash interfaces or PHP-Ming workflows. Use modern alternatives such as JavaScript, HTML5 and SVG.

If you maintain an old application that still depends on legacy components, contact support to check what remains available.

Order