The site www.bethazore.com is having a couple of error messages come up when trying to login to the admin-
Warning: file_put_contents(/home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css) [function.file-put-contents]: failed to open stream: Permission denied in /home/content/37/10812537/html/wp-content/themes/novelty/functions.php on line 66
Warning: Cannot modify header information - headers already sent by (output started at /home/content/37/10812537/html/wp-content/themes/novelty/functions.php:66) in /home/content/37/10812537/html/wp-includes/pluggable.php on line 875.
I got some help here. I'm not sure how to fix it, it's a bit too complicated for me here but this is what they said Warning: Cannot modify header information - headers already sent by ERROR - can anyone help?
Let's analyze this error word by word:
file_put_contents(/home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css)
Right, so we're running file_put_contents, and it's accessing that file.
failed to open stream: Permission denied
But it's not allowed to do what it wants to do with that file, which is writing for that function.
in /home/content/37/10812537/html/wp-content/themes/novelty/functions.php on line 66
And that's where it was called.
So, you now know where the error was generated, what is causing it, and what it's trying to do. The problem is of course that Apache doesn't have permissions to overwrite that file.
Run the following in your console:
chmod 777 /home/content/37/10812537/html/wp-content/themes/novelty/custom-style.css
Or set it to mode 777 in your control panel, and you should be fine.
Related
I have seen different variations of this problem which I have tried to use without any success so i figured it would be best just to ask.
I recently moved my website from my wamp server over to my qnap server. Seams to be working quite well except 3 errors that popped up (did not have them on my local host and havent changed any of the code).
I get the following 3 errors.
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(/share/HDA_DATA/Web/application/views/errors/html/error_php.php): failed to open stream: No such file or directory in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
Warning: include(): Failed opening '/share/HDA_DATA/Web/application/views/errors/html/error_php.php' for inclusion (include_path='.:/etc/config/php') in /share/HDA_DATA/Web/system/core/Exceptions.php on line 269
I seam to understand what is going on that it cannot access the file but can anyone point out what i need to change and where/which file i need to change it. I have not done any changes to my codeigniter file structure (all original setup). If you need code dump just let me know from which file.
Thank you for your help.
Jonas
I can export my database table in Localhost. But when I keep my code on Host, Below warning wiill fire. Let me know how I solve this warning.
PHP Warning: fopen(shotdev/Field_Work_Report.pdf): failed to open stream: Permission denied in D:\INETPUB\VHOSTS\econhealthcare.net\httpdocs\econ2\pdf\fpdf.php on line 1044
According to the comments above, the issue is fixed by changing the permission to correct settings, as the error message suggested that it's due to Permission errors.
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.
I have this very simple php website, Projectx2 that I am hosting from the Zymic server because it had good ratings.
However, I am having a few unusual errors that don't happen on my locally hosted XAMPP server.
The errors are:
Warning Cannot modify header information - headers already sent by (output started at /www/zzl.org/p/r/o/projectx2/htdocs/default.php:259) in /www/zzl.org/p/r/o/projectx2/htdocs/default.php on line 295.
and:
Warning: fopen (count.txt) [function.fopen]: failed to open stream: Permission denied in /www/zzl.org/p/r/o/projectx2/htdocs/default.php on line 298
and:
Warning: fwrite(): supplied argument is not a valid stream resource in /www/zzl.org/p/r/o/projectx2/htdocs/default.php on line 299.
and:
Warning: fclose(): supplied argument is not a valid stream resource in /www/zzl.org/p/r/o/projectx2/htdocs/default.php on line 300.
Here, I have a simple counter that keeps page counts in the file count.txt, which is also on the server.
Here is my code from 290 - 302:
<?php
$fp = fopen('count.txt','r');
$count = fread($fp,filesize('count.txt'));
fclose($fp);
if(!isset($_COOKIE['count'])) {
setcookie('count'); // 295
$count++;
}
$fp = fopen('count.txt','w'); // 298
fwrite($fp,$count); // 299
fclose($fp); // 300
echo "<div id='hitcount'>$count views</div>";
?>
I don't know why this is happening - I know very little about I/O in PHP, but I know some in Java. Can you please explain to me the problems in this code, and why it only works on a regular server?
Or maybe, is it just the Zymic server?
Tell me if I need to reveal more information or code.
thanks.
One by one:
Cannot modify header information - headers already sent: indicates that the PHP script is attempting to modify the HTTP headers after it has already started emitting the page. I can't give any more information because you haven't posted the relevant code.
Permission denied means the web server user does not have permission to access the file in the way that you wish. Talk to your hosting company about how you grant that permission. All the subsequent errors flow from this problem.
critique my website design: No - this site is about focussed questions on software development, not opinions on layout or colour schemes.
Use a FTP client like FileZilla to connect to your your website and then find the file count.txt and right click and then -> properties and set the permission to 0777
I'm trying out the tutorials for Facebook developers. However, I can't include the Facebook PHP SDK successfully in my code. As stated, require_once("facebook_sdk/facebook.php"); throws the following error:
Warning: require_once(facebook_sdk/facebook.php) [function.require-once]: failed to
open stream: Permission denied in /opt/lampp/htdocs/awesome/plas.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'facebook_sdk/facebook.php'
(include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/awesome/plas.php on line 2
I am developing under Lucid Lynx. I tried doing chmod 777 facebook.php but the problem persists. I found this SO question but the resolution arrived at (renaming the file, as it may be conflicting with one of PHP's own) does not work for me. (Come to think of it, how will a file named facebook.php conflict with internal PHP files?!) Even if I switch to plain require, the same warnings are thrown.
Curiously, if I copy the files (facebook.php and base_facebook.php) outside of facebook_sdk and change the require_once line accordingly, the require succeeds. Any thoughts?
Your web server needs read access right to facebook_sdk/facebook.php. You can do it by chowning the directory to the web server user. chmod 777 is not a good practice.
Also make sure for each of include path, facebook_sdk/facebook.php exists.