• Resolved Harris Marfel

    (@hrace009)


    When i press validate AMP error

    I got message like this:

    PHP Info:
    PHP Version : 7.2.13
    PHP Memory Usage: 14.61 MB
    PHP Memory Limit : 128M
    PHP Max Upload Size : 128M
    PHP Max Post Size : 128M
    PHP Allow URL fopen : On
    PHP Allow URL Include : Off
    PHP Display Errors : Off
    PHP Max Script Execution Time : 300 Seconds

    Help me to solve this

    thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Thread Starter Harris Marfel

    (@hrace009)

    where i put this code?

    // Increase timeout for AMP validation requests from 15 to 60 seconds.
    add_filter( 'http_request_args', function( $args, $url ) {
    	$query = wp_parse_args( wp_parse_url( $url, PHP_URL_QUERY ) );
    	if ( isset( $query['amp_validate'] ) ) {
    		$args['timeout'] = 60;
    	}
    	return $args;
    }, 10, 2 );
    Plugin Author Weston Ruter

    (@westonruter)

    Inside a custom plugin or your theme’s functions.php.

    Thread Starter Harris Marfel

    (@hrace009)

    i have setup it at costume plugin, and i have change apache TimeOut to 6000 and php max_execution_time to 6000, i run validate and it took long time, and 2 hours it still running, and i can’t access my website.

    so how to fix that thing?

    Plugin Author Weston Ruter

    (@westonruter)

    Do you have an external object cache plugin installed and active (e.g. Memcached or Redis)? That is the easiest way to speed up your site.

    Otherwise, if it is still too slow then your theme and plugins may not be suitable for the non-classic mode.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Validate AMP Erorr’ is closed to new replies.