These are chat archives for codersArmy/codersArmy.github.io

23rd
Feb 2016
Victor
@Evaderei
Feb 23 2016 01:46
@scottmike0 I'm getting a problem accessing
Vince Aggrippino
@VAggrippino
Feb 23 2016 01:49
@scottmike0 "Error: Linking directly to proxied pages is not permitted."
scottmike0
@scottmike0
Feb 23 2016 04:46
ah
use a proxy and see my site, devcollabs.com :P its not really a site, i have been havin a few complications trying to get phpmyadmin to be working..
Vince Aggrippino
@VAggrippino
Feb 23 2016 06:11
@scottmike0 What kind of problem have you been having getting phpMyAdmin set up?
Vince Aggrippino
@VAggrippino
Feb 23 2016 06:20
I also use Digital Ocean. I have phpMyAdmin running. I set up the droplet based on the PHPMyAdmin on 14.04 snapshot, but it's just installed and configured using the package manager. I might be able to help you get it up and running.
scottmike0
@scottmike0
Feb 23 2016 07:07
@Ghodmode i am getting error permission denied
@Ghodmode i use fedora tho
so my commands are somewhat different
read nothingtosee, as phpmyadmin
i made an alias for it
Vince Aggrippino
@VAggrippino
Feb 23 2016 07:55
@scottmike0 It's been a while since I used Fedora, but it shouldn't be too different. I think that some file locations are different.
That looks like a directory permissions problem to me. You can verify this by watching the Apache error log when you try to access the site.
On Ubuntu, you would use tail -f /var/log/apache2/error.log before you access the site. On Fedora, that should be tail -f /var/log/httpd/error_log.
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:01

I was able to reproduce this error message exactly by creating a subdirectory of my document root with permissions that don't allow access to the directory:

drwx------ 2 root root 4096 Feb 23 15:52 testdir

I left it there, so you can see the message at http://www.ghodmode.com/testdir

While watching the error log, the message was this:

[Tue Feb 23 15:52:38.197190 2016] [core:crit] [pid 21535] (13)Permission denied: [client 115.164.48.192:31884] AH00529: /var/www/html/testdir/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/testdir/' is executable

In this case, I know that the directory permissions are preventing access. Your problem could be the same, or it could be permissions on index.php in your phpmyadmin folder. The message in the error log should answer that for you.

scottmike0
@scottmike0
Feb 23 2016 08:03
yeah
i was in the error log
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:03
Make sure you know what user your web server runs its processes as (on Ubuntu it's www-data) and make sure that user can read the files.
Great! we're online at the same time. It's a little tough for me to do that... I'm in Malaysia and it's 4pm here.
Was it a directory permissions problem?
scottmike0
@scottmike0
Feb 23 2016 08:05
i just dont know exactly how to read the error logs
because there is nothing with key words of php
or anything relevant
@Ghodmode
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:07
hehe no one does :) Just look for the line with the path you were trying to access, then look for the error message. In my example, there's a timestamp, the name of the module that reported the error, the process id, then the error message.
scottmike0
@scottmike0
Feb 23 2016 08:08
but there was no error specifically to that
its just on the site
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:08
Don't look for PHP and you don't have to open the file. Just tail -f it in a console and try to load your page. Unless you have high traffic already, the first message that comes up should tell you your error.

If nothing pops up in the error log at exactly the same moment as you try to access the site, then tail access_log instead just to make sure it's logging.

If you're accessing your site through a proxy or something like Cloudflare, it might be caching requests.

You have to access your site directly in order to monitor logs.

scottmike0
@scottmike0
Feb 23 2016 08:11
AH01630: client denied by server configuration: /usr/share/phpMyAdmin
prolly as closest as i could get
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:11
If it's a directory permissions problem, there won't be anything in the error message about PHP, but if you get an error in the browser there should definitely be an error in the error_log with the path you were trying to access.
scottmike0
@scottmike0
Feb 23 2016 08:12
AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/phpmyadmin
and that
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:12
That's the problem... That's not a directory permissions problem. You may need to check your .htaccess file or turn on the FollowSymlinks option.
scottmike0
@scottmike0
Feb 23 2016 08:13
how do i get out of tail -f
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:13
ahh... you beat me to it :) You definitely need to turn on FollowSymlinks
CTRL-C to get out of tail -f
scottmike0
@scottmike0
Feb 23 2016 08:13
how to turn on
?
its apparently not a service
sooo
thats why i am wondering
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:16
I think that the default configuration of apache on Fedora is much different than on Ubuntu. You have to find your httpd.conf and the <Directory entry for /usr/share/phpMyAdmin. Make sure it has the following line in it:
     Options FollowSymLinks
