cakephp

CakePHP 3.3.15 multiple matching() chained with OR

允我心安 提交于 2020-01-14 02:37:27
问题 I'm trying to implement a global search mechenism in my CakePHP 3.3.15 app - this involves searching the Parent table for a value plus searching all the associated tables for the same value. I'm using matching() , but I can't find a way to combine multiple matching() into one query object using OR . It looks like matching() will narrow down the result set and calling matching() consecutively will use the object modified by the previous matching() call. This is what I have: $query = $this->

cakephp/app/webroot/ not found when installing cakephp on Apache servor

a 夏天 提交于 2020-01-13 21:52:14
问题 What I'm trying to do: I've developed a web application with cakephp 2.2.1 on wamp. Now I want to install it on an Apache server (version 2.2.16). Error : The requested URL /inetpub/wwwroot/cakephp/app/webroot was not found on this server. What I did: That's seemed to me to be a .htaccess error. I checked that LoadModule rewrite_module libexec/apache2/mod_rewrite.so was uncommented. I made sure that Options FollowSymLinks AllowOverride All was enabled for the wwwroot/cakephp dir. Then I

cakephp/app/webroot/ not found when installing cakephp on Apache servor

爱⌒轻易说出口 提交于 2020-01-13 21:40:20
问题 What I'm trying to do: I've developed a web application with cakephp 2.2.1 on wamp. Now I want to install it on an Apache server (version 2.2.16). Error : The requested URL /inetpub/wwwroot/cakephp/app/webroot was not found on this server. What I did: That's seemed to me to be a .htaccess error. I checked that LoadModule rewrite_module libexec/apache2/mod_rewrite.so was uncommented. I made sure that Options FollowSymLinks AllowOverride All was enabled for the wwwroot/cakephp dir. Then I

CakePHP Javascript Confirm dialog Form Submission cancel not working

泪湿孤枕 提交于 2020-01-13 11:33:17
问题 With my CakePHP's registration form, once clicking Submit button, I simply want to display Javascript Confirm dialog box, which should work like: If pressed Ok, should submit the form If pressed Cancel, should not go for submit action But here, when i press Cancel, though it gets submitted. Don't know why? CakePHP Form Code: <?php echo $form->create('Noncompetitor', array('type' => 'file', 'url' => '/register', 'onSubmit' => 'confirmfrmSubmit();'));?> My JS Code: function confirmfrmSubmit(){

CakePHP and SSL

旧街凉风 提交于 2020-01-13 10:27:28
问题 I just installed a SSL certificate on my website that uses CakePHP and now the site doesn't load anymore files from webroot (images, css files). Any ideas? I think SSL installation affected mod_rewrite, or something like this. 回答1: I just ran into this problem. Check your sites configuration for apache2. Make sure: AllowOverride all is set to allow .htaccess overrides under ssl. Here is my snippet of my config (on ubuntu). <IfModule mod_ssl.c> <VirtualHost _default_:443> ServerAdmin webmaster

Selectively enabling SSL for certain actions in CakePHP

拜拜、爱过 提交于 2020-01-13 09:49:27
问题 I'm trying to enable SSL for only certain actions on my CakePHP based website. I'm doing this using requireSecure() and redirecting to https://url in the corresponding blackHoleCallback(). To keep the server load down, I'd like to redirect back to http://whatever_url once the user is done with the action that requires SSL. How do I do this? 回答1: So this is one solution I've come upon. I add the following snippet to beforeFilter() in AppController : if (!in_array($this->action, $this->Security

Forum/Board written atop one of the big PHP Frameworks

青春壹個敷衍的年華 提交于 2020-01-13 09:18:07
问题 I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more secure, because of ORM and validation and abstracted processing logic. And also would be good showcase of the framework itself. Tutorials and example

Forum/Board written atop one of the big PHP Frameworks

旧巷老猫 提交于 2020-01-13 09:17:59
问题 I was looking for a fresh forum software (threaded) or bulletin board (flat/partitioned). And I'm wondering if there's an implementation based on one of the big PHP frameworks (CodeIgniter, Kohana, Yii, CakePHP, ZF, Seagull, Fusebox, Symfony, eZ, Prado, or whatever...). Reason: A framework based implementation would be inherently more secure, because of ORM and validation and abstracted processing logic. And also would be good showcase of the framework itself. Tutorials and example

CakePHP Cookies getting scrambled - Suhosin related

ⅰ亾dé卋堺 提交于 2020-01-13 09:01:41
问题 For some reason I am unable to read any cookies from my CakePHP app on any page after they have been set, the only thing that is returned is garbled text. My code is as simple as this: $this->Cookie->write('Region', 'test'); $reg = $this->Cookie->read('Region'); pr($reg); I uncomment the $this->Cookie->write() line and all I get back is a bunch of random control characters. I also recently upgraded to CakePHP 1.3 but AFAIK this should not effect cookie like this... This was working fine until

What version of Foundation is used in cakePHP3?

為{幸葍}努か 提交于 2020-01-13 05:01:11
问题 From an earlier question (Responsive bootstrap designing in CakePHP 3x) I understand that cakePHP3 are using Foundation for front-end framework, but which version (in cakePHP v.3.2)? I'm struggling with a toggled top-bar, that won't open when minimized. There seems to have been some bugs in the 5th version and I'm now wondering if they aren't fixed in the version that cakePHP3 are using. 回答1: The CakPHP application templates base.css file was last updated with foundation on September the 1st