TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

TestLink Tutorial

How to fix blank page TestLink __autoload() is deprecated, use spl_autoload_register()

Error Indications

autoload() is deprecated

Indications: A blank page is displayed when you try to login to TestLink UI __autoload() is deprecated.

Error displayed:

Deprecated: __autoload() is deprecated , use spl_autoload_register() instead in C:\xampp\htdocs\testlink\third_party\phpmailer\PHPMailerAutoload.php on line 45

 

The blank page is displayed when we log in to TestLink as shown below.

Error Blank Page

Fix

autoload() is Fall back to traditional autoload for old PHP versions @param string $classname The name of the class to load. You can replace the function with spl_autoload_register as shown in the below steps.

We need to register to autoload functions with spl_autoload_register, this is from PHP 5.3 onwards. This function registers any number of autoloaders, enabling for classes and interfaces to be automatically loaded if they are currently not defined. By registering autoloaders, PHP is given a last chance to load the class or interface before it fails with an error.

Locate PHP file

Locate the PHP file PHPMailerAutoload.php on your installation.

Deprecated Function

Modify the deprecated function as shown below:

function __autoload($classname)
{
PHPMailerAutoload($classname);
}


To
spl_autoload_register(function($class) {
PHPMailerAutoload($classname);
});

 

Stop/Start

Stop and Start the Apache server.

Verify Fix

Launch the TestLink login page and login with valid credentials.

This will fix the error and TestLink UI would be displayed without any error.

 

More Information

More information can be found at:

http://php.net/manual/en/language.oop5.autoload.php

 

Related Error on Linux Installation

A similar kind off error of blank white page displayed after TestLink login on Linux based installations can be found at:

https://www.testingdocs.com/questions/how-to-fix-testlink-blank-page-error-on-linux/

 

TestLink Tutorial on this website can be found at:
https://www.testingdocs.com/testlink-tutorials/

More information on TestLink Open source Test management tool can be found on the official website at: http://testlink.org

Related Posts

TestLink Tutorial /

TestLink Bitnami Cloud Image

TestLink Tutorial /

TestLink REST API Apache Server Configuration

TestLink Tutorial /

Install TestLink Software via CPanel Platform

TestLink Tutorial /

Import/Export TestSuite in TestLink

TestLink Tutorial /

Commercial Alternatives to TestLink Tool

‹ Keywords in TestLink› TestLink REST API Guide

Recent Posts

  • Scaler Academy – An Online Learning Platform
  • Difference between PHP and JavaScript?
  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com