Zen Cart Logo
Forums / General Questions / Error on line 44 (functions_general.php)

Error on line 44 (functions_general.php)

Locked

Views: 7,564

Results 1 to 20 of 23
This thread is locked. New replies are disabled.
25 Feb 2007, 8:04 AM
#1
john9 avatar

john9

New Zenner

Join Date:
Feb 2007
Posts:
40
Plugin Contributions:
0

Error on line 44 (functions_general.php)

Warning: Cannot modify header information - headers already sent by (output started at /home/cilver/public_html/shop/includes/languages/english/index.php:117) in /home/cilver/public_html/shop/includes/functions/functions_general.php on line 44Thats what it says and I have no idea what happened...

I attatched my functions_general.php file to this thread (its a zip and inside the zip is the file)

25 Feb 2007, 11:21 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

The problem is not actually in the functions_general file, but in your includes/languages/english/index.php file. If you take a look, I suspect that you will find that all the lines have been double spaced. Most importantly a new blank line has been added after the very last one.

There should be nothing after the ?> at the end. Position your cursor immediately afterwards and hit delete a few times. Then save and upload the resulting file.

How did this happen. Hopefully, you'll know what you did that might have caused this. I'd take a long hard look at your text editor.

25 Feb 2007, 6:23 PM
#3
john9 avatar

john9

New Zenner

Join Date:
Feb 2007
Posts:
40
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

I just replaced the english/index.php with the back up on and it works now, thanks.

3 Sep 2009, 5:49 AM
#4
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

kuroi:

The problem is not actually in the functions_general file, but in your includes/languages/english/index.php file. If you take a look, I suspect that you will find that all the lines have been double spaced. Most importantly a new blank line has been added after the very last one.

There should be nothing after the ?> at the end. Position your cursor immediately afterwards and hit delete a few times. Then save and upload the resulting file.

How did this happen. Hopefully, you'll know what you did that might have caused this. I'd take a long hard look at your text editor.

Hi,what happend it always display "
Warning: Cannot modify header information - headers already sent by (output started at /includes/languages/schinese/meta_tags.php:1) in*/includes/functions/functions_general.php on line 44
"
and as you said the index.php.no any blank after ?> .
Help me please

3 Sep 2009, 2:16 PM
#5
hhstudio avatar

hhstudio

New Zenner

Join Date:
Aug 2009
Posts:
31
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

If you are still having the problem try this I have worked on the file if it still gives you problems let me know I will be more than happy to look at your site and help you fix the problem.

3 Sep 2009, 3:22 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

gueston:

Hi,what happend it always display "
Warning: Cannot modify header information - headers already sent by (output started at /includes/languages/schinese/meta_tags.php:1) in*/includes/functions/functions_general.php on line 44
"
and as you said the index.php.no any blank after ?> .
Help me pleaseYour error is different to the one I responded to earlier in the post. If you re-read it it refers to a problem on line 1 of your includes/languages/schinese/meta_tags.php file.

This type of error usually occurs because the first character of the file has gotten lost. The file should start > <?php

3 Sep 2009, 3:26 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

hhstudio:

If you are still having the problem try this I have worked on the file if it still gives you problems let me know I will be more than happy to look at your site and help you fix the problem.New help is much appreciated in this forum. However, please do read the rest of the thread first.

In this case, I have already explained that these types of problem are **not **with the function_general file. That's merely where the problem is spotted.

Also the file that you attached to your post is based on an old version of Zen Cart and is missing a number of important updates that have happened since that release and could cause problems for people using more up-to-date versions.

6 Sep 2009, 6:19 AM
#8
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

kuroi:

Your error is different to the one I responded to earlier in the post. If you re-read it it refers to a problem on line 1 of your includes/languages/schinese/meta_tags.php file.

This type of error usually occurs because the first character of the file has gotten lost. The file should start

But i sure the meta_tags file is right.
But the site have so many eeror now.As the home page,always display
Notice: Constant ABSPATH already defined in /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php on line 21

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php:21) in /home/content/l/i/q/liqinghua/html/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php:21) in /home/content/l/i/q/liqinghua/html/includes/init_includes/init_templates.php on line 78

and the products detail page always can't display products detail information.as: http://cbwp.us/tote-p-2.html

6 Sep 2009, 6:23 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Error on line 44 (functions_general.php)

gueston:

But i sure the meta_tags file is right.
But the site have so many eeror now.As the home page,always display
Notice: Constant ABSPATH already defined in /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php on line 21

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php:21) in /home/content/l/i/q/liqinghua/html/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/wordpress/wp-config.php:21) in /home/content/l/i/q/liqinghua/html/includes/init_includes/init_templates.php on line 78

and the products detail page always can't display products detail information.as: http://cbwp.us/tote-p-2.html
Those are wordpress issues, not Zen Cart.

6 Sep 2009, 8:00 AM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

DrByte is right. this problem originates with your wordpress configuration file. But it's not a serious one which is why you only receive a "notice" and may be absolutely normal for Wordpress.

However, because you have strict error reporting on, the reporting of this minor event prevents PHP from creating the session the Zen Cart needs.

If you suppress display of notices, I suspect that you'll find that this problem goes away.

6 Sep 2009, 1:51 PM
#11
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

kuroi:

DrByte is right. this problem originates with your wordpress configuration file. But it's not a serious one which is why you only receive a "notice" and may be absolutely normal for Wordpress.

However, because you have strict error reporting on, the reporting of this minor event prevents PHP from creating the session the Zen Cart needs.

