<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.x-payments.com/help/?action=history&amp;feed=atom&amp;title=X-Payments%3ACodebook_regeneration</id>
	<title>X-Payments:Codebook regeneration - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.x-payments.com/help/?action=history&amp;feed=atom&amp;title=X-Payments%3ACodebook_regeneration"/>
	<link rel="alternate" type="text/html" href="https://www.x-payments.com/help/?title=X-Payments:Codebook_regeneration&amp;action=history"/>
	<updated>2026-05-12T22:46:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.5</generator>
	<entry>
		<id>https://www.x-payments.com/help/?title=X-Payments:Codebook_regeneration&amp;diff=99&amp;oldid=prev</id>
		<title>Dohtur: Created page with &quot;The &lt;u&gt;regen-codebook.php&lt;/u&gt; script is used to re-create the codebook contained in the &lt;tt&gt;&lt;lib/XPay/Model/Codebook.php&gt;&lt;/tt&gt; script.  When you run this script, it will also...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.x-payments.com/help/?title=X-Payments:Codebook_regeneration&amp;diff=99&amp;oldid=prev"/>
		<updated>2015-07-14T13:13:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;lt;u&amp;gt;regen-codebook.php&amp;lt;/u&amp;gt; script is used to re-create the codebook contained in the &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.php&amp;gt;&amp;lt;/tt&amp;gt; script.  When you run this script, it will also...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;lt;u&amp;gt;regen-codebook.php&amp;lt;/u&amp;gt; script is used to re-create the codebook contained in the &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.php&amp;gt;&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
When you run this script, it will also change:&lt;br /&gt;
&lt;br /&gt;
* the PIN-codes table,&lt;br /&gt;
* cardholder data encryption keys,&lt;br /&gt;
* online store keys,&lt;br /&gt;
* the 'force to change password' flag for all user accounts (including the Administrator).&lt;br /&gt;
&lt;br /&gt;
since this information is encrypted using the codebook.&lt;br /&gt;
&lt;br /&gt;
{{Note1| Note: Before using the script, make sure that SSH and CLI SAPI are available on your server. Contact your hosting provider regarding the matter.}}&lt;br /&gt;
&lt;br /&gt;
To re-generate the codebook please follow the below steps (do it carefully in order to avoid losing data):&lt;br /&gt;
&lt;br /&gt;
# Copy the file &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.php&amp;gt;&amp;lt;/tt&amp;gt; to the file &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.prev.php&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Create your X-Payments' database dump.&lt;br /&gt;
# Log in to the server via SSH.&lt;br /&gt;
# Go to the X-Payments installation directory, for example&amp;lt;pre&amp;gt;$ cd /home/www/xpayments&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Run the &amp;lt;u&amp;gt;regen-codebook.php&amp;lt;/u&amp;gt; script with two parameters &amp;lt;i&amp;gt;-run&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;&amp;lt;xpayments_dir&amp;gt;&amp;lt;/i&amp;gt;, where &amp;lt;i&amp;gt;&amp;lt;xpayments_dir&amp;gt;&amp;lt;/i&amp;gt; is the full path to the directory where your X-Payments intallation is located, for example: &amp;lt;pre&amp;gt;$ php regen-codebook.php -run /home/www/xpayments&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If the script failed, copy the file &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.prev.php&amp;gt;&amp;lt;/tt&amp;gt; to the file &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.php&amp;gt;&amp;lt;/tt&amp;gt;, restore the database from the saved dump and repeat step 3.&lt;br /&gt;
# If the script completed successfully delete the database dump file and the &amp;lt;tt&amp;gt;&amp;lt;lib/XPay/Model/Codebook.prev.php&amp;gt;&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
[[Category:X-Payments User Manual]]&lt;/div&gt;</summary>
		<author><name>Dohtur</name></author>
		
	</entry>
</feed>