Welcome Guest, Not a member yet? Register   Sign In
WAMP crashes
#1

[eluser]stuffradio[/eluser]
I have some code that's supposed to insert data in to a database. When I go to a specific part of the page, it crashes WAMP in Vista. Everywhere else is fine.

I get status 255 in Apache, any ideas what this is about? Is it a codeIgniter bug?
#2

[eluser]Derek Allard[/eluser]
stuffradio. There's not enough information here to diagnose. Could you provide more info?
#3

[eluser]stuffradio[/eluser]
I'm doing a comment script. When I submit the form to insert a comment, WAMP stops responding. It only happens on this specific page.

The form
Code:
<?php
echo form_open('picture/comment');
echo form_textarea('comment');
echo '<br />';
echo form_hidden('photo_id', $image_id);
echo form_submit('submitit', 'Submit comment!');
echo form_close();
?&gt;

Controller
Code:
function comment()
  {
    $this->comments->photo_id = $this->input->post('photo_id', true);
    $this->comments->poster = $this->session->userdata('logged_in');
    $this->comments->comment = $this->input->post('comment', True);
    $this->comments->insert();
    redirect('/picture/id/'.$this->input->post('photo_id'));
  }

Model
Code:
&lt;?php

class Comments extends Model
{
var $photo_id;
var $poster;
var $comment;
var $posted;


  function Comments()
  {
    parent::Model();
  }

  function insert()
  {
    if ($this->photo_id)
    {
      $content = array(
                 'photo_id' => $this->photo_id,
                 'poster' => $this->poster,
                 'comment' => $this->comment,
                 'posted' => $this->posted);
      $this->insert('pb_comments', $content);
    }
  }
  
}
#4

[eluser]stuffradio[/eluser]
Wow!!!!!!! I spent hours on this, I just noticed that I forgot to add something on the part where I was trying to insert.

Ugh, topic solved haha. Still, can you figure out why it crashes instead of giving me an error? Is this a bug?




Theme © iAndrew 2016 - Forum software by © MyBB