Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

No Idea What's Wrong - Maybe Fix PHP Include Paths?

Discussion in 'Database Discussion' started by jerdoggmckoy, Dec 23, 2013.

  1. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Hello my fellow Eggers of the Nog! Merry Christmas to you all! Hence, I have a problem and Santa is no where to be found. One of his pesky little elves fell into the gears of my server, and I need help to get him out.

    I had website 1, customer wanted a redesign, so I created a secondary cpanel account called website 2. Everything looked good, so he said make it live. I copied all files from website 2, placed them in the public_html folder of website 1 after clearing out all the previous files. I also dropped all the tables for website 1 via PHPMyAdmin, and then used SSH to upload the database for website 2. (I did first, however, go into the database I was uploading, that I had taken from website 2, changed the username values from "website2" to website1").

    The website won't display correctly. If I change my wordpress file, wp-config.php values from


    Hey, thanks for the help Can I ask how you determined that the codepeople plugin was connected to the error on the website? It wasn't mentioned in the error log I sent you that I noticed. I disabled that plugin and it had no effect on the look of the website.

    Here's something else, that might help you . . . help me =)

    If I log into the 'rmsdf' website, and I change the following within the file public_html>wp-config.php from

    define('DB_NAME', 'website1_wordpress');
    define('DB_USER', 'website1_john');

    TO

    define('DB_NAME', 'website2_wordpress');
    define('DB_USER', 'website2_john');

    Then everything works and displays fine, but it doesn't display fine when called website1. I hope you guys are following me so far . . . actually I hope nobody is following me . . . anyways . . .

    I found the following info in the error logs for WEBSITE1, and seeing as I no just enough about php/mysql/ssh to be dangerous, I'm not sure if there is something wrong with the server itself, the php.ini global values or what. But here is the log post:

    WEBSITE1 ERROR LOG POST:
    [23-Dec-2013 22:41:29] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '/home/website1/public_html/wp-includesload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/website1/public_html/wp-settings.php on line 21

    But then I also found strange errors in the website2 error logs as well

    WEBSITE2 ERROR LOG POST:
    [18-Dec-2013 23:17:11] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

    Does this provide any info at all to anyone out there that wants to make a last ditch effort at a good deed to try and convince Santa that you've been a good little boy or girl this year?

    Thanks in advance for any . . . and I truly mean "ANY", help, tips or suggestions.

    Willing to speak to Santa on your behalf,

    The JerDogg
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,261
    Likes Received:
    390
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    On a side note, I'm not sure how welcomed this long of a post is. You know, with the holidays and all, Santa is surely a bit busy with other things.

    I think creating a second cPanel account just to update/redesign a website, is overkill. A second database, a new directory for the redesigned site, yes sure.

    Assuming you used a different domain name, as well as a different database, have you updated the new site's config file to use the correct domain name?

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Thank you for your help. There was only a 2 sentence introductory paragraph that was "unnecessary" to explain the situation, but I apologize for wasting any of your time, your help IS appreciated.

    I use SSH to run a mysqldump of the database. Then I open it with my preferred notepad program and run a find & replace of everything from "website2" to "website1". Then I change the name of the sql file as well to reflect the name of the database, "website1_database.sql". I delete all of the tables in the place of the new database I am about to upload, then I run a PHPMyAdmin import of that database. But now that I think about it, maybe I should try uploading that database via SSH and see if that does the trick. I'll post back with the results.
     
  4. jerdoggmckoy

    jerdoggmckoy Active Member

    Joined:
    Jun 3, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    St Paul, MN
    cPanel Access Level:
    Root Administrator
    Well, it seems that everything imported and started working just fine once I imported using SSH instead of importing through the PHPMyAdmin control panel :p

    I used the following import command and it worked:

    mysql databasename (without the .sql extension) < /server/file/path/databasename.sql

    Thanks for the help!
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice