Re: cakephp on domains does not work

2014-04-06 Thread John Andersen
Please verify that your Domain name is pointing to the IP you expects.
Try to ping your domain name and see what IP address it shows.
Enjoy, John

On Sunday, 6 April 2014 02:56:14 UTC+3, AugustoA wrote:

 Hi guys,
 I`m having a problem here, when I run the cakephp in my domain name I 
 receive a 404 error message.
 When I do the same call from the IP I get the cakephp to run.
 Does anyone had this kind of problems?

 thanks a lot
 Augusto Arnold


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakephp on domains does not work

2014-04-06 Thread AugustoA
Hi John,
thanks for your reply.
I have joomla installed and it is working. I put the cakephp folder inside 
of the joomla folder and using the ip it works... but when I try the dns it 
fails.
The joomla works normally, it is indeed very strange.
Did you have this kind of problems?
Thanks
Augusto

On Sunday, April 6, 2014 1:49:01 PM UTC+2, John Andersen wrote:

 Please verify that your Domain name is pointing to the IP you expects.
 Try to ping your domain name and see what IP address it shows.
 Enjoy, John

 On Sunday, 6 April 2014 02:56:14 UTC+3, AugustoA wrote:

 Hi guys,
 I`m having a problem here, when I run the cakephp in my domain name I 
 receive a 404 error message.
 When I do the same call from the IP I get the cakephp to run.
 Does anyone had this kind of problems?

 thanks a lot
 Augusto Arnold



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: cakephp on domains does not work

2014-04-06 Thread John Andersen
Hi Augusto
Have never used Joomla, so can probably not help you there. My own setup is 
a fully CakePHP set with one CakePHP folder and several applications, all 
on the same folder level. Hope someone else can help you with the issue.
Enjoy, John

On Sunday, 6 April 2014 18:23:17 UTC+3, AugustoA wrote:

 Hi John,
 thanks for your reply.
 I have joomla installed and it is working. I put the cakephp folder inside 
 of the joomla folder and using the ip it works... but when I try the dns it 
 fails.
 The joomla works normally, it is indeed very strange.
 Did you have this kind of problems?
 Thanks
 Augusto
 [snip]


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Multi-level menu with Modified Preorder Tree Traversal

2014-04-06 Thread Sam Clauw
Hi Marco, thanks 4 your answer too! I realy do appreciate those great 
scripts you're sending to me. But right now, I still got the problem that I 
can't write the essence of a multi-level menu (without recursion) on my own 
;)
Perhaps, you can tell me if / how I can cross my tree-based database table 
and output it in a realy simple ulli list? No active class of whatever, 
but the real essence would help me a lot! :)

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Miles Johnson Uploader saves corrupt (empty) images

2014-04-06 Thread seba
Hi schnauss,

Just checked, and that is exactly what I am getting - the resulting image 
file uploaded to the server consists only of the HTTP PUT request.

