PHP error messages

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

PHP error messages

Post by zaahideen » Sat Jan 24, 2015 12:57 pm

Hi,

When I go to my site, then TWO error messages appear above my banner:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/attazkiyah/at-tazkiyah.com/ida_new/index.php:24) in /home/attazkiyah/at-tazkiyah.com/ida_new/libraries/joomla/session/session.php on line 658

And

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/attazkiyah/at-tazkiyah.com/ida_new/index.php:24) in /home/attazkiyah/at-tazkiyah.com/ida_new/libraries/joomla/session/session.php on line 658

What is the problem?

Link:
http://www.at-tazkiyah.com/ida_new
Last edited by zaahideen on Tue Jan 27, 2015 9:10 am, edited 1 time in total.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sat Jan 24, 2015 3:30 pm

headers already sent by (output started at /home/attazkiyah/at-tazkiyah.com/ida_new/index.php:24)
This means that there is an extra character or corruption in the index.php file in the main Joomla folder.

Did you or someone else modify the index.php file? If not, then the file must be corrupted or altered by an intruder to your site.

If your site uses Joomla 3.3.6, line 24 should be blank. Copy the original index.php from the installation archive, replace it in the main folder of Joomla and see what happens.
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sat Jan 24, 2015 7:33 pm

ok i'll try that.

but strange thing is when im running my website on LOCALHOST, the error message doesnt show...

it's only that after i uploaded to a remote server that the error appeared...

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sat Jan 24, 2015 8:06 pm

it's only that after i uploaded to a remote server that the error appeared...
If you download the file index.php from the main Joomla folder of the remote server and compare it to the index.php file on your localhost, you are likely to find that they are different.

How that happened is anyone's guess, the file may have become corrupted or the site or the server has been hacked.

If you find that the security of the site has been compromised, go to the Security forum and follow the instructions in the sticky notes at the top of the forum: http://forum.joomla.org/viewforum.php?f=714
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sun Jan 25, 2015 7:59 am

amazingly that isnt the case also!

both index.php codings are the same. i even copied the local file to my remote server. but still same error.

i think the issue is that i have added a "script" inside my index.php file. but why it doesnt show up as an error in my localhost is confusing?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sun Jan 25, 2015 8:10 am

i think the issue is that i have added a "script" inside my index.php file. but why it doesnt show up as an error in my localhost is confusing?
The extra script must has some function that inadvertently echoes one or more characters to cause the warning to be output by the remote host, which then prevents the session cookie to be sent.

The PHP coinfiguration in the localhost either ignores warnings or does not display errors at all.
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sun Jan 25, 2015 8:47 am

For some reason I can't post my script in this forum.
Do you know why?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sun Jan 25, 2015 8:55 am

Did you try to attach a file or did you copy and paste the code and then wrap it inside

Code: Select all

 
?
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sun Jan 25, 2015 8:58 am

Is used the

Code: Select all

 tag but comes up with a 403 error

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sun Jan 25, 2015 10:00 am

That is odd. Zip up index.php with the code and try to attach the file.
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sun Jan 25, 2015 10:31 am


zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Sun Jan 25, 2015 10:27 pm

Hi, did you manage to have a look at my .php file?

Thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Sun Jan 25, 2015 11:21 pm

Just noticed the post now. If you need the javascript part, it should probably go to the index.php file in your template, instead of the very beginning of the main index.php file where it causes the warning from PHP.
Toivo Talikka, Global Moderator

zaahideen
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Sat Jul 28, 2012 10:51 am

Re: PHP error messages

Post by zaahideen » Tue Jan 27, 2015 7:53 am

Thanks TOIVO
Works great!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17439
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: PHP error messages

Post by toivo » Tue Jan 27, 2015 8:09 am

Cheers. You can now edit the first post of this thread in Full Editor and select the green tick to mark the issue as resolved.
Toivo Talikka, Global Moderator


Locked

Return to “Administration Joomla! 3.x”