About Contact Charter News
all2all

MySQL and PHP

Questions about databases, PHP Glossary note: Server-side scripting language widely used by WordPress and web applications. versions, modules, permissions and runtime errors.

Questions

How do I manage my MySQL database?

MySQL databases can be managed through phpMyAdmin and Virtualmin Glossary note: Web hosting control panel used to manage domains, mailboxes, databases and settings. .

Use phpMyAdmin Glossary note: Web interface for managing MySQL or MariaDB databases. to browse tables, run SQL Glossary note: SQL (sometimes expanded as Structured Query Language) is a computer language used to create, retrieve, update and delete data from relational database management systems. SQL has been standardized by both ANSI and ISO. queries, import/export data and modify content. The exact address depends on your hosting server and is included in your access information.

Use Virtualmin Glossary note: Web hosting control panel for domains, files, mailboxes, databases and settings. to create databases, create users, change passwords and assign permissions. phpMyAdmin Glossary note: Web interface for managing MySQL or MariaDB databases. 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 Glossary note: Secure protocol for shell access and encrypted file transfer. tunnel to connect securely to the MySQL Glossary note: Relational database system often used by web applications. 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 Glossary note: Content management system for websites and publishing. or Perl Glossary note: Perl is a dynamic programming language created by Larry Wall and first released in 1987. Structurally, Perl is based on the brace-delimited block style of AWK and C, and was widely adopted for its strengths in string… , 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 Web interface for managing MySQL or MariaDB Glossary note: A free database server compatible with MySQL, used by many websites and applications. databases..

The MySQL username is the database user assigned to the database. It can be checked or changed in Web hosting control panel for domains, files, mailboxes, databases and settings..

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 Glossary note: Historical note: this old entry describes pre-HTML5 history. HTML is still the basic language of the web, but the current practical standard is HTML5. files?

Permissions can be changed through an FTP/ SFTP Glossary note: SFTP is file transfer over SSH. It is preferred to legacy FTP because the connection and authentication are encrypted. client, the Web hosting control panel for domains, files, mailboxes, databases and settings. file manager or shell access with chmod.

Recommended defaults:

  • HTML/ PHP Glossary note: Server-side scripting language widely used by WordPress and web applications. 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 Web hosting control panel for domains, files, mailboxes, databases and settings., in the PHP configuration page of the hosting, or with a local phpinfo() test page.

On modern servers, Server-side scripting language widely used by WordPress and web applications. versions can usually be selected per hosting through PHP-FPM.

Commonly available modules include:

  • mysqli
  • PDO / pdo_mysql
  • curl
  • gd
  • mbstring
  • xml Glossary note: The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language. XML is considered "general-purpose" because it enables anyone to originate and use a markup language for many types of…
  • zip

If a specific version or extension is required, verify it before installing a CMS Glossary note: A Content Management System (CMS) is a software system for organizing and facilitating collaborative creation of documents and publishing websites. A web content management system is often used to manage and control a… , 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 Glossary note: Web server software used to serve websites and apply .htaccess rules. integration, which influences which permissions are sufficient.

If a CMS reports write permission problems, first check the directory in your FTP Glossary note: File Transfer Protocol: legacy file transfer protocol, usually replaced by SFTP or SCP. 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 Server-side scripting language widely used by WordPress and web applications. 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 Web hosting control panel for domains, files, mailboxes, databases and settings. 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?

Server-side scripting language widely used by WordPress and web applications. upload limits are defined by server configuration.

Relevant settings include:

  • upload_max_filesize
  • post_max_size
  • max_execution_time

Check current values in Web hosting control panel for domains, files, mailboxes, databases and settings. 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 Web hosting control panel for domains, files, mailboxes, databases and settings. cron Glossary note: cron is the standard Unix/Linux scheduler for running commands automatically at fixed times, for example backups, maintenance scripts or regular synchronisation tasks. 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 Glossary note: Advanced open-source relational database system. 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 Glossary note: The Python programming language is actively used by many people, both in industry and academia for a wide variety of purposes. Its strengths for teaching include its syntactic simplicity, flexible typing, and… applications on hosting?

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

Simple scripts, automation and CGI Glossary note: Common Gateway Interface: classic way to run server-side scripts for web forms. -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?

Server-side scripting language widely used by WordPress and web applications.-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 Glossary note: Current HTML standard used for modern web pages and media playback. and SVG.

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

Order