CodeIgniter headers already sent error with different Server - php

I have a Code Ignitor 1.7.2 application which runs on a Windows 7 Apache Server. I copied the Application to Windows Pro SP2 Apache Server. Than I am getting the error
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent
Filename: helpers/url_helper.php
Line Number: 0
I again copied the application another Windows 7 PC and it is working. Usually this error comes if any space issue.
Please help how to solve this error.

please check whether you have 'echo'ed content the redirection page or diplayer any content in the redirection page

Thanks for your comments. I found the Bug. I am using a function to detect the MAC address of the system where I am using ob_start() and ob_clean(). This is causing the error.
Thanks and solved the issue to find the mac address without using those methods.
Thanks to all

Related

PhpRunner: Getting error in - classes/controls/ViewFileField.php on line 60... How to solve it?

We are using an admin panel which is create using PhpRUnner 10.3 (by a developer on Fiverr), and it was working just great on our old VPS which has Php 5.6. But just yesterday we switched to a new hosting company called GoDaddy. On GoDaddy the Php version was 7.4 I changed it to 5.6 but still the error occures.
After uploading the admin panel to GoDaddy we are getting error as follows:
Fatal error: require_once(): Failed opening required
'/home/g6oss6ljbwlx/public_html/admin/classes/uploadhandler.php'
(include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php')
in
/home/g6oss6ljbwlx/public_html/admin/classes/controls/ViewFileField.php
on line 60
The developer is not answering our query any more as he had completed out project 6 months back.
Can this problem be solved?
If yes please help.
I have found the solution.
The file (uploadhandler.php) being referred to in ViewFileField.php has case difference. I copied the file UploadHandler.php and renamed it to uploadhandler.php and now the admin panel has started working!!
I am still puzzled as to why it was working properly in our old server and giving errors in GoDaddy server.
Will check into that when I get time.

Symfony 3.3 Built-In server issue (PHP 7.1.9)

I'm just beginning with Symfony 3 but I'm stuck with a built-in server issue.
I am using wamp64 v3.0.6 with PHP 7.1.9 (and PHPStorm as IDE) on Windows 7.
I ran the built-in server once and got a response from localhost:8000 correctly but then, just like [this issue][1], I get the following error message when I try to access localhost:8000 on subsequent tries :
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required'C:\wamp64\www\projectname\vendor\symfony\symfony\src\Symfony\Bundle\WebServerBundle/Resources/router.php' (include_path='.;C:\php\pear') in Unknown on line 0
I've tried uninstalling symfony, wamp64 and PHPstorm to try to identify the problem.
After reinstalling wamp (without running the server) and symfony I've noticed the following :
When I run the built-in server for the first time and immediately access localhost:8000, it works fine. But then the server stops without my pressing CTRL-C. When I restart the server and try to access localhost:8000 I now get said error message.
I've tried creating a another project using PHP 7.0.23 with the same results : once the server crashes, I can no longer load my project.
I'm hoping someone can provide an answer as regarding this issue. I've spent the past few hours searching the web for an answer and have found none.
Thanks in advance.
Credit goes to Baig for this answer :
The source of the issue lies with the antivirus. To solve this, I've excluded the wamp directory (where symfony and my projects are also stored) from my antivirus and, voila, no more server crashes, everything works fine.

enabling error reporting fixed http 500 error on windows server

I have a web application programmed in php hosted on windows server which was working great until recently he encountered "http 500 internal server error" only on 1 php page which was basically retrieving and displaying information from database. i checked to see what can be the possible reasons for that error to happen. when i tried to generate the same error after including ini_set('display_errors', 1); in that php page, the page started working.
and I dont know what was the reason which was causing that http 500 error to generate.
if anyone has idea about this issue then please share the knowledge, it would be great help.
Check the php_error.log, if you do not know the location, open php.ini and find the path, or enable it if not enabled. Then log the error.

Drupal Internal Error

I have a problem, i moved my drupal site, and i can see all my sites working. But sometimes when i editing them it comes "Internal Server Error". I think there is something wrong with my htaccess or my webconfig. As someone told me IIS doesn't use htaccess, but than it uses web.config. The problem is it sometimes shows Error, sometimes not. So i think it has something to do with timeouts or something like that? Could that be?
I find out, what to do that the browser shows me the exact error:
It's this: "PHP Warning: session_start(): Trying to destroy uninitialized session in D:\Parallels\Plesk Panel\Vhosts\example.de\httpdocs\Intranet\includes\bootstrap.inc on line 1165
PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in D:\Parallels\Plesk Panel\Vhosts\example.de\httpdocs\Intranet\includes\bootstrap.inc on line 1165"
Can you see something, where there is something wrong?
IIS doesn't use .htaccess files. It is a different beast altogether. It is unusual to run Drupal on Windows much less IIS, so you may not find much information. Luckily, Microsoft has their own Drupal distro that you can find at http://www.microsoft.com/web/drupal. You can use their distro as-is or as a template for configuring your own installation.

Drupal Error: Undefined Offset: 0 error & Fastcgi

Thanks for reading this. I apologize if there is a simple solution to this but I have been through the forums/Google to find a fix and no luck as yet.
I am getting a Notice: Undefined offset: 0 error. The landing page renders but but all links shoot straight to a "Not Found" error page.
Are these two issues related? I read somewhere, that the Notice: Undefined offset: 0 error is from not having fastcgi as the php rendering engine. Is this correct? and will this solve that issue?
The server is Windows based with Plesk.
You can view the issue here
http://southbaypontoons.com.au/
Thanks in advance for the help!
The first issue, where you are getting 404 files errors for all of your links looks like it might be a rewrite issue.
I am not sure what webserver you are using with Plesk for Windows, but most likely it is IIS - the webserver that comes with Windows.
See this page for the rewriterules: http://drupal.org/node/3854
This will work if you have the IIS rewrite plugin for IIS (http://www.iis.net/downloads/microsoft/url-rewrite) If it is not your own server, you may need to ask your webhost to enable it.
As for the missing images - they are there. Look for example at http://southbaypontoons.com.au/sites/default/files/banner/slider-img1.jpg ... this is the image that is on the top of the home page.
It seems like you need to go through all of your drupal content and remove the /drupal/ at the front of all the images.

Categories