AbanteCart Community

AbanteCart Development => Development Help Needed => Topic started by: yonghan on March 21, 2016, 07:20:22 AM

Title: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 21, 2016, 07:20:22 AM
Hi admins,

I'm trying to use the upgrade my extension and I use both upgrade.sql and upgrade.php. I got this warning

2016-03-21 11:27:29 - warning:  AbanteCart core v.1.2.6 Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\testing\t126\extensions\xxx\upgrade.sql:36) in <b>C:\xampp\htdocs\testing\t126\core\engine\controller.php</b> on line <b>214</b>

I attach the upgrade process screenshot here. Did I missed something in the process? And is it possible to create a new table via upgrade.php? I tried that before but the table aren't created.Thanks
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: abolabo on March 21, 2016, 08:11:56 AM
please check is output buffering enabled on your testcase. See http://php.net/manual/en/outcontrol.configuration.php for details
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 21, 2016, 08:38:56 AM
I'll check it and will post again whether i succeed or not. Thanks abolabo
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 21, 2016, 08:46:23 AM
Ouutput buffering is enabled in my testcase.
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: abolabo on March 21, 2016, 11:19:44 AM
what about table prefix?
i see that you try to upgrade with prefix "ac_".
is your's the same?
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 21, 2016, 12:35:17 PM
I'm using the ac_ prefix.
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: abolabo on March 21, 2016, 05:05:56 PM
please describe what you did, i mean manual upgrade, step-by-step..
Still do not understand how you do this..
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 22, 2016, 12:07:41 AM
I want to make an upgrade routine for my extension that involves sql queries and some php routines. This is what i have in my extension config file:

Code: [Select]
<upgrade>
        <sql>upgrade.sql</sql>
<trigger>upgrade.php</trigger>
    </upgrade>
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: abolabo on March 24, 2016, 01:05:08 PM
i guess you have a sql error.
Please check your compounded sql in sql editor like a Mysql Workbench (or phpMyAdmin)
Title: Re: AbanteCart core v.1.2.6 Cannot modify header information-headers already sent
Post by: yonghan on March 25, 2016, 12:33:38 PM
I will recheck my sql queries again. Thanks abolabo.