MySQL Forums
Forum List  »  PHP

php and mysql won't communicate
Posted by: Mike Martinez
Date: May 09, 2006 08:28PM

I'm running Redhat Enterprise 4
It came with mysql 4.1.7
and Apache 2.0.52
I downloaded php-5.0.5 and ran the following:
'./configure' '--with-apxs2=/usr/sbin/apxs' '--with-mysqli-dir=/usr' '--with-mysql-dir=/usr' '--with-zlib-dir=/usr/include'

I then ran make
Then I ran make install

After doing this I ran <?php phpinfo(); ?> and the results are the following:

PHP Logo
PHP Version 5.0.5

System Linux la-im-web-01.XXXXXXXXX.imcorp.local 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:29:47 EST 2005 x86_64
Build Date May 9 2006 18:21:05
Configure Command './configure' '--with-apxs2=/usr/sbin/apxs' '--with-mysqli-dir=/usr' '--with-mysql-dir=/usr' '--with-zlib-dir=/usr/include'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20031224
PHP Extension 20041030
Zend Extension 220040412
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, http, ftp, compress.zlib
Registered Stream Socket Transports tcp, udp, unix, udg

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies

PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference Off Off
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/lib64/php4 /usr/lib64/php4
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/local/lib/php .:/usr/local/lib/php
log_errors On On
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 14 14
register_argc_argv On On
register_globals On On
register_long_arrays On On
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 no value no value
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/2.0.52 (Red Hat)
Apache API Version 20020903
Server Administrator XXXXXXXXXXXX
Hostname:Port XXXXXXX.com:0
User/Group apache(48)/48
Max Requests Per Child: 4000 - Keep Alive: off - Max Per Connection: 100
Timeouts Connection: 120 - Keep-Alive: 15
Virtual Server Yes
Server Root /etc/httpd
Loaded Modules core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest util_ldap mod_auth_ldap mod_include mod_log_config mod_env mod_mime_magic mod_cern_meta mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy proxy_ftp proxy_http proxy_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_php5 mod_auth_kerb mod_auth_mysql mod_auth_pgsql mod_authz_ldap mod_perl mod_python mod_ssl mod_dav_svn mod_authz_svn

Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment
Variable Value
HTTP_HOST xx.xx.xx.xxx
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
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,en-us;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
HTTP_CACHE_CONTROL max-age=0
PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
SERVER_SIGNATURE <address>Apache/2.0.52 (Red Hat) Server at xxxxxxxx Port 80</address>
SERVER_SOFTWARE Apache/2.0.52 (Red Hat)
SERVER_NAME xxxxxxxxxxxxx
SERVER_ADDR xxxxxxxxxxxxxx
SERVER_PORT 80
REMOTE_ADDR xxxxxxxxxxx
DOCUMENT_ROOT /var2/www/xxxxxxx/html
SERVER_ADMIN xxxxxxxxxx
SCRIPT_FILENAME /var2/www/xxxxxxx/html/phpinfo.php
REMOTE_PORT 1668
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /phpinfo.php
SCRIPT_NAME /phpinfo.php

HTTP Headers Information
HTTP Request Headers
HTTP Request GET /phpinfo.php HTTP/1.1
Host xxxxxxxx
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
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,en-us;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
Cache-Control max-age=0
HTTP Response Headers
X-Powered-By PHP/5.0.5
Connection close
Transfer-Encoding chunked
Content-Type text/html

ctype
ctype functions enabled

dom
DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.16
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.3.4

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

libxml
libXML support active
libXML Version 2.6.16
libXML streams enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 6.2 01-Aug-2005

posix
Revision $Revision: 1.60.2.4 $

session
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
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 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/lib/php/session /var/lib/php/session
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0

SimpleXML
Simplexml support enabled
Revision $Revision: 1.139.2.4 $
Schema support enabled

SPL
SPL support enabled
Interfaces RecursiveIterator, SeekableIterator
Classes ArrayIterator, ArrayObject, CachingIterator, CachingRecursiveIterator, DirectoryIterator, FilterIterator, LimitIterator, ParentIterator, RecursiveDirectoryIterator, RecursiveIteratorIterator, SimpleXMLIterator

SQLite
SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c,v 1.146.2.7 2005/06/07 15:38:37 dmitry Exp $
SQLite Library 2.8.14
SQLite Encoding iso8859

Directive Local Value Master Value
sqlite.assoc_case 0 0

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=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value

tokenizer
Tokenizer Support enabled

xml
XML Support active
XML Namespace Support active
libxml2 Version 2.6.16

zlib
ZLib Support enabled
Compiled Version 1.2.1.2
Linked Version 1.2.1.2

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

Environment
Variable Value
LANG C
TERM xterm
PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PWD /
SHLVL 1
_ /sbin/initlog

PHP Variables
Variable Value
PHP_SELF /phpinfo.php
_SERVER["HTTP_HOST"] xxxxxxxxxx
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
_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,en-us;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["HTTP_CACHE_CONTROL"] max-age=0
_SERVER["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_SERVER["SERVER_SIGNATURE"] <address>Apache/2.0.52 (Red Hat) Server at xxxxxxxx Port 80</address>
_SERVER["SERVER_SOFTWARE"] Apache/2.0.52 (Red Hat)
_SERVER["SERVER_NAME"] xxxxxx
_SERVER["SERVER_ADDR"] xxxxx
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] xxxx
_SERVER["DOCUMENT_ROOT"] /var2/www/xxxxxx/html
_SERVER["SERVER_ADMIN"] xxxxxxxx
_SERVER["SCRIPT_FILENAME"] /var2/wwwxxxxxxxx/html/phpinfo.php
_SERVER["REMOTE_PORT"] 1668
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["argv"]

Array
(
)

_SERVER["argc"] 0
_ENV["LANG"] C
_ENV["TERM"] xterm
_ENV["PATH"] /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
_ENV["PWD"] /
_ENV["SHLVL"] 1
_ENV["_"] /sbin/initlog

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.

=============================================
I believe I am running the initail configure command wrong. Does anyone working on Redhat Enterprise 4 have any idea what the correct configure command would be to make this work?

Options: ReplyQuote


Subject
Written By
Posted
php and mysql won't communicate
May 09, 2006 08:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.