Troubleshooting
Click on one of the questions below to see the trouble shooting advice. If your question is not answered here please use the contact form.
Any Version
Q. I receive a similar error message to:
An error has occurred: DB Error: unknown error
Your server may have been reset unexpectedly, and you may need to perform a repair on your mysql database.
You can easily do this yourself by going into your hosting CPanel -> phpMyAdmin. Select the script's database and it will list the tables in the database. Tick the checkbox next to each of the tables, and you should see a drop-down box saying "With Selected". Select "Repair table".
See the screen shot for an example of how to do this.

Your hosting provider should be able to do this if you contact their support. But it's helpful to know how to do a mysql repair yourself. If you see this "DB: Error: unknown error" error again in the future, in any of your PHP scripts, you can perform a database repair yourself.
Q. I get
An error has occurred: dbconnection.class.php:14 DB Error: connect failed
That error means that the script can not connect to your MySQL database.
Either the MySQL server is down, or the database somehow got deleted, or the config.inc.php settings are somehow no longer valid.
99.9% of the time it is because you have incorrect values in your config.inc.php database login settings.
Make sure that the /include/config.inc.php file contains the correct database settings, including the 'hostspec' field, (phpMyAdmin should tell you the server & database values at the top of it's pages).
Try using phpMyAdmin to view the database, to make sure it still exists and the server is running. On the "Structure" tab it should list 6 tables, along with the number of records they each have. If any of the tables say "In Use" then it probably needs to be repaired. You can try doing a repair on the tables via phpMyAdmin (tick their checkboxes then select "repair" from the drop-down field).
You can also try asking your web host to check if the database server is up.
Q. I receive a similar error message to:
Site error: the file /home/username/public_html/url/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.
This is because the server uses PHP 5.2.5 or higher, and the Ioncube loader must be installed in the php.ini file in this case.
Your hosting provider should be able to do this if you contact their support, but it may also be possible for you to use a custom php.ini file to install the Loader yourself.
-
First view the phpinfo page at http://www.yoursite.com/url/ioncube/ioncube-sysinfo.php and see if the entry for Server API says CGI.
- If it is not CGI (e.g. 'Apache 2.0 Handler') then just contact your hosting support and ask them to install the ioncube loader into the php.ini file. If it is CGI then you may be able to use a custom php.ini file, so here's how to test it:
- You need to find out the file path of the ioncube loader directory. So, search that phpinfo page for the SCRIPT_FILENAME value, it will probably have a value similar to "/home/username/public_html/url/ioncube/ioncube-sysinfo.php".
The Ioncube directory will therefore be /home/username/public_html/url/ioncube/
- Create a new text file called php.ini (also try php5.ini) and copy & paste the following into it:
[Zend]
zend_extension=/home/username/public_html/url/ioncube/ioncube_loader_lin_5.2.so
- Replace the ioncube directory with the correct value that you just found out, and if necessary replace the ioncube_loader_lin_5.2.so with the correct value as displayed in the error message.
- Upload the php.ini file to the url rotator script directory, usually this is /url/
- Test it out. If unsuccessul you should ask your hosting support to install the ioncube loader into the php.ini file.
Q. I receive a similar error message to: "The file
/home/username/public_html/url/index.php has been encoded with the ionCube
PHP Encoder and requires the free ioncube_loader_xxx_x.x.so ionCube PHP
Loader to be installed."
A. This error message means that your server is using a PHP version more recent than the loaders the script comes with. To solve the problem you need to visit the linked IonCube loader page at www.ioncube.com/loaders.php and download the relevant .zip file.
The error message shows you which file you need:
| ioncube_loader_lin_x.x.so | You need the Linux .zip |
| ioncube_loader_win_x.x.so | You need the Windows .zip |
| ioncube_loader_fre_x.x.so | You need the FreeBSD .zip |
If you are unsure wether you need the x86, x86-64, AMD64, ppc, etc. zip file you probably need the x86 as its the most common.
Once you have downloaded the .zip open it up and extract the required ioncube_loader_xxx_x.x.so (according to the error message) and upload that to your /url/ioncube/ directory.
Q. I receive a similar error message to: "
Warning: session_start() [function.session-start]: open(/tmp/sess_14a4bc72526cfa5a8a12b80412067057, O_RDWR) failed: Permission denied (13) in /home/username/public_html/url/include/common.inc.php on line 0"
A. These errors indicate a problem with your PHP configuration or filesystem permissions, and are not specifically related to the rotator script. You would encounter the same problems on your server with any script that uses PHP sessions.
The problem is usually that the server's PHP session.save_path setting is incorrect.
Try these steps:
1. Create a directory called tmp and give it all permissions 777.
2. Then add something like this to your .htaccess file (adjust the path to tmp as needed):
php_value session.save_path "/home/yourusername/tmp"
Q. I receive a similar error message to: "file
/httpdocs/url/index.php is corrupted."
A. This error is probably due to an incompatibility between the encoded php files and the version of the ioncube loaders on the server trying to decode them. Basically the old loaders being used can't read the new format of the encoded script so it thinks the files are corrupt.
The script makes use of recent Ioncube features (such as license files, and ascii upload comaptibility) and so the latest version of the loaders must be used.
A suitable loader for the most common server operating systems is included in the script package's /ioncube/ directory. Provided that you have uploaded this directory and your server supports run-time loading then the script should usually be able to use the correct ioncube loader.
However, the "file xxx.php is corrupted" message suggests that the correct loader is not being used, and instead an old version of the ioncube loader is trying to decode the php files. This happens when your web host has an old version of the loader already installed server-wide via php.ini, and unfortunately you cannot override this with runtime loading.
Please contact your webserver administrator and let them now that they need to upgrade their ioncube loaders. They can be freely downloaded here: http://www.ioncube.com/loaders.php. They should have no problem seeing as they're already using the loader, and the loaders are backwards compatible so nobody else on the server will be inconvienced by the upgrade.
Q. I get a
404 Error because my menu links are broken
i.e. http://mydomain.com/http://mydomain.com/url/destination_manage.php?cmd=search_own
Instead of:
http://mydomain.com/url/destination_manage.php?cmd=search_own
Make sure that in the /url/include/config.inc.php settings file you have:
$GLOBALS['config_settings']['short_base_url'] = "/url/";
Q. I receive a similar error message to: "403
Forbidden / You don't have permission to access /url/ on this
server."
A. This is an uncommon error and can be hard to diagnose. The first thing to do is rename (or delete) the /url/.htaccess file, then visit the script again to see if the error remains.
If the error has disappeared then the likely cause is the mod_rewrite rules in the .htaccess file. Restore the /url/.htaccess file and insert:
Options +FollowSymLinks
into the first line in the file. Then visit the script again, if the error remains please contact us for technical support.
Q. What is /url/redir.php?
What It Is
The redir.php file acts as a tunnel between the portal and the destination like so:
traffic source -> portal -> redir.php -> final destination
This is so that the administrators of "final destination" can't tell where the traffic originated from, all they will see is that it came from redir.php
They will see the redir.php as the referrer and if they visit redir.php directly it will show them a blank page. The redir.php can be renamed to whatever you want, and you can edit it to disguise it by putting in your own html content instead of showing a blank page.
It is not 100% bullet proof. Some browsers may still pass on the referrer string. The cloaker uses a double meta-refresh. It is as solid as I was able to make it, but I can't guarantee it. The redir.php file is unencrypted so you could modify it if needed. It is disabled by default because it can break the browser's back button (they have to rapidly click Back button twice instead of once).
You do not link to the redir.php yourself. You do not send any traffic to redir.php directly, just send your traffic to the portal url.
Enabling/Disabling It
The cloaking can be turned on/off per portal through the interface's "Edit Portal" page. i.e. Go to "Manage Portals" page -> find the portal you want -> click "Edit" button, set "Referrer Cloaking" to Enabled or Disabled.
Or leave the setting as "Use Default" and enable/disable the setting for all portals via the config.inc.php file.
The Referrer Cloaking setting on the Manage Portals Edit screen(Default, Enabled or Disabled) will override whatever is in the config.inc.php file.
To test if it works just visit one of your cloaked portals and look at the address bar in your browser. You should see it pass through redir.php before reaching the final destination.
Advanced Use: Renaming redir.php
The redir.php can be renamed and copied to any domain that you own. So, you can store it on a totally separate server, with no reference to your rotator site. It is a stand-alone file, so if you copy it to your other servers, you don't need to copy the rest of the script.
If you have not renamed or moved the redir.php file then on your "Add Portal" and "Edit Portal" pages you can leave the "Referrer Cloaking URL" field blank.
If you do rename it, you need to also edit the /include/config.inc.php file to update the referrer_cloaking_url setting. For example, if you have copied and renamed redir.php to yourwebsite.com/home.php then in your config file:
$GLOBALS['config_settings']['referrer_cloaking_url'] = "http://www.yourwebsite.com/home.php";
AND/OR you can just paste "http://www.yourwebsite.com/home.php" into the Referrer Cloaking URL field on the appropriate Add/Edit Portal forms. Doing it via the form will overide whatever is in the config.inc.php on a per-portal basis.
Advanced Use: Inserting "landing page" content
You can optionally edit the redir.php file to insert some dummy content. i.e. Go to the very bottom of the redir.php (after the closing ?> tag) and paste in whatever HTML content you want.
This is unnecessary. You could do this so that if the administrators of "final destination" did some "investigating" by visiting the redir.php directly, they would see the dummy content, and believe its just a normal webpage instead of blank page.
Recommended Usage
What I recommend is that you leave the config.inc.php "cloak referrer" setting to false (means off).
And then for on a portal-by-portal basis enable referrer-cloaking for them on their Manage Portal screen (set it to Enabled).
This way you can pick & choose which portals to cloak instead of doing all or none by the config.inc.php
Next, I recommend you copy and rename the redir.php file to another of your domains, and put the new url to it in your config.inc.php referrer url setting.
i.e. If you rename redir.php to landingpage.php and upload it to http://myothersite.com/landingpage.php then you could use "http://myothersite.com/landingpage.php" as the cloaking url when you create a portal.
You can also put some HTML text at the very bottom of the redir.php so if anyone visits that page they will see the text you put there (default is a blank page).
Alternatives
An alternative method for cloaking is to modify your destinations so that they use a 3rd party anonymizer/cloaker. For example a service like "http://anonym.to/". i.e. instead of using a destination like "http://www.mydestination.com" you could use "http://anonym.to/?http://www.mydestination.com". This will replace your referrer with "anonym.to".
Version 3.4 and up
Q. I need my main site address (www.yoursite.com) to automatically send me to one of the destinations sites.
A. Before you proceed you should create a rotator portal that you will use to rotate your http://www.yoursite.com/ traffic. For this example let's say you have called that portal 'main', and it's auto-generated link is http://www.yoursite.com/go/admin_main.
There are 3 different methods to choose from: mod_rewrite, meta-refresh, or frames.
Method 1: Use a .htaccess file + mod_rewrite
Pros: Gives the most efficient (fastest) performance.
Cons: Requires your server to have mod_rewrite enabled. This is no big deal, your server is highly likely support it.
Create a text file called .htaccess (NOTE: it starts with a dot and has no other file extension) and paste & edit the following lines into it, substituting your own portal url on the bottom line:
# top-level root / redirection to a rotator portal
RewriteEngine On
RewriteBase /
RewriteRule ^$ http://yoursite.com/go/admin_main [R,QSA]
Then upload that file to the top directory (the document root, usually called /www/ or /htdocs/ or /public_html/) of your website. Make sure you DO NOT OVERWRITE the /www/url/.htaccess in the rotator script's directory as it is a completely different file but shares the same name.
Method 2: Use a index.html file with meta-refresh
Pros: Works with any server. Will display your destination url in the web-browser location bar (i.e. it doesn't cloak the destination).
Create a text file called index.html then copy and paste the following code into it, substituting your own portal url:
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://www.yoursite.com/go/admin_main" />
</head>
</html>
Save the file as index.html and upload it to your main document root of your website (usually the /htdocs/ or /public_html/ or /www/ directory).
Method 3: Use a index.html file with frames
Pros: Works with any server. Will display your site's main address in the web-browser location bar while displaying your destination's content (i.e. it cloaks the destination).
Create a text file called index.html then copy and paste the following code into it, substituting your own portal url:
<html>
<frameset>
<frame src="http://www.yoursite.com/go/admin_main" />
</frameset>
</html>
Save the file as index.html and upload it to your main document root of your website (usually the /htdocs/ or /public_html/ or /www/ directory).
Versions below 3.4
Q. I need my main site address (www.yoursite.com) to automatically send me to one of the destinations sites.
A. Before you proceed you should create a rotator portal that you will use to rotate your http://www.yoursite.com/ traffic. For this example let's say you have called that portal 'main', and it's auto-generated link is http://www.yoursite.com/url/rotator/admin_main.
There are 3 different methods to choose from: mod_rewrite, meta-refresh, or frames.
Method 1: Use a .htaccess file + mod_rewrite
Pros: Gives the most efficient (fastest) performance.
Cons: Requires your server to have mod_rewrite enabled. This is no big deal, your server is highly likely support it.
Create a text file called .htaccess (NOTE: it starts with a dot and has no other file extension) and paste & edit the following lines into it, substituting your own portal url on the bottom line:
# top-level root / redirection to a rotator portal
RewriteEngine On
RewriteBase /
RewriteRule ^$ http://yoursite.com/url/rotator/admin_main [R,QSA]
Then upload that file to the top directory (the document root, usually called /www/ or /htdocs/ or /public_html/) of your website. Make sure you DO NOT OVERWRITE the /www/url/.htaccess in the rotator script's directory as it is a completely different file but shares the same name.
Method 2: Use a index.html file with meta-refresh
Pros: Works with any server. Will display your destination url in the web-browser location bar (i.e. it doesn't cloak the destination).
Create a text file called index.html then copy and paste the following code into it, substituting your own portal url:
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://www.yoursite.com/url/rotator/admin_main" />
</head>
</html>
Save the file as index.html and upload it to your main document root of your website (usually the /htdocs/ or /public_html/ or /www/ directory).
Method 3: Use a index.html file with frames
Pros: Works with any server. Will display your site's main address in the web-browser location bar while displaying your destination's content (i.e. it cloaks the destination).
Create a text file called index.html then copy and paste the following code into it, substituting your own portal url:
<html>
<frameset>
<frame src="http://www.yoursite.com/url/rotator/admin_main" />
</frameset>
</html>
Save the file as index.html and upload it to your main document root of your website (usually the /htdocs/ or /public_html/ or /www/ directory).
Q. I have installed the script properly, I can set Portals and Destinations
without a problem. But when it come to visiting the portals the destinations
are not being loaded. Visiting a portal like
http://www.mysite.com/url/rotator/admin_portal gives me a 404 error page as if
nothing is there at all, or it displays some PHP code.
A. Please double-check that you have uploaded the /url/.htaccess file included
in the .zip package. The rotator script uses mod_rewrite rules
defined in .htaccess to transparently rewrite /rotator/ links into /rotator.php?
links.
If you are sure that you have uploaded the /url/.htaccess file to your /url/
folder, and its still not working then the server probably doesn't support
mod_rewrite, and you may have to use the alternative portal url format which
will make your rotator URLs look like this:
http://www.mysite.com/url/rotator.php?admin_portal
instead of
http://www.mysite.com/url/rotator/admin_portal
For this what you will need to do is edit your /url/include/config.inc.php
file and look for these lines (around line 148):
if (preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']))
$GLOBALS['config_settings']['rotator_file'] = "rotator.php?"; # Leave the '?' at the end
else
$GLOBALS['config_settings']['rotator_file'] = "rotator/"; # Leave the '/' at the end
Please change those lines into this:
#if (preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']))
$GLOBALS['config_settings']['rotator_file'] = "rotator.php?"; # Leave the '?' at the end
#else
#$GLOBALS['config_settings']['rotator_file'] = "rotator/"; # Leave the '/' at the end
i.e. Just put a # hash mark in front of 3 of the 4 lines as shown.
Save and upload the config.inc.php and you should be good to go. But first
remember, please double-check that the /url/.htaccess file has been uploaded.
Q. Can the word /rotator/ in the portal urls somehow be replaced by another
word? I'd use the word "top" rather than "rotator" which is more suitable for
me.
Sure, what you will need to do is edit your
/url/include/config.inc.php file and look for these lines (around line 148):
if (preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']))
$GLOBALS['config_settings']['rotator_file'] = "rotator.php?"; # Leave the '?' at the end
else
$GLOBALS['config_settings']['rotator_file'] = "rotator/"; # Leave the '/' at the end
Please change those lines into this:
if (preg_match('/Microsoft|WebSTAR|Xitami/', $_SERVER['SERVER_SOFTWARE']))
$GLOBALS['config_settings']['rotator_file'] = "top.php?"; # Leave the '?' at the end
else
$GLOBALS['config_settings']['rotator_file'] = "top/"; # Leave the '/' at the end
Next, inside the /url/ directory you should see a file called .htaccess you
will need to edit this file and replace the line
RewriteRule rotator/(.*) rotator.php?$1 [QSA]
with
RewriteRule top/(.*) rotator.php?$1 [QSA]
Finally, make a copy of the /url/rotator.php file and name the copy
/url/top.php
Q. I receive a similar error message to: "Warning:
main(DB.php): failed to open stream: No such file or directory in
/httpdocs/url/include/common.inc.php on line 24".
A. The missing file DB.php is part of the PHP Extension and Application Repository (PEAR) which is basically a standardized library of reusable PHP code.
Most web hosts usually have the PEAR library already installed, but apparently yours may not.
Fortunately, PEAR is completely free and open source and can be downloaded from http://pear.php.net/
Not all components available there need to be installed for the rotator script to work, only the DB and PEAR Base packages.
I have included those two packages into a convenient zip file to make things easier for you.
What you need to do is download and unzip pear_library.zip and upload all the files and folders to your /url/include/ directory so that you end up with:
/url/include/DB/
/url/include/PEAR/
/url/include/DB.php
/url/include/PEAR.php
and that should take care of that.
Q. Can the script hide the referer information from each destination site?
Referrer cloaking is available in version 3.3+.
If you have a question relating to Ioncube Loaders you might find Ioncube.com's Loader FAQ helpful.
|