If you suppress display of notices, I suspect that you'll find that this problem goes away.

wow,ok,thanks your reply,but the products information can't display,is it have problem with wordpress?not zen cart?

6 Sep 2009, 1:59 PM
#12
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

Nobody's going to force you to believe us - though your error messages seem pretty clear.

The problem is that the combination of that notice about your wordpress config file, and your having very strict error reporting enabled, means that PHP won't let the Zen Cart code execute properly.

6 Sep 2009, 2:04 PM
#13
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

Ok,don't angry please,Maybe because my english is poor,so can't use exact word.thanks again

8 Sep 2009, 1:19 AM
#14
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

DrByte:

Those are wordpress issues, not Zen Cart.

Hi
I think the wordpress work fine now,but the chinese zen cart have issues . and when i use original meta_tags.php replace the chinese meta_tags.php,then it work fine. and after i use my own title keywords and description,then it always have error.
the http://cbwp.us/?language=gb&main_page=index display Warning first time,but after i refurbish the IE,then it only display the first warning.

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/includes/languages/schinese/meta_tags.php:1) in /home/content/l/i/q/liqinghua/html/includes/init_includes/init_templates.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/includes/languages/schinese/meta_tags.php:1) in /home/content/l/i/q/liqinghua/html/includes/functions/functions_general.php on line 44

I'm jackeroo
help me please

8 Sep 2009, 5:58 PM
#15
amilouwho avatar

amilouwho

New Zenner

Join Date:
Sep 2009
Posts:
7
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

I have a similar issue! Any help would be wonderful.

https://www.evaskye.com

My error:

[08-Sep-2009 13:49:37] PHP Warning: Cannot modify header information - headers already sent by (output started at /hermes/web08/b750/moo.amylemon/store/includes/languages/english/extra_definitions/blank_sidebox_defines.php:216) in /hermes/web08/b750/moo.amylemon/store/includes/functions/functions_general.php on line 44

8 Sep 2009, 6:17 PM
#16
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

gueston:

Hi
I think the wordpress work fine now,but the chinese zen cart have issues . and when i use original meta_tags.php replace the chinese meta_tags.php,then it work fine. and after i use my own title keywords and description,then it always have error.
the http://cbwp.us/?language=gb&main_page=index display Warning first time,but after i refurbish the IE,then it only display the first warning.

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/includes/languages/schinese/meta_tags.php:1) in /home/content/l/i/q/liqinghua/html/includes/init_includes/init_templates.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/i/q/liqinghua/html/includes/languages/schinese/meta_tags.php:1) in /home/content/l/i/q/liqinghua/html/includes/functions/functions_general.php on line 44

I'm jackeroo
help me pleaseThis is a UTF-8 encoding issue in your Chinese meta tags file. Post 4 of >> this thread explains the "BOM". You need to save the file without it.

8 Sep 2009, 6:28 PM
#17
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

amilouwho:

I have a similar issue! Any help would be wonderful.Your problem is that you balnk side box definitions file is trying to output content instead of just defining it.

9 Sep 2009, 5:54 AM
#18
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

kuroi:

This is a UTF-8 encoding issue in your Chinese meta tags file. Post 4 of >> this thread explains the "BOM". You need to save the file without it.

Thanks your help,but anyway,i really don't know how to let it work fine.
And other issue,can't create_account after install wordpress in my site,and always display:
Fatal error: Call to undefined function: username() in /home/content/l/i/q/liqinghua/html/includes/classes/observers/class.registerWordPress.php on line 17

<?php /** * Observer class used to add a free product to the cart if the user spends more than $x * */ class registerWordPress extends base { function registerWordPress() { global $zco_notifier; $zco_notifier->attach($this, array('NOTIFY_HEADER_START_CREATE_ACCOUNT')); } function update (&$callingClass, $notifier, $paramsArray) { $email = $_POST['email_address']; $user_id = username($email); if (!$user_id) { $user_id = email_exists($email); } if (!$user_id) { if ($_POST['password'] == '') { $user_pass = wp_generate_password(); } else { $user_pass = $_POST['password']; } $user_id = wp_create_user( $email, $user_pass, $email ); update_usermeta($user_id,'first_name',$_POST['firstname']); update_usermeta($user_id,'last_name',$_POST['lastname']); $user = wp_authenticate($email, $user_pass); wp_set_auth_cookie($user->ID, true); vtu_checkUserWS($email, true); } } } ?>

help me again please

9 Sep 2009, 8:28 AM
#19
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Error on line 44 (functions_general.php)

I can't help you with the editing problem as that's between you and your editor and isn't a problem with the one I use.

You latest problem is again related to what you're trying to do with Wordpress, and is completely unrelated to normal Zen Cart functionality. I can only guess that there should be a class or functions file loaded that includes a number of functions including username(), but that it isn't being loaded properly so the function can't be found.

9 Sep 2009, 11:03 AM
#20
gueston avatar

gueston

Zen Follower

Join Date:
Apr 2009
Posts:
118
Plugin Contributions:
0

Re: Error on line 44 (functions_general.php)

kuroi:

I can't help you with the editing problem as that's between you and your editor and isn't a problem with the one I use.

You latest problem is again related to what you're trying to do with Wordpress, and is completely unrelated to normal Zen Cart functionality. I can only guess that there should be a class or functions file loaded that includes a number of functions including username(), but that it isn't being loaded properly so the function can't be found.

Oh,i think i need find other blog for my site.can you recommend a blog mod for me?:D
I will be very grateful