I have to move a website from a shared hosting on Linux to a VPS running Windows.
Nothing works.. but when I add a new line above <?php it works a little bit.
I'm getting errors like headers already sent etc..
Any thoughts on this? Suggestions? This is really getting me pissed..
edit:
0. not seeing anything ( file index.php not found )
1. adding newline , script(index.php) is found.
2. Errors : Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:...config.php on line 134 ( where I start my session )
The Byte Order Mark is probably your problem
Related
I'm using a WordPress site, recently I had to update my site to WordPress 4.6.2. And now I'm experiencing an error. Can anyone help me out with this? check out the image for the error message:
Warning: base64_decode() has been disabled for security reasons in
/home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php
on line 270
Warning: base64_decode() has been disabled for security reasons in
/home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php
on line 274
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at
/home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php:270)
in
/home/play2daa/public_html/wp-content/plugins/tawkto-live-chat/tawkto.php
on line 44
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
/home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php:270)
in
/home/play2daa/public_html/wp-content/plugins/tawkto-live-chat/tawkto.php
on line 44
Warning: Cannot modify header information - headers already sent by
(output started at
/home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php:270)
in /home/play2daa/public_html/wp-includes/pluggable.php on line 1174
With respect, this question could be handled by reading the error messages carefully. The people who developed PHP went to a lot of trouble to make their messages informative.
The first two error messages in your question tell the story. They're pretty much the same fault.
Warning: base64_decode() has been disabled for security reasons in /home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php on line 270
Let's parse this message.
base64_decode is a php function. Type php base64_decode into your fav search engine to learn more.
base64_decode() has been disabled for security reasons is the error message. Try typing that into a search engine to learn more.
in /home/play2daa/public_html/wp-content/plugins/postman-smtp/Postman/PostmanOptions.php on line 270 tells you where the problem occurred. Look! it says .../plugins/postman-smtp/... in the path name! It seems likely you have a WordPress plugin called Postman SMTP or maybe Postman in your WP install. Have you contacted that plugin's developer to figure out what to do?
Here's the thing: Lots of cybercriminals have figured out how to trick various WordPress plugins into running malicious code by concealing it in base-64 encoded text and uploading it. So, some cheap and nasty hosting services have blocked the PHP call that decodes that kind of text, in an attempt to slow down those miscreants.
You can fix this problem by....
getting the plugin developer to issue an update, or repairing the plugin yourself if you're a developer.
finding a different plugin to send email from your site.
getting your hosting service to re-enable this disabled function.
firing your hosting service and getting a new one.
When execute header("Location: new/location.php") command I got session problems.
On local host testing everything works just perfect, but if i send my project on web server hosting i got these errors:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /srv/disk4/2008248/www/some-url.com/new/location.php:2) in /srv/disk4/2008248/www/some-url.com/new/location.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /srv/disk4/2008248/www/some-url.com/new/location.php:2) in /srv/disk4/2008248/www/some-url.com/new/location.php on line 7
, so my question is how to fix this problems and keep session values alive, so i can use that values in another redirected page?
Warning: session_start(): Cannot send session cookie - headers already... a typical error when something is before session_start()
You need to write session_start() above headers(). As error says you already sent something beforee session start. Make Session start the very first line of your script, and leave no spaces before <?php tag
use ob_start(); on top of the php page
Hi I would really appreciate some help. I get the following errors at http://www.bookapartmentsinyork.co.uk/
Warning: session_start() [function.session-start]: open(/home/content/05/11475705/tmp/sess_o4ml0j7uuo01pffbonlpdpi8p2, O_RDWR) failed: No such file or directory (2) in /home/content/05/11475705/html/wp-content/plugins/quitenicebooking/includes/quitenicebooking.class.php on line 141
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/05/11475705/html/wp-content/plugins/quitenicebooking/includes/quitenicebooking.class.php:141) in /home/content/05/11475705/html/wp-content/plugins/quitenicebooking/includes/quitenicebooking.class.php on line 141
I have tried so many thing but it's all got pretty confusing for me. I'm using GoDaddy,
The error was caused after changing from a Windows to Linux server. I am very new so please try to help me in your explanations as I may get confused easily :) Thank you!
It looks like the 'quitenicebooking' plugin is trying to read session storage data which does not exist.
The subsequent errors regarding headers already sent is just a consequence of the fact that the first error appears.
You could try changing the session storage location using ini_set().
Be sure to set session_start() at the very beginning of your file.
You're getting this error because the header are already sent.
I have just moved over to a linux server on my shared hosting to see if it is less rubbish than a windows server on godaddy (I have been stupid enough to have paid them 12 months up front so I am stuck with those idiots now). I am now no longer able to use any kind of sessions at all.
They have got back to me saying that it is up to me to resolve the issue to get it to work... yes that is right... TO GET SESSIONS TO WORK! Excuse me if I seem a little irate but I am furious.
Can someone please inform me how I can in some way get sessions to work on an Apache server? I have never had to set this up before because it has never been a problem. As soon as I do:
<?php session_start() ?>
... it is just coming up with about 8 lines of errors saying that:
Warning: session_start() [function.session-start]: open(/var/chroot/home/content/30/10247530/tmp/sess_sgruthqkbhfms6ekcle2l0n6i5, O_RDWR) failed: No such file or directory (2) in /home/content/30/10247530/html/sessionthing.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/30/10247530/html/sessionthing.php:2) in /home/content/30/10247530/html/sessionthing.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/30/10247530/html/sessionthing.php:2) in /home/content/30/10247530/html/sessionthing.php on line 2
Warning: Unknown: open(/var/chroot/home/content/30/10247530/tmp/sess_sgruthqkbhfms6ekcle2l0n6i5, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0
I have tried creating a php.ini file and I still cannot get it to work properly. I have checked the settings using phpinfo() and I genuinely do not know where to go from here.
EDIT: There are a few things appearing down the side of the page now pointing to similar problems. For some reason I did not come up with those when I did a search. One of them is even closed: https://stackoverflow.com/questions/11374110/session-start-errors-on-godaddy-server?rq=1
That one says that they got it resolved with Godaddy so I think I will have to go back to them and tell them to sort it out. It is not that I do not want to learn how to configure the server... it is just that sessions should just work.
Make sure that there are no other <?php session_start() ?> declared, and try set your own session temp path,
<?php
if (!is_dir(session_save_path())) {
session_save_path ('your/custom/existing/directory');
}
session_start();
?>
PHP is trying to save the session in /var/chroot/home/content/30/10247530/tmp/, and it can't open that directory (either because it doesn't exist or because it doesn't have write permissions to it). Investigate PHP's access to this path and I believe that you'll get your sessions working - maybe you overlooked a config variable when you migrated your code to the new server?
I use shoppica theme for opencart. When I log in as a test customer and click on order history section I always get a internal server error 500. I haven't changed anything in .htaccess nor in config file. It was from the begging but from now on I need it. All the sections in customer panel works except order history and transaction section. One clue is, when I give a reward transaction to my customer the transaction section which was before in the panel would disappeared and gave me an internal 500 error. Please help me as I need it a lot.
I can't install it again because it is for 3 months and I can't start from the beginning.
I use opencart 1.5.3.1
for another internal error I got these errors in my log:
PHP Warning: unlink(public_html/system/cache/cache.currency.1358109327) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in public_html/system/library/cache.php on line 14
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at public_html/index.php:104) in public_html/system/library/session.php on line 11
PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at public_html/index.php:104) in public_html/system/library/session.php on line 11
PHP Warning: Cannot modify header information - headers already sent by (output started at public_html/index.php:104) in public_html/index.php on line 177
PHP Warning: Cannot modify header information - headers already sent by (output started at public_html/index.php:104) in public_html/vqmod/vqcache/vq2-system_library_currency.php on line 45
you should check the unlink function
I'm a bit too late for this particular question, but since it has quite a bit of views I'll provide an answer nevertheless.
For anyone else struggling with 500 Server Errors in OpenCart – the first thing to do when debugging these is to look into your server's error log and find the exact error message.
If there aren't any, you may need to enable them explicitly by adjusting the error_reporting, display_errors and log_errors settings in your PHP configuration. You can also temporarily change them in your main index.php file directly.
Once you know the exact error message, fixing it is a simple process.
We've covered some of the most common OpenCart error messages causing 500 Server Errors in our blog post: Server Errors and Blank Pages in OpenCart: Most Common Causes.
In this particular case, the issues are caused by the fact that your cache folder is either missing or not writable by the server:
PHP Warning: unlink(public_html/system/cache/cache.currency.1358109327) [function.unlink]: No such file or directory in public_html/system/library/cache.php on line 14
This error indicates your OpenCart currency cache file is missing. In most cases, it happens when your system/cache/ folder lacks correct server permissions (for OpenCart, it's usually 775). It should be fixed by adjusting folder permissions and removing all of the existing cache files from inside the folder.