Wordpress blank front blank page not working - php

I have installed wordpress for cpanel via Softaculous app installer' that i installed theme. Theme is working properly after one day my font page not working.
This is error long.
[29-Apr-2018 07:56:23 UTC] PHP Warning: require(/home/eco/public_html/wp-includes/post.php): failed to open stream: Permission denied in /home/eco/public_html/wp-settings.php on line 166
[29-Apr-2018 07:56:23 UTC] PHP Fatal error: require(): Failed opening required '/home/eco/public_html/wp-includes/post.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/eco/public_html/wp-settings.php on line 166
[29-Apr-2018 07:57:00 UTC] PHP Warning: require(/home/eco/public_html/wp-includes/post.php): failed to open stream: Permission denied in /home/eco/public_html/wp-settings.php on line 166
[29-Apr-2018 07:57:00 UTC] PHP Fatal error: require(): Failed opening required '/home/eco/public_html/wp-includes/post.php' (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/eco/public_html/wp-settings.php on line 166
[30-Apr-2018 02:09:27 UTC] PHP Warning: include(/home/eco/public_html/wp-content/themes/Vangard/functions.php): failed to open stream: Permission denied in /home/eco/public_html/wp-settings.php on line 426
[30-Apr-2018 02:09:27 UTC] PHP Warning: include(): Failed opening '/home/eco/public_html/wp-content/themes/Vangard/functions.php' for inclusion (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/eco/public_html/wp-settings.php on line 426
[30-Apr-2018 02:09:27 UTC] PHP Warning: include(/home/eco/public_html/wp-content/themes/Vangard/functions.php): failed to open stream: Permission denied in /home/eco/public_html/wp-settings.php on line 426
[30-Apr-2018 02:09:27 UTC] PHP Warning: include(): Failed opening '/home/eco/public_html/wp-content/themes/Vangard/functions.php' for inclusion (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/eco/public_html/wp-settings.php on line 426
[30-Apr-2018 02:09:28 UTC] PHP Fatal error: Class 'FT_scope' not found in /home/eco/public_html/wp-content/themes/Vangard/header.php on line 28
Would you tell me how to fix it. thanks

It seems to me the error is because of a file permission issue.
If this is a local setup on your own system then simply right click on the wordpress installation (root project folder) and set them to 755
or set owner with all permissions and the rest with only access files
apply this recursively to all folders

you have incorrect permissions / file ownership on your project.
the best and easiest way to do it by using the following:
$ sudo find /path/to/site -type f -exec chmod 644 {} \;
$ sudo find /path/to/site -type d -exec chmod 755 {} \;
this will find everything in site root that is a file and set permissions to 644, then it will find everything that a directory and set it to 755.
if the permissions error returns after that, check root isn't the owner (by running ls -la on your directory to bring up the files in list view with file permissions and owners). If this is the case, set it to your home user or apache:
$ sudo chown -R /path/to/site my-user:www-data

Related

laravel 5.6 give white page

my web site is https://antilicense.com/
and I give a white page
PHP Fatal error: require(): Failed opening required '.../vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in .../vendor/composer/autoload_real.php on line 66
my error log:
[06-Mar-2018 10:31:34 UTC] PHP Warning: require(/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:34 UTC] PHP Fatal error: require(): Failed opening required '/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:53 UTC] PHP Warning: require(/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:31:53 UTC] PHP Fatal error: require(): Failed opening required '/home/antilic1/public_html/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/autoload_real.php on line 66
[06-Mar-2018 10:35:49 UTC] PHP Warning: include(/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:49 UTC] PHP Warning: include(): Failed opening '/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:49 UTC] PHP Fatal error: Uncaught Error: Class 'Illuminate\Filesystem\Filesystem' not found in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:175
Stack trace:
#0 /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(144): Illuminate\Foundation\Application->registerBaseBindings()
#1 /home/antilic1/public_html/bootstrap/app.php(15): Illuminate\Foundation\Application->__construct('/home/antilic1/...')
#2 /home/antilic1/public_html/public/index.php(38): require_once('/home/antilic1/...')
#3 {main}
thrown in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 175
[06-Mar-2018 10:35:50 UTC] PHP Warning: include(/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php): failed to open stream: No such file or directory in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:50 UTC] PHP Warning: include(): Failed opening '/home/antilic1/public_html/vendor/composer/../laravel/framework/src/Illuminate/Filesystem/Filesystem.php' for inclusion (include_path='.:/opt/alt/php72/usr/share/pear') in /home/antilic1/public_html/vendor/composer/ClassLoader.php on line 444
[06-Mar-2018 10:35:50 UTC] PHP Fatal error: Uncaught Error: Class 'Illuminate\Filesystem\Filesystem' not found in /home/antilic1/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:175
Stack trace:
when I unzip files all things is fine
but after few minutes I see white page...
I try:
php artisan key:generate
composer update --no-scripts
composer update
composer install
composer dump-autoload
but I still have problem
please help me. tnx.
note1: I upgraded my laravel 5.5 to 5.6
note2: It works on local host fine... but when I move it to server I see error log
this is my php info https://antilicense.com/info.php
It seems the vendor files are not in the system. Can you do composer update and see ?
Also make sure to set the file folder permission properly. Change all the directories to 755 and all the files to 644.
To change all the directories to 755 (drwxr-xr-x):
find /home/antilic1/public_html -type d -exec chmod 755 {} \;
To change all the files to 644 (-rw-r--r--):
find /home/antilic1/public_html -type f -exec chmod 644 {} \;
You must remove vendor directory in your shared host and run below code in your local project:
composer dumpautoload
and copy vendor directory from local project to shared host.

Wordpress wp-settins.php errors Notice: Use of undefined constant ABSPATH

Just installed Wordpress with this tutorial https://www.digitalocean.com/community/tutorials/wordpress-lamp-ubuntu-16-04-ru and got php errors when open wp-settings.php
Notice: Use of undefined constant ABSPATH - assumed 'ABSPATH' in /var/www/wordpress/wp-settings.php on line 19
Warning: require(ABSPATHwp-includes/load.php): failed to open stream: No such file or directory in /var/www/wordpress/wp-settings.php on line 19
Fatal error: require(): Failed opening required 'ABSPATHwp-includes/load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/wordpress/wp-settings.php on line 19
Okey, I tried
sudo chmod 755 $(find /var/www/wordpress/ -type d)
sudo chmod 644 $(find /var/www/wordpress/ -type f)
Tried to manually set the way to WP's files in wp-config.php. Tried another version of the WP. Set the ownership of the files and folders to not-root sudo-user. Nothing changes. Tryed on clear 14.04 and 16.04 ubuntu and nothing.
Your constants need to be strings.
It is string, I didn't change files from repo.
Also, my WP can't update itself because
Warning: copy(/var/www/wordpress/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 257
My mistake, I should open domain/wp-admin/options.php instead of domain/wp-settings.php

require_once: failed to open stream: Permission denied(lampp)

I need help solving , what says to be a permission error in the htdocs folder, because i needed to alter them to even add folders in the first place.
This is my init.php file:
<?php
//Start Session
session_start();
//Include Configuration
require_once('config/config.php');
//Helper Function Files
require_once('helpers/system_helper.php');
require_once('helpers/format_helper.php');
require_once('helpers/db_helper.php');
//Autoload Classes
function __autoload($class_name){
require_once('libraries/'.$class_name . '.php');
}
?>
I try to include it via `
When i run my index.php file i get this error:
Warning: require_once(../../htdocs/PHP-Wizard/helpers/system_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Fatal error: require_once(): Failed opening required '../../htdocs/PHP-Wizard/helpers/system_helper.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
I tried going one folder up with ../ , but it doesn't work.
I looked around for a similar error to mine, but no luck. They all say No such file or directory in (path).
Could it be that it is the same error, or do i really need to change my permissions, if so, how can i do that?
Edit: When i use include_once('helpers/system_helper.php'); i get this error:
Warning: include_once(helpers/system_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Warning: include_once(): Failed opening 'helpers/system_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 9
Warning: include_once(helpers/format_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 10
Warning: include_once(): Failed opening 'helpers/format_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 10
Warning: include_once(helpers/db_helper.php): failed to open stream: Permission denied in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 11
Warning: include_once(): Failed opening 'helpers/db_helper.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/PHP-Wizard/core/init.php on line 11
The problem was indeed the permissions, i'm guessing because i copied the folder.
I fixed it by chmod 777 on all the files in that folder, and now it works fine.
Thank you for your time attempting to help me.
I tested using relative paths and it works fine.
<?php
require_once '../test.php';
echo ' you';
Where test.php just contains echo "hello"; resulted in the expected "hello you".
I would guess your problem is with file permissions. Can you check what permissions are on your system_helper.php? It should be at least executable by the user php is running as (usually www-data). I could reproduce your error message by doing a chown root test.php and chmod 600 test.php so I would guess something like
chown www-data: system_helper.php
or
chmod g+rwx system_helper.php
should give you permission to run the script.

PHP Codeigniter error failed to open stream: Permission denied

I have been working on a project that uses codeigninter. I worked on it in Windows 7 and it was fine but after I moved this project on Ubuntu to work on it there, It gives me this error in every page/controller/method that I try to access:
Warning: require_once(/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php): failed to open stream: Permission denied in /opt/lampp/htdocs/TS_Project/index.php on line 202
Fatal error: require_once(): Failed opening required '/opt/lampp/htdocs/TS_Project/system/core/CodeIgniter.php' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/TS_Project/index.php on line 202
The CodeIgniter.php file does exist, the path to it is correct and I am able to read and write in it ( I can open it in a text editor and modify it freely). I tried changing the file permission to it using the chmod command but nothing happens. Why is permission denied to the CodeIgniter.php file?
You need to change the permission of your TS_Project folder to 755.
You can do that by:
sudo chmod -R 755 /opt/lampp/htdocs/TS_Project

pChart - running scripts as www-data doesn't work

So I'm having trouble running PHP scripts for pChart. Running them as the user who created them works fine, but if I sudo to www-data, I get these errors:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d
/mcrypt.ini on line 1 in Unknown on line 0
PHP Warning: include(/usr/lib/pchart/class/pDraw.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 4
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pDraw.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 4
PHP Warning: include(/usr/lib/pchart/class/pImage.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 5
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pImage.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 5
PHP Warning: include(/usr/lib/pchart/class/pData.class.php): failed to open stream: Permission denied in /usr/share/phpmyadmin/test.php on line 6
PHP Warning: include(): Failed opening '/usr/lib/pchart/class/pData.class.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/phpmyadmin/test.php on line 6
PHP Fatal error: Class 'pData' not found in /usr/share/phpmyadmin/test.php on line 10
Does anyone have any idea what permissions or groups I'd need to change to get this working? I've tried changing everything mentioned in the output above to 777 but it's still happening.
Ok, it was permissions, though it's not clear which ones yet. It started working when I changed the pChart2.1.3 folder permissions to 777. Now I can tidy up.

Categories