Sunday, May 31, 2009

I want to upgrade my cakephp to the newest version

Hi,

I want to upgrade my cakephp to the newest version, I only change the folder of 
cake_1.2.1.8004\cake_1.2.1.8004\cake

Is it the succeed for the upgrade?

every one how to upgrade?

Thank you very much

rimoe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

[OneStopPHP] How i can get ip address ? - PHP Interview Questions



HTML clipboard


Cool Interview


INTERVIEW QUESTIONS

 
Download Free eBook Download Free Interview Questions eBook of 500 Questions

(If you do not have a Yahoo! account, you can get it by simply sending a blank email to CoolInterview-Subscribe@yahoogroups.com and confirm the verification email received. Once your email is confirmed, we will instantly send the download link to you.)

PHP Interview Questions

 


Bring your gang together. Do your thing. Find your favourite Yahoo! Group.

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Groups

Cat Owners Group

Join a community

for cat lovers

Find helpful tips

for Moderators

on the Yahoo!

Groups team blog.

Yahoo! Green

Make It Green

Submit ideas to

better our planet

.

__,_._,___

Why Am I Getting Duplicate Records For My CakePHP View Display

Hi:
I need somebody to help fix a problem of duplicate (even
triplicate) rows for the same record (with same unique ID) from my
table - in my cakephp view displays.

I know the problem is definitely coming from Cake because I can
confirm that the mysql tables don't have the repeated records. Could
it be a pagination bug that I don't know of? here's the code from my
'index' controller and view:

FROM index CONTROLLER:
-----------------------------
function index() {
$this->Jurisdiction->recursive = 0;
$this->set('jurisdictions', $this->paginate());
}


FROM index VIEW
-----------------------------
<div class="jurisdictions index">
<h2><?php __('Jurisdictions');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out
of %count% total, starting on record %start%, ending on %end%', true)
));
?></p>
<div class="actions">
<ul>
<li><?php echo $html->link(__('New Jurisdiction', true), array
('action'=>'add')); ?></li>
</ul>
</div>
<table cellpadding="0" cellspacing="0">
<tr>
<th><?php echo $paginator->sort('id');?></th>
<th><?php echo $paginator->sort('name');?></th>
<th><?php echo $paginator->sort('city');?></th>
<th><?php echo $paginator->sort('region');?></th>
<th><?php echo $paginator->sort('description');?></th>
<th><?php echo $paginator->sort('auth_level');?></th>
<th><?php echo $paginator->sort('contact_id');?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
<?php
$i = 0;
foreach ($jurisdictions as $jurisdiction):
$class = null;
$class = ( ($i % 2) ? " class='altrow'": '' );
$i++;
//if ($i++ % 2 == 0) {
// $class = ' class="altrow"';
//}
?>


Any help would be much appreciated.

-sdarko

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Saving a page automatically ...

Thanks a lot for your answer, I am going to study it to see what I can
do, very generous, I truly appreciate it.


On May 30, 10:48 pm, Teh Treag <tehtr...@gmail.com> wrote:
> thesaint704,
>
> I have an application that generates monthly graphs.  In my view that
> generates the graph (graph.ctp), I cache the results.  Subsequent
> calls will get the image from cache.  What I have in the views, is
> something like this.
>
> view.ctp:
> ----------
> <img src='<?php echo Router::url(array(
>      'controller'=>'adsense',
>      'action'=>'graph',
>      'month'=>$month,
>      'year'=>$year,
>     )); ?>' />
>
> in the graph action, data is fetched, and an image is generated in the
> view.  If an image was recently created, it will be used instead of
> producing another one.
> graph.ctp:
> ----------
> $cacheKey='chart_graph_'.base64_encode(serialize(compact
> ('month','year')));
> $image=base64_decode(Cache::read($cacheKey));
> if(!$image){
>     ob_start();
>     require_once 'Image/Graph.php';
>     //
>     // Make the image
>     //
>     $image = ob_get_contents();
>     ob_end_clean();
>     Cache::write($cacheKey,base64_encode($image),"+1 day");}
>
> echo $image;
>
> I hope this helps at some level or another.
>
> -teh
>
> On May 30, 11:43 am, "thesaint...@googlemail.com"
>
>
>
> <thesaint...@googlemail.com> wrote:
> > I have a php script that produces a final product with a png image
> > plus interpretation and other calculations, is there any way that at
> > the same time that produces de final page also would produce a copy
> > and save it in my server, for example in a folder "customers/"?
>
> > Thank you very much for your help.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: PHP array for use in javascript

Hi Céryl,

This was very useful for me as I'm trying to use flot as well.

I did something similar by first trying to build up an array of tuples
and then used the $javascript->object() function which produces a JSON
array which is perfect input for flot e.g.

