{"id":3428,"date":"2014-03-24T19:49:57","date_gmt":"2014-03-24T19:49:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/phpckeditorrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-24T19:49:57","modified_gmt":"2014-03-24T19:49:57","slug":"phpckeditorrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/24\/phpckeditorrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"php,ckeditorRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fd65727a064c5e4b46c90e36ac7751e6?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser3367639<br \/>\nphp codeigniter<br \/>\nSo, I am making a from select with the code below: \/\/ Controller Code $data[&#8216;message_to_options&#8217;] = array(&#8216;1&#8217; =&gt; &#8216;username 1&#8242;,&#8217;2&#8217; =&gt; &#8216;username 2&#8217;, );\/\/ View Code &lt;?php echo form_dropdown(&#8216;message_to&#8217;, $message_to_options); ?&gt;This all works great. Except the users needs to be dynamically created not hard coded. I have the following code from ion_auth for code igniter. This gets all the users in the system. Which Is what I want to do. $users = $this-&gt;ion_auth-&gt;users()-&gt;resul<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/8RcUX.jpg?s=32&amp;g=1\" \/><br \/>\nEd Cottrell<br \/>\nphp mysql database<br \/>\nHere is my database connection code, whenever i sign up in form it always says &#8220;syntax error, unexpected T_STRING in&#8221;&lt;?php\/\/Database Connection Settingsmysql_connect(&#8220;localhost&#8221;, &#8220;root&#8221;, &#8220;&#8221;);mysql_select_db(&#8220;project mix&#8221;);global $connection;$connection = @mysql_connect(&#8220;&#8221;) or die(&#8216;Connection could not be made to the SQL Server. Please report this system error at &lt;font color=&#8221;blue&#8221;&gt;info@servername.com&lt;\/font&gt;&#8217;);@mysql_select_db(project mix,$connection) or die(&#8216;Connec<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bfc52cb788b02f41232ba14e3bc3ed46?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTimothy Carter<br \/>\nphp javascript jsp splash-screen<br \/>\nI want to know how to show a splash screen (like a gif or jpeg file) on the user screen during my script execution.Thank you for your help.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e44fdcfb1f25aea44e160db896104d22?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmikeTheLiar<br \/>\nphp try-catch composer-php<br \/>\nI am trying to install Composer (http:\/\/getcomposer.org\/download\/) on a GoDaddy-hosted Linux server but it&#8217;s not working. No matter which method I try, I eventually run up against some version of the following error:Parse error: syntax error, unexpected &#8216;{&#8216; on line 290.Line 290 refers to line 290 in this file: https:\/\/getcomposer.org\/installer which is the start of a try-catch block. And, indeed, even a simple script like:echo &#8216;&lt;?php echo &#8220;Hello World &#8220;; try {echo &#8220;Goodbye&#8221;;} catch (Except<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6a70e0db4589df727ee35666fd5e6290?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPieter<br \/>\nphp strpos<br \/>\nThis is my code:&lt;?php $url = &#8220;http:\/\/www.uhasselt.be\/collegeroosters\/2009_2010_298_5_10.html&#8221;; $headers = get_headers($url, 1); print_r($headers); $contloc = $headers[&#8220;Content-Location&#8221;]; echo &#8220;Content-Location: &#8221; . $contloc . &#8220;\\n&#8221;; $soft404test = strpos($contloc, &#8220;http:\/\/www.uhasselt.be\/404b.htm&#8221;) ? true : false; var_dump($soft404test); ?&gt;This is its output:Array ([0] =&gt; HTTP\/1.1 200 OK[Content-Length] =&gt; 2030[Content-Type] =&gt; text\/html[Content-Location] =&gt; http:\/\/www.uhasselt<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fdec787990174a98e42235a3e62435a6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGuillermo Phillips<br \/>\nphp oracle blobs<br \/>\nI am attempting to transfer a set of photos (blobs) from one table to another across databases. I&#8217;m nearly there, except for binding the photo parameter. I have the following code:$conn_db1 = oci_pconnect(&#8216;username&#8217;, &#8216;password&#8217;, &#8216;db1&#8217;); $conn_db2 = oci_pconnect(&#8216;username&#8217;, &#8216;password&#8217;, &#8216;db2&#8217;);$parse_db1_select = oci_parse($conn_db1, &#8220;SELECTREF PID,BINARY_OBJECT PHOTOGRAPH FROMBLOBS&#8221;);$parse_db2_insert = oci_parse($conn_db2, &#8220;INSERT INTOPHOTOGRAPHS(PID,PHOTOGRAPH) VALUES(:pid,:photo)&#8221;); oci_e<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/e8f77197253b38a41563ece20aed9483?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTianyu<br \/>\nphp c gcc llvm llvm-gcc<br \/>\nI tried to generate LLVM intermediate code by callingllvm-gcc -emit-llvm -I\/mypath\/ -c main.c -o main.oIt works perfectly without any warnings or errors if I manually type this command in the terminal. However I have built a website that can automate this process by calling exec function in PHP like below.exec(&#8220;llvm-gcc -emit-llvm -I\/mypath\/ -c main.c -o main.o&#8221;,$msg,$ret);It will still generate .o file with a warning. The warning says that Potential incompatible plugin version. GCC: 4.5.3. Expe<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/64839d31baaefafa58120e1a5a503d66?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohn Conde<br \/>\njavascript php jquery ajax<br \/>\nI&#8217;m simply trying to read in a field from a text box, pass the value via ajax to PHP and then store the data in a mysql table. The table is already set up and ready to go, all I need is to insert values. Here is my js file var address = $(&#8220;input#email&#8221;).val(); \/\/If submission is valid if(submitForm == &#8220;true&#8221;){$.ajax({ url: &#8220;bin\/process.php&#8221;, type: &#8220;POST&#8221;, data: {email: address}, success: function(response) { $(&#8216;#message&#8217;).html(response); }}); return false; }And then my PHP looks like this<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/70c0aec7984923f29a87ae70dd58b8ea?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\nuser2718671<br \/>\nphp wordpress<br \/>\nIs it possible to create sub menu pages depending on the options? In my plugin option page I got an input field for titles (of the submenu pages). These titles are separated by commas. I tried following in my plugin script:function my_menu() {global $page_hook_suffix;$page_hook_suffix = add_menu_page(&#8230;); \/\/adding main menu$titles=get_option(&#8216;my_option_name&#8217;);$titles=explode(&#8220;,&#8221;,$titles);if(!empty(get_option(&#8216;my_option_name&#8217;))){foreach($titles as $title){ $slug = str_replace(&#8216; &#8216;, &#8216;_&#8217;, $titl<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1f1ef8ae17123697d90e677e52852ea2?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nFoolishSeth<br \/>\nphp forms html-select<br \/>\nI am trying to save what state a user select after &#8216;POST&#8217; the form action runs on the same page, but I keep getting unexpected T_IS_EQUAL, expecting &#8216;}&#8217; error. What am I missing? I have the following code:&lt;select style=&#8217;width:50px; float:left; position:relative; left:-160px; top:2px; border-radius:3px; &#8216; project=&#8217;statelist&#8217; class=&#8217;statelist&#8217; name=&#8217;statelist&#8217;&gt;$state = array( &#8216;AZ&#8217;,&#8217;AL&#8217;,&#8217;AK&#8217;,&#8217;AR&#8217;, &#8216;CA&#8217;,&#8217;CO&#8217;, &#8216;CT&#8217;,&#8217;DE&#8217;,&#8217;DC&#8217;,&#8217;FL&#8217;, &#8216;GA&#8217;, &#8216;HI&#8217;,&#8217;ID&#8217;,&#8217;IL&#8217;, &#8216;IN&#8217;,&#8217;IA&#8217;,&#8217;KS&#8217;,&#8217;KY&#8217;,&#8217;LA&#8217;,&#8217;ME&#8217;,&#8217;MT&#8217;,&#8217;NV&#8217;,&#8217;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6af6c4c44575775210dca60bcc8eec47?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAndy<br \/>\nphp javascript ckeditor<br \/>\nI&#8217;m using Ckeditor version 3.1 within CakePHP 2.xI can get the editor to load and replace the textarea. The HTML is saved to the database with HTML formatting tags like this:&lt;p&gt; &lt;strong&gt;&amp;lt;p&amp;gt; This is a test&amp;lt;\/p&amp;gt; &lt;\/strong&gt;&lt;\/p&gt;When I insert that into the CkEditor I get the following appearing in the editor screen:&lt;p&gt; &lt;strong&gt;&amp;lt;p&amp;gt; This is a test&amp;lt;\/p&amp;gt; &lt;\/strong&gt;&lt;\/p&gt;If I use html_entity_decode prior to<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/2rDHJ.jpg?s=32&amp;g=1\" \/><br \/>\nAamir Shahzad<br \/>\njavascript html asp.net css3 ckeditor<br \/>\nI am using CKEditor asp.net page for allowing client to easily edit\/format text. Also i am using tabs option within CKEditor as shown in the fig. attached. But tabs are not working at all. Initially i have created tabs withJS. I thought it&#8217;s the JS that not working with CKEditor so i have chosen alternative solution using css3. But tabs are still not working in CKEditor. I have searched on CKEditor forum but unable to get good resource or help. For css3 I am using checkbox hidden through opacity<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/cef6e5e6c34c61b6da403216f033d3a9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJosh<br \/>\njavascript ckeditor<br \/>\nWhen i am passing HTML to a CKEditor instance, a P tag is being inserted within the HTML producing unexpected results.For example, with the following code:CKEDITOR.instances[&#8220;myEditor&#8221;].setData(&#8220;&lt;div&gt;1&lt;\/div&gt;&lt;div&gt;2&lt;\/div&gt;&#8221;);the editor does not display them as block elements (it outputs as &#8220;12&#8221; inline). Calling getData() and i see the HTML is reformatted incorrectly as:&#8221;&lt;div&gt; &lt;p&gt;1&lt;\/div&gt;&lt;div&gt;2&lt;\/div&gt;&lt;\/p&gt; &#8221; I&#8217;ve played with the enterMode conf<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c032a0e8e40dd79b715420e4c5d03b00?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmeagar<br \/>\ndiv ckeditor carriage-return<br \/>\nI noticed that CkEditor has problems with using entermode br (mainly slowness after typing text for a long time).So I&#8217;m looking into the other entermodes (p and div).I see that entermode p is adviced by CkEditor.However, this introduces margins below the content, which is not desired (as the users are not used to typing paragraphs).So, I was thinking of using entermode div , which seems more correct in this case.However, I want to avoid introducing problems by using entermode div.Are there known<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bc685c2925d132a056ba6f1b1d8ea9f1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nG.Martin<br \/>\nckeditor wysiwyg<br \/>\nI&#8217;ve got several sites up and running on Nginx, but no editor loads. Wysiwyg is configured properly with CKeditor downloaded and in the libraries directory.At this point I&#8217;m unsure if its something I&#8217;m missing, or something in my config that is blocking it.My current config: http:\/\/pastebin.com\/yreZ0kr1EDIT:I&#8217;ve uninstalled the WYSIWYG module, reinstalled it, and it cannot see CKeditor. If I paste the url into the address bar, I can access the CKeditor.js file directly.EDIT2:Found out that the<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dd11cabc6f1779ffa658654bec8551db?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nDan<br \/>\njavascript ios ckeditor<br \/>\nI suppose this is a more specific version of my recent question Browser-sniffing alternative for bugs\/misbehaviors (NOT lack of features). CKEditor is known not to work on certain clients like iOS Safari. Rather than use hackish browser detection, is there a way to see at runtime whether ckeditor will work on the current browser so that I can not load it or fall back to an alternative in case it won&#8217;t?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d1354e2a045df806012db8a473ac8beb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nTom van Enckevort<br \/>\nckeditor<br \/>\nBy default, CKEditor&#8217;s enter key behavior is adding a &lt;p&gt; tag and starting a new paragraph. But that behavior can be modified in the configuration with a .EnterMode parameter.I&#8217;m wondering if there is a way to change Enter key behavior in the runtime, by putting a button into its tool bar, to switch between &lt;p&gt; and &lt;br&gt; (single line vs double line), just like as in Word.Any ideas on how to do this?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fd5b1fc484a553856373b1e6b657dd62?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nGreg Pete<br \/>\njavascript jquery html ckeditor<br \/>\nCan I change CKEditor&#8217;s autoGrow_maxHeight at runtime (jquery or etc)? I&#8217;ve tried CKEDITOR.replace (&#8216;editor1&#8217;, { autoGrow_maxHeight: x });And also destroying the instance before trying to recreate it, with a new maxHeight. I&#8217;m trying to keep the maxHeight to the height of the browser window (minus about 220 px of other stuff on the page). This is when I do the main replace of the text area:autoGrow_maxHeight: (window.innerHeight-220)This works for the initial creation of the editor. But the prob<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5192e7cbcf2f72a847d6fb0d1552f049?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\njewelsea<br \/>\nwebview ckeditor javafx-2<br \/>\nI&#8217;m using a CKEditor 4.1.1 instance within my JavaFX apps&#8217; WebView. When i hit the paste-button of the editor, a window opens that tells me that the security settings of the browser prevent clipboard access.As the browser in this case is the WebViewcomponent, how can i alter the according settings to enable clipboard access?Test App:import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebView; import javafx.stage.Stage;public class SimpleWebView extends Appli<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/0ece8cc5cee715be190f7aa9d32ef127?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nmatwonk<br \/>\njavascript jquery textarea ckeditor<br \/>\nI&#8217;m running into an issue where I have a button on my page that has a CKEditor. When the button is pressed I want to append text to the editor. I used the following code: $(&#8216;#mtxDescription&#8217;).append($(this).data(&#8216;key&#8217;)); CKEDITOR.instances[&#8216;mtxDescription&#8217;].updateElement();However this does not work. The editor does not reflect the change. However when I inspect the editor I find that the textarea does show the appropriate text appended, its just the editor is not showing it. Does anyone know o<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>user3367639 php codeigniter So, I am making a from select with the code below: \/\/ Controller Code $data[&#8216;message_to_options&#8217;] = array(&#8216;1&#8217; =&gt; &#8216;username 1&#8242;,&#8217;2&#8217; =&gt; &#8216;username 2&#8217;, );\/\/ View Code &lt;?php echo form_dropdown(&#8216;message_to&#8217;, $message_to_options); ?&gt;This all works great. Except the users needs to be dynamically created not hard coded. I have the following code from ion_auth [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3428","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3428"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3428\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}