I'm not sure what you mean by a service. The Apache web server (httpd) runs as a service (called a daemon on Linux). So does the MySQL server.
After you make a change to your apache configuration file, don't forget that you have to restart your apache server.
scottmike0
@scottmike0
Feb 23 2016 08:19
i found httpd.conf
ok
i put that bit of code into the file
and restared
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:22
I lost my internet connection for a minute :cry:
Here's the equivalent section in my configuration file:
Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_flag allow_url_fopen Off
                php_value include_path .
                php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
        </IfModule>

</Directory>
Did the change fix the problem?
scottmike0
@scottmike0
Feb 23 2016 08:23
did you put that all in
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:24
No, none of it. Setting things up is all automated now :) I've done it before, though.
scottmike0
@scottmike0
Feb 23 2016 08:25
@Ghodmode
#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:25
I know pretty much what all of the settings do.
scottmike0
@scottmike0
Feb 23 2016 08:25
thats pretty much i have
ah it did not paste the whole code
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:27
Okay, your configuration for phpmyadmin isn't in httpd.conf. See the line that says Include conf.modules.d/*.conf? It's in one of the files in the subdirectory conf.modules.d. The name of the file is probably phpmyadmin.conf.
scottmike0
@scottmike0
Feb 23 2016 08:27
ah you want me to use the phpmyadmin.conf?
i thought you wanted me to insert that code
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:27
Don't paste the whole code from mine. I was just providing context.
scottmike0
@scottmike0
Feb 23 2016 08:27
into httdocs
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:28
Don't do that... some of the settings will be specific to my configuration.
scottmike0
@scottmike0
Feb 23 2016 08:28
noo, not that, i mean this code
Options FollowSymLinks
i had that in the main
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:29
Just make sure you have Options FollowSymlinks turned on in your <Directory /usr/share/phpmyadmin block.
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:30
I think you may also have to change AllowOverride none in the main file to AllowOverride all. Hold on, let me look that up. This setting controls whether or not it uses .htaccess files.
Disregard what I said about AllowOverride... it doesn't look like phpMyAdmin uses .htaccess. That might be something you should consider later to secure phpMyAdmin, though... and me too :P
scottmike0
@scottmike0
Feb 23 2016 08:34
so i just place the first code into the first block
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:35
Inside of the Directory block for /usr/share/phpMyAdmin
scottmike0
@scottmike0
Feb 23 2016 08:36
yeah, but not the if statement right?
<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8
 Options FollowSymLinks
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
like this?
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:37
Not the <IfModule part. That part may be specific to my configuration.
scottmike0
@scottmike0
Feb 23 2016 08:37
nah, i had that
i was mainly refering to the location of options followssmlinks
and still cannot access it..
:(
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:38
Here's the reference for the options: https://httpd.apache.org/docs/2.4/mod/core.html#Options
Hold on a minute and I'll find the link to the explanation of FollowSymlinks
The SELinux stuff on the page you linked to may be relevant. I haven't dealt with that before.
scottmike0
@scottmike0
Feb 23 2016 08:40
i tried turning it off
it did not effect anything
scottmike0
@scottmike0
Feb 23 2016 08:44
[Tue Feb 23 08:43:16.593822 2016] [core:error] [pid 29574] [client 150.135.210.123:54491] AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/phpmyadmin
is what i get
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:44
Those go back to directory permissions that I originally though was the problem. Look at the directory permissions for /usr and /usr/share and /usr/share/phpMyAdmin and make sure the user the web server runs as can read and search all of them.
scottmike0
@scottmike0
Feb 23 2016 08:44
the location of phpmyadmin is not in html though
is there a way to copy it
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:45
On your server, is /var/www/html/phpmyadmin a symlink to /usr/share/phpMyAdmin?
scottmike0
@scottmike0
Feb 23 2016 08:45
var/www/html/ website stuff
nothing of phpadmin is in html
Alias /phpMyAdmin /usr/share/phpMyAdmin
is what i have at the top
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:48
I'm thinking that there may be something hard-coded in phpMyAdmin that refers to {DOCUMENTROOT}/phpmyadmin where yours is {DOCUMENTROOT}/nothingtosee. Try changing your alias back to /phpmyadmin /usr/share/phpMyAdmin temporarily to see if that fixes the problem.
scottmike0
@scottmike0
Feb 23 2016 08:49
i removed that problem
but i still am stuck with this
problem
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:51
You changed your alias in phpmyadmin.conf back to Alias /phpmyadmin /usr/share/phpMyAdmin and restarted your web server?
scottmike0
@scottmike0
Feb 23 2016 08:51
i think i may have fixed it
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:51
What was wrong and how did you fix it?
scottmike0
@scottmike0
Feb 23 2016 08:52
nvm
did not
i tried copying the location of phpmyadmin
to html folder
did not solve it
[Tue Feb 23 08:51:56.744644 2016] [authz_core:error] [pid 29665] [client 150.135.210.123:54525] AH01630: client denied by server configuration: /usr/share/phpMyAdmin
now got this
soo
it was a link not available, before
so i think i am in the right path
what does your config look like
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:55
Just so you know, I may have to go soon... wife and daughter will get home from school soon :) When they get here, I'm going to get up from the computer. So, it'll look like I just disappeared :)
scottmike0
@scottmike0
Feb 23 2016 08:55
k
i have some exams i will be studying for, but how does your configuration look
does it have 2 requires
or 1
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:56
Which part of the config do you want to see? Ubuntu splits the config into many files, taking a modular approach that I don't think any other distro does.
scottmike0
@scottmike0
Feb 23 2016 08:57

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>

       Require ip 127.0.0.1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All

     Allow from 127.0.0.1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>

       Require ip 127.0.0.1
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All

     Allow from 127.0.0.1
   </IfModule>
