SnippetMaster Support Forums
Return to main website
 
April 20, 2018, 01:54:36 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 20, 2018, 01:54:36 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: How to edit a SNIPPET that contains more then 100kb of HTML code? « previous next »
Pages: [1] Print
Author Topic: How to edit a SNIPPET that contains more then 100kb of HTML code?  (Read 4590 times)
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] How to edit a SNIPPET that contains more then 100kb of HTML code?
« on: October 18, 2008, 04:36:14 AM »

SYMPTOM

- You have created a SNIPPET of html code (using Snippet Tags), but it is not appearing in the list of SNIPPETS in the "Select a file" dropdown selection box.

- The SNIPPET is very large and contains a lot of HTML code.  It is probably around the 100kb size or so...  (This might occur after pasting a large spreadsheet or text document, etc...)

PROBLEM
 
It could be the "pcre.backtrack_limit" PHP configuration setting on your web server.

Basically, what this setting does is set a size limit for certain PHP functions that Snippetmaster uses to "search" for the Snippet Tags inside your editable file. The size of the SNIPPET that can be found is limited to whatever is the value of this setting. (The default value of this setting is "100000", which is 100kb.)

To verify this is the problem, here is what you should do:

1. ) First, find out what is the size limit for your PHP software:
  • Go to http://www.yourdomain.com/snippetmaster/includes/diag/phpinfo.php
  • Press CTRL-F and search for "pcre.backtrack_limit".
  • Record the value of this setting under the "Local Value" column. For example, if it is "100000", then this means SnippetMaster will be automatically killed by your server when trying to find any SNIPPET that contains more then 100kb (100000 bytes) of html code.

2.) Second, find the "size" of the SNIPPET you inside the file you are trying to edit:
  • Open the editable file in a text editor.
  • Select the SNIPPET (including the Snippet Tags) and copy it to a new document. (Note: You must select only the SNIPPET and *not* the entire file.)
  • Use the "character count" function of your text editor to count the number of characters in the new document. If the number of characters in the SNIPPET is higher than the "pcre.backtrack_limit" value, then this is the problem.

RESOLUTION

To fix this problem, you need to modify the PHP configuration settings for your website. 

You must contact your web hosting provider and ask them to increase the "pcre.backtrack_limit" value located inside the php.ini file for your website. The new value for this setting should be (in bytes) whatever is the biggest size of SNIPPET html code you expect to edit. (ie: If you want to edit SNIPPETS that are 150kb in size, then you should set the value to "150000".)

If your web hosting provider is not willing (or capable) of making this change, then please let me know if you would like a recommendation for a good web hosting provider where you can get free licenses of SnippetMaster PRO (rebrandable version) with each account, as well as the best customer service and support you will ever find.

Smile
« Last Edit: December 04, 2008, 03:47:24 PM by admin » Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  How To's & FAQs  |  Topic: How to edit a SNIPPET that contains more then 100kb of HTML code? « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!