I have migrated my site to another host (Cloud host); the new host is configured and tested with no issues. However, after copied all files from the old host the wp-admin is stopped responding and I am stuck there. one more thing, the below error is appearing in the homepage. any idea?
Warning: include(/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php on line 65
Warning: include(): Failed opening '/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/opt/sp/php5.6/lib/php') in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php on line 65
Warning: include_once(/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php on line 82
Warning: include_once(): Failed opening '/home5/dndrhcom/public_html/3indubai/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/opt/sp/php5.6/lib/php') in /srv/users/serverpilot/apps/wordpress/public/wp-content/plugins/wp-super-cache/wp-cache.php on line 82
solved by removed all .php files and add fresh files from new wordpress folder then only edit the links to be leading to my site. thanks a lot
I had a similar problem loading css from a theme directory after a migration and also using serverpilot. The include_path was set to the php install directory, so I solved the problem by adding get_template_directory() to the include.
<?php include '/style.css'; ?>
~~~~~Changed to ~~~~~~~~~~~~~~~
<?php include( get_template_directory() . '/style.css'); ?>
Looks like you might be able to do something similar for plugins.
https://codex.wordpress.org/Function_Reference/plugin_dir_path#Examples
If you uploaded your files with your root#xx.xx.xx.xx user, the file permissions are different to uploading with the serverpilot#xx.xx.xx.xx user.
I had a very similar issue until i removed the files uploaded by root, and re-uploaded with serverpilot.
just change path config file (wp-config.php) change path.
You can find Defien path for this just change your hosting path
define( 'WPCACHEHOME',your hostng path);
This will work fine.
Related
I am struggling trying to figure out why my require path link is not working.
My folder setup is the following:
Main domain on server test.example.com.
public_html -> test.example.com -> PHPMailer -> PHPMailerAutoload.php
Since the main domain is test.example.com, I am putting test.example.com in the path url. I have to do this for any link on the site (it was a setup mistake, but I haven't changed it yet).
The way I am trying to access this folder is below:
require 'test.example.com/test.example.com/PHPMailer-master/PHPMailerAutoload.php';
I get the following errors:
Warning: require(test.example.com/PHPMailer-master/PHPMailerAutoload.php): failed to open stream: No such file or directory in /home/example/public_html/test.example.com/php/newsletterSend.php on line 4
Warning: require(test.example.com/test.example.com/PHPMailer-master/PHPMailerAutoload.php): failed to open stream: No such file or directory in /home/example/public_html/test.example.com/php/newsletterSend.php on line 4
Fatal error: require(): Failed opening required 'test.example.com/test.example.com/PHPMailer-master/PHPMailerAutoload.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/example/public_html/test.example.com/php/newsletterSend.php on line 4
I need the link to be an absolute path because the file will be used in different folders.
Does anyone see what I am doing wrong?
it looks like your php is in a directory above the phpMailer folder.. so i think the path would be "../PHPMailer/PHPMailerAutoload.php"
you can use absolute paths if its simpler:
/home/foo/public_html/test.example.com/PHPMailer/PHPMailerAutoload.php
or relative paths if you know where you're starting!
../PHPMailer/PHPMailerAutoload.php
I store my WordPress theme in my Dropbox to use it easily on many machines. Unfortunately require_once()/include_once() doesn't seem to work for me.
Is store original theme at G:\Dropbox\Dropbox\Wordpress\Themes\Blabla\
The symlink is placed at C:\xampp\htdocs\blabla\wp-content\themes\Blabla
When I wanted to require/include any file, eg. C:\xampp\htdocs\blabla\wp-load.php I used to do require_once('../../wp-load.php');
But with symlink all I got is:
Warning: require_once(../../../wp-load.php): failed to
open stream: No such file or directory in
G:\Dropbox\Dropbox\Wordpress\Themes\Blabla\foo\bar.php on line
2 Fatal error: require_once(): Failed
opening required '../../../wp-load.php'
(include_path='.;C:\xampp\php\PEAR') in
G:\Dropbox\Dropbox\Wordpress\Themes\Blabla\foo\bar.php on line
2
Looks like require_once looks for the file within the Dropbox, not symlink context? Is it possible to fix it somehow? I can't use absolute path as I develop on different machines / different OSes and those vary... Any ideas? How does require_once work when it's symlinked? Does it look for required file in both places (original-context & symlink-context)?
How about putting the original file into you Wordpress folder and symlinking to dropbox?
While installing this, you should turn off dropbox on all machines where you did not move the folder yet.
I am having problems to go up and down in folders using both relative and absolute path. Everything I try giver me an error:
failed to open stream: No such file or directory in C:\wamp\www\project\Telas\Funcionario\IncluirFuncionario.php
When I try using "dirname(FILE)" it returns a warning:
Warning: include_once(C:\wamp\www\qrFoodManager\Telas\Funcionario/../../Seguranca/VerificarAutenticacaoSubTela.php): failed to open stream: No such file or directory in C:\wamp\www\qrFoodManager\Telas\Funcionario\IncluirFuncionario.php on line 2
When I try relative paths, it gives me a warning like:
Warning: include_once(../../Seguranca/VerificarAutenticacaoSubTela.php): failed to open stream: No such file or directory in C:\wamp\www\qrFoodManager\Telas\Funcionario\IncluirFuncionario.php on line 2
This is the project tree (open on eclipse Helios): http://img268.imageshack.us/img268/5593/y3l3.png
I am trying to include VerificaAutenticacaoSubTela.php in IncluirFuncionario.php; currently using Wamp Server 2.4 installed on C: .. Help please!
Use $_SERVER['DOCUMENT_ROOT']
<?php include_once($_SERVER['DOCUMENT_ROOT']."/project/Seguranca/VerificarAutenticacaoSubTela.php"); ?>
include_once(dirname(__FILE__).'/../../Seguranca/VerificarAutenticacaoSubTela.php');
Try this
<?php
include_once($_SERVER['DOCUMENT_ROOT']."/project/Telas/Seguranca/VerificarAutenticacaoSubTela.php");
?>
*Note: * Assuming the path where the files are is: /project/Telas within your wamp/www
My php files were working fine but today when i check them i get following errors.
Warning: require_once(Connections/deal.php) [function.require-once]: failed to open stream: No such file or directory in C:\complete project\ordering system\orderingcart.php on line 1
Fatal error: require_once() [function.require]: Failed opening required 'Connections/orders.php' (include_path='.;C:\php\pear') in C:\complete project\orderingcart.php on line 1
I don't know how to resolve these errors, where do I start?
It means, the path you gave in require_once() is invalid. You have two options,
1.Checkout whether the path Connections/deal.php is correct or not. Do you have a folder Connections in the folder where this running file is placed? Is there a deal.php inside that folder Connections?
I think your running file path is C:\complete project\ordering system\orderingcart.php. It does not have such a folder and file. So place your Connections folder in C:\complete project\ordering system\ and checkout.
2.Else, You can run the page without fatal error if you change the line to include_once(Connections/deal.php). Functions assosciated with deal.php will be inactivated.
This sounds like the file has either moved OR the file permission have been altered as to prevent the server account (usually www-data) from having access to it.
You might also have better luck by trying to access the file by suppling an absolute path, rather than a relative path, e.g:
<?php
$lines = file("C:\\Documents and Settings\\myfile.txt");
foreach($lines as $line){
echo($line);
}
?>
This file path issue give full file location like
if it is windows
require_once('C:/complete project/Connections/deal.php');
For reference
http://php.net/manual/en/function.realpath.php
I am receiving this error
Warning: include(../config.php) [function.include]: failed to open stream: No such file or directory in /home/soizastu/public_html/cms/happy-api/retrieve.php on line 2
Warning: include() [function.include]: Failed opening '../config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/soizastu/public_html/cms/happy-api/retrieve.php on line 2
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'soizastu'#'localhost' (using password: NO) in /home/soizastu/public_html/cms/happy-api/retrieve.php on line 6
Error connecting to database.
basically in the cms folder is config.php i thought include "../config.php"; would do the trick but it dosent appear so.
Try computing the absolute path and including that.
include(dirname(__FILE__)."/../config.php");
I think it's the safest bet when dealing with multiple levels of include.
Make sure that the user you're using to run your web server can read the file. For a sanity check, chmod the file to 665. If it's a Windows system, then make it so that Everyone can read the file.
This should work include('../config.php');
Just define the absolute path for the cms folder, in this case if the caller script (which you try to include the config.php) /home/soizastu/public_html/cms/happy-api/retrieve.php. Then write on top line of retrieve.php :
define('ABSPATH',dirname(dirname(__FILE__)) . '/');
and include the config.php by write :
require(ABSPATH . 'config.php');
Try this code i hope it works for me
Assume we had dbconfig.php in home directory and include that file in file that inside home like path structure.
|--admin
|--includes
|--add_dbconfig.php
|--dbconfig.php
add_dbconfig.php
enter image description hereenter image description here