SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been using Slackware for a little over a year now. I would like to learn more about it, but am unsure where exactly to start. I'd like to improve my script-fu, but so far have been unable to motivate myself to actually go out and search. So far, it has 'just worked' which is how I've managed to get this far without really learning much. I will say that I find forums like this one VERY helpful because it saves my data, so if I have a problem like this one, and I remember something someone said, I can easily go back and read what they said again. But for my current problem:
PHPMyAdmin is inaccessible. I don't know why. I've checked /var/log/httpd/error.log and found the following two lines for today:
Code:
[Tue May 14 09:30:57.837363 2019] [mpm_event:notice] [pid 1367:tid 140465856018304] AH00489: Apache/2.4.39 (Unix) configured -- resuming normal operations
[Tue May 14 09:30:57.948982 2019] [core:notice] [pid 1367:tid 140465856018304] AH00094: Command line: '/usr/sbin/httpd'
What is happening is that my PHPMyAdmin interface is permanently (or at least as close to "permanently" as seamonkey can get at this time) open in a tab. However, the page loads, and I see PHP code in it. I know from my experience that I should never see PHP code in a webpage. I am getting this from address
near the bottom of /etc/httpd/httpd.conf just uncomment one line
Code:
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf
you might want to edit another line in the same file, just to avoid specifying index.php
Code:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
if you want to have a look at php errors maybe the most handy way is to edit a line in the /etc/php.ini file
Code:
;error_log = php_errors.log
like
Code:
error_log = /var/log/httpd/php_errors.log
then, restart httpd
Code:
/etc/rc.d/rc.httpd restart
you can also call the php interpreter via the command line and check for errors there
Code:
$ php -v
PHP 5.6.40 (cli) (built: Feb 7 2019 14:31:35)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
near the bottom of /etc/httpd/httpd.conf just uncomment one line
Code:
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf
you might want to edit another line in the same file, just to avoid specifying index.php
Code:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
if you want to have a look at php errors maybe the most handy way is to edit a line in the /etc/php.ini file
Code:
;error_log = php_errors.log
like
Code:
error_log = /var/log/httpd/php_errors.log
then, restart httpd
Code:
/etc/rc.d/rc.httpd restart
you can also call the php interpreter via the command line and check for errors there
Code:
$ php -v
PHP 5.6.40 (cli) (built: Feb 7 2019 14:31:35)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
Thank you for the above advice. Now, after carefully following your instructions, my problem has changed. Now, instead of seeing PHP code, the page completely fails to load. I see in my PHPMyAdmin tab a page that says "Page Load Error" in the title and the text of the page says "Connection Interrupted", "The document contains no data.", and "The network link was interrupted while negotiating a connection. Please try again." When I try again, the same thing happens. There was some information returned when I restarted httpd, but I don't think it's relevant to my current issue:
Code:
root@caitlyn:~# /etc/rc.d/rc.httpd restart
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
you can try calling the interpreter via the command line, as suggested above, or read /var/log/httpd/error.log and /var/log/httpd/php_errors.log (hope you have enabled it, still like suggested above).
you can try calling the interpreter via the command line, as suggested above, or read /var/log/httpd/error.log and /var/log/httpd/php_errors.log (hope you have enabled it, still like suggested above).
From /var/log/httpd/error_log:
Code:
[Tue May 14 11:06:07.948731 2019] [core:notice] [pid 1367:tid 140465856018304] AH00052: child pid 5225 exit signal Segmentation fault (11)
[Tue May 14 11:06:07.948767 2019] [core:notice] [pid 1367:tid 140465856018304] AH00052: child pid 5226 exit signal Segmentation fault (11)
[Tue May 14 11:06:08.949036 2019] [core:notice] [pid 1367:tid 140465856018304] AH00052: child pid 5281 exit signal Segmentation fault (11)
[Tue May 14 11:06:08.949061 2019] [core:notice] [pid 1367:tid 140465856018304] AH00052: child pid 5282 exit signal Segmentation fault (11)
[Tue May 14 11:06:08.949067 2019] [core:notice] [pid 1367:tid 140465856018304] AH00052: child pid 5283 exit signal Segmentation fault (11)
And from /var/log/httpd/php_errors.log:
Code:
root@caitlyn:~# cat /var/log/httpd/php_errors.log
[14-May-2019 16:03:15 UTC] PHP Warning: require_once(./libraries/vendor_config.php): failed to open stream: No such file or directory in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
[14-May-2019 16:03:15 UTC] PHP Fatal error: require_once(): Failed opening required './libraries/vendor_config.php' (include_path='.:/usr/lib64/php') in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
When I try to run a custom php script that does not rely on a complex file system/structure, I get this:
Code:
root@caitlyn:~# php /var/www/htdocs/index.php
Host information: Localhost via UNIX socket
root@caitlyn:~# cat /var/log/httpd/php_errors.log
[14-May-2019 16:03:15 UTC] PHP Warning: require_once(./libraries/vendor_config.php): failed to open stream: No such file or directory in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
[14-May-2019 16:03:15 UTC] PHP Fatal error: require_once(): Failed opening required './libraries/vendor_config.php' (include_path='.:/usr/lib64/php') in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
that seems to say that your phpmyadmin installation is incomplete.
Quote:
When I try to run a custom php script that does not rely on a complex file system/structure, I get this:
Code:
root@caitlyn:~# php /var/www/htdocs/index.php
Host information: Localhost via UNIX socket
However, when I open that page in seamonkey, it returns a blank page. The code appears in the page source view, but the page itself does not execute.
it shouldn't appear in the page source view at all when the php code is interpreted, just the output/html, if there is some.
what are you opening in seamonkey? the file /var/www/htdocs/index.php (that is just a text file in your filesystem) or the php code executed by mod_php running through apache ( http://localhost/index.php ) ?
try creating a /var/www/htdocs/info.php file with this content
Code:
<?php
phpinfo();
?>
then run it via the command line ( "php /var/www/htdocs/info.php" ) and via the browser ( http://localhost/info.php ) and check the output (if it works in both cases and if it's the same).
...but looking at the output from your script via the command line at least there your php seems to be working just fine.
that seems to say that your phpmyadmin installation is incomplete.
it shouldn't appear in the page source view at all when the php code is interpreted, just the output/html, if there is some.
what are you opening in seamonkey? the file /var/www/htdocs/index.php (that is just a text file in your filesystem) or the php code executed by mod_php running through apache ( http://localhost/index.php ) ?
try creating a /var/www/htdocs/info.php file with this content
Code:
<?php
phpinfo();
?>
then run it via the command line ( "php /var/www/htdocs/info.php" ) and via the browser ( http://localhost/info.php ) and check the output (if it works in both cases and if it's the same).
...but looking at the output from your script via the command line at least there your php seems to be working just fine.
PHP executes fine from the command line. But it's the web interface I need working. The info.php script returns Page Load Error when I try to load it in seamonkey. The phpinfo command was too long for this post. I'll have to send it through multiple posts...
Registered PHP Streams => compress.bzip2, php, file, glob, data, http, ftp, https, ftps, compress.zlib, zip, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => mcrypt.*, mdecrypt.*, bzip2.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*, zlib.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
_______________________________________________________________________
Configuration
bcmath
BCMath support => enabled
Directive => Local Value => Master Value
bcmath.scale => 0 => 0
bz2
BZip2 Support => Enabled
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
BZip2 Version => 1.0.6, 6-Sept-2010
calendar
Calendar support => enabled
Core
PHP Version => 5.6.40
Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => 0 => 0
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => /var/log/httpd/php_errors.log => /var/log/httpd/php_errors.log
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib64/php/extensions => /usr/lib64/php/extensions
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/lib64/php => .:/usr/lib64/php
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 17 => 17
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
ctype
ctype functions => enabled
curl
cURL support => enabled
cURL Information => 7.64.1
Age => 4
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => No
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => No
SSL => Yes
SSPI => No
TLS-SRP => Yes
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host => x86_64-pc-linux-gnu
SSL Version => OpenSSL/1.0.2r
ZLib Version => 1.2.11
libSSH Version => libssh2/1.8.2
Last edited by maschelsea; 05-14-2019 at 05:33 PM.
Thank you for trying to help me solve this. I really think that the problem lies with apache and not php. Maybe the way that mod_php is interfaced with apache?
Normally it is an extremely easy process to get php working with apache, following the simple points that ponce posted above. I have enabled it on several of my installations using those exact same steps without issue.
Can you verify your apache and php install versions?
Normally it is an extremely easy process to get php working with apache, following the simple points that ponce posted above. I have enabled it on several of my installations using those exact same steps without issue.
Can you verify your apache and php install versions?
Code:
ls -1 /var/log/packages/{httpd,php}*
Code:
root@caitlyn:~# ls -1 /var/log/packages/{httpd,php}*
/var/log/packages/httpd-2.4.39-x86_64-1_slack14.2
/var/log/packages/php-5.6.40-x86_64-1_slack14.2
/var/log/packages/phpmyadmin-4.8.3-noarch-1_SBo
UPDATE: I just noticed that the tab which was open to the info.php file in seamonkey is now displaying correctly. PHPMyAdmin still shows me PHP code. That's the one I really need. Whatever it is that you're advising me to do so far is apparently working, but we're not there yet. Thank you for your help so far.
root@caitlyn:~# cat /var/log/httpd/php_errors.log
[14-May-2019 16:03:15 UTC] PHP Warning: require_once(./libraries/vendor_config.php): failed to open stream: No such file or directory in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
[14-May-2019 16:03:15 UTC] PHP Fatal error: require_once(): Failed opening required './libraries/vendor_config.php' (include_path='.:/usr/lib64/php') in /var/www/htdocs/phpmyadmin/libraries/common.inc.php on line 74
that seems to say that your phpmyadmin installation is incomplete.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.