AbanteCart Community

eCommerce construction => Installation and Configuration => Topic started by: nigelt on December 21, 2016, 08:16:48 AM

Title: Fresh installtion getting cannot modify headers after ticking accept license
Post by: nigelt on December 21, 2016, 08:16:48 AM
Hi Folks
I'm trying to install abantecart to my hosting server (vidahost).
I get the main screen displayed, where I have to tick to accept the license condition and click continue, but when I do, the screen stays blank.
I've looked in errors.txt and all that in there is a warning that....
AbanteCart core v.1.2 cannot modify header information - headers already sent by (output started ..... public_html/abantecart/system.config.php:2) in ..... public_html/abantecart/core./helper/utils.php on line 1198

line 1198 of utils.php says ..
1196 function redirect($url){
1197   if(!$url){ return false; }
1198   header('Location: ' . str_replace('&', '&', $url));
1199   exit;

Anyone got any pointers ?
I've read up on the problem and there are a lot of replies about checking for whitespace, but I've already installed this on my localhost (uniserver) without any problems, so really am at a loss to understand why its not working with vidahost.
Thanks

...ok update !
After searching online I added ob_start(); to core/helper/utils.php
The installation completed without a problem...I expected to see some output error message, but nothing !
Just to make sure I hadnt messed up, I took out the ob_start line, tried to install and again.. blank page with the complaint about headers.
Put ob_start back in again, installs fine without issue.
Now I am totally confused !

Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: eCommerce Core on December 22, 2016, 08:19:45 AM
The error that you get indicates that some file have extra line or character before <?php

Make sure that you did not unintentionally added that.

Check file public_html/abantecart/system/config.php and public_html/abantecart/core./helper/utils.php
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: nigelt on December 22, 2016, 02:47:57 PM
The error that you get indicates that some file have extra line or character before <?php
Yes, what I read all over google, but if that IS the case, its come from the AbanteCart coders as its a pure install, untouched by myself.
As I said, it installs with no issues at all, when I install it to my locahost. It's only a problem when installing to my web host.
Wonder if something is handled differently when installing locally (uniserver windows).
Strange...
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: Basara on December 23, 2016, 12:17:06 AM
How do you upload AbanteCart installation to your server? FTP, cpanel or softaculous installation?
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: nigelt on December 23, 2016, 07:38:05 AM
How do you upload AbanteCart installation to your server? FTP, cpanel or softaculous installation?
Hi
I do it via ftp. I send the stock zip file up using filezilla /binary and then uncompress on the host.... are you thinking that maybe ftp is substituting the odd character ?
Cheers
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: Basara on December 23, 2016, 08:51:59 AM
No if you send zip it should not change any file inside archive.
Maybe issue related to some unarchive process or server type, module etc..
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: Basara on December 23, 2016, 08:57:39 AM
If you have Softaculous or Installeron in your Cpanel you may try automatic installation
http://docs.abantecart.com/pages/install/options/click_installation.html
Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: nigelt on December 27, 2016, 12:28:00 PM
If you have Softaculous or Installeron ....
Unfortunately Vidahost dont have Abantecart... would make life a lot easier.

BUT.... I'm progressing....
I've noticed that before the install, system/config.php is empty apart from a line feed on line 1, when it gets to the blank screen page and has plonked the "cannot create headers" message into errors.txt, system/config.php contains 2 lines... the original and a 2nd blank line.
So I'm now on the hunt for where config.php is populated during the install process.
Me and my best pal "grep" are going to be busy for a while :-)

Title: Re: Fresh installtion getting cannot modify headers after ticking accept license
Post by: BGM on February 26, 2017, 10:37:36 PM
old post i know.. but where do you add the ob_start();  because im experiencing the same issue.