Tuesday, May 31, 2011

[php-objects] Site hacked : HaCkEd By Sy-soldier what to do?

 

Hi guys,
I am using wordpress on my site, and twice in 14 months my site has been hacked. Both times index.php gets changed in root folder, i am not sure but i suppose it is done using comments. Can anyone tell how it is being done & how to evade it?

__._,_.___
Recent Activity:
Are you looking for a PHP job?
Join the PHP Professionals directory Now!
http://www.phpclasses.org/jobs/
.

__,_._,___

Re: Passing fusion chart csv via javascript to a cake controller

revised PHP code. apologize.

I need to export a csv file from fusion charts and pass the data to a cake controller function via javascript/jquery.

HTML
<li><a href="javascript:void(0)" id="downloadCsv" class="userFunctionsButton">Download CSV</a></li>

JS
$(function(){
    $('#downloadCsv').click(function(){
        var myChart = FusionCharts('myChartId3');

        var data = myChart.getDataAsCSV();

        data = data.replace(/"/g, '').replace(/\n/g, 'BREAK'); 
var url = PATH +'dashboard/getCsvReport/?'+ encodeURIComponent( data );
        
        window.location = url;
    });
});

PHP
function getCsvReport($chart_data){
           $filename = 'chart';
           $data = str_replace('BREAK', "\n", $chart_data);
  
            header("Content-type: application/force-download");
            header("Pragma: no-cache");
            header("Expires: 0");
            header("Content-Disposition: attachment; filename=\"".$filename.".csv\"");

            $this->layout = 'empty';
            $this->render('/ajax/empty');

            echo $data;
     }


The above only writes the first key value pair to the csv file. Turning on the AllowEncodedSlashes in the apache config is not an option. 

Any ideas? References for sending post data as a form submission or ajax request.

Thank you in advance.

-a 

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Passing fusion chart csv via javascript to a cake controller

I need to export a csv file from fusion charts and pass the data to a cake controller function via javascript/jquery.

HTML
<li><a href="javascript:void(0)" id="downloadCsv" class="userFunctionsButton">Download CSV</a></li>

JS
$(function(){
    $('#downloadCsv').click(function(){
        var myChart = FusionCharts('myChartId3');

        var data = myChart.getDataAsCSV();

        data = data.replace(/"/g, '').replace(/\n/g, 'BREAK'); 
var url = PATH +'dashboard/getCsvReport/?'+ encodeURIComponent( data );
        
        window.location = url;
    });
});

PHP
function getCsvReport($chart_data){
           $filename = 'chart';
 
            $data = str_replace('/', "\n", $chart_data);
  
            header("Content-type: application/force-download");
            header("Pragma: no-cache");
            header("Expires: 0");
            header("Content-Disposition: attachment; filename=\"".$filename.".csv\"");

            $this->layout = 'empty';
            $this->render('/ajax/empty');

            echo $data;
     }


The above only writes the first key value pair to the csv file. Turning on the AllowEncodedSlashes in the apache config is not an option. 

Any ideas? References for sending post data as a form submission or ajax request.

Thank you in advance.

-a 

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Best practise? Creating a detailed data report from different linked models?

My two cents:

The recommendation to have your report be an action in the appropriate
controller good one assuming that fits your case. In my experience.
It's been my experience as the size/complexity of an application grows
you want multiple reports each of which spans your data to some
degree. In this case I would make a reports contoller. It seems like
the more natural solution to me, and I don't think it works against
the framework at all.

On May 31, 8:34 pm, dreamingmind <dreamingmin...@gmail.com> wrote:
> Michael,
>
> You could certainly have a Reports controller. The expectation would
> be that it is operating on the Report model. This seems pretty
> unlikely given the information so far. More likely you are wanting a
> report on data in some other model (like Project or Customer or ...)
> and it's related models.
>
> Starting with the assumption that you want to generate reports on the
> model Project, you would want a report action in your Projects
> controller. A simple example would be this:
>
> function report() {
>   if(!empty($this->data)) {
>      $report = $this->Project->find('all', array('conditions'=>'your
> conditions', 'contain'=>'fields you want'));
>      $this->set('report', $report);
>   }
>
> }
>
> In the folder app/views/projects/ you would store your file report.ctp
> This file would output a form so the user can control and modify
> reports. Also have this file output a formatted report if data is
> available to do so. User the Form Helper to generate the form on your
> page (http://book.cakephp.org/view/1383/Form).
>
> Given this setup the user would get to the page athttp://yoursite.com/projects/report
>
> The report action in your Project controller looks to see if it was
> being provided with posted data. On the first visit there would be
> none so the logic would just fall out the bottom of the action and
> report.ctp is rendered with only the form displayed. The user fills
> the form, submits the data back to projects/report and this time the
> if() is satisfied, the find() is done and data passed to the view in
> $report. Now the page shows the form AND the report!
>
> One action, one view, sweet!
>
> Your various models would be designed with hasMany, belongsTo,
> hasAndBelongsToMany, etc. as appropriate. Probably you would also want
> your models to use the Containable behavior (http://book.cakephp.org/
> view/1323/Containable) since you imply there is a lot of linking
> involved.
>
> I think you're fighting against the framework a bit. To become more
> familiar with where to store your files and how to name things, look
> these sections over again:http://book.cakephp.org/view/899/CakePHP-Folder-Structurehttp://book.cakephp.org/view/901/CakePHP-Conventions
>
> Regards,
> Don
>
> On May 31, 1:19 pm, mivogtGermanyLU <miv...@mivogt.net> wrote:
>
>
>
>
>
>
>
> > Don,
>
> > yes I need a form to offer the user a way to select the criteria.
>
> > As the SQL is a bit more complex, the use of find will not be my way.
> > I know it is a dirty way of using cake but a long sqlquery-string
> > works just better for me and offers me a nice result so far without
> > learning the complex find (in my case I am using nearly all my models
> > linked with each other)
>
> > I am not sure about naming files and functions this for and placing
> > them in the right directory.
>
> > Is it ok to create a "reports_controller.php" containing an action
> > "CreateReport($id,$date)" and 2 views "selectDataSet.ctp",
> > "showReport.ctp"
>
> > .. pleas feel free to correct my naming as it will not be within the
> > convention so far ;)
>
> > TIA
>
> > michael
>
> > On 31 Mai, 20:20, dreamingmind <dreamingmin...@gmail.com> wrote:
>
> > > Michael,
>
> > > I'm not sure I see what the problem is. Your link/button can certainly
> > > pass any search parameters you want in to your action. It sounds like
> > > you might be planning to offer a small form for the user to choose
> > > search params? The Form Helper will let you put all that together and
> > > the data will come back to you in $this->data in your action (http://
> > > book.cakephp.org/view/1383/Form). The action can make use of the
> > > parameters to build a $this->yourModel->find() call. The returned data
> > > will be be passed along to the view because actions by default render
> > > their associated views. All pretty standard stuff unless I'm
> > > misreading your message.
>
> > > If you're really planning on writing that sql by hand, you might want
> > > to review thishttp://book.cakephp.org/view/1017/Retrieving-Your-Data
>
> > > Regards,
> > > Don
>
> > > On May 31, 10:28 am, mivogtGermanyLU <miv...@mivogt.net> wrote:
>
> > > > Hi there,
>
> > > > my app has several models with defined relations.
> > > > Entering Data works fine also all the CRUD stuff is fine.
>
> > > > Now  I need to collect data from the database ostly leftjoined and
> > > > limited and sorted by some definitions... so far as first step I made
> > > > me an SQL statement trying insidephpmyadminand it works fine.
>
> > > > To get it more comfortable I would like to have a view offering to set
> > > > the data-limiters.
> > > > In my case it will be a month/year datafield and the id of one model
> > > > all the other stuff is linked somehow.
>
> > > > I am not sure about how to go on with this and would be happy to get a
> > > > helping comment...
>
> > > > I guess I will need a SelectWhatToReport-View to select month/year/
> > > > model_id
> > > > passing this to a controller-action CreateReport($month,$year,
> > > > $model_id)
>
> > > > in controller I might add the new action
> > > > CreateReport($month,$year, $model_id)
> > > > {sql='select ... where .. $month .. ,$year, ..  $model_id'
> > > > // . creating sql result array to be passed to a view
>
> > > > }
>
> > > > not sure about how to call a 2nd view from controller to display the
> > > > result from SqlResultArray using some while statements ...
>
> > > > ok maybe I better rewrite in short sentences what I want to know/need
> > > > to do:
> > > > - need to get a view offering to choose an entry of a model from
> > > > database (sems to be easy I hope)
> > > > - passing this selectioncriteria  to controller/action (hopefully just
> > > > by pressing a button)
> > > > - calling a view from controller side to display the result (sql
> > > > array)
>
> > > > Thanks in advance
>
> > > > Michael

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Best practise? Creating a detailed data report from different linked models?

Hi there,

my app has several models with defined relations.
Entering Data works fine also all the CRUD stuff is fine.

Now I need to collect data from the database ostly leftjoined and
limited and sorted by some definitions... so far as first step I made
me an SQL statement trying inside phpmyadmin and it works fine.

To get it more comfortable I would like to have a view offering to set
the data-limiters.
In my case it will be a month/year datafield and the id of one model
all the other stuff is linked somehow.

I am not sure about how to go on with this and would be happy to get a
helping comment...

I guess I will need a SelectWhatToReport-View to select month/year/
model_id
passing this to a controller-action CreateReport($month,$year,
$model_id)

in controller I might add the new action
CreateReport($month,$year, $model_id)
{sql='select ... where .. $month .. ,$year, .. $model_id'
// . creating sql result array to be passed to a view
}

not sure about how to call a 2nd view from controller to display the
result from SqlResultArray using some while statements ...


ok maybe I better rewrite in short sentences what I want to know/need
to do:
- need to get a view offering to choose an entry of a model from
database (sems to be easy I hope)
- passing this selectioncriteria to controller/action (hopefully just
by pressing a button)
- calling a view from controller side to display the result (sql
array)


Thanks in advance

Michael

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Caching

Jeremy,

Yes, another layer... seems a bit crazy. It looks like their may be
more bits and pieces of unique code sprinkled into your pages than I
imagined. None the less, a couple more thoughts?

- A new route could override the basic controller/action/params
pattern and funnel everything to your accumulator controller/action
while still passing along the controller/action/params that are needed
to fully inform the process.
- Or maybe your component just needs to be extended a bit to do the
necessary additional portioning-out of tasks

Either way seems in line with cake philosophy.

- I've had some success with shipping html into php's XML/DOM
manipulators (http://us.php.net/manual/en/refs.xml.php
http://us.php.net/manual/en/domdocument.loadhtml.php) and that has
sometimes made it very easy to swap an entire div in or out of a page.
It's also given me ways of walking through the DOM in php to make all
sorts of fussy page tweaks. This just moves the javascripty way
manipulating pages into your component, action or helper.
- Possibly a final helper could be fed the cached and dynamic chunks
for assembly into your final cach-namic page. That would be a pretty
cake-y way to go.

I'm excited about this plan! Especially since I don't have to write
it!

Don

On May 31, 8:54 am, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> Hmmm...nice thinking and I appreciate your reply, but it sounds like it's derailing Cake somehow. This happens on every page view so I'd effectively be putting another layer in there.
>
> A bit more background...
>
> The component scans $this->params and takes into account a number of factors like is the user logged in, are they an administrator, do they perform some other sort of role, where are they in the system, what menu items should have the 'selected' class and so on. It produces a keyed array (e.g. main, sub-1, sub-2, user [log in/log out/logged in as etc] and so on). The array is passed to the view as a variable. The default.ctp layout contains an element that parses each key and renders output.
>
> Currently it's called in app_controller/beforeRender() but this is now being bypassed when the view is cached. It is, by it's nature, very dynamic. It can't easily be created in full in advance and placed in session because, for example, a user could log in and then log out.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.com
> (t) +44 (0) 208 123 3822
> (m) +44 (0) 7973 481949
> Skype: jeremy_burnshttp://www.classoutfit.com
>
> On 31 May 2011, at 15:58, dreamingmind wrote:
>
>
>
>
>
>
>
> > Jeremy,
>
> > I don't know details of how to accomplish this, but it seems like
> > you're going to have to call another non-cached action instead of the
> > action you want. It will:
>
> > - call the navigation engine to get an html fragment of your menus
> > - call the desired action and get the page rendering
> > - plug the menus into the page and send it to the browser
>
> > or
>
> > - send the menu out as a string that javascript can insert in the page
> > once it loads
>
> > Does this seem possible?
>
> > Regards,
> > Don
>
> > On May 31, 5:44 am, Jeremy Burns <jeremybu...@classoutfit.com> wrote:
> >> I've raised a similar question before but got no responses, so I'll
> >> try something more specific.
>
> >> I have an application that is pretty dynamic. With no caching turned
> >> on there is a lag of around 2 seconds before anything happens, and
> >> then it all zips in really quickly. If I blanket enable view caching
> >> (enabling cache in core.php, adding the Cache helper to app_controller
> >> and setting cacheAction to +1hour) the lag disappears, response is
> >> fantastic but the results are (understandably) terrible as nothing is
> >> dynamic.
>
> >> If I move the cache setting from app_controller into specific actions
> >> I start to get better results. It's a pretty big app, so that's going
> >> to take a lot of time and testing to do correctly. However, I have a
> >> particular problem that I need to solve before I put in the effort.
>
> >> I have a navigation component that reads $this->params, sets up some
> >> variables that are passed through the controller and rendered in an
> >> element (that also has a nested element):
>
> >> function beforeRender() {
> >>             $this->set('menus', $this->Navigation->menus($this->params));
>
> >> I have placed <cake:nocache></cake:nocache> blocks in the elements.
>
> >> Reading the Cake on line book:
> >> "It should be noted that once an action is cached, the controller
> >> method for the action will not be called - otherwise what would be the
> >> point of caching the page. Therefore, it is not possible to wrap
> >> <cake:nocache> </cake:nocache> around variables which are set from the
> >> controller as they will be null."
>
> >> As every page contains the navigation code, it would seem that I
> >> cannot pass the menus variable down. Subsequent rendering of the
> >> navigation (when the contents have changed) delivers lots of
> >> 'Undefined index' errors as the variables are indeed missing. This is
> >> especially so when a user logs in and then logs, which generates
> >> different menu content.
>
> >> Can anyone suggest a work around for this?
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

[php-gurus] College Girl Gets Fucked While Her Best Friend

 
__,_._,___

[php-gurus] College Girl Gets Fucked While Her Best Friend

 
__,_._,___

Re: Static Username

Notice (8): Undefined property: View::$Auth [APP/views/pages/
home.ctp, line 16]
Fatal error: Call to a member function login() on a non-object

Does your code have to be placed in a controller? I'm trying to
include it in home.ctp


On May 31, 10:02 am, Jeremy Burns | Class Outfit
<jeremybu...@classoutfit.com> wrote:
> Why are you doing this through a form? You can just do:
>
> $user = $this->User->findByUsername('xxx');
> $this->Auth->login($user);
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 31 May 2011, at 16:57, Jacob wrote:
>
> > I am attempting to create a login.ctp page that takes the username and
> > password from global environment variables and automatically performs
> > a login. I can't seem to figure out how to make an input form accept
> > "static text" rather than creating an input box.
>
> >        <h2>Login</h2>
> >        <?php
> >        $user = getenv('user');
> >        $pass = getenv('pass');
> >                echo $form->create('User', array('url' =>
> > array('controller' => 'users', 'action' =>'login')));
> >                echo $form->input('User.username', array($user));
> >                echo $form->input('User.password', array($pass));
> >                echo $form->end('Login');
> >        ?>
>
> > --
> > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org
> > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help others with their CakePHP related questions.
>
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

[php-gurus] College Girl Gets Fucked While Her Best Friend

 
__,_._,___

Script to see foss jobs from terminal

Hi geeks,

  I wrote a ruby script , By using this, we can see fossjobs from terminal that was posted in fossjobs.in 

Link of that script was below. Please see that and give your suggestion

http://sathia27.wordpress.com/2011/05/30/update-foss-job-script/

Using this we can,
  1. we can search for job by date
  2. by range of date
  3. and by keywords (i.e) ROR, PHPMYSQL etc.
  4. We can also see description of job,  if we needed.
                                                        Thank you          
   

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Static Username

> I am attempting to create a login.ctp page that takes the username and
> password from global environment variables and automatically performs
> a login. I can't seem to figure out how to make an input form accept
> "static text" rather than creating an input box.
>
> <h2>Login</h2>
> <?php
> $user = getenv('user');
> $pass = getenv('pass');
> echo $form->create('User', array('url' =>
> array('controller' => 'users', 'action' =>'login')));
> echo $form->input('User.username', array($user));
> echo $form->input('User.password', array($pass));
> echo $form->end('Login');
> ?>
>

try setting the value:

echo $form->input('User.username', array('value'=>$user));
echo $form->input('User.password', array('value'=>$pass));

TBH unless you are using javascript to automatically submit this form, you
would be better off having a controller action that reads in the username
and password and then redirects to the login action.

Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mikek@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel: 07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Static Username

Why are you doing this through a form? You can just do:

$user = $this->User->findByUsername('xxx');
$this->Auth->login($user);

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
http://www.classoutfit.com

On 31 May 2011, at 16:57, Jacob wrote:

> I am attempting to create a login.ctp page that takes the username and
> password from global environment variables and automatically performs
> a login. I can't seem to figure out how to make an input form accept
> "static text" rather than creating an input box.
>
> <h2>Login</h2>
> <?php
> $user = getenv('user');
> $pass = getenv('pass');
> echo $form->create('User', array('url' =>
> array('controller' => 'users', 'action' =>'login')));
> echo $form->input('User.username', array($user));
> echo $form->input('User.password', array($pass));
> echo $form->end('Login');
> ?>
>
> --
> Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Static Username

I am attempting to create a login.ctp page that takes the username and
password from global environment variables and automatically performs
a login. I can't seem to figure out how to make an input form accept
"static text" rather than creating an input box.

<h2>Login</h2>
<?php
$user = getenv('user');
$pass = getenv('pass');
echo $form->create('User', array('url' =>
array('controller' => 'users', 'action' =>'login')));
echo $form->input('User.username', array($user));
echo $form->input('User.password', array($pass));
echo $form->end('Login');
?>

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Caching

Hmmm...nice thinking and I appreciate your reply, but it sounds like it's derailing Cake somehow. This happens on every page view so I'd effectively be putting another layer in there.

A bit more background...

The component scans $this->params and takes into account a number of factors like is the user logged in, are they an administrator, do they perform some other sort of role, where are they in the system, what menu items should have the 'selected' class and so on. It produces a keyed array (e.g. main, sub-1, sub-2, user [log in/log out/logged in as etc] and so on). The array is passed to the view as a variable. The default.ctp layout contains an element that parses each key and renders output.

Currently it's called in app_controller/beforeRender() but this is now being bypassed when the view is cached. It is, by it's nature, very dynamic. It can't easily be created in full in advance and placed in session because, for example, a user could log in and then log out.

Jeremy Burns
Class Outfit

jeremyburns@classoutfit.com
(t) +44 (0) 208 123 3822
(m) +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 31 May 2011, at 15:58, dreamingmind wrote:

> Jeremy,
>
> I don't know details of how to accomplish this, but it seems like
> you're going to have to call another non-cached action instead of the
> action you want. It will:
>
> - call the navigation engine to get an html fragment of your menus
> - call the desired action and get the page rendering
> - plug the menus into the page and send it to the browser
>
> or
>
> - send the menu out as a string that javascript can insert in the page
> once it loads
>
> Does this seem possible?
>
> Regards,
> Don
>
> On May 31, 5:44 am, Jeremy Burns <jeremybu...@classoutfit.com> wrote:
>> I've raised a similar question before but got no responses, so I'll
>> try something more specific.
>>
>> I have an application that is pretty dynamic. With no caching turned
>> on there is a lag of around 2 seconds before anything happens, and
>> then it all zips in really quickly. If I blanket enable view caching
>> (enabling cache in core.php, adding the Cache helper to app_controller
>> and setting cacheAction to +1hour) the lag disappears, response is
>> fantastic but the results are (understandably) terrible as nothing is
>> dynamic.
>>
>> If I move the cache setting from app_controller into specific actions
>> I start to get better results. It's a pretty big app, so that's going
>> to take a lot of time and testing to do correctly. However, I have a
>> particular problem that I need to solve before I put in the effort.
>>
>> I have a navigation component that reads $this->params, sets up some
>> variables that are passed through the controller and rendered in an
>> element (that also has a nested element):
>>
>> function beforeRender() {
>> $this->set('menus', $this->Navigation->menus($this->params));
>>
>> I have placed <cake:nocache></cake:nocache> blocks in the elements.
>>
>> Reading the Cake on line book:
>> "It should be noted that once an action is cached, the controller
>> method for the action will not be called - otherwise what would be the
>> point of caching the page. Therefore, it is not possible to wrap
>> <cake:nocache> </cake:nocache> around variables which are set from the
>> controller as they will be null."
>>
>> As every page contains the navigation code, it would seem that I
>> cannot pass the menus variable down. Subsequent rendering of the
>> navigation (when the contents have changed) delivers lots of
>> 'Undefined index' errors as the variables are indeed missing. This is
>> especially so when a user logs in and then logs, which generates
>> different menu content.
>>
>> Can anyone suggest a work around for this?
>
> --
> Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: How do I get prototype to

What cake will do for you is help you keep your javascript out of your
pages (or organized in your pages). It gives you the script() method
in the Html Helper to load javascript files. And it gives you the
buffer() and write() methods in the Js Helper to collect javascript
code and output it all at the end of your html page.

Other than these code-organization tools, cake doesn't concern itself
too much with javascript. The Js Helper makes efforts in that
direction but if you're new to javascript it might be easier to work
pretty directly with the language as you solve your problem and just
use the cake tools that get your code into your page in a neat way.

By default, the Js Helper makes the jQuery framework for javascript
available to you, so you can use that to write your js code. Learning
a new language from the context of a framework though... maybe it's
just me, but that seems both hard and a bit crazy. I have a hard time
penetrating the abstraction a framework imposes and if I don't know
the language underneath! Yikes!

Don

On May 31, 7:32 am, barricades <davow...@googlemail.com> wrote:
> Hi
>
> I've a search page which allows users to search through a table of
> charities. Each charity has one or more tags attached to it. As a
> search alternative I'd like a list of the tags (there are only 20 or
> so) with a checkbox for each where if someone checks one or more boxes
> then only the charities with those tags appear in the list.
>
> So I've made the list and been advised that I should use
> 'observerform' call on the page that runs whenever the form is
> changed'
>
> I've googled observerform but haven't been able to figure out what
> exactly to do since I'm totally new to javascript.
>
> Can anyone give me a bit of a road map on how to do this? I don't get
> how to attach the javascript to the form and how to make it call a
> function to run the query
>
> I did findhttp://stackoverflow.com/questions/2417542/how-can-i-implement-a-js-o...
> which has a bit of javascript which might help but from what I've
> learned about cakephp there is probably a much better way of doing
> this.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Caching

Jeremy,

I don't know details of how to accomplish this, but it seems like
you're going to have to call another non-cached action instead of the
action you want. It will:

- call the navigation engine to get an html fragment of your menus
- call the desired action and get the page rendering
- plug the menus into the page and send it to the browser

or

- send the menu out as a string that javascript can insert in the page
once it loads

Does this seem possible?

Regards,
Don

On May 31, 5:44 am, Jeremy Burns <jeremybu...@classoutfit.com> wrote:
> I've raised a similar question before but got no responses, so I'll
> try something more specific.
>
> I have an application that is pretty dynamic. With no caching turned
> on there is a lag of around 2 seconds before anything happens, and
> then it all zips in really quickly. If I blanket enable view caching
> (enabling cache in core.php, adding the Cache helper to app_controller
> and setting cacheAction to +1hour) the lag disappears, response is
> fantastic but the results are (understandably) terrible as nothing is
> dynamic.
>
> If I move the cache setting from app_controller into specific actions
> I start to get better results. It's a pretty big app, so that's going
> to take a lot of time and testing to do correctly. However, I have a
> particular problem that I need to solve before I put in the effort.
>
> I have a navigation component that reads $this->params, sets up some
> variables that are passed through the controller and rendered in an
> element (that also has a nested element):
>
> function beforeRender() {
>             $this->set('menus', $this->Navigation->menus($this->params));
>
> I have placed <cake:nocache></cake:nocache> blocks in the elements.
>
> Reading the Cake on line book:
> "It should be noted that once an action is cached, the controller
> method for the action will not be called - otherwise what would be the
> point of caching the page. Therefore, it is not possible to wrap
> <cake:nocache> </cake:nocache> around variables which are set from the
> controller as they will be null."
>
> As every page contains the navigation code, it would seem that I
> cannot pass the menus variable down. Subsequent rendering of the
> navigation (when the contents have changed) delivers lots of
> 'Undefined index' errors as the variables are indeed missing. This is
> especially so when a user logs in and then logs, which generates
> different menu content.
>
> Can anyone suggest a work around for this?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: Caching

Use sessions to store your navigation data / parameters and call the
appropriate method?

On May 31, 1:44 pm, Jeremy Burns <jeremybu...@classoutfit.com> wrote:
> I've raised a similar question before but got no responses, so I'll
> try something more specific.
>
> I have an application that is pretty dynamic. With no caching turned
> on there is a lag of around 2 seconds before anything happens, and
> then it all zips in really quickly. If I blanket enable view caching
> (enabling cache in core.php, adding the Cache helper to app_controller
> and setting cacheAction to +1hour) the lag disappears, response is
> fantastic but the results are (understandably) terrible as nothing is
> dynamic.
>
> If I move the cache setting from app_controller into specific actions
> I start to get better results. It's a pretty big app, so that's going
> to take a lot of time and testing to do correctly. However, I have a
> particular problem that I need to solve before I put in the effort.
>
> I have a navigation component that reads $this->params, sets up some
> variables that are passed through the controller and rendered in an
> element (that also has a nested element):
>
> function beforeRender() {
>             $this->set('menus', $this->Navigation->menus($this->params));
>
> I have placed <cake:nocache></cake:nocache> blocks in the elements.
>
> Reading the Cake on line book:
> "It should be noted that once an action is cached, the controller
> method for the action will not be called - otherwise what would be the
> point of caching the page. Therefore, it is not possible to wrap
> <cake:nocache> </cake:nocache> around variables which are set from the
> controller as they will be null."
>
> As every page contains the navigation code, it would seem that I
> cannot pass the menus variable down. Subsequent rendering of the
> navigation (when the contents have changed) delivers lots of
> 'Undefined index' errors as the variables are indeed missing. This is
> especially so when a user logs in and then logs, which generates
> different menu content.
>
> Can anyone suggest a work around for this?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: cakephp hacked

406 errors can be thrown from apache mod_security.

add to webroot's htaccess:
ErrorDocument 406 default

(to disable redirection to cake on HTTP 406 error)

You should check for last modified files using FTP
for malicious code inside.

Check apache mod_security logz.


On May 31, 9:42 am, robert123 <generics...@gmail.com> wrote:
> hi, my website was developed in cakephp, recently it was hacked, and
> it keeps giving the below error message, anyone knows how i can fix
> it, thanks
>
> Missing Controller
>
> Error: 406.shtmlController could not be found.
>
> Error: Create the class 406.shtmlController below in file: app/
> controllers/406.shtml_controller.php
>
> <?php
> class 406.shtmlController extends AppController {
>
>         var $name = '406.shtml';}
>
> ?>

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

How do I get prototype to

Hi

I've a search page which allows users to search through a table of
charities. Each charity has one or more tags attached to it. As a
search alternative I'd like a list of the tags (there are only 20 or
so) with a checkbox for each where if someone checks one or more boxes
then only the charities with those tags appear in the list.

So I've made the list and been advised that I should use
'observerform' call on the page that runs whenever the form is
changed'

I've googled observerform but haven't been able to figure out what
exactly to do since I'm totally new to javascript.

Can anyone give me a bit of a road map on how to do this? I don't get
how to attach the javascript to the form and how to make it call a
function to run the query

I did find http://stackoverflow.com/questions/2417542/how-can-i-implement-a-js-observer-which-will-observe-multiple-fields
which has a bit of javascript which might help but from what I've
learned about cakephp there is probably a much better way of doing
this.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: cakephp hacked

I would make a copy of the application-code and the database as it is running right now. Take the site offline and setup one of your latest backups. Then make a diff on the version you deployed (in case you do not have that consider using a VCS next time) and the code you just saved from your webserver, so you can see what has been modified and analyze the consequences.
Besides that I would suggest that you inform your hoster about the possible attack and ask them to investigate it or, in case you are running non-hosted, patch your production system.

regards,
Jens

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

Re: (PT) Re: compiler written in c or c++ needed

 

I wouldn't bother with that one - it's no longer under current
development, and, thus, is over 6 years out of date.

http://en.wikipedia.org/wiki/Dev-C%2B%2B#Development_status

I'd go for gcc if you're after the C source for a C compiler:
http://gcc.gnu.org/viewcvs/

On Tue, May 31, 2011 at 2:49 PM, M Basharat <basharatazad@gmail.com> wrote:
>  http://bloodshed-dev-c.en.softonic.com/download
>
>
>
> Dev c++ is the best option
>
>
>
>
>
>
>
>
>
> This e-mail and any attachments are for authorized use by the intended
> recipient(s) only. They may contain proprietary material or confidential
> information and/or be subject to legal privilege. They should not be copied,
> disclosed to, or used by any other party. If you have reason to believe that
> you are not one of the intended recipients of this e-mail, please notify the
> sender immediately by reply e-mail and immediately delete this e-mail and
> any of its attachments
>
>
>
> On Tue, May 31, 2011 at 6:21 PM, Richard Bowen <fhp0329@yahoo.com> wrote:
>
>>
>>
>> Can you explain or elaborate on that request?  Compiler for what language?
>>
>>
>> I had to write a compiler (in C) for my Master's project.  This sounds like
>> a school assignment.
>>
>> Richard Bowen
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> To unsubscribe : programmers-town-unsubscribe@yahoogroups.com
>
> Yahoo! Groups Links
>
>
>
>

--
PJH

__._,_.___
Recent Activity:
To unsubscribe : programmers-town-unsubscribe@yahoogroups.com

.

__,_._,___

Re: (PT) Re: compiler written in c or c++ needed

 

http://bloodshed-dev-c.en.softonic.com/download

Dev c++ is the best option

This e-mail and any attachments are for authorized use by the intended
recipient(s) only. They may contain proprietary material or confidential
information and/or be subject to legal privilege. They should not be copied,
disclosed to, or used by any other party. If you have reason to believe that
you are not one of the intended recipients of this e-mail, please notify the
sender immediately by reply e-mail and immediately delete this e-mail and
any of its attachments

On Tue, May 31, 2011 at 6:21 PM, Richard Bowen <fhp0329@yahoo.com> wrote:

>
>
> Can you explain or elaborate on that request? Compiler for what language?
>
>
> I had to write a compiler (in C) for my Master's project. This sounds like
> a school assignment.
>
> Richard Bowen
>
> [Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
To unsubscribe : programmers-town-unsubscribe@yahoogroups.com

.

__,_._,___