foreach($data as $key => $val){
$flot_data[] = array( $key, $val ); //append onto flot_data array
}
$output = $javascript->object($flot_data);

Cheers,

Ian


On May 18, 9:34 pm, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
> Worked almost a charm... Still, I ended up writing a this codeblock to
> manually make-up the output the way I want it:
>
> $i=0;
> $output = "[";
> foreach($data as $key=>$val){
>         if ($i != 0) {$output .= ", ";}
>
>         $output .= "[".$key.", ".$val."]";
>         $i++;}
>
> $output .= "]";
> echo $output;
>
> It makes thearraylook like the string [[x,y],[x,y]...[x,y]] whith
> which I used Codeblock to generate the javaCode. Thanks all!
>
> On 18 mei, 19:08, brian <bally.z...@gmail.com> wrote:
>
> > You couldusethe JavascriptHelper to create thearray, or any other
> > block of JS code.
>
> > On Mon, May 18, 2009 at 12:10 PM, Céryl <c.a.h.wilt...@student.tue.nl> wrote:
>
> > > Hej all!
>
> > > I've been trying to find a solution for this, and maybe I'm
> > > approaching it wrong. This is the case:
>
> > > For my site I need make graphs out of data in a table. I have picked
> > > JQuery FLOT for making the graphs. However, FLOT needs data in a
> > > jQueryarraybuild like:
>
> > > [[xaxis, yaxis]
> > > [xaxis, yaxis]
> > > [xaxis, yaxis]];
>
> > > and then calls the plot graph function in FLOT to build it. These
> > > functions (With thearraycurrently hardcoded) are in my project in a
> > > seperate .js file I load in my view.
>
> > > However, When I get into my controller and get the relevant data, and
> > > pass it to the view using Cake's Set, how can I get that (PHP)array
> > > converted and passed to thejavascript(.js file) that builds the
> > > graph?
>
> > > Has anybody any expierience or idea's with this? And if there are
> > > graphing libraries that allow for on-the-fly graphs from a database,
> > > that work better with Cake, please tell me! Now it's not to late to
> > > switch!
>
> > > Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

[php-gurus] *** HOT INDIAN WOMEN STRIPPING N SHOWING HAIRY PUSSY ***


Re: Not able to save HTML tags to mysql database.

maybe because you sanitize input ?
http://book.cakephp.org/view/462/html

--
pietro

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Problem Uploading Flash

MeioUpload is made for images..

If you have modified it, to handle all kinds of files, check to see if
you can upload other kind of files.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Persistent model to true -> Fatal error

Hi all,

when i activate persistent model to true in my application, it breaks
my models, I'm getting the following fatal errors:

