Jump to content

Setting up existing site in my local environment for development...


creativeguy
 Share

Recommended Posts

Okay, so, this is the pickle I'm in: My friend, business partner and development teacher - also a member of this community - passed away last year (not of COVID). I'm not sure what his PW handle was but his name was Anthony Taylor. I know a lot now about PHP, HTML and CSS because of him, and for that reason, I feel like I owe it to him to learn and maintain the sites he's built with me.

My dilemma is that the site exists and is online, doing it's thing. But, I can't make a local copy work. I've compared the config.php to other sites I have in my local, but this one is more robust due to the nature of the site and it's features. I can't diagnose why it won't fire on localhost. And to make matters more difficult, he was the only person I knew and know with PW experience.

No one here knows me or has any reason to help me. 2020 took a hit out of my bank account as well, so I can't even hire someone. What I'm asking I guess, is anyone out there willing to spend a little time looking at the code to see if there's something obvious to a knowledgeable person, or if it needs further effort. I can pay for time, but it might take a few installments.

Anyway, I'll also mention a suitability warning: the site is adult-themed. Not illegal or something dark, it's a legit site with affiliations and a fanbase. I'd just want someone to know that before even responding.

Let me know if there's anyone willing to give me a hand getting past this pot-hole.

  • Like 3
Link to comment
Share on other sites

Hello @creativeguy,

First, my condolences to you and his family. I applaud you for carrying on with the sites you and he built together.

Second, don't worry about the adult theme. I have a number of client sites that are adult only. (Also nothing dark :D)

Lastly, since you are versed in PHP, why don't we see if we can get you up and running. This forum is full of knowledgeable people that are more than willing to help get you set up.

Let's start at the beginning. When you say that you cannot make a local copy work. Did you "copy" all of the files from document root to your localhost? What error message(s) are you getting when you attempt to access localhost? Do the messages indicate a problem connecting to the database? Do you stay in an endless loop trying to login?

Also, an FYI, The config.php will be different on localhost than on the server, and possibly the .htaccess file as well.

Give us some more information to go on so we know where to look.

Best regards,

  • Like 4
Link to comment
Share on other sites

Sad to hear that! But I'm sure you'll find help ? 

Other important informations: Server environment (Linux I guess)? Local environment? Also Linux? Windows? XAMPP? Laragon? PHP/MySQL Versions? What is the error message you see? Maybe some helpful informations in /site/assets/logs ?

Link to comment
Share on other sites

Hi, and thank you both.

My local environment is MAMP on Windows 10

PHPMyAdmin version:  4.4.15.5

Web server

Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.13 mod_perl/2.0.8 Perl/v5.16.3

Database client version: libmysql - 5.6.34

PHP extension: mysqli 

PHP version: 7.0.13

My method was to take a copy of the database, download the relevant PW site from my host and create a new database with the live DB imported. I opened the config.php and changed the DB location, user and password to match those of my local environment and made sure 'localhost' was included in the array of URLs for the site.

When I visit the site via locahost, the error indicated that the connection was refused by localhost. I tested my other local PW sites and they fire fine.

I also went as far to do a clean installation of PW, and connect to the database, replacing the tabs and columns of the install to those of the new DB. The clean version of PW loaded fine in the browser, but not after connecting to the database.

Link to comment
Share on other sites

6 minutes ago, creativeguy said:

When I visit the site via locahost, the error indicated that the connection was refused by localhost. I tested my other local PW sites and they fire fine.

Perhaps an issue with .htaccess? Try the first approach to set up the copy to check that, but replace the .htaccess file with a stock one.

Otherwise, one of the log files involved should have more information - apache error log, mysql error log, php error log and last but not least site/assets/logs/errors.txt.

Link to comment
Share on other sites

Update, I found the logs files in my MAMP folder. Nothing in the PHP log, but the apache log has a few things.

[Sat Mar 27 09:30:19 2021] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Mar 27 09:30:20 2021] [warn] pid file C:/MAMP/bin/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Mar 27 09:30:20 2021] [notice] Digest: generating secret for digest authentication ...
[Sat Mar 27 09:30:20 2021] [notice] Digest: done
[Sat Mar 27 09:30:21 2021] [notice] Apache/2.2.31 (Win32) DAV/2 mod_ssl/2.2.31 OpenSSL/1.0.2e mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.6 PHP/7.0.13 mod_perl/2.0.8 Perl/v5.16.3 configured -- resuming normal operations
[Sat Mar 27 09:30:21 2021] [notice] Server built: May  6 2016 10:19:53
[Sat Mar 27 09:30:21 2021] [notice] Parent: Created child process 18520
[Sat Mar 27 09:30:21 2021] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat Mar 27 09:30:22 2021] [notice] Digest: generating secret for digest authentication ...
[Sat Mar 27 09:30:22 2021] [notice] Digest: done
[Sat Mar 27 09:30:23 2021] [notice] Child 18520: Child process is running
[Sat Mar 27 09:30:23 2021] [notice] Child 18520: Acquired the start mutex.
[Sat Mar 27 09:30:23 2021] [notice] Child 18520: Starting 64 worker threads.
[Sat Mar 27 09:30:23 2021] [notice] Child 18520: Starting thread to listen on port 80.
[Sat Mar 27 09:30:33 2021] [error] [client 127.0.0.1] File does not exist: C:/MAMP/htdocs/docs-assets, referer: http://localhost/MAMP/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...