On Sunday, 6 April 2014 06:51:29 UTC+10, schnauss wrote:

 What are the contents of the file that gets uploaded?

 I've been having a similar problem. I upload an image, but the resulting 
 file is 900b and consists only of my HTTP PUT request.

 On Friday, April 4, 2014 12:10:51 AM UTC-4, seba wrote:

 I'm using the Miles Johnson Uploader to upload and resize images. I'm 
 finding that images are being uploaded to the correct location and the 
 respective database table column is being updated with the correct path and 
 file name, however, the images that are being saved to the server directory 
 are effectively empty and corrupt (i.e. I upload a 500KB image, that ends 
 up being 6KB in size once uploaded, and when I go to open it, I get the 
 file is corrupt message). 
 Note:  I've removed the resize config temporarily whilst I have this 
 corrupt image issue, hence there's no config below for it.

 I've provided the relevant code snippets below, but any advice to help 
 resolve this issue around why my app's uploading empty/corrupt images is 
 much appreciated.

 *Here is the upload code in my model file:*

 At the top of the model file:

 App::uses('AppModel', 'Model','AttachmentBehavior');

 And the configuration further down the model file:
 public $actsAs = array(
 'Uploader.Attachment' = array(
 'image' = array(
 'prepend' = 'logo-',
 'tempDir' = TMP,
 'uploadDir' = '/full-path-to/app/webroot/img/uploads/',
 'finalPath' = '/img/uploads/',
 'dbColumn' = 'image',
 'overwrite' = true,
 'stopSave' = true,
 'allowEmpty' = true
 )
 ),
 'Uploader.FileValidation' = array(
 'image' = array(
 'extension' = array('gif', 'jpg', 'png', 'jpeg'),
 'type' = array('image'),
 'filesize' = 5242880
 )
 )
 );

 *Here is the code for the image input field only (fyi - the image field 
 is one of many in the form) in the view. I'm using Bootstrap, hence the 
 additional formatting:*

 echo $this-Form-input('image', array(
 'fieldset' = false,
 'label' = false,
  'before' = 'label class=col-sm-2 control-labelImage/labeldiv 
 class=col-sm-9',
  'after' = '/div',
  'class' = 'form-control',
  'type' = 'file',
  'div' = 'form-group',
  'error' = array(
  'attributes' = array(
  'wrap' = 'div', 'class' = 'alert alert-danger'
   )
  )
 )
 ); 


 *Finally, here is the controller code:*

  public function edit($id = null) {
  if (!$this-ModelName-exists($id)) {
 throw new NotFoundException(__('Invalid ModelName'));
 }
 if ($this-request-is(array('post', 'put'))) {
 if ($this-ModelName-save($this-request-data)) {
 $this-Session-setFlash(__('The ModelName has been saved.'), 'default', 
 array('class' = 'alert alert-success'));
 return $this-redirect(array('action' = 'index'));
 } else {
 $this-Session-setFlash(__('The ModelName could not be saved. Please, 
 try again.'), 'default', array('class' = 'alert alert-danger'));
 }
 } else {
 $options = array('conditions' = array('ModelName.' . 
 $this-ModelName-primaryKey = $id));
 $this-request-data = $this-ModelName-find('first', $options);
 }
 }

 Thanks!



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Miles Johnson Uploader saves corrupt (empty) images

2014-04-06 Thread seba
Ok.. think I caught a break. Thanks to schnauss' reminder to check the 
image content, I did a little more digging and found a reminder to include 
the following in the Form-create:

   - 'enctype' = 'multipart/form-data'
   

So resulting form-create looks like:

echo $this-Form-create('ModelName', array('enctype' = 
'multipart/form-data'));


Made the update, and images are being uploaded with content (and there 
might have been a face-palm at some point after this update)!

On Monday, 7 April 2014 11:50:54 UTC+10, seba wrote:

 Hi schnauss,

 Just checked, and that is exactly what I am getting - the resulting image 
 file uploaded to the server consists only of the HTTP PUT request.

 On Sunday, 6 April 2014 06:51:29 UTC+10, schnauss wrote:

 What are the contents of the file that gets uploaded?

 I've been having a similar problem. I upload an image, but the resulting 
 file is 900b and consists only of my HTTP PUT request.

 On Friday, April 4, 2014 12:10:51 AM UTC-4, seba wrote:

 I'm using the Miles Johnson Uploader to upload and resize images. I'm 
 finding that images are being uploaded to the correct location and the 
 respective database table column is being updated with the correct path and 
 file name, however, the images that are being saved to the server directory 
 are effectively empty and corrupt (i.e. I upload a 500KB image, that ends 
 up being 6KB in size once uploaded, and when I go to open it, I get the 
 file is corrupt message). 
 Note:  I've removed the resize config temporarily whilst I have this 
 corrupt image issue, hence there's no config below for it.

 I've provided the relevant code snippets below, but any advice to help 
 resolve this issue around why my app's uploading empty/corrupt images is 
 much appreciated.

 *Here is the upload code in my model file:*

 At the top of the model file:

 App::uses('AppModel', 'Model','AttachmentBehavior');

 And the configuration further down the model file:
 public $actsAs = array(
 'Uploader.Attachment' = array(
 'image' = array(
 'prepend' = 'logo-',
 'tempDir' = TMP,
 'uploadDir' = '/full-path-to/app/webroot/img/uploads/',
 'finalPath' = '/img/uploads/',
 'dbColumn' = 'image',
 'overwrite' = true,
 'stopSave' = true,
 'allowEmpty' = true
 )
 ),
 'Uploader.FileValidation' = array(
 'image' = array(
 'extension' = array('gif', 'jpg', 'png', 'jpeg'),
 'type' = array('image'),
 'filesize' = 5242880
 )
 )
 );

 *Here is the code for the image input field only (fyi - the image field 
 is one of many in the form) in the view. I'm using Bootstrap, hence the 
 additional formatting:*

 echo $this-Form-input('image', array(
 'fieldset' = false,
 'label' = false,
  'before' = 'label class=col-sm-2 control-labelImage/labeldiv 
 class=col-sm-9',
  'after' = '/div',
  'class' = 'form-control',
  'type' = 'file',
  'div' = 'form-group',
  'error' = array(
  'attributes' = array(
  'wrap' = 'div', 'class' = 'alert alert-danger'
   )
  )
 )
 ); 


 *Finally, here is the controller code:*

  public function edit($id = null) {
  if (!$this-ModelName-exists($id)) {
 throw new NotFoundException(__('Invalid ModelName'));
 }
 if ($this-request-is(array('post', 'put'))) {
 if ($this-ModelName-save($this-request-data)) {
 $this-Session-setFlash(__('The ModelName has been saved.'), 'default', 
 array('class' = 'alert alert-success'));
 return $this-redirect(array('action' = 'index'));
 } else {
 $this-Session-setFlash(__('The ModelName could not be saved. Please, 
 try again.'), 'default', array('class' = 'alert alert-danger'));
 }
 } else {
 $options = array('conditions' = array('ModelName.' . 
 $this-ModelName-primaryKey = $id));
 $this-request-data = $this-ModelName-find('first', $options);
 }
 }

 Thanks!



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.