The connection was refused when attempting the localhost
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
The connection was refused when attempting the localhost
When I want to run the PHP code i got the prolem was
The connection was refused when attempting the localhost
Then I'm trying to start the httpd server. But it gives one error.
That error is :
httpd failed. The error was: Starting httpd: Syntax error on line 6 of /etc/httpd/conf.d/auth_mysql.conf:
Cannot load /etc/httpd/modules/mod_auth_mysql.so into server: libmysqlclient.so.10: cannot open shared object file: No such file or directory
[FAILED]
I think you need to install MySQL and the Apache MySQL module. Or else if you don't need MySQL just remove the module from Apache configuration and try again.
What distro and version of Apache are you using by the way?
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread/question get the exposure it deserves.
It looks you don't have MySQL installed. Please check it. Alternatively, if you don't want to use a database, you may remove MySQL support from Apache and use it in that configuration. Do you need MySQL or not?
It's not just mysql, but you need the myslq-shared-compat package. That package provides the libmysqlclient.so.10 file you're missing. There used to be 2 different shared library packages - mysql-shared-compat, and myslq-shared. If you installed the first, you didn't need to install the latter. If you get the packages from mysql directly, I believe that last linux rpm version that had that package was 4.1.13. 4.1.15 had the package also, but it looks like mysql changed their site and have taken the package out. It also looks like you won't be able to find previous versions of mysql on mysql's site.
the difference between mysql version 4.1.13 and the higher versions, is that the higher versions use glibc2.3, so if you're running an old rpm distro like redhat 7.3, you're last availbe version of mysql is 4.1.13. Although, it doesn't seem to matter now since the shared compat package is no longer listed.
Now bear in mind, I'm only talking about the packages from mysql's site. Your distro might package things up differently.
Of course, you can always try rebuilding the source.
I reinstalled the mod_auth_mysql-20030510-4.1.src.rpm package, the connection was refused problem was gone. But I got another problem which is Call to undefined function: mysql_connect()
I told you, you need the mysql-shared-compat package. It looks like mysql have taken that package out from their download site. Normally you wouldn't install MySQL-shared-5.0.16-0.glibc23 if you installed the MySQL-shared-compat package. The last version of MySQL I've seen that had the compatibility package was 4.1.13. Check the web if you can find that package. If not, give me a holler and I'll find out some way of getting it to you.
installing php from rpms, I don't know as I've always compiled php from source. The default php.ini file should work as is if compiled from source. Definately check your php.ini file, but if you want, uninstall the php rpms you installed and compile the source code instead. Things should definately work out better for you.
The ./configure command I used (note I couldn't figure out how to get snmp compiled in so that's omitted):
use the correct path to the base install directory of your apache install when using the --with-apx2 option.
*edit: also of note, there's a lot of options I use and you'll have to get the packages for things like the correct version of libxml (or libxml2), unixODBC, etc...
then type:
make
su
<enter root password>
make install
'make install' will install the correct libphp5.so and libphp5.la apache modules in the right location (/install/path/to/apache/modules) and will put in the correct load module line in httpd.conf.
With mysql, I do use the rpms, but with apache I always compile that from source, as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.