DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
Old 2nd June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

Here is my ls -l outputs:
Code:
ls -l /var/mysql/                                                   
total 246180
-rw-rw----  1 _mysql  _mysql      32768 Jun  1 23:44 aria_log.00000001
-rw-rw----  1 _mysql  _mysql         52 Jun  1 23:44 aria_log_control
-rw-rw----  1 _mysql  _mysql      67405 Jun  1 23:45 my_system.err
-rw-rw----  1 _mysql  _mysql          5 Jun  1 23:44 my_system.pid
-rw-r-----  1 _mysql  _mysql        976 Jun  1 23:44 ib_buffer_pool
-rw-rw----  1 _mysql  _mysql  100663296 Jun  1 23:44 ib_logfile0
-rw-rw----  1 _mysql  _mysql   12582912 Jun  1 23:44 ibdata1
-rw-rw----  1 _mysql  _mysql   12582912 Jun  1 23:44 ibtmp1
-rw-rw----  1 _mysql  _mysql          0 May 26 14:07 multi-master.info
drwx------  2 _mysql  _mysql       2560 May 26 13:19 mysql
drwx------  2 _mysql  _mysql        512 May 28 22:17 onedb
drwx------  2 _mysql  _mysql        512 May 26 13:19 performance_schema
drwx------  2 _mysql  _mysql        512 May 26 13:19 test
Code:
ls -l /var/www/var/run/mysql/                                       
total 0
srwxrwxrwx  1 _mysql  _mysql  0 Jun  1 23:44 mysql.sock
Code:
ls -l /etc/php-8.0                                                  
total 0
lrwxr-xr-x  1 root  wheel  30 May 29 07:49 mysqli.ini -> /etc/php-8.0.sample/mysqli.ini
Code:
ls -l /var/www                                    
total 56
drwxr-xr-x   2 root  daemon   512 Apr 18  2021 acme
drwxr-xr-x   2 root  daemon   512 May 26 13:21 bin
drwx-----T   2 www   daemon   512 Apr 18  2021 cache
drwxr-xr-x   2 root  daemon   512 Apr 18  2021 cgi-bin
drwxr-xr-x   3 root  daemon   512 May 28 21:21 conf
drwxr-xr-x   4 root  daemon   512 May 26 14:09 htdocs
drwxr-xr-x   2 root  daemon   512 May 25 22:40 logs
drwxr-xr-x   5 root  daemon   512 May 26 13:23 pear
drwxr-xr-x  12 root  daemon  3072 May 28 21:21 phpMyAdmin
drwxr-xr-x   2 root  daemon   512 Jun  1 23:44 run
drwx-----T   2 www   www      512 Jun  1 17:22 tmp
drwxr-xr-x   3 root  daemon   512 May 26 13:21 usr
drwxr-xr-x   3 root  daemon   512 May 31 13:31 var
Quote:
I can only guess it is your "root" statement in your httpd.conf. Compare your httpd.conf with my example, above. Which one is easier to read and which one is more complex?
This is your httpd.conf
Code:
server "lab" {
        listen on * port 80
        location "*.php" {
                fastcgi socket "/run/php-fpm.sock"
        }
}
and here is my httpd.conf
Code:
cat /etc/httpd.conf                                                 
# $OpenBSD: httpd.conf,v 1.22 2020/11/04 10:34:18 denis Exp $


#[ MACROS ]
loopback = "127.0.0.1"

# [ SERVERS ]
server "default" {
    listen on $loopback port 80
    root "htdocs/my_website"
    directory index "index.php"

    location "/*.php*" { fastcgi socket "/run/php-fpm.sock" }
}

