I am switching over a website that was built on Wordpress from one HostGator server to another HostGator server. I have successfully transferred over the files via FTP, and migrated the MySQL database over and have both connected successfully.
I am running into an issue when I view the site in the browser and I receive this following error message:
Warning: require(DIR/warp.php) [function.require]: failed to open stream: No such file or directory in /home/abcworld/public_html/new2/wp-content/themes/yoo_moustache_wp1/index.php on line 10
Warning: require(DIR/warp.php) [function.require]: failed to open stream: No such file or directory in /home/abcworld/public_html/new2/wp-content/themes/yoo_moustache_wp1/index.php on line 10
Fatal error: require() [function.require]: Failed opening required 'DIR/warp.php' (include_path='.:/opt/php52/lib/php') in /home/abcworld/public_html/new2/wp-content/themes/yoo_moustache_wp1/index.php on line 10
When I switch to the themes that comes with Wordpress, the site is displayed with the data that is in the MySQL database, so it seems that the Template is what's causing the error. I am using a Yootheme Template called 'Moustache' and have downloaded the latest version and uploaded it to Wordpress and the error message is still there.
The site I am working on is: http://abcworldwidestone.com/new2/
I am unsure what's causing this and would love some assistance - Any thoughts?
Your server must still be using PHP 5.2 , use 5.3.3 or higher at least.
As per the documentation;
5.3.0 Added DIR and NAMESPACE constants
You are more than likely running PHP version < 5.3.0.
Related
I have recently been trying to add PHPMailer script to my site, following the accepted answer from here:
Send attachments with PHP Mail()?
I have never used a require statment before so I assume I must be doing it wrong, currently testing on my local host version of the site. I have downloaded the entire zip of git (unzipped it) and moved it to the dir my scripts are in.
In my script I added the following line:
require_once(__DIR__.'/PHPMailer-master/class.phpmailer.php');
Which to my understanding was all I needed to do to use it. However I get this error:
Warning:
require_once(C:\xampp\htdocs\Website\PHPMailer-master\class.phpmailer.php):
failed to open stream: No such file or directory in
C:\xampp\htdocs\Website\include\mailer.php on line 10
Fatal error: require_once(): Failed opening required
'C:\xampp\htdocs\Website\PHPMailer-master\class.phpmailer.php'
(include_path='C:\xampp\php\PEAR') in
C:\xampp\htdocs\Website\include\mailer.php on line 10
Any ideas what is causing this error? Am running PHP 5.6.21 if this is relevant.
Try to use the full path to the file, using realpath() - http://php.net/realpath, and use dirname(__FILE__) to get your current directory:
I moved wordpress from one server to other...home page is running fine but when I click to category pages/links it shows these errors
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/server/public_html/index.php on line 17
Warning: require(./wp-blog-header.php) [function.require]: failed to open stream: No such file or directory in /home/server/public_html/index.php on line 17
Fatal error: require() [function.require]: Failed opening required './wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/server/public_html/index.php on line 17
I searched on google and tried accordingly but not solved. I tried wp-codex tech like http://codex.wordpress.org/Changing_The_Site_URL but also failed. I have the wp-blog-header file in my directory but still not working....any help ...thanx in advance
Change php version for 7. My tech.support make this and problem was done
I had a similar issue and the problem was with the PHP version used which in my case by default was PHP 5.2 and it was throwing the 500 status code error.
When upgrading the PHP version to 5.3 the 500 status code was gone but Wordpress returned this error:
Your server is running PHP version 5.3.29 but WordPress 5.4.2 requires at least 5.6.20.
Note to myself (and everyone else with this error): When moving Wordpress websites between different servers make sure you are running the minimum required PHP version.
Also remember:
Note: If you are in a legacy environment where you only have older PHP or MySQL versions, WordPress also works with PHP 5.6.20+ and MySQL 5.0+, but these versions have reached official End Of Life and as such may expose your site to security vulnerabilities.
According to WP docs the recommended PHP is version 7.3.
Try the default theme and see if you still have the error. If so the theme you are using is causing the error - as in my case. The page that had an error was calling a file in "pages" that was not there. When I changed what is to show on that page to something current - the error went
When I moved MediaWiki from Localhost to the server I started getting the below error. I am using the latest version and tried to use php 5.3, 5.4 and 5.5 but error exists for all version of php. I know this might not be php version related but just cross checked.
Warning:
require_once(/home/meuser/public_html/site_dir\extensions\Cite\Cite.php):
failed to open stream: No such file or directory in
/home/meuser/public_html/site_dir/LocalSettings.php on line 132
Fatal error: require_once(): Failed opening required '/home/meuser/public_html/site_dir\extensions\Cite\Cite.php'
(include_path='.:/opt/php54/lib/php') in
/home/meuser/public_html/site_dir/LocalSettings.php on line 132
When I commented Cite extension (to disable the extension) to cross check, it gives the same error for the next extension. So I believe there is something wrong in moving server?
I have just uploaded all files to the server and changed database and site url settings in Localsettings.php and imported database.
Is there any extra step required?
There's an issue with the directory separators in your paths. Notice how they're all forward slashes until you reach site_dir. Fix these and it should work perfectly. Based on this code the paths you need to change are in LocalSettings.php
i think this will help you
Syntax:
require_once($_SERVER['DOCUMENT_ROOT']./your file location with only '/' slash);
ie.,
require_once($_SERVER['DOCUMENT_ROOT']./site_dir/extensions/Cite/Cite.php);
I have applied the google map to my local server via Xampp. I have moved it to my web hosting server and I can not get it to connect to the databse. I was able to get other db connections to work but the issue here is I must be puting the file path in incorrectly. I am using the same file structure as on my local machine.
The Errors:
Warning: require(../includes/core/db/map_dbinfo.php) [function.require]: failed to open stream: No such file or directory in /home/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php on line 2
Fatal error: require() [function.require]: Failed opening required '../includes/core/db/map_dbinfo.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxx/public_html/includes/state_map/phpsqlajax_genxml2.php on line 2
Anyone know why it's throwing these errors now but not on local machine and how I can go about fixing it?
I really have no idea where to start or even how to word this question. Any help would be appreciated. Thanks
You are standing in .../includes/states_map/phpsqlajax_genxml2.php and trying to reach "../includes/core/db/map_dbinfo.php". If you go back one directory from states_map you get to includes, and then you try to find includes under the includes directory.
Change the include to ../../includes/core/db/map_dbinfo.php
Why this is happening? Probably because you on your local server has .../includes added in you r include_path in php, which then will try includes/../includes/...
I'm not one to normally reach out but I've found myself completely stumped by this one.
I have a new server and chose to go with Windows Server 2008 and Plesk. After importing my site, I find that my includes no longer work, coming up with this error message:
require_once(include/online_class.php) [function.require-once]: failed to open stream: Operation not permitted
Fatal error: require_once() [function.require]: Failed opening required 'include/online_class.php
I have disabled open_basedir to make sure that it isn't conflicting but I am still getting this message. I have tried doing a fresh install of PEAR via command line and have made sure include_path points to the correct directory -> C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR
I have switched between both PHP 5.2 and 5.3 - 5.3 will just display a 500 error message without even reaching the php include errors.
Is there something I'm missing here? This is an issue I've never had with linux / cpanel builds and it's leaving a sour taste in my mouth with regards to Windows servers. What can I do to fix this problem?
Any help would be appreciated. Cheers!