Warning: session_start():

Questions related to using nuBuilder Forte.

Warning: session_start():

Postby dmier » Fri Apr 12, 2019 4:29 am

hi, Im having this problem every time I press sql Builder:

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home4/signs3d/public_html/login/nuselect.php:1) in /home4/signs3d/public_html/login/nuchoosesetup.php on line 9
dmier
 
Posts: 16
Joined: Fri Apr 12, 2019 4:24 am

Re: Warning: session_start():

Postby admin » Sat Apr 13, 2019 10:44 am

dmier,

What browsers have you tried?

Steven
admin
Site Admin
 
Posts: 3402
Joined: Mon Jun 15, 2009 9:53 am

Re: Warning: session_start():

Postby n9yty » Sun Oct 18, 2020 9:47 am

I see that here when going into the SQL Builder, have tried both Safari and MS Edge.

Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in /Users/n9yty/Sites/nubuilder/nuchoosesetup.php on line 52

Warning: session_start(): Cannot start session when headers already sent in /Users/n9yty/Sites/nubuilder/nuchoosesetup.php on line 9

I don't know if it is related, but I can paste the SQL in and set it to "Edit Manually", but it doesn't seem to be working. Also, I can add tables, but I cannot drag/interact with them. [EDIT: I can interact with them in FireFox, but not the other two browsers]

Also, saw this post: viewtopic.php?f=19&t=9808&p=18657&hilit=headers#p18657

I can confirm if I do that, the messages go away, but unsure what side effect that has.
n9yty
 
Posts: 39
Joined: Fri Oct 16, 2020 4:13 am

Re: Warning: session_start():

Postby n9yty » Sun Oct 18, 2020 2:11 pm

As another reply to this, I think this really should be fixed, unless it is due to some PHP mis-configuration or something else? But I have a clean setup here, not any real customization on an out-of-the box macOS Catalina setup, so it should be "typical" as opposed to heavily-customized.

Note, I set up /etc/php.ini (did not exist) and included "error_reporting = E_ALL ^ E_WARNING" to remove warnings, this makes it go away (after restarting the web server), but this is not the ideal solution and other warnings will now be missed.

If I hand edit files (unselect.php in this case) to make it go away, I fear it will prevent them being updated in the future when I refresh from GitHub. I don't want to have it force overwrite or I will lose my nuconfig.php file.

I am seeing this in Firefox, Safari and Microsoft Edge on the Mac, so it is not isolated to one browser, it is a PHP server message because the file is sending the DOCTYPE and HTML tags before the PHP section of the code loads and initiates the session.

The post I referenced in my last reply does show the start of unselect.php that is causing this problem. Maybe the opening HTML has to be moved to a location after the require_once call? or some nuJSInclude calls?
n9yty
 
Posts: 39
Joined: Fri Oct 16, 2020 4:13 am

Re: Warning: session_start():

Postby kev1n » Sun Oct 18, 2020 2:35 pm

n9yty wrote:Also, saw this post: viewtopic.php?f=19&t=9808&p=18657&hilit=headers#p18657

I can confirm if I do that, the messages go away, but unsure what side effect that has.


When I change nuselect.php this way, I can't click on anything in the added tables or move them.

BTW, I'm not seeing this issue. And I don't think that it's caused by any browser since this error occurs in PHP (server-side). What's your PHP version?
Attachments
sqlbuilder.gif
sqlbuilder.gif (1014.66 KiB) Viewed 186 times
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (82)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
 
Posts: 1085
Joined: Mon Oct 15, 2018 2:13 am

Re: Warning: session_start():

Postby n9yty » Mon Oct 19, 2020 9:59 am

I am running PHP 7.3.11 on macOS 10.15.

I can mute that warning by changing my php.ini so that it didn't complain, but that doesn't mean the underlying cause is solved.

The point is that some data is being emitted before some routine trying to alter headers runs, which can't be done after data is sent. The fact that the file has HTML at the top before the PHP that is trying to alter the headers is the source of the problem, and that is why commenting that HTML out (or removing it, the DOCTYPE/etc) will make the error go away, but it is having unintended consequences for the operation of the software. That is why I suggested maybe the DOCTYPE/etc needs to be moved to a location in that file AFTER whatever is modifying the headers has run.

I don't think this is new to PHP 7.3, though. Perhaps your PHP config is not set to show warnings?
n9yty
 
Posts: 39
Joined: Fri Oct 16, 2020 4:13 am

Re: Warning: session_start():

Postby kev1n » Tue Oct 20, 2020 11:55 pm

n9yty wrote: I don't think this is new to PHP 7.3, though. Perhaps your PHP config is not set to show warnings?


Even if I change the settings to

Code: Select all
error_reporting=E_ALL
display_errors=On


I don't see the issue here. I really have not clue what is causing it.
If you like nuBuilder, please leave a review on SourceForge

nuBuilder Code Library (82)
Installation Guides
Updating nuBuilder

Join Discord to talk about nuBuilder!
kev1n
 
Posts: 1085
Joined: Mon Oct 15, 2018 2:13 am


Return to General



cron