I am having issues with my Opencart shop (version 2.0). I have not made any changes in a few days and my hosting company don't work weekends... and something always seems to go wrong on weekends.
When I try to log in to my admin panel I get this error:
Warning: session_start():
open(/tmp/sess_6944b43ff0351f3609154764b353ba7c, O_RDWR) failed:
Permission denied (13) in
/home/thespace/public_html/system/library/session.php on line
23Warning: session_start(): Cannot send session cache limiter -
headers already sent (output started at
/home/thespace/public_html/admin/index.php:165) in
/home/thespace/public_html/system/library/session.php on line 23
The front end of the website works with the exception of the checkout... It gives me this error when trying to access it:
Warning: session_start():
open(/tmp/sess_6944b43ff0351f3609154764b353ba7c, O_RDWR) failed:
Permission denied (13) in
/home/thespace/public_html/system/library/session.php on line
23Warning: session_start(): Cannot send session cache limiter -
headers already sent (output started at
/home/thespace/public_html/index.php:207) in
/home/thespace/public_html/system/library/session.php on line
23Warning: Cannot modify header information - headers already sent by
(output started at /home/thespace/public_html/index.php:207) in
/home/thespace/public_html/vqmod/vqcache/vq2-system_engine_controller.php
on line 28Warning: Cannot modify header information - headers already
sent by (output started at /home/thespace/public_html/index.php:207)
in
/home/thespace/public_html/vqmod/vqcache/vq2-system_engine_controller.php
on line 29
Fatal error: Call to a member function get() on a non-object in
/home/thespace/public_html/index.php on line 205
I have tried googling the issue but can't seem to find a resolve. I did notice that there was no public_html/vqmod/vqcache/vq2-system_engine_controller.php file in my vqcache and I've tried restoring an old backup of the site but that hasn't worked either!
Really need help with this.
Try deleting all files of vqmod/vqcache and delete the file vqmod/mods.cache
First you need to check that is there vqmod in the site if it is then :
1) delete the mods.cache and checked.cache file from vqmod folder
2) delete all cache files from vqmod/vqcache
second check there is any Extension installed through OCMod if any then Go to Admin and clear and refresh the modification.
I think these will help because it helps me once.
It seems the plugin/extension you have installed using VQMOD/OCMOD is not working properly somehow.
Here are some ways to show the error message:
1. Set your “Output Compression Level” to 0 in the System > Settings > Server tab.
2. Then open php.ini and add code below:
I. display_errors = 1;
II. error_reporting = E_ALL;
III. log errors = 1;
3. If your server not read the php.ini, we will use an alternative method. Open index.php and add code below at the top (line 2):
I. ini_set('display_errors', 1);
II. ini_set('log_errors', 1);
II. error_reporting(E_ALL);
4. Once you have fixed the problem, remove the above code.
If It's just warning then You should do inverse process.
You have to disable display error using Admin Panel of Opencart Application.
delete vqcache
delete mods.cache
delete checked.cache
clear modification
Amy is right. This just helped my friend.
Related
I am currently working on a user registration system for a client on GoDaddy hosting.
I have previously never had this sort of issue before on Hostgator and while testing locally on a PHP test server on OS X.
It's a fairly simple script too. common.php accesses the MySQL database, all of the pages (login, register, etc.) include common.php. Sessions start when the user logs in, etc.
I see the following errors at the top of the page:
Warning: session_start(): open(/home/content/10/12114910/tmp/sess_trmok9fgtb527mjp21a76shf54, O_RDWR) failed: No such file or directory (2) in /home/content/10/12114910/html/common.php on line 86
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/10/12114910/html/common.php:86) in /home/content/10/12114910/html/common.php on line 86
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/10/12114910/html/common.php:86) in /home/content/10/12114910/html/common.php on line 86
The following errors are at the bottom of the page.
Warning: Unknown: open(/home/content/10/12114910/tmp/sess_trmok9fgtb527mjp21a76shf54, 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
Once again, this is only a GoDaddy issue. My client was originally on Windows hosting and this just did not even work at all and I switched them to Linux hosting.
They were on PHP version 5.3 and I changed it to 5.4 and I have still had no luck.
I have never messed with a php.ini file. Would I need to create one? I have heard that uploading it into the public_html folder overrides the one on the server even though we are on a shared hosting plan.
Would I also need SSH access to create a tmp folder and set proper permissions for it?
This is usually quite easy to fix on crappy providers (I don't recommend GoDaddy, by the way).
Here is how I'd go about fixing it, hopefully it will help you.
Step 1: Make a directory and call it _sessions or something of that
nature.
Step 2: Give it a chmod of 775 so that the web server can write to it.
Step 3: On the first script that runs, right at the top place session_save_path("./_sessions");
Step 4 (optional, but recommended): Add either deny from all in a .htaccess file to prevent people from getting to the directory, or simply chmod 776.
Find out more about session_save_path() here: php.net/session_save_path
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.
I get a session error which I did not have before which is strange.
Warning: session_start() [function.session-start]: open(/tmp/sess_6768c4a8b1cff40d24a3a87de701c865, O_RDWR) failed: Read-only file system (30) in /home/public_html/ctcms/index.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/public_html/ctcms/index.php:4) in /home/public_html/ctcms/index.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/public_html/ctcms/index.php:4) in /home/adrian/public_html/ctcms/index.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/ctcms/index.php:4) in /home/public_html/ctcms/library/CT/Controller.php on line 40
Warning: Unknown: open(/tmp/sess_6768c4a8b1cff40d24a3a87de701c865, O_RDWR) failed: Read-only file system (30) 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 (/tmp) in Unknown on line 0`
I have only session_start(); in my index.php at line 4. How can I fix this?
Your /tmp/ folder isn't writable. Make it writable.
chmod u+w /tmp/
You can test it with is_writable(session_save_path()).
Warning: session_start() [function.session-start]: open(/tmp/sess_6768c4a8b1cff40d24a3a87de701c865, O_RDWR) failed: Read-only file system (30) in /home/public_html/ctcms/index.php on line 4
It looks like /tmp is on a read-only file system. This is not normal. Tell your sysadmin/hosting provider to have a look at it; the machine may have a serious problem.
If the machine is yours, check the logs for any errors related to the file system and try to remount the disk in read-write (mount -o remount,rw /dev/yourdevicehere).
Yuo can't write on /tmp/
Make it writable and redo the operation.
Moreover, remember that session_start() have to be the first operation that you do on the page.
Take a look: php manual
This was a known bug in version(s) of PHP . Depending on your server environment, you can try setting the sessions folder to 777:
/var/lib/php/session (your location may vary)
I ended up using this workaround:
session_save_path('/path/not/accessable_to_world/sessions');
ini_set('session.gc_probability', 1);
You will have to create this folder and make it writeable. I havent messed around with the permissions much, but 777 worked for me (obviously).
Make sure the place where you are storing your sessions isn't accessible to the world.
This solution may not work for everyone, but I hope it helps some people!
please select an answer and mark accordingly.