Unable to add site

Last update: 01.09.2022

Error: the code was installed, but the system does not accept the site and asks you to specify the page on which it is installed. Follow the steps below to resolve this problem

  1. Correct the code of links output:

    <?php
        define('_SERPZILLA_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxx'); 
        require_once(realpath($_SERVER['DOCUMENT_ROOT'].'/'._SERPZILLA_USER.'/serpzilla.php')); 
    
        //Add these lines for the line output <!--check code-->
        $o = array();
        $o[ 'force_show_code' ] = true; 
        $client = new LINKS_client( $o );
    
        echo $client->return_links();
    ?>
  2. Then refresh the page and look at its source HTML code. The line <!--check code→ should appear where the links should be placed in the future.

There is a line, but the site is still not added

There is a line return_links(); ?>

There is no line, an error message appeared

The line <!--check code--> didn’t appear

Several sites were placed in one folder

When adding a site, there is a message «This site already exists in the system»

Caching/filtering/patterning are enabled on the website


There is a line, but the site is still not added

Check whether the <--check code--> line is in an indexable area of a document which search engines can index. If links are blocked from indexing by one of the following methods, they will not be found by the robot of our system:

  1. the links are locked from indexation with <noindex>,<script>, <frames>, <applet>, <embed>, <object>, form tags or comment tags;

  2. the page containing the links is not indexed in the robots.txt file or in the meta tags;

  3. when checking the links placement on the pages, robot gets response code different from 200 in HTTP headers of your hosting;

  4. links are placed outside the <body> tag;

  5. caching/filtering/patterning are enabled on the website. 

[To the beginning]


There is a line return_links(); ?>

This means that the pages on your site are not processed by PHP. To enable PHP processing, simply write the following lines in the .htaccess file (it should be in the root directory of the site)

RemoveHandler .php .htm .html
AddHandler application/x-httpd-php .php .htm .html

If the file doesn't exist, you can create it in Notepad and upload it to the root of the site.

If it still shows return_links(); ?> , then contact your hosting support team and ask «How can I make the html pages process the php code?».

[To the beginning]


There is no line, an error message appeared

Read the message carefully, fix the error, and check that the code is correctly installed.

One of the most common problems: the code can't connect the serpzilla.php file because the folder is not in the site's root directory. Check the value of a variable $_SERVER['DOCUMENT_ROOT'] and add the missing part of the path manually.

[To the beginning]


The line check code didn’t appear

If the line <!--check code-->, didn’t appear, check if the privileges for the code folder are set to 777.

How to set the privileges for “777” folder

The privileges are set, but still there is no line

How to set the privileges for “777” folder

There are many FTP clients and there is no way to describe every case.

For example, in Total Commander you can set folder privileges by the following sequence of actions:

  1. Select a folder -> Files -> Change Attributes....

  2. Then set the privileges to 777 and press "OK".

  3. Some hosters do not support 777 privileges, be aware of this and check it.

The privileges are set, but still there is no line

Check if the links.db file is created in the code folder.

The file is created and filled in, but line is still not visible

The file is not created or is created empty

The file is created and filled in, but line is still not visible

You are probably not passing the variable correctly into the template or into any function that is directly outputting the links.

Follow precisely all the steps of the parameter transfer.

The file is not created or is created empty

You are probably having problems connecting to our link server. Add the following line to the link output code to be sure:

