Report this

What is the reason for this report?

setting up wordpress in freebsd 10.1 with apache24, php56 and mysql56

Posted on March 27, 2015

Hi:

I have followed the instructions for your freebsd tutorials. I have set up apache24, and I can see the “It works” page. I am trying to set up wordpress. I have follwed this tutorial:

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-apache-on-freebsd-10-1

When I go to the site to setup wordpress, I get a blank page, and this error message in httpd-error.log:

Fatal error: require(): Failed opening required ‘xxx/wp-includes/load.php’ (include_path=‘.:/usr/local/share/pear’) in xxx/wp-settings.php on line 21

My complete installation is from ports.

Thanks

PD: I did delete the “it works” file



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @gutiersa:

Thanks for your reply:

yes. It has to do with apache itself. It is attempting to server from ServerRoot, rather than from DocumentRoot. I figured it out by temporarily changing this:

<Directory /> AllowOverride none Require all denied </Directory>

to this:

<Directory /> AllowOverride none Require all granted </Directory>

and adding the it works index.html file to it. then I went to the browser and entered:

http://www.mysite.com/ http://www.mysite.com/index.html

and of course “It worked”

I have gone over this over and over and can’t figure it out. Why is apache ignoring my main server configuration?

View the original comment

Here are some general steps to troubleshoot issues like that

  1. Check File Paths: First, double-check that the file ‘load.php’ exists in the ‘wp-includes’ directory of your WordPress installation. Ensure that there are no typos in the file paths.

  2. File Permissions: Make sure that the file permissions for your WordPress files and directories are set correctly. Typically, web server user (e.g., www or apache) should have read access to all WordPress files and directories.

    You can use the following command to adjust file permissions:

chmod -R 755 /path/to/your/wordpress
  1. PHP Include Path: The error message mentions the PHP include path. Check your PHP configuration to make sure that the include_path is correctly set. The ‘include_path’ directive in your PHP configuration should include the path to your WordPress installation.

You can check the PHP include path by creating a PHP file (e.g., info.php) with the following content and accessing it through your web browser:

<?php
phpinfo();
?>

Look for the include_path directive in the PHP configuration section of the phpinfo page and verify that it includes the path to your WordPress installation.

  1. PHP Module: Ensure that the PHP module for MySQL or MariaDB is installed and enabled. WordPress requires this module to connect to the database.

    You can check if the module is installed by running the following command:

php -m | grep mysql

If the module is not installed, you can install it using the package manager or ports system on FreeBSD.

  1. Database Configuration: Double-check the database configuration in your WordPress configuration file (wp-config.php). Make sure the database credentials (database name, username, password, and host) are correct.

  2. PHP Error Logging: Check if PHP error logging is enabled and configured properly. You can specify an error log location in your Apache or PHP configuration. This can help you get more detailed error messages in case of issues.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.