Jump to content
mwa

Unable to access site after moving from AMPPS on OSX to "" on Linux

Recommended Posts

Quote

( ! ) Warning: fopen(/usr/local/ampps/www/mway/site/assets/logs/exceptions.txt): failed to open stream: Permission denied in /usr/local/ampps/www/mway/wire/core/FileLog.php on line 83

What might I do to resolve/troubleshoot this?

Share this post


Link to post
Share on other sites
1 hour ago, mwa said:

What might I do to resolve/troubleshoot this?

We will need tons more details regarding your setup.

Are you in Linux now? What distro? (Ubuntu, Kubuntu, Arch, etc.)
Open a terminal and type in this command:

lsb_release -a

This one too, as it gives a different output:

cat /proc/version

What versions of Apache, PHP and MySQL? Do you know how to check? Copy/Paste this one-liner in your terminal:

apache2 -version && mariadb --version && php --version

What are the contents of `usr/local/ampps/www/mway/site/assets/logs/exceptions.txt?

cat /usr/local/ampps/www/mway/site/assets/logs/exceptions.txt

 

Do you have the proper permissions set up?

Share this post


Link to post
Share on other sites

Linux Mint 19.1; Apache 2.2; PHP 5.6; MySQL 5.6.37

Nothing in exceptions.txt since the move/2018 (and I just now am attempting to import the website).

As for the permissions I'm not sure... I tried chmod 755 on all directories and 644 on all files by $(find . -type d) etc.

Aforementioned line 83 through 85 =

		if($fp = fopen($this->logFilename, "a")) {
			$trys = 0; 
			$stop = false;

I tried clearing the cache storage and none of the logs have anything from this year either.

Share this post


Link to post
Share on other sites
2 minutes ago, mwa said:

Linux Mint 19.1; Apache 2.2; PHP 5.6; MySQL 5.6.37

Can you first attempt a default new PW install before trying to import your current one? 

Linux Mint is Debian based. Check my signature. I have a detailed write-up on a LAMP install that will help you cover all the bases before you proceed.

I've never used OSX so I wouldn't know about migrating this Dev site over. 

  • Like 1

Share this post


Link to post
Share on other sites

Couldn't access installer:

( ! ) Warning: require_once(/usr/local/ampps/www/my/wire/core/ProcessWire.php): failed to open stream: Permission denied in /usr/local/ampps/www/my/index.php on line 32

( ! ) Fatal error: require_once(): Failed opening required '/usr/local/ampps/www/my/wire/core/ProcessWire.php' (include_path='.:') in /usr/local/ampps/www/my/index.php on line 32

Ownership was off, set that and permissions, and got as far as database setup, where I get

Quote
Database connection information did not work.
SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)

 

Share this post


Link to post
Share on other sites
18 minutes ago, mwa said:
Access denied for user 'root'@'localhost' (using password: YES)

Verify username and password.

Update in config.php

Share this post


Link to post
Share on other sites
Posted (edited)

Okay I reinstalled apache2 php7 mysql phpmyadmin from scratch, and freshly installed processwire-master. Everything looks okay up until the end. I can access the homepage but not the login page: 404, says /processwire/admin was not found on the server. I don't know whether it's supposed to include the localhost part there in the message but again the homepage itself is accessible.

Edited by mwa

Share this post


Link to post
Share on other sites
13 minutes ago, mwa said:

Okay I reinstalled apache2 php7 mysql phpmyadmin from scratch, and freshly installed processwire-master. Everything looks okay up until the end. I can access the homepage but not the login page: 404, says /processwire/admin was not found on the server. I don't know whether it's supposed to include the localhost part there in the message but again the homepage itself is accessible.

What do your apache logs say?

Do you know where they are located?

Did you follow my write-up from my sig? 

Are you using virtualhosts?

  • Like 1

Share this post


Link to post
Share on other sites

Unfortunately overlooked that, so no, but I have this /etc/apache2/sites-available/processwire.conf:

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/html/processwire
     ServerName example.com

     <Directory /var/www/html/processwire/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/processwire_error.log
     CustomLog ${APACHE_LOG_DIR}/processwire_access.log combined

</VirtualHost>

Apache access.log has:


127.0.0.1 - - [11/Apr/2019:14:01:26 -0700] "GET /processwire/ HTTP/1.1" 200 589 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:01:32 -0700] "GET /processwire/ HTTP/1.1" 200 590 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:01:33 -0700] "GET /processwire/ HTTP/1.1" 200 590 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:01:33 -0700] "GET /processwire/site/templates/styles/main.css HTTP/1.1" 200 277 "http://localhost/processwire/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:01:33 -0700] "GET /favicon.ico HTTP/1.1" 404 468 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:02:17 -0700] "POST /phpmyadmin/index.php HTTP/1.1" 200 2462 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:44 -0700] "GET /processwire/pw HTTP/1.1" 404 472 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:44 -0700] "GET /favicon.ico HTTP/1.1" 404 468 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:46 -0700] "GET /processwire/pw HTTP/1.1" 404 472 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:46 -0700] "GET /favicon.ico HTTP/1.1" 404 468 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:47 -0700] "GET /processwire/ HTTP/1.1" 200 589 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:14:04:50 -0700] "GET /processwire/ HTTP/1.1" 200 589 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0"
127.0.0.1 - - [11/Apr/2019:16:55:37 -0700] "GET /processwire/pw HTTP/1.1" 404 472 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101

None of the other logs have anything relevant.

Share this post


Link to post
Share on other sites

My apache had errors until I added this to my .conf file

try changing this:

     <Directory /var/www/html/processwire/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>

to this:

    <Directory /var/www/html/processwire/>
        AllowOverride all
        Options Indexes FollowSymLinks
        Require local
    </Directory>

 

7 minutes ago, mwa said:

ServerName example.com

Is that really the name of your virtualhost?

Share this post


Link to post
Share on other sites

Ah, oops. I changed the ServerName to processwire.ooo Alias www."" and tried the change you specified for <Directory/> to no avail.

Share this post


Link to post
Share on other sites
Just now, mwa said:

... tried the change you specified for <Directory/> to no avail.

Don't forget to restart Apache

sudo service apache2 restart

Share this post


Link to post
Share on other sites
7 hours ago, mwa said:

I can access the homepage but not the login page: 404, says /processwire/admin was not found on the server. 

Can you access any other pages?

If not, there's very likely some sort of an issue with your .htaccess file, or rather an incompatibility with your server and the .htacecss file. The 404 error message you're seeing also sounds like the plain text version from server, not a 404 page from within ProcessWire – so most likely rewrite rules configured in the .htaccess file are not working as expected.

Might also mean that something is missing from the server, though if you just ran the install process, that should've flagged any such issues.

In a bit of a hurry, but at least the .htaccess file is where I'd start digging into this.

Share this post


Link to post
Share on other sites

Rewrite is enabled. I tried clearing the htaccess file and changing the rewritebase to /processwire/, neither of which seemed to have any effect. This was a fresh blank install so there are no other pages I can try accessing as of yet.

Also is setting up a virtualhost necessary for each new site setup?

Share this post


Link to post
Share on other sites
4 minutes ago, mwa said:

Also is setting up a virtualhost necessary for each new site setup?

absolutely not.

I just helps me to have a different URL on my development machine so i can have www.project1.webdev as a base install of PW, www.project2.webdev for another installation of PW, www.project3.webdev for playing with something else, etc.

It just helps to keep everything separated instead of doing localhost/project1, localhost/project2, localhost/project3

Share this post


Link to post
Share on other sites

Right good ok that's what I thought. ProcessWire is my favorite though

  • Like 1

Share this post


Link to post
Share on other sites

Nah my virtualhost itself processwire.ooo isn't even working

Share this post


Link to post
Share on other sites
22 hours ago, mwa said:

@OrganizedFellow how did you learn server administration?

Through years of trial-and-error my friend.

I've been a Linux/Debian user for many years. I stopped using "traditional web hosts" about 6-7 years ago. When I first heard of Digital Ocean, Linode and all the others - I wanted to tinker and learn how to run my own server. At the time I didn't know how much I would enjoy it, nor how simple it would make my web development hobby.

At the time I was using *buntu but without a LAMP setup. It was then that I started to get serious about coding.

I can't tell you how many partitions and Windows dual-boot setups I ruined by learning, but here I am.

Both my laptops run some distro. Thinkpad T420 with Debian stretch off a netinstall using i3wm and a little Acer Chromebook C720 running BunsenLabs but soon it will run Arch. My third ThinkPad will run either CentOS or Void, perhaps LFS (Linux From Scratch) if I can dedicate the time.

  • Like 1

Share this post


Link to post
Share on other sites

That sounds like bundles of technical wonder.

I reinstalled PW with the Regular/Blog profile and only the homepage is accessible, not admin nor other pages...

Share this post


Link to post
Share on other sites

Sorry just had to change the apache config AllowOverride NoneAll

Share this post


Link to post
Share on other sites
16 minutes ago, mwa said:

Sorry just had to change the apache config AllowOverride NoneAll

here's what i have in mine:

AllowOverride all
        Options Indexes FollowSymLinks
        Require local
		AllowOverride all
        Options Indexes FollowSymLinks
        Require local

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...