You are not logged in.
I folowed this guide: http://wiki.archlinux.org/index.php/LAMP and I did everything it says and everything is working well... but when I try to install any CMS that uses MySQL, it says that mysql is not running... Even with Nmap, it only shows that apache is running... anyone knows why ?
when I'm installing Xoops, it prints this error:
Fatal error:
mysql extension not loaded in /home/httpd/html/xoops-2.2.3a-final-xpr/html/class/database/mysqldatabase.php on line 74
But, phpMyAdmin runs without any errors... this is so strange...
Can anyone help me ?
Thanks in advance
Offline
uncomment
extension=mysql.so
in your /etc/php.ini file.
and..by default, mysql does not listen on external interfaces ('no-networking' in my.cnf). which only matters if you are trying to use mysql from another machine (ie. webserver on a different system). For local host usage, it will just use a socket.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I did that... and MySQL is in my machine... I told you that I folowed the howto...
Offline
stupid question - /etc/rc.d/mysqld is running?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
Yes, it is... Even after I restart my computer, the http deamon starts and the mysql one also... I didn't forget to add mysqld and httpd to the deamons list on rc.conf....
Offline
SOooo.... I gues anyone knows the answer... too bad...
I'll just have so switch to PostgreSQL then...
Offline
is phpinfo() showing mysql would be ok?
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
I know what it is, I had the same problem.
For some reason, the php.ini in the php5-package refers to libs in linux as .dll. What you want to do is locate the extension-dir setting, and change it to look for .so.
I have no idea why the package suddenly started doing this, as php.ini was correct before.
Offline
I don't get what you're saying... You're telling me that I have to locate the extension-dir...
Do I have to change this ?:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php/extensions/php"
If it's this I have to change, how do I make it look for .so ?
In the folder /usr/lib/php/extensions/php there's a mysql.so file, and on the /etc/php.ini file there's extension=mysql.so ... so what's wrong ?
Offline
Gah, sorry.
You want to change
extension=mysql.dll
to
extension=mysql.so
Offline
All I had to do is enable oadmodule php5_module in apache.
Mysql support is already compiled in php5.
Try phpinfo.php, it tells you:
<?
phpinfo();
?>
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
I don't have any extension=mysql.dll in my php.ini.... I just have extension=mysql.so...
Here's my <?
phpinfo();
?>
This is Arch Linux, running PHP.
PHP Logo
PHP Version 5.1.1
System Linux localhost 2.6.15 #4 PREEMPT Mon Jan 9 13:16:27 CAT 2006 i686
Build Date Dec 5 2005 11:31:11
Configure Command './configure' '--with-apxs2' '--prefix=/usr' '--sysconfdir=/etc' '--with-layout=PHP' '--with-ttf' '--enable-mailparse' '--with-config-file-scan-dir=/etc' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-ftp=shared' '--enable-gd-native-ttf' '--enable-magic-quotes' '--enable-posix=shared' '--enable-session' '--enable-shared' '--enable-shmop=shared' '--enable-pdo=shared' '--enable-sqlite-utf8' '--enable-sockets=shared' '--enable-xml' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-sysvmsg=shared' '--enable-track-vars' '--enable-trans-sid' '--enable-safe-mode' '--with-imap' '--with-imap-ssl' '--with-ncurses' '--with-readline' '--with-bz2=shared' '--with-curl' '--with-mime-magic' '--with-freetype-dir=/usr' '--with-gd=shared' '--enable-exif' '--with-jpeg-dir=/usr' '--enable-dba' '--without-db2' '--without-db3' '--with-inifile' '--with-flatfile' '--with-gdbm' '--with-ldap=shared' '--with-openssl' '--with-gettext' '--with-unixODBC=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-mysqli=shared' '--with-mysql-sock=/tmp/mysql.sock' '--with-pdo-mysql=shared,/usr' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-pgsql-sock=/tmp/pgsql.sock' '--with-pdo-pgsql=shared,/usr' '--with-sqlite=shared' '--with-pdo-sqlite=shared,/usr' '--with-pear=/usr/share/pear' '--with-dom' '--with-dom-xslt' '--with-xsl' '--with-png-dir=/usr' '--with-regex=php' '--with-zlib' '--enable-mbstring=all' '--enable-mbregex'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/lib
Scan this dir for additional .ini files /etc
additional .ini files parsed /etc/php.ini
PHP API 20041225
PHP Extension 20050922
Zend Extension 220051025
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib, https, ftps, compress.bzip2
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, convert.iconv.*, zlib.*, bzip2.*
Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.1.0, Copyright (c) 1998-2005 Zend Technologies
PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
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 no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
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 On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2039 2039
expose_php On On
extension_dir /usr/lib/php/extensions/php /usr/lib/php/extensions/php
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/share/pear .:/usr/share/pear
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_time 60 60
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays Off Off
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from me@localhost.com me@localhost.com
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
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
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off
apache2handler
Apache Version Apache
Apache API Version 20020903
Server Administrator you@your.address
Hostname:Port laptop-do-joao.net:0
User/Group nobody(99)/99
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Virtual Server No
Server Root /usr
Loaded Modules core prefork http_core mod_so mod_access mod_actions mod_alias mod_asis mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest mod_autoindex mod_cgi mod_dav mod_dav_fs mod_dir mod_env mod_expires mod_ext_filter mod_headers mod_imap mod_include mod_info mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_speling mod_ssl mod_status mod_userdir mod_vhost_alias mod_php5
Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0
Apache Environment
Variable Value
HTTP_HOST laptop-do-joao.net
HTTP_USER_AGENT Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060104 Firefox/1.5
HTTP_ACCEPT text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_LANGUAGE en-us,en;q=0.5
HTTP_ACCEPT_ENCODING gzip,deflate
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE 300
HTTP_CONNECTION keep-alive
PATH /bin:/usr/bin:/sbin:/usr/sbin
SERVER_SIGNATURE <address>Apache Server at laptop-do-joao.net Port 80</address>
SERVER_SOFTWARE Apache
SERVER_NAME laptop-do-joao.net
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 127.0.0.1
DOCUMENT_ROOT /home/httpd/html
SERVER_ADMIN you@your.address
SCRIPT_FILENAME /home/httpd/html/test.php
REMOTE_PORT 33973
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /test.php
SCRIPT_NAME /test.php
HTTP Headers Information
HTTP Request Headers
HTTP Request GET /test.php HTTP/1.1
Host laptop-do-joao.net
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060104 Firefox/1.5
Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
HTTP Response Headers
X-Powered-By PHP/5.1.1
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html; charset=ISO-8859-1
bcmath
BCMath support enabled
bz2
BZip2 Support Enabled
Stream Wrapper support compress.bz2://
Stream Filter support bzip2.decompress, bzip2.compress
BZip2 Version 1.0.3, 15-Feb-2005
calendar
Calendar support enabled
ctype
ctype functions enabled
curl
CURL support enabled
CURL Information libcurl/7.15.0 OpenSSL/0.9.7h zlib/1.2.3
date
date/time support enabled
Timezone Database Version 2005.14
Timezone Database internal
Default timezone Africa/Khartoum
Directive Local Value Master Value
date.timezone no value no value
dba
DBA support enabled
Supported handlers gdbm cdb cdb_make inifile flatfile
dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.22
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled
exif
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c,v 1.173.2.2 2005/10/10 06:09:25 helly Exp $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF
ftp
FTP support enabled
gettext
GetText Support enabled
iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.3.5
Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1
imap
IMAP c-Client Version 2004
SSL Support enabled
libxml
libXML support active
libXML Version 2.6.22
libXML streams enabled
mbstring
Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 3.7.1
mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding ISO-8859-1 no value
mbstring.language neutral neutral
mbstring.substitute_character no value no value
mime_magic
mime_magic support enabled
Directive Local Value Master Value
mime_magic.debug Off Off
mime_magic.magicfile /etc/httpd/conf/magic /etc/httpd/conf/magic
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.0.18
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
openssl
OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.7h 11 Oct 2005
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 6.2 01-Aug-2005
posix
Revision $Revision: 1.70.2.1 $
session
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0
shmop
shmop support enabled
SimpleXML
Simplexml support enabled
Revision $Revision: 1.151.2.7 $
Schema support enabled
sockets
Sockets Support enabled
SPL
SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RuntimeException, SimpleXMLIterator, SplFileObject, SplObjectStorage, UnderflowException, UnexpectedValueException
standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.83 90.83
date.sunset_zenith 90.83 90.83
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value
tokenizer
Tokenizer Support enabled
xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.22
xsl
XSL enabled
libxslt Version 1.1.15
libxslt compiled against libxml Version 2.6.21
EXSLT enabled
libexslt Version 1.1.15
zlib
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Additional Modules
Module Name
sysvsem
sysvshm
Environment
Variable Value
CONSOLE /dev/console
TERM linux
LD_LIBRARY_PATH /usr/lib:
INIT_VERSION sysvinit-2.86
PATH /bin:/usr/bin:/sbin:/usr/sbin
RUNLEVEL 5
PWD /
PREVLEVEL N
SHLVL 3
HOME /
BOOT_IMAGE Arch-2.6.15
_ /usr/sbin/httpd
PHP Variables
Variable Value
_SERVER["HTTP_HOST"] laptop-do-joao.net
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060104 Firefox/1.5
_SERVER["HTTP_ACCEPT"] text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["PATH"] /bin:/usr/bin:/sbin:/usr/sbin
_SERVER["SERVER_SIGNATURE"] <address>Apache Server at laptop-do-joao.net Port 80</address>
_SERVER["SERVER_SOFTWARE"] Apache
_SERVER["SERVER_NAME"] laptop-do-joao.net
_SERVER["SERVER_ADDR"] 127.0.0.1
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] 127.0.0.1
_SERVER["DOCUMENT_ROOT"] /home/httpd/html
_SERVER["SERVER_ADMIN"] you@your.address
_SERVER["SCRIPT_FILENAME"] /home/httpd/html/test.php
_SERVER["REMOTE_PORT"] 33973
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /test.php
_SERVER["SCRIPT_NAME"] /test.php
_SERVER["PHP_SELF"] /test.php
_SERVER["REQUEST_TIME"] 1137274380
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["CONSOLE"] /dev/console
_ENV["TERM"] linux
_ENV["LD_LIBRARY_PATH"] /usr/lib:
_ENV["INIT_VERSION"] sysvinit-2.86
_ENV["PATH"] /bin:/usr/bin:/sbin:/usr/sbin
_ENV["RUNLEVEL"] 5
_ENV["PWD"] /
_ENV["PREVLEVEL"] N
_ENV["SHLVL"] 3
_ENV["HOME"] /
_ENV["BOOT_IMAGE"] Arch-2.6.15
_ENV["_"] /usr/sbin/httpd
PHP License
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
Offline
And guess what ?!
NOW IT'S WORKING !!!
Maybe because I were playing on php.ini...
Thanks for the ideas guys !!!
Offline
You don't need mysql.so, nore mysql.dll.
Offline
Ja.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
No, I am not. Definetly, I have no mysql.so enabled in php.ini, and I use phpmyadmin, and work on my mysql tables.
Offline
Ah, I have no mysql.so enabled in php, 2. Like annette said - it does what it does:
cat /etc/php.ini | grep mysql.so
;extension=pdo_mysql.so
;extension=mysql.so
You can also check PKGBUILD of php to see if mysql is compiled in, and you'll notice it is. No need to guess if there is a proof.
http://cvs.archlinux.org/cgi-bin/viewcv … cvs-markup
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
This is odd. I'm running the very latest package for php5, and I had to change from .dll to .so.
I tried commenting the extension=mysql.so out, which disabled mysql support in PHP. Something is up, I say!
Offline
phpmyadmin tries to load the mysql extension via the dl() function. This will only fail if you enable safe_mode. So you don't have to uncomment the mysql.so section in your php.ini file if safe_mode=off
Jürgen
Offline