<?php
    define('_SERPZILLA_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); 
    require_once(realpath($_SERVER['DOCUMENT_ROOT'].'/'._SERPZILLA_USER.'/serpzilla.php'));

    $o = array();

    $o[ 'force_show_code' ] = true;
    
    //Add this line for red message output
    $o[ 'verbose' ] = true;

    $client = new LINKS_client( $o );
    echo $client->return_links();
?>

A red message should appear at the place of the code:

LINKS ERROR: Data integrity was violated when recording to the file:.........

LINKS ERROR: Unable to record the data to the file:.........

LINKS ERROR: Unable to connect to the server:.........

LINKS ERROR: Unable to read the file data: .........

LINKS ERROR: There is no access to the file recording: links.db! Set the privileges for the 777 folder.

LINKS ERROR: The file links.db doesn’t exist. Failed to create. Set the privileges for the 777 folder.

The message is not displayed

LINKS ERROR: Data integrity was violated when recording to the file: .........

Check the amount of free disk space on your hosting service.

LINKS ERROR: Unable to record the data to the file:.........

Check file and folder record privileges.

See the section How to set the privileges for the “777” folder.

LINKS ERROR: Unable to connect to the server: .........

The problem is that your hoster has to allow a remote connection to the links webserver:

dispenser-01.saperu.net

Contact your hosting support and clarify this issue.

Also note point 2  in this section.

LINKS ERROR: Unable to read the file data: .........

Check the read privileges of the file and folder.

See the section How to set the privileges for the “777” folder.

LINKS ERROR: There is no access to the file recording: links.db! Set the privileges 777 for the folder.

See the section How to set the privileges for the “777” folder.

LINKS ERROR: The file links.db doesn’t exist. Failed to create. Set the privileges for the 777 folder.

See the section How to set the privileges for the “777” folder.

The message is not displayed

You may have set the code in such a way that it does not work. To check this, make the following changes:

<?php
    define('_SERPZILLA_USER', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'); 
    require_once(realpath($_SERVER['DOCUMENT_ROOT'].'/'._SERPZILLA_USER.'/serpzilla.php'));

    $o = array();

    $o[ 'force_show_code' ] = true;

    $o[ 'verbose' ] = true;

    $client = new LINKS_client( $o );

    //Add this line to output the $client variable dump 
    var_dump( $client );

    echo $client->return_links();
?>

A long line should appear in the HTML code, describing all the contents of the $client object.

If the line doesn't appear, then the code doesn’t work. Try to find out the problem.

var_dump() works, but links.db hasn’t been created still

Please, send your login and FTP access to the site to the support and we will help you to solve the problem.

[To the beginning]


Several websites use the common Serpzilla folder

If the code folder is used by several websites, to avoid conflicts in links.db, use the following parameter:

<?php
    $o = array();

    $o['multi_site'] = true; //Indicates to the script that there are several sites
    $client = new LINKS_client($o);
?>

In this case, an individual file with links will be created for each website.

[To the beginning]


When adding a site, there is a message «This site already exists in the system»

If you get the message «This site already exists in the system» when you try to add a site, follow these steps: 

  1.  Create a serpzilla.txt file in the root of the site, where you will write your account's login. The serpzilla.txt file should be available at site.com/serpzilla.txt (as an example).

  2. Write to Serpzilla technical support and give us a link to your placed serpzilla.txt file. After that we will transfer a site on your account.

[To the beginning]


Caching/filtering/patterning are enabled on the website

If the error "Check code was not found on the page" appears when adding a site, but the <--check code-->line appears in the code: the problem could be that the CMS, template engine or content caching/filtering service (such as Cloudflare) used for the site is changing the original html output for the page or is cutting out comment tags.

Why is it a problem:

  • we target the output of our code and will not be able to add the site to the system and subsequently verify the links placed if the output of the code or links on the pages is blocked.

How can you find out that the problem is with it's the caching/filtering/template intermediate layer:

  • open the source code of the page, make a request to var_export(...); die(); with the content that is returned as a result of function call return_links() or similar;

  • if the result is that you see content with a check code on the screen but it's not on the final page, it's about caching or cutting out content.

How to fix this problem:

  • disable caching when outputting all blocks with our client code;

  • disable source html minimization/obfuscation.

The ideal variant is to wrap the calling block of our code in exclusion tags, which prevent your middleware layer from caching and/or handling the output of our client code.

[To the beginning]

Was this article helpful?