instalasi ci error di hosting


Status
Not open for further replies.

Habib Musyaddat

Beginner 1.0
Dear para master,

saya install codeigniter di hosting, dan masukkan file-file nya (source code).
namun ada error, berikut errornya:

A PHP Error was encountered
Severity: Warning

Message: session_start(): Cannot send session cookie - headers already sent by (output started at /home/goodwayv/public_html/admin/admingvc/application/helpers/time_elapsed_string_helper.php:2)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/goodwayv/public_html/admin/admingvc/index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Warning

Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/goodwayv/public_html/admin/admingvc/application/helpers/time_elapsed_string_helper.php:2)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/goodwayv/public_html/admin/admingvc/index.php
Line: 315
Function: require_once

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/goodwayv/public_html/admin/admingvc/application/helpers/time_elapsed_string_helper.php:2)

Filename: helpers/url_helper.php

Line Number: 564

Backtrace:

File: /home/goodwayv/public_html/admin/admingvc/application/controllers/Welcome.php
Line: 11
Function: redirect

File: /home/goodwayv/public_html/admin/admingvc/index.php
Line: 315
Function: require_once

ini kenapa ya?
mohon pencerahan.
 

Attachments

  • 1.jpg
    1.jpg
    58.3 KB · Views: 5
  • 2.jpg
    2.jpg
    62.6 KB · Views: 3
  • 3.jpg
    3.jpg
    69.5 KB · Views: 3
sudah coba konsultasi dengan provider hostingnya?
 
Coba display errornya dimatiin kalau bisa. Kemungkinan ada output error/warning sebelum proses bikin sesi.
 
coba cek setiap <?php dan akhiran ?> apakah ada awalan dan akhirannya. Biasanya error di ci terjadi lupa awalan dan akhirannya, http header dapat error karena tidak bisa create header serta jangan salah spasi juga bisa menyebabkan error tsb misal lebih spasi sebelum <?php

kemungkinan lain:
1. ada echo printf redirect atau sebagainya
2. ada fungsi yang tidak bisa di jalankan contoh seperti get mac address
3. contoh redirect yang benar
Code:
jika code redirect ini, bisa menyebabkan error
    redirect('site/function1');

coba rubah seperti ini
    $url = 'site/function1';
    echo'
    <script>
    window.location.href = "'.base_url().'index.php?/'.$url.'";
    </script>
    ';
4. coba menginsertkan ob_start(); di index.php
Code:
<?php
ob_start();
/*
 *---------------------------------------------------------------
 * aplikasi kamu
 *---------------------------------------------------------------

coba salah satu saja, jika sudah ok tidak perlu coba yang lain.
 
Status
Not open for further replies.
Back
Top