</Directory>
these parts
Vince Aggrippino
@VAggrippino
Feb 23 2016 08:59
I don't have any. My phpMyAdmin isn't secure. I may be mistaken, but it looks like you're explicitly denying connections from any server that isn't your hosted web server. So, you wouldn't be able to access it from your computer. That might be the cause of the problem.
Hold on a minute while I look up Require.
scottmike0
@scottmike0
Feb 23 2016 09:00
ah
i am abit unsure, do i put my server ip or do i put my remote ip, currently, it is my remote ip, but it gets denied
Vince Aggrippino
@VAggrippino
Feb 23 2016 09:01
I'm also not using mod_authz_core. That's probably a security problem on my side, though.
scottmike0
@scottmike0
Feb 23 2016 09:02
possibly
Vince Aggrippino
@VAggrippino
Feb 23 2016 09:03
Ya, I'm pretty sure you're only allowing connections from 127.0.0.1. So, you can only access phpMyAdmin from the server it's running on. You can't access it from the web.
scottmike0
@scottmike0
Feb 23 2016 09:03
so i add both?
the linux server and the remote?
Vince Aggrippino
@VAggrippino
Feb 23 2016 09:05
If you have a static IP address on the computer you want to access phpMyAdmin from, you can add that to the Require line, but if you don't, you'll probably want to remove the RequireAny block entirely. Read up on that before you make the change... I'm not sure.
scottmike0
@scottmike0
Feb 23 2016 09:05
yeah my ip is static
Vince Aggrippino
@VAggrippino
Feb 23 2016 09:05
Those pages also link to other articles that may need reading.
scottmike0
@scottmike0
Feb 23 2016 09:05
dns server is not though
Vince Aggrippino
@VAggrippino
Feb 23 2016 09:05
The DNS server shouldn't matter.
It's only using your IP address. Keep in mind, though, that I'm talking about the IP address on your personal computer at home, not the IP address on your server.
You can check the IP address you're using now here: http://ipchicken.com/
gotta go... goood luck :)
scottmike0
@scottmike0
Feb 23 2016 09:08
ok
mmacedo
@mmacedoeu
Feb 23 2016 16:33
heey
mmacedo
@mmacedoeu
Feb 23 2016 22:01
@marvin-klempert welcome to ours Army !
Marvin Klempert
@marvin-klempert
Feb 23 2016 22:01
Thank you for adding me. What are you guys all about?
mmacedo
@mmacedoeu
Feb 23 2016 22:02
We have the same goal, to sharpen the tools and change the world for good
Marvin Klempert
@marvin-klempert
Feb 23 2016 22:02
That sounds awesome. Are there working groups? Plans for specific projects or something like that?
mmacedo
@mmacedoeu
Feb 23 2016 22:03
We are still beginning to organize ourselves
Marvin Klempert
@marvin-klempert
Feb 23 2016 22:03
Okay
mmacedo
@mmacedoeu
Feb 23 2016 22:04
We have talked a lot on the channel, but just started
We have created our Organization into github and here on gitter, all help is welcome
Marvin Klempert
@marvin-klempert
Feb 23 2016 22:09
That sounds great. Do you guys all have some prior knowledge about programming, or are you also still learning?
mmacedo
@mmacedoeu
Feb 23 2016 22:38
always learning, but we can do things while learning, myself on programming for the past 20 years