Fatal error: PhotosController::index() [<a href='http://php.net/
photoscontroller.index'>photoscontroller.index</a>]: The script tried
to execute a method or access a property of an incomplete object.
Please ensure that the class definition &quot;Albuns&quot; of the
object you are trying to operate on was loaded _before_ unserialize()
gets called or provide a __autoload() function to load the class
definition in /Volumes/Data/paulogomes/www/pg/controllers/
photos_controller.php on line 32
---
Fatal error: BehaviorCollection::trigger() [<a href='http://php.net/
behaviorcollection.trigger'>behaviorcollection.trigger</a>]: The
script tried to execute a method or access a property of an incomplete
object. Please ensure that the class definition
&quot;ExtendAssociationsBehavior&quot; of the object you are trying to
operate on was loaded _before_ unserialize() gets called or provide a
__autoload() function to load the class definition in /Volumes/Data/
paulogomes/www/cake/libs/model/behavior.php on line 456
---
Fatal error: ResourcesController::index() [<a href='http://php.net/
resourcescontroller.index'>resourcescontroller.index</a>]: The script
tried to execute a method or access a property of an incomplete
object. Please ensure that the class definition &quot;Types&quot; of
the object you are trying to operate on was loaded _before_ unserialize
() gets called or provide a __autoload() function to load the class
definition in /Volumes/Data/paulogomes/www/pg/controllers/
resources_controller.php on line 29

the error only occurs on second call of controller, after persistent
cache files created on tmp.
I'm using cakephp 1.2 running on leopard with php 5.2.6.


Any ideas?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Not able to save HTML tags to mysql database.

Hi,

I have form where the site admin create articles.
While creating the article for links he is using <a href="http://
google.com">google</a> , But this is not getting saved in my database.

When i click on save, it is not throwing any error also.
Normal text is getting saved.
database filed's type is "TEXT" in mysql db.

Please let me know what needs to be done for this

Thanks & Regards
Sridhar k N
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: [phpXperts] Re: How to disable right mouse click in Opera browser?



A Java applet or flash can be used only to show email address. It can
be extracted too. But will be little bit harder.

--
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা অনেক ভাল
Sent from Dhaka, Bangladesh

__._,_.___
Visit phpXperts website at www.phpxperts.net
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Need traffic?

Drive customers

With search ads

on Yahoo!

Yahoo! Groups

Auto Enthusiast Zone

Passionate about cars?

Check out the Auto Enthusiast Zone.

.

__,_._,___

Re: [php-objects] movie to flash conversion



Use mencoder

Il giorno 31/mag/09, alle ore 21:30, Reji Jayan <for_rejijayan@yahoo.co.uk
> ha scritto:

>
>
> Hello All,
>
> I am in need to convert movie files to flash (for a flash player in
> my site) .
>
> I searched for convertors but all which i found were trial versions,
> could you please help me to locate a free version,
>
> or any other methods to convert those . .
>
> Thanks in advance..
>
> Reji.
>
> Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>

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

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

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

[php-objects] movie to flash conversion



Hello All,
 
I am in need to convert movie files to flash (for a flash player in my site) .
 
I searched for convertors but all which i found were trial versions, could you please help me to locate a free version,
 
or any other methods to convert those  . .
 
Thanks in advance..
 
Reji.

Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com

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

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

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Re: [phpXperts] Re: How to disable right mouse click in Opera browser?

Recent Activity
Visit Your Group
Give Back

Yahoo! for Good

Get inspired

by a good cause.

Y! Toolbar

Get it Free!

easy 1-click access

to your groups.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

Re: CakePHP & jQuery - Update multiple selects?

If you want to use code like you had before, check the livequery
plugin. It reattached applicable events as new elements are added to
the DOM (ie. Your change event to a new select box)

On May 30, 2:47 pm, DigitalDude <e.blumsten...@googlemail.com> wrote:
> Hey,
>
> THX for the response. I already changed my approach to the problem and
> set up ID's for the elements and use .append to replace the options of
> the elements. This works just finde, i encode my results to JSON and
> jQuery rebuilds the list oft options for my selects the way it should.
>
> A question related to jQuery in general, are there any good sites or
> tutorials or what I would call a function-overview for such purposes?
> This would be great because it took a LOT of time to gather all
> required information to my topic before I could solve it.
>
> Regards
>
> On 30 Mai, 18:43, brian <bally.z...@gmail.com> wrote:
>
> > This is solely due to jQuery (in fact, probably the source of most
> > questions on its mailing list).
>
> > The problem is that you're completely replacing each of the selects,
> > rather than just the options. So, the event handlers you set up on the
> > selects are no longer once the selects have been replaced. See here:
>
> >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> > Also, it doesn't appear that you have several sets of these 5 selects
> > on a page because you're setting the event handlers using the element
> > IDs (eg. '#BookingCountryId'). So, you might want to consider using an
> > element id, rather than a class (eg. '.ajax_shop_id'), for the target
> > to be updated.
>
> > Or, don't bother and let jQuery find it using the select element itself:
>
> > $('.ajax_page #BookingCountryId').change(function(){
> >         var self = this;
> >         var selected = $(this).val();
> >         ajax_loading_image('.ajax_loading_image');
>
> >         $.ajax({
> >                 type: "POST",
> >                 url: '/bookings/getLocations',
> >                 data: "ajax=true&id="+selected,
> >                 success: function(msg){
> >                         $(self).parent('div').html(msg);
> >                         ajax_remove_loading_image('.ajax_loading_image');
> >                 }
> >         });
>
> > });
>
> > However, I recommend that you simply replace the options rather than
> > the entire select element.
>
> > On Sat, May 30, 2009 at 9:06 AM, DigitalDude
>
> > <e.blumsten...@googlemail.com> wrote:
>
> > > Hi,
>
> > > I'm trying to deal with jQuery in CakePHP and basically I want to do
> > > the following:
>
> > > I have 5 select-boxes in which the user should chose some values, and
> > > when a value changes the other selects should be updated with the
> > > corresponding data.
> > > I figured out how to update selects, that's not a big problem and it
> > > works fine. But when I chose a value from a select box that has been
> > > populated with jQuery, the change(function()) in my jQuery script does
> > > not register the changing of the value, even though the div-id's are
> > > set correct.
> > > The part of my js-script where the second selectbox should be checked
> > > for changed calues is not triggered, I tried many combinations of the
> > > element-id but it won't start any function in that part.
>
> > > Here's what I'm dealing with:
> > > ----------------------------------------------------------------
> > > Main-View:
> > > ----------------------------------------------------------------
> > > <?php echo $form->create('Booking',array('class'=>'ajax_page'));?>
> > >        <fieldset>
> > >                <legend>Ajax Test 1.2</legend>
> > >                <div class="ajax_loading_image"></div>
> > >                <?php
> > >                echo $form->input('country_id',array(
> > >                        'label'=>'Country',
> > >            'empty' => 'Choose country'
> > >                ));
> > >        echo $form->input('location_id',array(
> > >                        'label'=>'Location',
> > >                        'type' => 'select',
> > >            'empty' => 'Choose location',
> > >            'div'=>'input select ajax_location_id'
> > >        ));
> > >                echo $form->input('shop_id',array(
> > >                        'label'=>'Shop',
> > >                        'type' => 'select',
> > >            'empty' => 'Choose shop',
> > >                        'div'=>'input select ajax_shop_id'
> > >                ));
> > >        ?>
> > > <?php echo $form->end();?>
>
> > > ----------------------------------------------------------------
> > > The controller- part(s):
> > > ----------------------------------------------------------------
> > >    function getLocations() {
> > >        $country_id = $this->params['form']['id'];
> > >        $locations = array();
> > >        $this->layout = null;
>
> > >        if($country_id > 0) {
> > >            $locations = $this->Booking->Shop->Location->find('list',
> > > array(
> > >                'contain' => array('Country'),
> > >                'conditions' => array(
> > >                    'Location.country_id' => $country_id
> > >            )));
> > >        }
> > >        $this->set(compact('locations'));
> > >    }
>
> > >    function getActiveShops() {
> > >        $location_id = $this->params['form']['id'];
> > >        $shops = array();
> > >        $this->layout = null;
>
> > >        if($location_id > 0) {
> > >            $shops = $this->Booking->Shop->find('list', array(
> > >                'contain' => array('Location'),
> > >                'conditions' => array(
> > >                    'Shop.location_id' => $location_id
> > >            )));
> > >        }
> > >        $this->set(compact('shops'));
> > >    }
> > > ----------------------------------------------------------------
> > > The jQuery-script:
> > > ----------------------------------------------------------------
> > > $(document).ready(function() {
> > > $('.ajax_page #BookingCountryId').change(function(){
> > >        alert("Test!");
> > >    // selected value
> > >        var selected = $(this).val();
>
> > >        // set loading image
> > >        ajax_loading_image('.ajax_loading_image');
> > >        // ajax
> > >        $.ajax({
> > >                type: "POST",
> > >                url: '/bookings/getLocations',
> > >                data: "ajax=true&id="+selected,
> > >                success: function(msg){
> > >                        //console.log(msg);
> > >                        $('.ajax_location_id').html(msg);
> > >                        // remove loading image
> > >                        ajax_remove_loading_image('.ajax_loading_image');
> > >                }
> > >        });
> > > });
> > > $('.ajax_page #BookingLocationId').change(function(){
> > >        alert("Test!");
> > >    // selected value
> > >        var selected = $(this).val();
>
> > >        // set loading image
> > >        ajax_loading_image('.ajax_loading_image');
> > >        // ajax
> > >        $.ajax({
> > >                type: "POST",
> > >                url: '/bookings/getActiveShops',
> > >                data: "ajax=true&id="+selected,
> > >                success: function(msg){
> > >                        //console.log(msg);
> > >                        $('.ajax_shop_id').html(msg);
> > >                        // remove loading image
> > >                        ajax_remove_loading_image('.ajax_loading_image');
> > >                }
> > >        });
> > > });
> > > });
> > > ----------------------------------------------------------------
>
> > > The views of the controller action which should replace the "old"
> > > select-elements:
> > > ----------------------------------------------------------------
> > > (*** function getLocations() ***)
> > > ----------------------------------------------------------------
> > > <?php
> > > if(!empty($locations)) {
> > >        echo $form->input('Booking.location_id',array(
> > >                        'label'=>'Location',
> > >                        'type' => 'select',
> > >            'options' => $locations,
> > >            'empty' => 'Choose location',
> > >            'div' => false,
> > >            'name' => 'data[Booking][location_id]'
> > >        ));
> > > }
> > > ?>
> > > ----------------------------------------------------------------
> > > (*** function getLocations() ***)
> > > ----------------------------------------------------------------
> > > <?php
> > > if(!empty($shops)) {
> > >        echo $form->input('shop_id',array(
> > >                        'label'=>'Shop',
> > >                        'type' => 'select',
> > >            'options' => $shops,
> > >            'empty' => 'Choose shop',
> > >            'div' => false,
> > >            'name' => 'data[Booking][shop_id]'
> > >        ));
> > > }
> > > ?>
>
> > > The first part where I chose a country and populate the second select-
> > > box with the corresponding locations works fine and I get all the
> > > right results. But when I select a location it does NOT trigger the
> > > second function of the jQuery script and that gives me a headache!
>
> > > What is the magic mistake in my code or my thinking? Please help me,
> > > I'm stuck on this for days now and I can't figure out why this
> > > aaproach does not work correct :(

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---