# [ TYPES ]
types {
    include "/usr/share/misc/mime.types"
In <location "/*.php*"> part I used * after php word but you didn't. Is that the problem?
Reply With Quote
Old 2nd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

My lab webserver's chroot is /var/www -- the default. My lab webserver's root directory within the chroot is /htdocs -- the default. Therefore, the physical location of the website file structure is under /var/ww/htdocs/. A URL consisting of http://<webserver>/phpMyAdmin/index.php resolves to the actual file /var/www/htdocs/phpMyAdmin/index.php -- but yours does not on your webserver. From httpd.conf(5):
Code:
     root directory
             Configure the document root of the server.  The directory is a
             pathname within the chroot(2) root directory of httpd.  If not
             specified, it defaults to /htdocs.
Reply With Quote
Old 2nd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

In order to get phpMyAdmin working correctly, an assortment of different tools need to be functioning and integrated together. Each should be tested individually to confirm they function, and then an integration test can be performed to ensure they work together.

MariaDB (MySQL) unit test

Review /etc/my.cnf and ensure that the [client-server] socket value is assigned inside /var/www.
Code:
[client-server]
socket=/var/www/var/run/mysql/mysql.sock
Run the mysql(1) command line tool with your personally defined userid and password to ensure the server is running correctly, a client can reach it, and the administrative userid you created earlier is valid. Note the password must follow -p without spaces to include it on the command line:
Code:
$ mysql -u YourUser -pYourPassword
Welcome to the MariaDB monitor.  Commands end with ...
Use "quit" to exit the tool.

PHP / mysqli extension unit test


Run the PHP command line tool to confirm the mysqli extension is provisioned with PHP:
Code:
$ php -r "phpinfo();" | grep parsed 
Additional .ini files parsed => /etc/php-8.0/mysqli.ini
Webserver / PHP-FPM integration test

You have a phpinfo.php file located on your server's filesystem at /var/www/htdocs/my_website/phpinfo.php. It should contain
Code:
<?php
phpinfo();
?>
Test that it can be reached and parsed correctly with the URL http://localhost/phpinfo.php.

phpMyAdmin test

Confirm you have correctly copied the complete file structure of 3,815 files from /var/www/phpMyAdmin to /var/www/htdocs/my_website/phpMyAdmin. In my case, these files were copied to /var/www/htdocs/phpMyAdmin:
Code:
$ find /var/www/phpMyAdmin | wc -l
    3815
$ find /var/www/htdocs/phpMyAdmin | wc -l
    3815
If you get a mismatched result, you might not have copied the structure with cp(1)'s -pR options. If the result is identical, point your browser at the index file in /var/www/htdocs/my_website/phpMyAdmin with the URL http://localhost/phpMyAdmin/index.php, and log on with the previously tested userid and password.
Reply With Quote
Old 2nd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

If the URL with http://localhost/phpinfo.php does not resolve correctly, double-check that localhost is provisioned correctly. Usually, this is provisioned through hosts(5) and resolv.conf(5):
  1. Ensure "localhost" is provisioned in /etc/hosts. In my case, I have it defined for both IPv4 and IPv6
    Code:
    $ grep localhost /etc/hosts
    127.0.0.1       localhost
    ::1             localhost
  2. To avoid any accidental external DNS resolution of "localhost", ensure resolv.conf(5) uses the hosts(5) file for domain name resolution before it attempts resolution through DNS servers. It is the other way around by default:
    Code:
    $ grep lookup /etc/resolv.conf
    lookup file bind
Reply With Quote
Old 2nd June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

Thanks for the detailed explanation. Please let me tell you why I did this: htdocs/my_website. It's because there is another directory under that. I wanted them to be separated.
Code:
>>>ls -l /var/www/htdocs/
total 8
drwxr-xr-x  2 root  wheel   512 Apr 18  2021 bgplg
drwxr-xr-x  3 root  daemon  512 May 29 08:29 my_website
Quote:
A URL consisting of http://<webserver>/phpMyAdmin/index.php resolves to the actual file /var/www/htdocs/phpMyAdmin/index.php -- but yours does not on your webserver.
So basically you are telling me that I should create /var/www/htdocs/phpMyAdmin/ directory and put some index.php file inside it. Also configure httpf.conf's root as root "htdocs/phpMyAdmin" instead of "htdocs/my_website". Did I get it correct?

Tests:

#1
Quote:
MariaDB (MySQL) unit test
Review /etc/my.cnf and ensure that the [client-server] socket value is assigned inside /var/www.
Code:
cat /etc/my.cnf
[client-server]
socket=/var/www/var/run/mysql/mysql.sock
port=3306
#2
Quote:
Run the mysql(1) command line tool with your personally defined userid and password to ensure the server is running correctly
Code:
>>>mysql -u root -p 
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.12-MariaDB OpenBSD port: mariadb-server-10.5.12p0v1

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> quit
Bye
#3 There is a problem here
Quote:
PHP / mysqli extension unit test
Code:
php -r "phpinfo();" | grep parsed
Additional .ini files parsed => (none)
#4
Quote:
Webserver / PHP-FPM integration test
It works. I got purple colored page. It contains crazy amounts of information. Strange thing is that it says:
Code:
Additional .ini files parsed 	/etc/php-8.0/mysqli.ini
#5
Code:
>>>find /var/www/phpMyAdmin/ | wc -l                                   
    2993
Code:
>>>ls www/htdocs/my_website/phpMyAdmin/ | wc -l                               <
    2993
Reply With Quote
Old 3rd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by gordon.f View Post
It's because there is another directory under that. I wanted them to be separated.
As long as you understand what you are doing, why you are doing it, and the implications. You reported in post comment #19 that you are seeing "file not found" errors, so I wanted you to be sure you have the phpMyAdmin file structure in the right place, and correctly structured. It is very easy to confuse yourself when you have a non-standard document root because filesystem locations do not clearly align with URL structures.
Quote:
So basically you are telling me that I should create /var/www/htdocs/phpMyAdmin/ directory and put some index.php file inside it. Also configure httpf.conf's root as root "htdocs/phpMyAdmin" instead of "htdocs/my_website". Did I get it correct?
No, I wanted you to be sure you were either using your non-standard root structure correctly, or, return to using the defaults if necessary.
Quote:
Code:
>>>mysql -u root -p
This doesn't test the function of your newly created MariaDB administrative user. This user was discussed in post comment #9, step 6. And again in more detail in post comment #18. You won't be able to use the "root" mysql user with phpMyAdmin.
Quote:
#3 There is a problem here


Code:
php -r "phpinfo();" | grep parsed
Additional .ini files parsed => (none)
That is odd, because your test with php-fpm (#4) shows the extension is provisioned. So the first thing I'd check is to see which version of PHP the command line interpreter is. You could have multiple versions of PHP installed simultaneously. Run $ pkg_info -E /usr/local/bin/php and take a look at which version of PHP it is. If it isn't 8.0, then you needn't worry, because it's only PHP 8.0 that needs to be provisioned with the extension.
Quote:
#5

Code:
>>>find /var/www/phpMyAdmin/ | wc -l                                   
    2993
Code:
>>>ls www/htdocs/my_website/phpMyAdmin/ | wc -l                               <
    2993
The version of phpMyAdmin I'm running is 5.1.3, while the version that came with OpenBSD 6.9 was 4.9.5. So I'm not worried about the file counts, as long as they are the same. Double-check to see that you have the file /var/www/htdocs/my_website/phpMyAdmin/index.php, and that should map to the URL http://localhost/phpMyAdmin/index.php on your system.
Reply With Quote
Old 3rd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

One last note, because I just noticed it now:
Quote:
Code:
>>>ls www/htdocs/my_website/phpMyAdmin/ | wc -l                               <
    2993
I'm hoping your test #5 did NOT include the use of ls(1) as you'd posted, and you actually used find(1). This PHP application consists of a complete structure of (at version 5.1.3) 669 directories containing 3146 files. The find(1) command I'd used produces one line of output for each directory or file. The ls(1) command you show in your post would only produce output for the top level directory.

If you actually used ls(1) as shown, the count should be (at version 5.1.3) 27. If you used ls(1) and have as large of a count as shown, your copy was performed incorrectly.
Reply With Quote
Old 3rd June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi,

sorry for little late response.

Quote:
As long as you understand what you are doing, why you are doing it, and the implications. You reported in post comment #19 that you are seeing "file not found" errors, so I wanted you to be sure you have the phpMyAdmin file structure in the right place, and correctly structured. It is very easy to confuse yourself when you have a non-standard document root because filesystem locations do not clearly align with URL structures.
Alright, if final arrangements don't fix anything I'll change my directories.

Quote:
This doesn't test the function of your newly created MariaDB administrative user. This user was discussed in post comment #9, step 6. And again in more detail in post comment #18. You won't be able to use the "root" mysql user with phpMyAdmin.
From this link https://blog.eldernode.com/install-m...-on-openbsd-7/ I used
Code:
MariaDB [(none)]> CREATE USER 'user2'@'localhost' IDENTIFIED BY 'F5tYh(ikB2wq';
So I tried and it connected.
Code:
mysql -u user2 -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.12-MariaDB OpenBSD port: mariadb-server-10.5.12p0v1

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> quit
Bye
Quote:
You could have multiple versions of PHP installed simultaneously. Run $ pkg_info -E /usr/local/bin/php and take a look at which version of PHP it is.
Code:
pkg_info -E /usr/local/bin/php
/usr/local/bin/php: php-7.4.23
php-7.4.23          server-side HTML-embedded scripting language
I think we found some part of the problem. So I'll go wirh pkg_delete php-7.4.23, is that ok?

Quote:
If you actually used ls(1) as shown, the count should be (at version 5.1.3) 27. If you used ls(1) and have as large of a count as shown, your copy was performed incorrectly.
Yeah, by mistake I used ls. So I just went with "find" again it returned the same number.
Code:
find /var/www/htdocs/my_website/phpMyAdmin/ | wc -l
    2993

RECENT EDIT: I put some "index.php" file inside "/var/www/htdocs/my_website/phpMyAdmin" and it worked. It didn't ask any username or password, though. In order to land username-password page I stopped all the daemons with rcctl stop command and started them again but couldn't land on username-password page. It takes credentials by default I guess. How can land on that phpMyAdmin page which asks your username and password?

So I anyways, from the first beginning I was making a huge mistake. I didn't put any index.php file into "/var/www/htdocs/my_website/phpMyAdmin". I was thinking that it resolve pages automatically. All of my php files were outside of "/var/www/htdocs/my_website/phpMyAdmin" like this:
Code:
ls /var/www/htdocs/my_website/                      
first.php    index.html   index.php    phpinfo.php  test.php
first.php~   index.html~  phpMyAdmin   phpinfo.php~
Apologies for the inconvenience and thank you very much for great help.

Last edited by gordon.f; 3rd June 2022 at 01:39 PM.
Reply With Quote
Old 3rd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Quote:
Originally Posted by gordon.f View Post
Code:
pkg_info -E /usr/local/bin/php
/usr/local/bin/php: php-7.4.23
 php-7.4.23          server-side HTML-embedded scripting language
I think we found some part of the problem. So I'll go wirh pkg_delete php-7.4.23, is that ok?
It's OK but I don't believe it is the root cause of your problems. More likely, it's this:
Quote:
Yeah, by mistake I used ls.
If so, ls(1) showed nearly three thousand entities in the top level directory. If I run ls(1) here against my copied structure, I get 27 entities in the top-level directory:
Code:
$ ls /var/www/htdocs/phpMyAdmin/ | wc -l
      27
And, here they are:
Code:
$ ls -F /var/www/htdocs/phpMyAdmin/ 
CONTRIBUTING.md         composer.json           favicon.ico             print.css               themes/
ChangeLog               composer.lock           index.php               robots.txt              url.php
LICENSE                 config.inc.php          js/                     setup/                  vendor/
README                  config.sample.inc.php   libraries/              show_config_errors.php
RELEASE-DATE-5.1.3      doc/                    locale/                 sql/
babel.config.json       examples/               package.json            templates/
I think you need to carefully check the contents of your top level directory. If you have thousands of files there, and, as you stated in your last post comment, no "index.php" file was located within it, you need to delete the structure and recreate it. I would do something like:
Code:
# rm -r /var/www/htdocs/my_website/phpMyAdmin
# cp -pR /var/www/phpMyAdmin /var/www/htdocs/my_website/
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi,

Good day. I was trying to fix this problem. It took some time.

I deleted php-8.0.10 and related packages. Now I use php-7.4.23. I tested it and it works. I have phpinfo() page without a problem outside of phpMyAdmin.

Now talk about the first warning(related to "twig" which was appearing at username-password page); it disappeared. Everything looks cool.

In order to make sure I deleted phpMyAdmin from /my_website directory.
Code:
rm -r /var/www/htdocs/my_website/phpMyAdmin
Code:
ls /var/www/htdocs/my_website/
first.php    index.html   index.php    phpinfo.php~
first.php~   index.html~  phpinfo.php  test.php
and copied again with -pR option
Code:
cp -pR /var/www/phpMyAdmin /var/www/htdocs/my_website/
Code:
ls /var/www/htdocs/my_website/                         
first.php    index.html   index.php    phpinfo.php  test.php
first.php~   index.html~  phpMyAdmin   phpinfo.php~
and tested folder numbers with ls(1)
Code:
ls -F /var/www/htdocs/my_website/phpMyAdmin/ | wc -l
     112
Code:
ls -F /var/www/phpMyAdmin/ | wc -l                                  
     112
also tested with find(1)
Code:
>>>find /var/www/htdocs/my_website/phpMyAdmin/ | wc -l
    2993
Code:
find /var/www/phpMyAdmin/ | wc -l                                   
    2993
here is the inside of phpMyAdmin/ under /my_website directory:
Code:
>>>ls /var/www/htdocs/my_website/phpMyAdmin/
CODE_OF_CONDUCT.md                      robots.txt
CONTRIBUTING.md                         schema_export.php
ChangeLog                               server_binlog.php
DCO                                     server_collations.php
LICENSE                                 server_databases.php
README                                  server_engines.php
RELEASE-DATE-4.9.5                      server_export.php
ajax.php                                server_import.php
browse_foreigners.php                   server_plugins.php
changelog.php                           server_privileges.php
chk_rel.php                             server_replication.php
composer.json                           server_sql.php
composer.lock                           server_status.php
config.inc.php                          server_status_advisor.php
config.sample.inc.php                   server_status_monitor.php
db_central_columns.php                  server_status_processes.php
db_datadict.php                         server_status_queries.php
db_designer.php                         server_status_variables.php
db_events.php                           server_user_groups.php
db_export.php                           server_variables.php
db_import.php                           setup
db_multi_table_query.php                show_config_errors.php
db_operations.php                       sql
db_qbe.php                              sql.php
db_routines.php                         tbl_addfield.php
db_search.php                           tbl_change.php
db_sql.php                              tbl_chart.php
db_sql_autocomplete.php                 tbl_create.php
db_sql_format.php                       tbl_export.php
db_structure.php                        tbl_find_replace.php
db_tracking.php                         tbl_get_field.php
db_triggers.php                         tbl_gis_visualization.php
doc                                     tbl_import.php
error_report.php                        tbl_indexes.php
examples                                tbl_operations.php
export.php                              tbl_recent_favorite.php
favicon.ico                             tbl_relation.php
gis_data_editor.php                     tbl_replace.php
import.php                              tbl_row_action.php
import_status.php                       tbl_select.php
index.php                               tbl_sql.php
js                                      tbl_structure.php
libraries                               tbl_tracking.php
license.php                             tbl_triggers.php
lint.php                                tbl_zoom_select.php
locale                                  templates
logout.php                              themes
navigation.php                          themes.php
normalization.php                       transformation_overview.php
package.json                            transformation_wrapper.php
phpinfo.php                             url.php
phpmyadmin.css.php                      user_password.php
prefs_forms.php                         vendor
prefs_manage.php                        version_check.php
prefs_twofactor.php                     view_create.php
print.css                               view_operations.php
so there is no warning and it gives me username-password page, too. But when hit localhost/phpMyAdmin/index.php it says "File not found". After this happened, just because I know that httpd, mysqld, and php74_fpm services are already working,I tried restarting them one by one in order see which one is faulting. Restarted httpd and tried to go to index page. Nothing happened. Same for mysqld. But when I hit
Code:
>>>rcctl restart php74_fpm                                                                                                           
php74_fpm(ok)
php74_fpm(ok)
tried to connect to localhost/phpMyAdmin/index.php again and now I am able to view phpMyAdmin's index page but with some errors. (If you wonder, I used 'user2' for username and 'F5tYj(ikB2wq' for password instead of 'root' and 'my_password')

Screenshot:
https://www.imgur.com/a/Od5VQos

Please view the errors below:
Quote:
The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why.
Or alternately go to 'Operations' tab of any database to set it up there.
Quote:
The curl extension was not found and allow_url_fopen is disabled. Due to this some features such as error reporting or version check are disabled.
Quote:
The configuration file now needs a secret passphrase (blowfish_secret).
Quote:
The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
Additional information if required:
Code:
php -r "phpinfo();" | grep parsed
Additional .ini files parsed => /etc/php-7.4/mysqli.ini
Code:
cat /etc/my.cnf                                                     
[client-server]
socket= /var/www/var/run/mysql/mysql.sock
port= 3306

# This will be passed to all MariaDB clients
[client]
password=my_password

# The MariaDB server
[mysqld]
# To listen to all IPv4 network addresses, use "bind-address = 0.0.0.0"
bind-address=127.0.0.1
# Directory where you want to put your data
#data=/var/mysql
# This is the prefix name to be used for all log, error and replication files
#log-basename=mysqld
# Logging
#general-log
#slow_query_log
Code:
ls /var/www/var/run/mysql/                                          
mysql.sock

Last edited by gordon.f; 4th June 2022 at 11:09 AM.
Reply With Quote
Old 4th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Congratulations on getting your phpMyAdmin application up and running! You now have a web interface into your MariaDB platform.

On my lab system, when I log in I see these same three warnings. I could continue provisioning actions to eliminate these warnings:
  1. I could install and provision the php-curl extension.
  2. I could edit /var/www/htdocs/phpMyAdmin/config.inc.php and provision cookie-based authentication by editing the blowfish_secret variable, setting a 32-byte field as directed by the comments in the configuration file.
  3. I could add a temporary directory in the structure with appropriate permissions, using /var/www/tmp as a template.
You should be able to do these three things on your own.
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

Thanks a lot. I'm looking after those warnings and errors but can I ask did you see there is also a popup warning on the attached screenshot. It says "connection to server has been lost". What could be the problem?
Reply With Quote
Old 4th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

There's no attached screenshot, and I didn't see any similar popup when connecting to my test system. Aside from our release differences, I was running the test environment in a separate guest virtual machine and connecting to it remotely, using a Firefox instance running on the host.
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

I shared but maybe website not showing it you. Here is the link for the screenshot:

https://imgur.com/a/Od5VQos

Can you view it?


EDIT:
I cannot view phpMyAdmin/index.php without restarting php74_fpm and when I do that I can view that page. But with an error:

"Error in processing request
Error code:404
Error text: Not found(rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status."

Last edited by gordon.f; 4th June 2022 at 12:05 PM.
Reply With Quote
Old 4th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I can see your screenshot, thank you.

The error at the beginning of the message is what you should focus on. It is an HTTP 404 error: "Not Found". But the message doesn't tell you what file was not found. There is a possibility that whatever produced this message has logged more information, either in /var/www/logs/error.log, or possibly in /var/log/php-fpm.log. Perhaps not.
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Quote:
Originally Posted by jggimi View Post
I can see your screenshot, thank you.

The error at the beginning of the message is what you should focus on. It is an HTTP 404 error: "Not Found". But the message doesn't tell you what file was not found. There is a possibility that whatever produced this message has logged more information, either in /var/www/logs/error.log, or possibly in /var/log/php-fpm.log. Perhaps not.
Code:
>>>cat /var/www/logs/error.log
returns "Primary script unknown"

Code:
>>>cat /var/log/php-fpm.log
returns
Code:
[04-Jun-2022 14:56:54] NOTICE: fpm is running, pid 10859
[04-Jun-2022 14:56:54] NOTICE: ready to handle connections
[04-Jun-2022 15:00:45] NOTICE: Terminating ...
[04-Jun-2022 15:00:45] NOTICE: exiting, bye-bye!
[04-Jun-2022 15:00:46] NOTICE: fpm is running, pid 14895
[04-Jun-2022 15:00:46] NOTICE: ready to handle connections
[04-Jun-2022 15:06:23] NOTICE: Terminating ...
[04-Jun-2022 15:06:23] NOTICE: exiting, bye-bye!
[04-Jun-2022 15:06:24] NOTICE: fpm is running, pid 47527
[04-Jun-2022 15:06:24] NOTICE: ready to handle connections
There are other lines from this day but they are just same as the lines above.

I didn't understand why I couldn't see the index.php page without restarting php74_fpm.


EDIT: I was trying to create a new user and got this message too.
Code:
rcctl check mysqld
mysqld(ok)
Code:
mysql_install_db                                                    
WARNING: The host 'my_system.net' could not be looked up with /usr/local/bin/resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MariaDB version. The MariaDB daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MariaDB privileges !
mysql.user table already exists!
Run mysql_upgrade, not mysql_install_db

Last edited by gordon.f; 4th June 2022 at 12:46 PM.
Reply With Quote
Old 4th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

So, nothing in your logs related to the 404 error.
Quote:
Originally Posted by gordon.f View Post
Code:
mysql_install_db
mysql_install_db(1) should only be used when provisioning MariaDB for the very first time, and /var/mysql does not yet exist. Or if you have deleted the /var/mysql structure and wish to recreate it, starting over.
Quote:
Code:
WARNING: The host 'my_system.net' could not be looked up....
resolveip(1) is a tool included with the MariaDB server, which uses the OS's domain name resolver gethostbyname(3) from libc. OpenBSD's library call uses resolv.conf(5) for name resolution. The system named 'my_system.net' is not defined either by your provisioned nameserver(s) or by your hosts(5) file.
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

Quote:
resolveip(1) is a tool included with the MariaDB server, which uses the OS's domain name resolver gethostbyname(3) from libc. OpenBSD's library call uses resolv.conf(5) for name resolution. The system named 'my_system.net' is not defined either by your provisioned nameserver(s) or by your hosts(5) file.
I don't know how to check necessary files.

This is my /etc/hosts:
Code:
>>>cat /etc/hosts                     
127.0.0.1	localhost
::1		localhost
Also there is no gethostbyname(3):
Code:
>>>gethostbyname
ksh: gethostbyname: not found
Code:
cat /etc/resolv.conf                                                
lookup file bind
Is my problem related to this resolving issue? If so, could you please guide me?
Reply With Quote
Old 4th June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Domain names such as "daemonforums.org" need to be resolved into IP addresses, such as "95.170.82.241", in order to communicate over a network. There are two ways to resolve names into addresses: 1) via one or more domain name servers that provide this as a service, or 2) via a local file on the computer that lists domain names and their IP addresses. Your OpenBSD system does not have any domain name servers provisioned. If there were any, there would be "nameserver" lines in /etc/resolv.conf. You only have a local file defining names and addresses. In that local file, you only have "localhost" defined, no other systems, and therefore no definition for "my_system.net". There are man pages that may help: the resolv.conf(5) man page and the hosts(5) man page.
Quote:
Also there is no gethostbyname(3)...
There most certainly is, but it is not a program in your $PATH. Instead, it is a library call, a function of the C library, callable from within programs such as MariaDB's resolveip(1) program. The gethostbyname(3) man page describes the library call and its usage in detail.
Reply With Quote
Old 4th June 2022
gordon.f gordon.f is offline
Fdisk Soldier
 
Join Date: Oct 2021
Location: Europe
Posts: 60
Default

Dear jggimi;

Thanks a lot. Let's see what can I achieve and I'll let you know about the result.
Reply With Quote
Reply

Tags
httpd, php, phpmyadmin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating the "vi /etc/httpd.conf", httpd -n, rcctl restart httpd" treadmill J65nko Guides 0 18th May 2021 12:58 AM
How to configure nagios-web on OpenBSD 5.8 httpd? kleefaj OpenBSD Packages and Ports 0 11th April 2016 04:58 PM
phpMyAdmin problems werwer OpenBSD General 5 16th July 2010 10:53 AM
phpMyAdmin Unaccessable Nk2Network OpenBSD Packages and Ports 2 20th April 2009 09:13 PM
phpMyAdmin Unaccessable plexter OpenBSD Packages and Ports 3 16th December 2008 10:32 PM


All times are GMT. The time now is 04:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick