Search Results

Search found 768 results on 31 pages for 'cakephp 1 3'.

Page 20/31 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How can I by using the FormHelper ,or some other method, render an image link that runs javascript w

    - by chiggsy
    Background: I want to render this: <a href="javascript:myfunction('Somevar')"><img src="some.png" width="20" height="20" border="0" /></a> in a cakephp app. Note: this link is not associated with a model at all, it's just part of a form going off-site. I'm unsure of how to proceed: I've seen this on the cakephp site, but with all that goes on in cake, I'm not sure about the whole javascript calling business. What's the best way to create such a thing?

    Read the article

  • when i try to access website without www. i get access denied.

    - by madphp
    I have an apache web server on a debian machine. Im using virtualmin to administer virtual hosts. I have two sites on this server right now, when i try to access one site without the www in the URL i get an access denied. The other site is fine. The site with the problem is a cakephp app and has the following .htaccess file in the public_html folder. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> Below is the directives for the problem domain. SuexecUserGroup "#1001" "#1001" ServerName mydomain.net ServerAlias www.mydomain.net ServerAlias webmail.mydomain.net ServerAlias admin.mydomain.net DocumentRoot /home/mydomain/public_html ErrorLog /var/log/virtualmin/mydomain.net_error_log CustomLog /var/log/virtualmin/mydomain.net_access_log combined ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/ ScriptAlias /awstats/ /home/mydomain/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/mydomain/public_html> Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5 </Directory> <Directory /home/mydomain/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.mydomain.net RewriteRule ^(.*) https://mydomain.net:20000/ [R] RewriteCond %{HTTP_HOST} =admin.mydomain.net RewriteRule ^(.*) https://mydomain.net:10000/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 31 <Files awstats.pl> AuthName "mydomain.net statistics" AuthType Basic AuthUserFile /home/mydomain/.awstats-htpasswd require valid-user </Files>

    Read the article

  • When I try to access a website without www I get access denied.

    - by madphp
    I have an apache web server on a debian machine. I'm using virtualmin to administer virtual hosts. I have two sites on this server right now, when I try to access one site without the www in the URL I get an access denied. The other site is fine. The site with the problem is a cakephp app and has the following .htaccess file in the public_html folder. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> Below is the directives for the problem domain. SuexecUserGroup "#1001" "#1001" ServerName mydomain.net ServerAlias www.mydomain.net ServerAlias webmail.mydomain.net ServerAlias admin.mydomain.net DocumentRoot /home/mydomain/public_html ErrorLog /var/log/virtualmin/mydomain.net_error_log CustomLog /var/log/virtualmin/mydomain.net_access_log combined ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/ ScriptAlias /awstats/ /home/mydomain/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 <Directory /home/mydomain/public_html> Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI allow from all AllowOverride All AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5 </Directory> <Directory /home/mydomain/cgi-bin> allow from all </Directory> RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.mydomain.net RewriteRule ^(.*) https://mydomain.net:20000/ [R] RewriteCond %{HTTP_HOST} =admin.mydomain.net RewriteRule ^(.*) https://mydomain.net:10000/ [R] RemoveHandler .php RemoveHandler .php5 IPCCommTimeout 31 <Files awstats.pl> AuthName "mydomain.net statistics" AuthType Basic AuthUserFile /home/mydomain/.awstats-htpasswd require valid-user </Files>

    Read the article

  • How does everyone set up AWS for PHP with a git workflow while worrying about distributing EC2?

    - by Parris
    Hello, I have been looking for something like heroku but for php, and after much frustration (and almost finding what I need, but not quite) we decided to just go with AWS without any other abstraction. We are using PHP 5.3 (and CakePHP 1.3), and are currently using git. Ubuntu seems like the easiest way to get both of those on there and we will most likely use that. We aren't really going worry about outgoing email. We are using smtp through gmail, but will most likely switch to some other service eventually. I had 3 questions: 1) I have been looking at Zend Server, and I am not quite sure how that is more beneficial than xampp. Perhaps it is not? 2) I suppose to make the application scale we would need multiple instances of some ec2 ami. Then just duplicate it and such. The question then becomes how do we make sure all EC2 instances are up to date? 3) I understand the concept of load balancing to some degree. I understand that in 1 region you select a bunch of servers and have it load balance across them. The question then becomes well how about world wide? How do I make it so that traffic is directed to the correct ec2 server? I have heard of route 53, and tried signing up for that, but nothing appears in my control panel. Also perhaps it is just a DNS thing with my domain registrar? AHHH... some tutorial would be helpful!

    Read the article

  • How to integrate yahoo user interface with cakePHP

    - by ygmehboob
    Hi all I am very new to cakePHP, I want to add YUI accordion in the default layout of my application. A simple explanation could be like this - I have a table 'lecturers' in my database. I have baked the model lecturer (file) I have baked the controller lecturers_controller (file) I have baked the view lecturers (folder) I need to override the default layout but I want to add YUI 3 accordion sothat the table name lecturers will be on top, after clicking on the top division it will slidedown and will show me the column name of lecturer table. Is there anyone who could suggest me how to integrate the YUI 3 accordion - Do I have to write a helper for this or simply after copying the YUI 3 library I could code this in the default.ctp file. I am really confused as I could hardly get a full tutorial on this topic. Thank you in advance ................

    Read the article

  • purpose of 3rd party mvc ?

    - by Honey
    ive seen many third party mvcs or frameworks such as codeignitor , cakephp, and so on. what i want to know is what are their purposes? ive created my own framework call it an mvc or framework (in my opinion their all the same). in my framework i have all the classes in one folder called classes and all functions in another. its all organized and when a new project comes in i am able to complete it fast. i have looked at the applications that i mentioned and it seems to have huge articles and tutorials to study. what is the purpose? why not study the main language such as php, javascript/ajax or jquery, and so on then build something that you know the ins and outs of so that any project comes your way you know what to do. ive known some people who use cakephp and for every project they get stuck and need to figure out what to do. another guy i knew worked with joomla and every basic company website that came his way he would reverse engineer joomla to make it work with the site. are people using these applications because they lack knowledge in the languages? or sometimes have no choice but to make a site while lacking language and put something together.

    Read the article

  • MySQL & PHP - Creating Multiple Parent Child Relations

    - by Ashok
    Hi, I'm trying to build a navigation system using categories table with hierarchies. Normally, the table would be defined as follows: id (int) - Primary key name (varchar) - Name of the Category parentid (int) - Parent ID of this Category referenced to same table (Self Join) But the catch is that I require that a category can be child to multiple parent categories.. Just like a Has and Belongs to Many (HABTM) relation. I know that if there are two tables, categories & items, we use a join table categories_items to list the HABTM relations. But here i'm not having two tables but only table but should somehow show HABTM relations to itself. Is this be possible using a single table? If yes, How? If not possible, what rules (table naming, fields) should I follow while creating the additional join table? I'm trying to achieve this using CakePHP, If someone can provide CakePHP solution for this problem, that would be awesome. Even if that's not possible, any solution about creating join table is appreciated. Thanks for your time.

    Read the article

  • Association and model data saving problem

    - by Zhlobopotam
    Developing with cakephp 1.3 (latest from github). There are 2 models bind with hasAndBelongsToMany: documents and tags. Document can have many tags in other words. I've add a new document submitting form there user can enter a list of tags separated with commas (new tag will be added, if not exist already). I looked at cakephp bakery 2.0 source code on github and found the solution. But it seems that something is wrong. class Document extends AppModel { public $hasAndBelongsToMany = array('Tag'); public function beforeSave($options = array()) { if (isset($this->data[$this->alias]['tags']) && !empty($this- >data[$this->alias]['tags'])) { $tagIds = $this->Tag->saveDocTags($this->data[$this->alias] ['tags']); unset($this->data[$this->alias]['tags']); $this->data[$this->Tag->alias][$this->Tag->alias] = $tagIds; } return true; } } class Tag extends AppModel { public $hasAndBelongsToMany = array ('Document'); public function saveDocTags($commalist = '') { if ($commalist == '') return null; $tags = explode(',',$commalist); if (empty($tags)) return null; $existing = $this->find('all', array( 'conditions' => array('title' => $tags) )); $return = Set::extract($existing,'/Tag/id'); if (sizeof($existing) == sizeof($tags)) { return $return; } $existing = Set::extract($existing,'/Tag/title'); foreach ($tags as $tag) { if (!in_array($tag, $existing)) { $this->create(array('title' => $tag)); $this->save(); $return[] = $this->id; } } return $return; } } So, new tags creation works well but document model can't save association data and tells: SQL Error: 1054: Unknown column 'Array' in 'field list' Query: INSERT INTO documents (title, content, shortnfo, date, status) VALUES ('Document with tags', '', '', Array, 1) Any ideas how to solve this problem?

    Read the article

  • Cake returned the time consumed in data lookup in JQuery Alert Box

    - by kwokwai
    Hi all, When I was doing some self-learning on JQuery Ajax in Cakephp, I found out some strange behaviour in the JQuery Alert Box. Here are a few lines of code of the JQuery Ajax I used: $(document).ready(function(){ $(document).change(function(){ var usr = $("#data\\[User\\]\\[name\\]").val(); $.post{"http://www.mywebsite.com/controllers/action/", usr, function(msg){alert(msg);} } }); }); The Alert box shows me a message returned from the Action: Helloworld <!--0.656s--> I am not sure why the number of time consumption was displayed in the Alert box, since it was not in my code as follows: function action($data=null){ $this->autoRender = false; $result2=$this->__avail($data); if($result2==1) {return "OK";} else {return "NOT";} } CakePHP rteurned some extra information in the Alert box. Later I altered a single line of code and tried out this instead, and the time consumption was not displayed on screen then: $(document).ready(function(){ $(document).change(function(){ var usr = $("#data\\[User\\]\\[name\\]").val(); $.post{"http://www.mywebsite.com/controllers/action/", usr, function(msg){$("#username").append('<span>'+msg+</span'>);} } }); });

    Read the article

  • How to pass some data to JQuery AJAX in CAKEPHP

    - by kwokwai
    Hi all, I am learning how to use JQuery to help check data availability. To start with it, I wrote a few lines of codes using cakePHP. I have written a function in a Controller for checking data input, and the URL is like this: http://www.mywebsite.com/controllers/action/avariable I was trying to pass the value in a Input TextBox field using the JQuery Ajax to the URL above,but I don't know why it is not working in passing a variable to the Controller's action. Could you help me out please? <Script language="javascript"> //<!-- $(document).ready(function(){ $(document).change(function() { var usr = $("#data\\[User\\]\\[name\\]").val(); if(usr.length >= 3){ $("#username").append('<span><img align="absmiddle" src="loader.gif" />Checking</span>'); $.ajax({ type: "POST", url: "http://www.mywebsite.com/controllers/action/", data: usr, success: function(msg){ if(msg == 'OK') { $("#username").append('<span><img align="absmiddle" src="accepted.png"/></span>'); } else { $("#username").append('<span>'+msg+'</span>'); } } }); } else { $("#username").append('<span>The username should have at least 3 characters.</span>'); } }); }); //--> </Script> <form name="adduser" id="adduser" method="post" action="/controllers/action2"> <table border=0 width="100%"> <tr> <td>Username</td> <td> <div id="username"> <input type=text name="data[User][name]" id="data[User][name]"> </div> </td> </tr> <tr> <td> <input type="submit" value="Send"> </td> </tr> </table> </form>

    Read the article

  • cake's Acl problems...

    - by Gaurav
    I created an application using the method described in the "http:// book.cakephp.org/view/641/Simple-Acl-controlled-Application" but after I try to log in there is an error which says, "DbAcl::allow() - Invalid node [CORE\cake\libs\controller\components\acl.php, line 325]" I did exactly same as mentioned in the website but after loggin in I am given this error msg.. Please help me rectify this. Any help is greatly appreciated..... thanks gaurav sharma

    Read the article

  • ajax->form submit onchage event on selectTag keeping submit button on form without click

    - by prashant
    Hi, I am using cakephp 1.1. for my project.I used ajax-form for form creation.In one form, form submitted using onchange event of selectTag taking submit button and giving submit.click for that button.But it peroperly not redirect to view file gives error "cake/libs/model/datasources/dbo_source.php" and submit that form,but I am not getting to which view it is submitting(submittied form to itself).

    Read the article

  • Understanding Smarty and MVC Frameworks

    - by Korrupzion
    Hello there, I just created this thread to discuss with people who have adopted the smarty system, and how many time it took to you to understand it, because i just can't get the idea, instead of making every easier as everybody says i think it just make more complex to code. More than a problem with only smarty is with the whole MVC model, with CakePHP or KohanaPHP i experience the same problems, u need to do 3x lines of code and files for something that u can do with a few lines of simple php. Maybe u can tell how did u learned to code using MVC model :)

    Read the article

  • Change environment in cake php

    - by ryudice
    I just started with cakePHP for a small project, I have rails experience and I can see they are really similar however I cant seem to find where to chagne the environment you are working? I'm current working with test because I see all those debugging messages but I want to see how the design looks and I need to get rid of those messages so I need to change environment to production.

    Read the article

  • cake php AppController and inheritance

    - by RSK
    hello folks........ In many tutorial of Acl component in cakephp i got instruction that add component either in AppController or in all the other controllers which inherits AppController....... but problem is var $components=array('Auth',Acl); when i use the above line in AppConroller i cant use the Auth or Acl component... but when i use the same code in all the child classes it works fine........ what will be the problem thanks in advance any help will be appreciated.

    Read the article

  • Is it safe to change the 'Security.salt' line to a more lengthy string {64 hex key}

    - by Gaurav Sharma
    Hi everyone, I have changed the Configure::write('Security.salt', '############'); value in the file config/core.php file to a '256-bit hex key'. Is it safe or a good practice to change these lines for every different installation of cakephp application or shall I revert back to the original ? I also changed the Configure::write('Security.cipherSeed','7927237598237592759727'); to a different one of more length. Please throw some light on this. Thanks

    Read the article

  • How can I debug a PHP CLI script with xdebug?

    - by Laran Evans
    I haven't quite figured this out. EVERY piece of documentation I've found covers how to use xdebug to debug scripts running in Apache. I need to debug a php CLI script. So, for instance, how do I pass the XDEBUG_SESSION_START variable in to get xdebug to kick on? I'm specifically trying to debug a CakePHP shell. So if anyone has any additional insight into that I'd be very appreciative. Thanks.

    Read the article

  • Specify database engine to use in fixtures

    - by deceze
    Is there a way to specify the database engine to be used for fixtures in CakePHP test fixtures? Some of my models depend on database transactions, and I would like to write some tests for their correct behavior. Currently I'm simply auto-importing the schema, but the tables get created with MySQL's standard MyISAM engine, which doesn't support transactions. class FooFixture extends CakeTestFixture { public $name = 'Foo'; public $import = 'Foo'; public $records = array(...); }

    Read the article

  • virus attack to the website and it is not showing anything

    - by Nidhin Baby
    Hello, I have a web application which is developed in cakePHP, but from last few week, a virus is affected to the site and its not showing any pages. even if we go to the source code, nothing is there to display. I have checked the index.php, there is no extra entry. Can some help me to find out the solution. and, how can i prevent these virus attacks? Thanks in advance

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >