Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2014-12-18 11:34:04

dougc
Member
Registered: 2013-03-11
Posts: 119

CE4 Pages Contact Form error

I am getting this when I click the Contact tab.  Any ideas how I can fix this?
Thanks,
Doug

session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home4/thewilf4/public_html/phplugins/phplugins.php:1)|#0 /home4/thewilf4/public_html/ttg-be/framework/init.php(94): ErrorHandler::handleError() #1 /home4/thewilf4/public_html/lib.php(73): require_once('/home4/thewilf4...') #2 /home4/thewilf4/public_html/contact.php(95): require_once('/home4/thewilf4...') #3 {main}|URL: /contact.php

Offline

#2 2014-12-18 11:47:09

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

have you installed ttg-be yet?
http://ce4.theturninggate.net/docs/doku … tion_setup

if that's not it, be sure to post a link to your site


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2014-12-18 13:13:59

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

Yes, I have installed ttg-be.  Here's my site:
www.collinsnet.us

Thanks!
Doug

Offline

#4 2014-12-18 13:27:45

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2014-12-18 14:23:13

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

Thank you.  I will follow up with Bluehost.

Doug

Offline

#6 2014-12-18 15:30:20

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

Bluehost? That's strange. Things usually just work with Bluehost.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2014-12-19 03:19:44

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

I just got off the phone with Bluehost tech support.  They looked at the error message that is returned when "Contact" is clicked and said that it is due to an error in the php code on my web site (that is, the code generated by TTG CE4 Pages).  On my other web site ( www.thewilderness.us ), which still uses CE3 (I haven't converted it yet), the Contact form does work.  It is also hosted on Bluehost as a subdomain on the account that hosts www.collinsnet.us as the main domain.

Offline

#8 2014-12-19 03:41:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

I'm using Bluehost as well and my CE4 Pages contact form works perfectly.

Between CE3 and CE4 the way the contact form is processed is different. CE3 used Form-to-email and CE4 uses code that Matt and Ben put together.
I'm assuming you've configured the email setting in ttg-be?

Be sure to enable guest access to ttg-be so that Ben or Matt can take a look.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2014-12-19 04:04:46

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

the error message has reference to you phplugins file. Do you have anything special going on in there or is anything out of place, like not below the line that says Place User Functions Below here (or words to that effect)?
You could try disabling phplugins to see if that clears it up. If it does, re-enable and add your functions back in one at a time until the problem crops up again.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#10 2014-12-19 04:07:07

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

I just made a couple of minor changes to my site (CE4 Pages) that I don't think should have effected the Contact page.  However, it is now displaying correctly! 

Nonetheless, when I try to send an email using the Contact form, I get this error message:

Cannot modify header information - headers already sent by (output started at /home4/thewilf4/public_html/phplugins/phplugins.php:1)|#0 /home4/thewilf4/public_html/contact.php(158): ErrorHandler::handleError('Location: /cont...') #1 {main}|URL: /contact.php

Any ideas on what is wrong here and how to fix it?

Thanks,
Doug

Offline

#11 2014-12-19 04:11:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

try my suggestion above. See if temporarily disabling phplugins has any effect.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#12 2014-12-19 04:16:47

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

I just received an email from Bluehost Tech Support (copied below).  The change they made may be why the Contact page is now displaying correctly.  However, I still get the above error when trying to use the Contact form to send a message.

Doug

Copy of Bluehost email:

Hello,

We can fix it by removing the call to session_start in the init.php file (the page will at least partially display if the session_start() function is moved up to the top of the /home4/thewilf4/public_html/ttg-be/framework/init.php page) however we are unable to fix the fact that your webdesigner appears to have included session_start() multiple times in the code, and done so after creating headers. It should only be used once, and must be used before other output has been generated by the php.

line 94 on /home4/thewilf4/public_html/ttg-be/framework/init.php
was:
session_start();

and is now:
//session_start();

Thank you,
(Tech's name deleted)
Level II Site/Script Compatibility
BlueHost.com

Offline

#13 2014-12-19 04:46:43

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

The only change I have made to the phplugins.php file is to add the "Snowstorm" near the bottom of the user section.  Here is a copy of the very bottom of my phplugins.php file with some overlap of the original file:

// THIS FUNCTION REMOVES THE R2D2-MENU SCRIPT FROM THE PAGE
function ttg_scripts_navigation( $style, $path ) {
    echo '
   
    <!-- if your navigation requires Javascript, link your script files here; otherwise, leave this empty -->

    ';
    return false;
} // END
DELETE THIS LINE */

// SNOWSTORM
function ttg_body_bottom( $style, $path ) {
    if (
        G_STYLE == 'CE4-AUTOINDEX' ||
        (preg_match('/^CE4-PAGES-(.*)$/', G_STYLE) && G_STYLE != 'CE4-PAGES-HOME' ) ||
        G_STYLE == 'CE4-WORDPRESS'
    ) {

        echo '
<script src="/phplugins/js/snowstorm-min.js"></script>
<script>

    snowStorm.snowCharacter = "•";
    snowStorm.snowColor = "#ffffff";

</script>
        ';

    }
} // END


// ****************************************************************************************************
// END USER FUNCTIONS

?>

Offline

#14 2014-12-19 04:53:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

I still think it's a good test to temporarily disable phplugins just to see if that has any effect at all.

But this will be something for Matt to look at. He'll likely need at least guest access to ttg-be so you can save yourself some time by enabling that.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#15 2014-12-19 05:01:02

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

I now cannot log in to my ttg-be.  I don't get an "incorrect Username or Password" message, I just get the blank login screen again.  I suspect the changes the Bluehost tech made are interfering with my login process.  Thus, I can't enable the Guest Access for Matt and Ben.

Should I try deleting the ttg-be folder on my site and uploading it again?

Doug

Offline

#16 2014-12-19 05:18:18

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

Should I try deleting the ttg-be folder on my site and uploading it again?

I wouldn't delete the entire folder because it contains the database, your Publisher templates and probably more.

First thing to try would be to re-upload the one file that the tech changed (ttg-be/framework/init.php)
That would undo anything that he's done. You might want to first change the existing file's name (on the server) just to preserve it. By changing the name it will no longer affect your site, but it will be available in case of....something?

if that doesn't do it, then you may need to delete ttg-be and start over. But that will also remove the database, publisher templates, etc. You may end up needing to manually delete albums and albums sets before re-creating them. But before you do that, try undoing what was done and then let Matt take a look.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#17 2014-12-19 06:01:07

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

I'm seeing your login screen. Did you replace that file?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#18 2014-12-19 06:56:43

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

Good advice on not deleting ttg-be!  I did replace the ttg-be/framework/init.php file with the original.  Then I could successfully login to ttg-be and I enabled the Guest login for Matt and Ben.  If I switch back to the init.php file as modified by the Bluehost Tech Support, I again lose the ability to log in to ttg-be.

I currently have the original init.php file in place so hopefully Matt and/or Ben can have a look and see if they have any ideas.

Next I will disable phplugins to test that.

Thanks,
Doug

Offline

#19 2014-12-19 07:03:16

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

are the guest credentials set to the default? I just tried taking a look but couldn't log on as guest using guest/ttg8888

If you don't want to share them, be sure to PM them to Matt and Ben


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#20 2014-12-19 07:48:18

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

I disabled phplugins and am now able to go to the Contact page without errors and send emails without errors, getting the correct "Thanks for sending..." message.  I haven't yet RECEIVED any of the emails (I have previously noticed there is some delay, so I am still hopeful).  In addition to disabling phplugins, I needed to change my email setting from SMTP to Mail in ttg-be.  I saw something about this on another post in the TG Forum

Doug

Offline

#21 2014-12-19 07:52:13

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Rod,

I emailed the Guest login credentials to you hoping you could forward them to Matt and Ben.  Please try them to see that they work and to see if you see any errors I may have made in the ttg-be setup

Thanks again for all your help.

Doug

Offline

#22 2014-12-19 07:54:13

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: CE4 Pages Contact Form error

looks like something may be amiss with your phplugins file then.

I'm no expert, but if you want to email it to me I'll take a look to see if I can see anything glaringly obvious.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#23 2014-12-19 11:53:25

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: CE4 Pages Contact Form error

The error is caused because the file http://www.collinsnet.us/phplugins/phplugins.php is outputting something when it shouldn't be.
Specifically, a byte-order-mark has been added by your text editor.  What editor did you use to edit phplugins.php?  You may have success by using Notepad++ instead.  I don't have that editor handy, but you may also need to toggle a setting in preferences so that byte-order marks aren't inserted.

Offline

#24 2014-12-19 15:20:32

dougc
Member
Registered: 2013-03-11
Posts: 119

Re: CE4 Pages Contact Form error

Ben,

Thank you for finding that error. 

I thought I had used Notepad++ with no BOM encoding (although that is all trial and error for me :-) ).  I probably introduced the error in the phplugins.php file before I switched to Notepad++.  Nonetheless, I was able to use Notepad++ to "Convert to UTF-8 without BOM", the file was three bytes smaller, and it now seems to work correctly!!!

Much thanks to you and Rod.

Doug

Offline

#25 2014-12-19 18:54:10

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: CE4 Pages Contact Form error

Hi Doug, I'm glad that solved it.  BOM characters cause all kinds of problems. 
The contact form is unique, in that the phplugins.php is loaded before the session is created.  If the order was the other way around then a few BOM characters wouldn't matter.  We're looking at reordering the code on the contact page to eliminate this problem.

Offline

Board footer

Powered by FluxBB