Welcome Guest, Not a member yet? Register   Sign In
First time GoDaddy and CI user with issues...
#1

[eluser]Unknown[/eluser]
I have a basic site that runs great from my local computer. I put the site up on GoDaddy and am running into issues I've never seen before. In particular, I'm getting an error when I try to update information on a basic form. Which is especially wierd because the update is actually working. I've pasted what I'm seeing below.

Also, in accordance with some advice I've read in the forums, I created a .htaccess file at the root of the GoDaddy directory that looks like this:
Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>

and I've changed some of my default config.php settings to look like this:
Code:
$config['index_page'] = "index.php?";
$config['uri_protocol']    = "QUERY_STRING";
Here are the errors:
Code:
A PHP Error was encountered

Severity: Warning

Message: Missing argument 1 for Front_custom_c::edit_front_custom()

Filename: controllers/front_custom_c.php

Line Number: 23

A PHP Error was encountered

Severity: Warning

Message: Missing argument 2 for Front_custom_c::edit_front_custom()

Filename: controllers/front_custom_c.php

Line Number: 23

A PHP Error was encountered

Severity: Warning

Message: Missing argument 3 for Front_custom_c::edit_front_custom()

Filename: controllers/front_custom_c.php

Line Number: 23

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/content/02/7602902/html/barbershop/system/libraries/Exceptions.php:166)

Filename: helpers/url_helper.php

Line Number: 541
#2

[eluser]Frank Rocco[/eluser]
My values that work for me are:
Code:
$config['index_page'] = "";
$config['uri_protocol']    = "AUTO";
#3

[eluser]Unknown[/eluser]
[quote author="Frank Rocco" date="1300745551"]My values that work for me are:
Code:
$config['index_page'] = "";
$config['uri_protocol']    = "AUTO";
[/quote]


Thanks for the tip, but, I'm still totally stuck. When I changed to $config['index_page'] = ""; everything stopped working.

I'm going to provide some more details...

My Form
Code:
foreach ($front_cust->result() as $f)
            {
            echo form_open('front_custom_c/edit_front_custom');?&gt;
            &lt;?php echo form_hidden('id',set_value('id',$f->id));?&gt;
            <fieldset class="fieldset">
                <legend>Edit Custom Front Area</legend>
                <label for="Title">Title</label>
                &lt;input type="text" name="title" size="40" value='&lt;?php echo $f-&gt;title?&gt;'/> <br/>
                <label for="Description">Description</label>
                &lt;TEXTAREA Name="description" rows="5" cols="50"&gt;&lt;?php echo $f->description?&gt;&lt;/TEXTAREA&gt;&lt;br/>
                 <label for="">&nbsp;</label>
                 &lt;input type="submit" value="Submit" class="button"/&gt;
                &lt;?php echo form_close();
            }
    }

My Controller Function
Code:
function edit_front_custom($id,$title,$description)
    {
        $id = $this->input->post('id');
        $title = $this->input->post('title');
        $description = $this->input->post('description');
        //$description = nl2br($this->input->post('description'));
           $this->load->model('barber_model','',TRUE);
        echo $id;
        echo $title;
        echo $description;
        $this->barber_model->edit_front_custom($id,$title,$description);
        redirect('welcome');
    }

My Model
Code:
function edit_front_custom($id,$title,$description)
    {
        $data = array(
               'title' => $title,
               'description' => $description,);
  
        $this->db->where('id', $id);
        $this->db->update('front_custom', $data);    
    }

Also, not sure that it matters but this project includes Ion Auth.

Again, I'm getting errors on submit but the data is updating. I'm really stuck and am getting frustrated fast.
#4

[eluser]wh1tel1te[/eluser]
It looks like you have error suppression turned on on your local computer, which will hide PHP warning messages, which gives the appearance that everything is working fine. When you upload to GoDaddy, they have errors displaying (error suppression is turned off).

Try going through the errors one at a time and fixing them up. For example, the first one:

Code:
A PHP Error was encountered
Severity: Warning
Message: Missing argument 1 for Front_custom_c::edit_front_custom()
Filename: controllers/front_custom_c.php
Line Number: 23

This tells me that on line 23 of controllers/front_custom_c.php, it requires a parameter to be passed into the edit_front_custom() method. However, PHP is complaining that no parameter is being passed in. Try either passing a parameter into this method, or setting a default value for the parameter.




Theme © iAndrew 2016 - Forum software by © MyBB