Testing MySQL PHP connection

Testing MySQL PHP connection

am 09.07.2007 17:11:47 von Jacob Bergman

------_=_NextPart_001_01C7C23B.786D2A25
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

While trying to connect to the mysqll database with php, I use the
following file:

=20


/* Program: mysql_up.php

* Desc: Connects to MySQL Server and=20

* outputs settings.

*/

echo "

Test MySQL

";

$host=3D"PHP-AND-MYSQL";

$user=3D"root";

$password=3D"Britt9906";

=20

$cxn =3D mysqli_connect($host,$user,$password);

$sql=3D"SHOW STATUS";

$result =3D mysqli_query($cxn,$sql);

if($result == false)

{

echo "

Error: ".mysqli_error($cxn)."

";

}

else

{

/* Table that displays the results */

echo "



";

for($i =3D 0; $i < mysqli_num_rows($result); $i++)=20

{

echo "";

$row_array =3D mysqli_fetch_row($result);

for($j =3D 0;$j < mysqli_num_fields($result);$j++)=20

{

echo "\n";

}

}

echo "
Variable_name Value
".$row_array[$j]."
";

}

?>



=20

When I access this file I I get "Fatal error: Call to undefined function
mysqli_connect() in C:\Program Files\Apache
Group\Apache2\htdocs\mysql_up.php on line 13"

=20

Not sure what is wrong... I'm pretty new to all this and grabbed this
out of a book. Thanks for the help!

=20

Jacob Bergman

Network Technician

Pullman School District #267

(509) 432-4012

jbergman@psd267.wednet.edu

=20


------_=_NextPart_001_01C7C23B.786D2A25--

Re: Testing MySQL PHP connection

am 09.07.2007 17:17:59 von Stut

Jacob Bergman wrote:
> While trying to connect to the mysqll database with php, I use the
> following file:



> When I access this file I I get "Fatal error: Call to undefined function
> mysqli_connect() in C:\Program Files\Apache
> Group\Apache2\htdocs\mysql_up.php on line 13"
>
> Not sure what is wrong... I'm pretty new to all this and grabbed this
> out of a book. Thanks for the help!

You need to enable/install the MySQLi extension. Your book should tell
you how to do that, if not: http://php.net/mysqli

-Stut

--
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Testing MySQL PHP connection

am 09.07.2007 17:18:29 von Niel Archer

Hi

make sure the required dll ("php_mysqli.dll") is enabled in the php.ini
and not still commented out as is the default
--
Niel Archer

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Testing MySQL PHP connection

am 09.07.2007 17:40:32 von Stut

Please include the list when replying.

Jacob Bergman wrote:
> Yeah, the extension=php_mysqli.dll line is enabled in the php.ini file.
> Doesn't that error indicate something wrong with the php file itself?

Have you restarted Apache/IIS/whatever since changing it?

The error indicates that it doesn't have any knowledge of a function
called mysqli_connect. That function will be registered when the
extension is loaded, so the extension is not being loaded (either
correctly or at all).

If you have then make a phpinfo page (http://php.net/phpinfo) and check
that PHP thinks MySQLi is installed.

-Stut

--
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]
> Sent: Monday, July 09, 2007 8:18 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>
> Jacob Bergman wrote:
>> While trying to connect to the mysqll database with php, I use the
>> following file:
>
>
>
>> When I access this file I I get "Fatal error: Call to undefined
> function
>> mysqli_connect() in C:\Program Files\Apache
>> Group\Apache2\htdocs\mysql_up.php on line 13"
>>
>> Not sure what is wrong... I'm pretty new to all this and grabbed this
>> out of a book. Thanks for the help!
>
> You need to enable/install the MySQLi extension. Your book should tell
> you how to do that, if not: http://php.net/mysqli
>
> -Stut
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 17:47:11 von Jacob Bergman

Sorry about that...

Anyways, I created a phpinfo page and don't see anything about mysql in
the output... =20

PHP Version 5.2.3=20

System Windows NT PHP-AND-MYSQL 5.1 build 2600 =20
Build Date May 31 2007 09:36:39 =20
Configure Command cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=3Dshared" =20
Server API Apache 2.0 Handler =20
Virtual Directory Support enabled =20
Configuration File (php.ini) Path C:\WINDOWS =20
Loaded Configuration File C:\PHP\php.ini =20
PHP API 20041225 =20
PHP Extension 20060613 =20
Zend Extension 220060519 =20
Debug Build no =20
Thread Safety enabled =20
Zend Memory Manager enabled =20
IPv6 Support enabled =20
Registered PHP Streams php, file, data, http, ftp, compress.zlib =20
Registered Stream Socket Transports tcp, udp =20
Registered Stream Filters convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
zlib.* =20

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
=20


------------------------------------------------------------ ------------
--------

PHP Credits

------------------------------------------------------------ ------------
--------

Configuration
PHP Core
Directive Local Value Master Value=20
allow_call_time_pass_reference On On=20
allow_url_fopen On On=20
allow_url_include Off Off=20
always_populate_raw_post_data Off Off=20
arg_separator.input & &=20
arg_separator.output & &=20
asp_tags Off Off=20
auto_append_file no value no value=20
auto_globals_jit On On=20
auto_prepend_file no value no value=20
browscap no value no value=20
default_charset no value no value=20
default_mimetype text/html text/html=20
define_syslog_variables Off Off=20
disable_classes no value no value=20
disable_functions no value no value=20
display_errors On On=20
display_startup_errors Off Off=20
doc_root no value no value=20
docref_ext no value no value=20
docref_root no value no value=20
enable_dl On On=20
error_append_string no value no value=20
error_log no value no value=20
error_prepend_string no value no value=20
error_reporting 6135 6135=20
expose_php On On=20
extension_dir ./ ./=20
file_uploads On On=20
highlight.bg #FFFFFF #FFFFFF=20
highlight.comment #FF8000 #FF8000=20
highlight.default #0000BB #0000BB=20
highlight.html #000000 #000000=20
highlight.keyword #007700 #007700=20
highlight.string #DD0000 #DD0000=20
html_errors On On=20
ignore_repeated_errors Off Off=20
ignore_repeated_source Off Off=20
ignore_user_abort Off Off=20
implicit_flush Off Off=20
include_path .;C:\php5\pear .;C:\php5\pear=20
log_errors Off Off=20
log_errors_max_len 1024 1024=20
magic_quotes_gpc Off Off=20
magic_quotes_runtime Off Off=20
magic_quotes_sybase Off Off=20
mail.force_extra_parameters no value no value=20
max_execution_time 30 30=20
max_input_nesting_level 64 64=20
max_input_time 60 60=20
memory_limit 128M 128M=20
open_basedir no value no value=20
output_buffering no value no value=20
output_handler no value no value=20
post_max_size 8M 8M=20
precision 12 12=20
realpath_cache_size 16K 16K=20
realpath_cache_ttl 120 120=20
register_argc_argv On On=20
register_globals Off Off=20
register_long_arrays On On=20
report_memleaks On On=20
report_zend_debug On On=20
safe_mode Off Off=20
safe_mode_exec_dir no value no value=20
safe_mode_gid Off Off=20
safe_mode_include_dir no value no value=20
sendmail_from no value no value=20
sendmail_path no value no value=20
serialize_precision 100 100=20
short_open_tag On On=20
SMTP localhost localhost=20
smtp_port 25 25=20
sql.safe_mode Off Off=20
track_errors Off Off=20
unserialize_callback_func no value no value=20
upload_max_filesize 2M 2M=20
upload_tmp_dir no value no value=20
user_dir no value no value=20
variables_order EGPCS EGPCS=20
xmlrpc_error_number 0 0=20
xmlrpc_errors Off Off=20
y2k_compliance On On=20
zend.ze1_compatibility_mode Off Off=20


apache2handler
Apache Version Apache/2.0.59 (Win32) PHP/5.2.3 =20
Apache API Version 20020903 =20
Server Administrator admin@VMware.psd267.wednet.edu =20
Hostname:Port PHP-AND-MYSQL.VMware.psd267.wednet.edu:80 =20
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100 =20
Timeouts Connection: 300 - Keep-Alive: 15 =20
Virtual Server No =20
Server Root C:/Program Files/Apache Group/Apache2 =20
Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access
mod_actions mod_alias mod_asis mod_auth mod_autoindex mod_cgi mod_dir
mod_env mod_imap mod_include mod_isapi mod_log_config mod_mime mod_php5
mod_negotiation mod_setenvif mod_userdir =20

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


Apache Environment
Variable Value=20
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/xaml+xml,
application/vnd.ms-xpsdocument, application/x-ms-xbap,
application/x-ms-application, */* =20
HTTP_ACCEPT_LANGUAGE en-us =20
HTTP_ACCEPT_ENCODING gzip, deflate =20
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) =20
HTTP_HOST localhost =20
HTTP_CONNECTION Keep-Alive =20
PATH C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem =20
SystemRoot C:\WINDOWS =20
COMSPEC C:\WINDOWS\system32\cmd.exe =20
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH =20
WINDIR C:\WINDOWS =20
SERVER_SIGNATURE

Apache/2.0.59 (Win32) PHP/5.2.3 Server at
localhost Port 80
=20
SERVER_SOFTWARE Apache/2.0.59 (Win32) PHP/5.2.3 =20
SERVER_NAME localhost =20
SERVER_ADDR 127.0.0.1 =20
SERVER_PORT 80 =20
REMOTE_ADDR 127.0.0.1 =20
DOCUMENT_ROOT C:/Program Files/Apache Group/Apache2/htdocs =20
SERVER_ADMIN admin@VMware.psd267.wednet.edu =20
SCRIPT_FILENAME C:/Program Files/Apache Group/Apache2/htdocs/Info.php =20
REMOTE_PORT 2597 =20
GATEWAY_INTERFACE CGI/1.1 =20
SERVER_PROTOCOL HTTP/1.1 =20
REQUEST_METHOD GET =20
QUERY_STRING no value =20
REQUEST_URI /info.php =20
SCRIPT_NAME /info.php =20


HTTP Headers Information
HTTP Request Headers=20
HTTP Request GET /info.php HTTP/1.1 =20
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/xaml+xml,
application/vnd.ms-xpsdocument, application/x-ms-xbap,
application/x-ms-application, */* =20
Accept-Language en-us =20
Accept-Encoding gzip, deflate =20
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) =20
Host localhost =20
Connection Keep-Alive =20
HTTP Response Headers=20
X-Powered-By PHP/5.2.3 =20
Keep-Alive timeout=3D15, max=3D100 =20
Connection Keep-Alive =20
Transfer-Encoding chunked =20
Content-Type text/html =20


bcmath
BCMath support enabled =20


calendar
Calendar support enabled =20


com_dotnet
COM support enabled=20
DCOM support disabled=20
..Net support enabled=20

Directive Local Value Master Value=20
com.allow_dcom 0 0=20
com.autoregister_casesensitive 1 1=20
com.autoregister_typelib 0 0=20
com.autoregister_verbose 0 0=20
com.code_page no value no value=20
com.typelib_file no value no value=20


ctype
ctype functions enabled =20


date
date/time support enabled =20
"Olson" Timezone Database Version 2007.5 =20
Timezone Database internal =20
Default timezone Europe/London =20

Directive Local Value Master Value=20
date.default_latitude 31.7667 31.7667=20
date.default_longitude 35.2333 35.2333=20
date.sunrise_zenith 90.583333 90.583333=20
date.sunset_zenith 90.583333 90.583333=20
date.timezone no value no value=20


dom
DOM/XML enabled =20
DOM/XML API Version 20031129 =20
libxml Version 2.6.26 =20
HTML Support enabled =20
XPath Support enabled =20
XPointer Support enabled =20
Schema Support enabled =20
RelaxNG Support enabled =20


filter
Input Validation and Filtering enabled =20
Revision $Revision: 1.52.2.39 $ =20

Directive Local Value Master Value=20
filter.default unsafe_raw unsafe_raw=20
filter.default_flags no value no value=20


ftp
FTP support enabled =20


hash
hash support enabled =20
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128
ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3
tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b
haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4
haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5
haval192,5 haval224,5 haval256,5 =20


iconv
iconv support enabled =20
iconv implementation "libiconv" =20
iconv library version 1.9 =20

Directive Local Value Master Value=20
iconv.input_encoding ISO-8859-1 ISO-8859-1=20
iconv.internal_encoding ISO-8859-1 ISO-8859-1=20
iconv.output_encoding ISO-8859-1 ISO-8859-1=20


json
json support enabled =20
json version 1.2.1 =20


libxml
libXML support active =20
libXML Version 2.6.26 =20
libXML streams enabled =20


odbc
ODBC Support enabled=20
Active Persistent Links 0 =20
Active Links 0 =20
ODBC library Win32 =20

Directive Local Value Master Value=20
odbc.allow_persistent On On=20
odbc.check_persistent On On=20
odbc.default_db no value no value=20
odbc.default_pw no value no value=20
odbc.default_user no value no value=20
odbc.defaultbinmode return as is return as is=20
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes=20
odbc.max_links Unlimited Unlimited=20
odbc.max_persistent Unlimited Unlimited=20


pcre
PCRE (Perl Compatible Regular Expressions) Support enabled =20
PCRE Library Version 7.0 18-Dec-2006 =20


Reflection
Reflection enabled=20
Version $Id: php_reflection.c,v 1.164.2.33.2.39 2007/05/29 08:44:05
helly Exp $ =20


session
Session Support enabled =20
Registered save handlers files user =20
Registered serializer handlers php php_binary wddx =20

Directive Local Value Master Value=20
session.auto_start Off Off=20
session.bug_compat_42 On On=20
session.bug_compat_warn On On=20
session.cache_expire 180 180=20
session.cache_limiter nocache nocache=20
session.cookie_domain no value no value=20
session.cookie_httponly Off Off=20
session.cookie_lifetime 0 0=20
session.cookie_path / /=20
session.cookie_secure Off Off=20
session.entropy_file no value no value=20
session.entropy_length 0 0=20
session.gc_divisor 100 100=20
session.gc_maxlifetime 1440 1440=20
session.gc_probability 1 1=20
session.hash_bits_per_character 4 4=20
session.hash_function 0 0=20
session.name PHPSESSID PHPSESSID=20
session.referer_check no value no value=20
session.save_handler files files=20
session.save_path no value no value=20
session.serialize_handler php php=20
session.use_cookies On On=20
session.use_only_cookies Off Off=20
session.use_trans_sid 0 0=20


SimpleXML
Simplexml support enabled=20
Revision $Revision: 1.151.2.22.2.26 $ =20
Schema support enabled =20


SPL
SPL support enabled=20
Interfaces Countable, OuterIterator, RecursiveIterator,
SeekableIterator, SplObserver, SplSubject =20
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,
RecursiveRegexIterator, RegexIterator, RuntimeException,
SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage,
SplTempFileObject, UnderflowException, UnexpectedValueException =20


standard
Regex Library Bundled library enabled =20
Dynamic Library Support enabled =20
Internal Sendmail Support for Windows enabled =20

Directive Local Value Master Value=20
assert.active 1 1=20
assert.bail 0 0=20
assert.callback no value no value=20
assert.quiet_eval 0 0=20
assert.warning 1 1=20
auto_detect_line_endings 0 0=20
default_socket_timeout 60 60=20
safe_mode_allowed_env_vars PHP_ PHP_=20
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH=20
url_rewriter.tags =
a=3Dhref,area=3Dhref,frame=3Dsrc,input=3Dsrc,form=3D,fieldse t=3D
a=3Dhref,area=3Dhref,frame=3Dsrc,input=3Dsrc,form=3D,fieldse t=
user_agent no value no value=20


tokenizer
Tokenizer Support enabled =20


wddx
WDDX Support enabled=20
WDDX Session Serializer enabled =20


xml
XML Support active =20
XML Namespace Support active =20
libxml2 Version 2.6.26 =20


xmlreader
XMLReader enabled =20


xmlwriter
XMLWriter enabled =20


zlib
ZLib Support enabled =20
Stream Wrapper support compress.zlib:// =20
Stream Filter support zlib.inflate, zlib.deflate =20
Compiled Version 1.2.3 =20
Linked Version 1.2.3 =20

Directive Local Value Master Value=20
zlib.output_compression Off Off=20
zlib.output_compression_level -1 -1=20
zlib.output_handler no value no value=20


Additional Modules
Module Name=20


Environment
Variable Value=20
ALLUSERSPROFILE C:\Documents and Settings\All Users =20
CommonProgramFiles C:\Program Files\Common Files =20
COMPUTERNAME PHP-AND-MYSQL =20
ComSpec C:\WINDOWS\system32\cmd.exe =20
FP_NO_HOST_CHECK NO =20
NUMBER_OF_PROCESSORS 1 =20
OS Windows_NT =20
Path C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem =20
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH =20
PROCESSOR_ARCHITECTURE x86 =20
PROCESSOR_IDENTIFIER x86 Family 15 Model 6 Stepping 8, GenuineIntel =20
PROCESSOR_LEVEL 15 =20
PROCESSOR_REVISION 0608 =20
ProgramFiles C:\Program Files =20
SystemDrive C: =20
SystemRoot C:\WINDOWS =20
TEMP C:\WINDOWS\TEMP =20
TMP C:\WINDOWS\TEMP =20
USERPROFILE C:\Documents and Settings\LocalService =20
windir C:\WINDOWS =20
AP_PARENT_PID 3196 =20


PHP Variables
Variable Value=20
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash, application/xaml+xml,
application/vnd.ms-xpsdocument, application/x-ms-xbap,
application/x-ms-application, */*=20
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us=20
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate=20
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)=20
_SERVER["HTTP_HOST"] localhost=20
_SERVER["HTTP_CONNECTION"] Keep-Alive=20
_SERVER["PATH"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem=20
_SERVER["SystemRoot"] C:\WINDOWS=20
_SERVER["COMSPEC"] C:\WINDOWS\system32\cmd.exe=20
_SERVER["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH=20
_SERVER["WINDIR"] C:\WINDOWS=20
_SERVER["SERVER_SIGNATURE"]
Apache/2.0.59 (Win32) PHP/5.2.3
Server at localhost Port 80
=20
_SERVER["SERVER_SOFTWARE"] Apache/2.0.59 (Win32) PHP/5.2.3=20
_SERVER["SERVER_NAME"] localhost=20
_SERVER["SERVER_ADDR"] 127.0.0.1=20
_SERVER["SERVER_PORT"] 80=20
_SERVER["REMOTE_ADDR"] 127.0.0.1=20
_SERVER["DOCUMENT_ROOT"] C:/Program Files/Apache Group/Apache2/htdocs=20
_SERVER["SERVER_ADMIN"] admin@VMware.psd267.wednet.edu=20
_SERVER["SCRIPT_FILENAME"] C:/Program Files/Apache
Group/Apache2/htdocs/Info.php=20
_SERVER["REMOTE_PORT"] 2597=20
_SERVER["GATEWAY_INTERFACE"] CGI/1.1=20
_SERVER["SERVER_PROTOCOL"] HTTP/1.1=20
_SERVER["REQUEST_METHOD"] GET=20
_SERVER["QUERY_STRING"] no value=20
_SERVER["REQUEST_URI"] /info.php=20
_SERVER["SCRIPT_NAME"] /info.php=20
_SERVER["PHP_SELF"] /info.php=20
_SERVER["REQUEST_TIME"] 1183995709=20
_SERVER["argv"] Array
(
)

=20
_SERVER["argc"] 0=20
_ENV["ALLUSERSPROFILE"] C:\Documents and Settings\All Users=20
_ENV["CommonProgramFiles"] C:\Program Files\Common Files=20
_ENV["COMPUTERNAME"] PHP-AND-MYSQL=20
_ENV["ComSpec"] C:\WINDOWS\system32\cmd.exe=20
_ENV["FP_NO_HOST_CHECK"] NO=20
_ENV["NUMBER_OF_PROCESSORS"] 1=20
_ENV["OS"] Windows_NT=20
_ENV["Path"] C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem=20
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH=20
_ENV["PROCESSOR_ARCHITECTURE"] x86=20
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 6 Stepping 8,
GenuineIntel=20
_ENV["PROCESSOR_LEVEL"] 15=20
_ENV["PROCESSOR_REVISION"] 0608=20
_ENV["ProgramFiles"] C:\Program Files=20
_ENV["SystemDrive"] C:=20
_ENV["SystemRoot"] C:\WINDOWS=20
_ENV["TEMP"] C:\WINDOWS\TEMP=20
_ENV["TMP"] C:\WINDOWS\TEMP=20
_ENV["USERPROFILE"] C:\Documents and Settings\LocalService=20
_ENV["windir"] C:\WINDOWS=20
_ENV["AP_PARENT_PID"] 3196

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Stut [mailto:stuttle@gmail.com]=20
Sent: Monday, July 09, 2007 8:41 AM
To: Jacob Bergman
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Please include the list when replying.

Jacob Bergman wrote:
> Yeah, the extension=3Dphp_mysqli.dll line is enabled in the php.ini
file.
> Doesn't that error indicate something wrong with the php file itself?

Have you restarted Apache/IIS/whatever since changing it?

The error indicates that it doesn't have any knowledge of a function=20
called mysqli_connect. That function will be registered when the=20
extension is loaded, so the extension is not being loaded (either=20
correctly or at all).

If you have then make a phpinfo page (http://php.net/phpinfo) and check=20
that PHP thinks MySQLi is installed.

-Stut

--=20
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]=20
> Sent: Monday, July 09, 2007 8:18 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> Jacob Bergman wrote:
>> While trying to connect to the mysqll database with php, I use the
>> following file:
>=20
>
>=20
>> When I access this file I I get "Fatal error: Call to undefined
> function
>> mysqli_connect() in C:\Program Files\Apache
>> Group\Apache2\htdocs\mysql_up.php on line 13"
>>
>> Not sure what is wrong... I'm pretty new to all this and grabbed
this
>> out of a book. Thanks for the help!
>=20
> You need to enable/install the MySQLi extension. Your book should tell

> you how to do that, if not: http://php.net/mysqli
>=20
> -Stut
>=20

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Testing MySQL PHP connection

am 09.07.2007 17:57:57 von Stut

Jacob Bergman wrote:
> Sorry about that...
>
> Anyways, I created a phpinfo page and don't see anything about mysql in
> the output...



Then it's not enabled. Have you restarted your web server since changing
php.ini? Are you sure you changed the right php.ini (look near the top
of the phpinfo output for where it should go).

-Stut

--
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]
> Sent: Monday, July 09, 2007 8:41 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>
> Please include the list when replying.
>
> Jacob Bergman wrote:
>> Yeah, the extension=php_mysqli.dll line is enabled in the php.ini
> file.
>> Doesn't that error indicate something wrong with the php file itself?
>
> Have you restarted Apache/IIS/whatever since changing it?
>
> The error indicates that it doesn't have any knowledge of a function
> called mysqli_connect. That function will be registered when the
> extension is loaded, so the extension is not being loaded (either
> correctly or at all).
>
> If you have then make a phpinfo page (http://php.net/phpinfo) and check
> that PHP thinks MySQLi is installed.
>
> -Stut
>


-Stut

--
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 18:04:28 von Jacob Bergman

Yes, I restarted Apache and yes I edited the correct php.ini file, it is
looking in C:\windows for the file and I checked to make sure that the
line was uncommented. Is there anything else I need to be changing in
the php.ini file?? I made sure the php_mysqli.dll file was in the
c:\php folder, in case that would do anything like this...

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Stut [mailto:stuttle@gmail.com]=20
Sent: Monday, July 09, 2007 8:58 AM
To: Jacob Bergman
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Jacob Bergman wrote:
> Sorry about that...
>=20
> Anyways, I created a phpinfo page and don't see anything about mysql
in
> the output... =20



Then it's not enabled. Have you restarted your web server since changing

php.ini? Are you sure you changed the right php.ini (look near the top=20
of the phpinfo output for where it should go).

-Stut

--=20
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]=20
> Sent: Monday, July 09, 2007 8:41 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> Please include the list when replying.
>=20
> Jacob Bergman wrote:
>> Yeah, the extension=3Dphp_mysqli.dll line is enabled in the php.ini
> file.
>> Doesn't that error indicate something wrong with the php file itself?
>=20
> Have you restarted Apache/IIS/whatever since changing it?
>=20
> The error indicates that it doesn't have any knowledge of a function=20
> called mysqli_connect. That function will be registered when the=20
> extension is loaded, so the extension is not being loaded (either=20
> correctly or at all).
>=20
> If you have then make a phpinfo page (http://php.net/phpinfo) and
check=20
> that PHP thinks MySQLi is installed.
>=20
> -Stut
>=20


-Stut

--=20
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 18:08:35 von Bill Bolte

The extension probably needs to be in the "ext" folder inside the php
folder. There is an extension path statement in the ini that points to
where extensions should go.=20

-----Original Message-----
From: Jacob Bergman [mailto:jbergman@psd267.wednet.edu]=20
Sent: Monday, July 09, 2007 11:04 AM
To: Stut
Cc: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Testing MySQL PHP connection

Yes, I restarted Apache and yes I edited the correct php.ini file, it is
looking in C:\windows for the file and I checked to make sure that the
line was uncommented. Is there anything else I need to be changing in
the php.ini file?? I made sure the php_mysqli.dll file was in the
c:\php folder, in case that would do anything like this...

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Stut [mailto:stuttle@gmail.com]=20
Sent: Monday, July 09, 2007 8:58 AM
To: Jacob Bergman
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Jacob Bergman wrote:
> Sorry about that...
>=20
> Anyways, I created a phpinfo page and don't see anything about mysql
in
> the output... =20



Then it's not enabled. Have you restarted your web server since changing

php.ini? Are you sure you changed the right php.ini (look near the top=20
of the phpinfo output for where it should go).

-Stut

--=20
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]=20
> Sent: Monday, July 09, 2007 8:41 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> Please include the list when replying.
>=20
> Jacob Bergman wrote:
>> Yeah, the extension=3Dphp_mysqli.dll line is enabled in the php.ini
> file.
>> Doesn't that error indicate something wrong with the php file itself?
>=20
> Have you restarted Apache/IIS/whatever since changing it?
>=20
> The error indicates that it doesn't have any knowledge of a function=20
> called mysqli_connect. That function will be registered when the=20
> extension is loaded, so the extension is not being loaded (either=20
> correctly or at all).
>=20
> If you have then make a phpinfo page (http://php.net/phpinfo) and
check=20
> that PHP thinks MySQLi is installed.
>=20
> -Stut
>=20


-Stut

--=20
http://stut.net/

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 18:12:32 von Jacob Bergman

The extension is also in the ext folder, I just copied it to the main
c:\php folder... mostly cause the book said too... O.o

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Bill Bolte [mailto:billb@hightouchinc.com]=20
Sent: Monday, July 09, 2007 9:09 AM
To: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Testing MySQL PHP connection

The extension probably needs to be in the "ext" folder inside the php
folder. There is an extension path statement in the ini that points to
where extensions should go.=20

-----Original Message-----
From: Jacob Bergman [mailto:jbergman@psd267.wednet.edu]=20
Sent: Monday, July 09, 2007 11:04 AM
To: Stut
Cc: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Testing MySQL PHP connection

Yes, I restarted Apache and yes I edited the correct php.ini file, it is
looking in C:\windows for the file and I checked to make sure that the
line was uncommented. Is there anything else I need to be changing in
the php.ini file?? I made sure the php_mysqli.dll file was in the
c:\php folder, in case that would do anything like this...

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Stut [mailto:stuttle@gmail.com]=20
Sent: Monday, July 09, 2007 8:58 AM
To: Jacob Bergman
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Jacob Bergman wrote:
> Sorry about that...
>=20
> Anyways, I created a phpinfo page and don't see anything about mysql
in
> the output... =20



Then it's not enabled. Have you restarted your web server since changing

php.ini? Are you sure you changed the right php.ini (look near the top=20
of the phpinfo output for where it should go).

-Stut

--=20
http://stut.net/

> -----Original Message-----
> From: Stut [mailto:stuttle@gmail.com]=20
> Sent: Monday, July 09, 2007 8:41 AM
> To: Jacob Bergman
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> Please include the list when replying.
>=20
> Jacob Bergman wrote:
>> Yeah, the extension=3Dphp_mysqli.dll line is enabled in the php.ini
> file.
>> Doesn't that error indicate something wrong with the php file itself?
>=20
> Have you restarted Apache/IIS/whatever since changing it?
>=20
> The error indicates that it doesn't have any knowledge of a function=20
> called mysqli_connect. That function will be registered when the=20
> extension is loaded, so the extension is not being loaded (either=20
> correctly or at all).
>=20
> If you have then make a phpinfo page (http://php.net/phpinfo) and
check=20
> that PHP thinks MySQLi is installed.
>=20
> -Stut
>=20


-Stut

--=20
http://stut.net/

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 18:22:33 von Jacob Bergman

Ok, so I put the two files into my system32 directory, which seems to
have fixed the error I was getting... but wouldn't you know it, I know
have 3 more... :( =20


Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host
'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
this MySQL server in C:\Program Files\Apache
Group\Apache2\htdocs\mysql_up.php on line 13

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given
in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 15

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given
in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 18

Error:

I have checked the hostname, user, and password in the php file, and
they are all correct.

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]=20
Sent: Monday, July 09, 2007 9:17 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

There error message means that the mysqli functions are not enabled.=20
This means one of two things: (1) you did not activate the mysqli=20
functions in php.ini by commenting the mysqli line. After editing=20
php.ini, you need to restart your web server. Also, be sure you are=20
editing the correct php.ini, as shown in the output of phpinfo().

(2) PHP cannot the find one or both of the files: php_mysqli.dll=20
andlibmysqli.dll. The files must be located where PHP can find them. The

simplest way is to locate them in a folder that is in your system path.=20
If you added c:\php to your system path, copy them there. Or you can=20
copy them to your windows\system32 folder.

Janet


Jacob Bergman wrote:

> While trying to connect to the mysqll database with php, I use the
> following file:
>=20
> =20
>=20
> >=20
> /* Program: mysql_up.php
>=20
> * Desc: Connects to MySQL Server and=20
>=20
> * outputs settings.
>=20
> */
>=20
> echo "
>=20
> Test MySQL
>=20
> ";
>=20
> $host=3D"PHP-AND-MYSQL";
>=20
> $user=3D"root";
>=20
> $password=3D"Britt9906";
>=20
> =20
>=20
> $cxn =3D mysqli_connect($host,$user,$password);
>=20
> $sql=3D"SHOW STATUS";
>=20
> $result =3D mysqli_query($cxn,$sql);
>=20
> if($result == false)
>=20
> {
>=20
> echo "

Error: ".mysqli_error($cxn)."

";
>=20
> }
>=20
> else
>=20
> {
>=20
> /* Table that displays the results */
>=20
> echo "
>=20
>
>=20
> ";
>=20
> for($i =3D 0; $i < mysqli_num_rows($result); $i++)=20
>=20
> {
>=20
> echo "";
>=20
> $row_array =3D mysqli_fetch_row($result);
>=20
> for($j =3D 0;$j < mysqli_num_fields($result);$j++)=20
>=20
> {
>=20
> echo "\n";
>=20
> }
>=20
> }
>=20
> echo "
Variable_nameValue
".$row_array[$j]."
";
>=20
> }
>=20
> ?>
>=20
>
>=20
> =20
>=20
> When I access this file I I get "Fatal error: Call to undefined
function
> mysqli_connect() in C:\Program Files\Apache
> Group\Apache2\htdocs\mysql_up.php on line 13"
>=20
> =20
>=20
> Not sure what is wrong... I'm pretty new to all this and grabbed this
> out of a book. Thanks for the help!
>=20
> =20
>=20
> Jacob Bergman
>=20
> Network Technician
>=20
> Pullman School District #267
>=20
> (509) 432-4012
>=20
> jbergman@psd267.wednet.edu
>=20
> =20
>=20
>=20


--=20
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 18:48:34 von Jacob Bergman

Thanks for all the help guys... but I think I am going to blow away what
I have so far and install wamp5. I want to be able to get on with your
book Janet :) Thanks for the help though. I'm sure I will have plenty
more questions.

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]=20
Sent: Monday, July 09, 2007 9:17 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

There error message means that the mysqli functions are not enabled.=20
This means one of two things: (1) you did not activate the mysqli=20
functions in php.ini by commenting the mysqli line. After editing=20
php.ini, you need to restart your web server. Also, be sure you are=20
editing the correct php.ini, as shown in the output of phpinfo().

(2) PHP cannot the find one or both of the files: php_mysqli.dll=20
andlibmysqli.dll. The files must be located where PHP can find them. The

simplest way is to locate them in a folder that is in your system path.=20
If you added c:\php to your system path, copy them there. Or you can=20
copy them to your windows\system32 folder.

Janet


Jacob Bergman wrote:

> While trying to connect to the mysqll database with php, I use the
> following file:
>=20
> =20
>=20
> >=20
> /* Program: mysql_up.php
>=20
> * Desc: Connects to MySQL Server and=20
>=20
> * outputs settings.
>=20
> */
>=20
> echo "
>=20
> Test MySQL
>=20
> ";
>=20
> $host=3D"PHP-AND-MYSQL";
>=20
> $user=3D"root";
>=20
> $password=3D"Britt9906";
>=20
> =20
>=20
> $cxn =3D mysqli_connect($host,$user,$password);
>=20
> $sql=3D"SHOW STATUS";
>=20
> $result =3D mysqli_query($cxn,$sql);
>=20
> if($result == false)
>=20
> {
>=20
> echo "

Error: ".mysqli_error($cxn)."

";
>=20
> }
>=20
> else
>=20
> {
>=20
> /* Table that displays the results */
>=20
> echo "
>=20
>
>=20
> ";
>=20
> for($i =3D 0; $i < mysqli_num_rows($result); $i++)=20
>=20
> {
>=20
> echo "";
>=20
> $row_array =3D mysqli_fetch_row($result);
>=20
> for($j =3D 0;$j < mysqli_num_fields($result);$j++)=20
>=20
> {
>=20
> echo "\n";
>=20
> }
>=20
> }
>=20
> echo "
Variable_nameValue
".$row_array[$j]."
";
>=20
> }
>=20
> ?>
>=20
>
>=20
> =20
>=20
> When I access this file I I get "Fatal error: Call to undefined
function
> mysqli_connect() in C:\Program Files\Apache
> Group\Apache2\htdocs\mysql_up.php on line 13"
>=20
> =20
>=20
> Not sure what is wrong... I'm pretty new to all this and grabbed this
> out of a book. Thanks for the help!
>=20
> =20
>=20
> Jacob Bergman
>=20
> Network Technician
>=20
> Pullman School District #267
>=20
> (509) 432-4012
>=20
> jbergman@psd267.wednet.edu
>=20
> =20
>=20
>=20


--=20
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Testing MySQL PHP connection

am 09.07.2007 19:36:30 von Matt.Murphy

=20
Mysql can be configured to only allow connections from certain hosts,
and it appears your host is not allowed.=20

You need to talk to the mysql admin.=20

Matt

-----Original Message-----
From: Jacob Bergman [mailto:jbergman@psd267.wednet.edu]=20
Sent: Monday, July 09, 2007 11:23 AM
To: Janet Valade
Cc: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Testing MySQL PHP connection

Ok, so I put the two files into my system32 directory, which seems to
have fixed the error I was getting... but wouldn't you know it, I know
have 3 more... :( =20


Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host
'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
this MySQL server in C:\Program Files\Apache
Group\Apache2\htdocs\mysql_up.php on line 13

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given
in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 15

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given
in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 18

Error:

I have checked the hostname, user, and password in the php file, and
they are all correct.

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]
Sent: Monday, July 09, 2007 9:17 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

There error message means that the mysqli functions are not enabled.=20
This means one of two things: (1) you did not activate the mysqli
functions in php.ini by commenting the mysqli line. After editing
php.ini, you need to restart your web server. Also, be sure you are
editing the correct php.ini, as shown in the output of phpinfo().

(2) PHP cannot the find one or both of the files: php_mysqli.dll
andlibmysqli.dll. The files must be located where PHP can find them. The

simplest way is to locate them in a folder that is in your system path.=20
If you added c:\php to your system path, copy them there. Or you can
copy them to your windows\system32 folder.

Janet


Jacob Bergman wrote:

> While trying to connect to the mysqll database with php, I use the=20
> following file:
>=20
> =20
>=20
> >=20
> /* Program: mysql_up.php
>=20
> * Desc: Connects to MySQL Server and=20
>=20
> * outputs settings.
>=20
> */
>=20
> echo "
>=20
> Test MySQL
>=20
> ";
>=20
> $host=3D"PHP-AND-MYSQL";
>=20
> $user=3D"root";
>=20
> $password=3D"Britt9906";
>=20
> =20
>=20
> $cxn =3D mysqli_connect($host,$user,$password);
>=20
> $sql=3D"SHOW STATUS";
>=20
> $result =3D mysqli_query($cxn,$sql);
>=20
> if($result == false)
>=20
> {
>=20
> echo "

Error: ".mysqli_error($cxn)."

";
>=20
> }
>=20
> else
>=20
> {
>=20
> /* Table that displays the results */
>=20
> echo "
>=20
>
>=20
> ";
>=20
> for($i =3D 0; $i < mysqli_num_rows($result); $i++)
>=20
> {
>=20
> echo "";
>=20
> $row_array =3D mysqli_fetch_row($result);
>=20
> for($j =3D 0;$j < mysqli_num_fields($result);$j++)
>=20
> {
>=20
> echo "\n";
>=20
> }
>=20
> }
>=20
> echo "
Variable_nameValue
".$row_array[$j]."
";
>=20
> }
>=20
> ?>
>=20
>
>=20
> =20
>=20
> When I access this file I I get "Fatal error: Call to undefined
function
> mysqli_connect() in C:\Program Files\Apache=20
> Group\Apache2\htdocs\mysql_up.php on line 13"
>=20
> =20
>=20
> Not sure what is wrong... I'm pretty new to all this and grabbed this

> out of a book. Thanks for the help!
>=20
> =20
>=20
> Jacob Bergman
>=20
> Network Technician
>=20
> Pullman School District #267
>=20
> (509) 432-4012
>=20
> jbergman@psd267.wednet.edu
>=20
> =20
>=20
>=20


--
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Mysql_send.php

am 11.07.2007 17:33:50 von Jacob Bergman

When I try to run the mysql_send.php function from your website... from
the 3rd edition of the php and mysql for dummies, I get these errors:

************************************************************ ************
**
Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host
'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
this MySQL server in C:\xampp\htdocs\mysql_send.php on line 21

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 22
Database Selected:=20
Query:=20
Results

------------------------------------------------------------ ------------
--------

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 28

Error:=20

------------------------------------------------------------ ------------
--------
************************************************************ ************
****

The screen with the database name and and query comes up ok, but I get
what is displayed above as soon as I hit the submit query button.
Thanks for the help.

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]=20
Sent: Monday, July 09, 2007 10:53 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Here you go. Hope the editing marks aren't too confusing. The lines=20
through things don't mean they are crossed out. It means they are in a=20
different type face.

Janet






Jacob Bergman wrote:

> That would be great, thanks!
>=20
> Jacob Bergman
> Network Technician
> Pullman School District #267
> (509) 432-4012
> jbergman@psd267.wednet.edu
>=20
> -----Original Message-----
> From: Janet Valade [mailto:jvalade@eoni.com]=20
> Sent: Monday, July 09, 2007 10:04 AM
> To: Jacob Bergman
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> I have installed a document with complete, up-to-date instructions for

> installing PHP on my web site at janet.valade.com. This might be
helpful
>=20
> for you.
>=20
> Also, I have instructions that I have just written for installing from

> XAMPP on Windows. They are for the book I am writing now. I could send

> the XAMPP instructions to you if you would like.
>=20
> Janet
>=20
>=20
> Jacob Bergman wrote:
>=20
>=20
>>Thanks for all the help guys... but I think I am going to blow away
>=20
> what
>=20
>>I have so far and install wamp5. I want to be able to get on with
>=20
> your
>=20
>>book Janet :) Thanks for the help though. I'm sure I will have plenty
>>more questions.
>>
>>Jacob Bergman
>>Network Technician
>>Pullman School District #267
>>(509) 432-4012
>>jbergman@psd267.wednet.edu
>>
>>-----Original Message-----
>>From: Janet Valade [mailto:jvalade@eoni.com]=20
>>Sent: Monday, July 09, 2007 9:17 AM
>>To: Jacob Bergman
>>Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>>
>>There error message means that the mysqli functions are not enabled.=20
>>This means one of two things: (1) you did not activate the mysqli=20
>>functions in php.ini by commenting the mysqli line. After editing=20
>>php.ini, you need to restart your web server. Also, be sure you are=20
>>editing the correct php.ini, as shown in the output of phpinfo().
>>
>>(2) PHP cannot the find one or both of the files: php_mysqli.dll=20
>>andlibmysqli.dll. The files must be located where PHP can find them.
>=20
> The
>=20
>>simplest way is to locate them in a folder that is in your system
>=20
> path.=20
>=20
>>If you added c:\php to your system path, copy them there. Or you can=20
>>copy them to your windows\system32 folder.
>>
>>Janet
>>
>>
>>Jacob Bergman wrote:
>>
>>
>>
>>>While trying to connect to the mysqll database with php, I use the
>>>following file:
>>>
>>>
>>>
>>> >>>
>>>/* Program: mysql_up.php
>>>
>>>* Desc: Connects to MySQL Server and=20
>>>
>>>* outputs settings.
>>>
>>>*/
>>>
>>>echo "
>>>
>>> Test MySQL
>>>
>>> ";
>>>
>>>$host=3D"PHP-AND-MYSQL";
>>>
>>>$user=3D"root";
>>>
>>>$password=3D"Britt9906";
>>>
>>>
>>>
>>>$cxn =3D mysqli_connect($host,$user,$password);
>>>
>>>$sql=3D"SHOW STATUS";
>>>
>>>$result =3D mysqli_query($cxn,$sql);
>>>
>>>if($result == false)
>>>
>>>{
>>>
>>> echo "

Error: ".mysqli_error($cxn)."

";
>>>
>>>}
>>>
>>>else
>>>
>>>{
>>>
>>> /* Table that displays the results */
>>>
>>> echo "
>>>
>>>
>>>
>>> ";
>>>
>>> for($i =3D 0; $i < mysqli_num_rows($result); $i++)=20
>>>
>>> {
>>>
>>> echo "";
>>>
>>> $row_array =3D mysqli_fetch_row($result);
>>>
>>> for($j =3D 0;$j < mysqli_num_fields($result);$j++)=20
>>>
>>> {
>>>
>>> echo "\n";
>>>
>>> }
>>>
>>> }
>>>
>>> echo "
Variable_nameValue
".$row_array[$j]."
";
>>>
>>>}
>>>
>>>?>
>>>
>>>
>>>
>>>
>>>
>>>When I access this file I I get "Fatal error: Call to undefined
>>
>>function
>>
>>
>>>mysqli_connect() in C:\Program Files\Apache
>>>Group\Apache2\htdocs\mysql_up.php on line 13"
>>>
>>>
>>>
>>>Not sure what is wrong... I'm pretty new to all this and grabbed
this
>>>out of a book. Thanks for the help!
>>>
>>>
>>>
>>>Jacob Bergman
>>>
>>>Network Technician
>>>
>>>Pullman School District #267
>>>
>>>(509) 432-4012
>>>
>>>jbergman@psd267.wednet.edu
>>>
>>>
>>>
>>>
>>
>>
>>
>=20
>=20


--=20
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Mysql_send.php

am 11.07.2007 17:48:11 von Matt.Murphy

I already explained this error to you once, the MySQL server is
rejecting your connection. You need to talk to the person who set up the
MySQL server and have them allow connections from your host.=20

If you are the admin of this MySQL server, install phpmyadmin and figure
it out.=20

Matt=20

-----Original Message-----
From: Jacob Bergman [mailto:jbergman@psd267.wednet.edu]=20
Sent: Wednesday, July 11, 2007 10:34 AM
To: Janet Valade
Cc: php-windows@lists.php.net
Subject: [PHP-WIN] Mysql_send.php

When I try to run the mysql_send.php function from your website... from
the 3rd edition of the php and mysql for dummies, I get these errors:

************************************************************ ************
**
Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130): Host
'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
this MySQL server in C:\xampp\htdocs\mysql_send.php on line 21

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 22 Database Selected:=20
Query:=20
Results

------------------------------------------------------------ ------------
--------

Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given
in C:\xampp\htdocs\mysql_send.php on line 28

Error:=20

------------------------------------------------------------ ------------
--------
************************************************************ ************
****

The screen with the database name and and query comes up ok, but I get
what is displayed above as soon as I hit the submit query button.
Thanks for the help.

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]
Sent: Monday, July 09, 2007 10:53 AM
To: Jacob Bergman
Subject: Re: [PHP-WIN] Testing MySQL PHP connection

Here you go. Hope the editing marks aren't too confusing. The lines
through things don't mean they are crossed out. It means they are in a
different type face.

Janet






Jacob Bergman wrote:

> That would be great, thanks!
>=20
> Jacob Bergman
> Network Technician
> Pullman School District #267
> (509) 432-4012
> jbergman@psd267.wednet.edu
>=20
> -----Original Message-----
> From: Janet Valade [mailto:jvalade@eoni.com]
> Sent: Monday, July 09, 2007 10:04 AM
> To: Jacob Bergman
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> I have installed a document with complete, up-to-date instructions for

> installing PHP on my web site at janet.valade.com. This might be
helpful
>=20
> for you.
>=20
> Also, I have instructions that I have just written for installing from

> XAMPP on Windows. They are for the book I am writing now. I could send

> the XAMPP instructions to you if you would like.
>=20
> Janet
>=20
>=20
> Jacob Bergman wrote:
>=20
>=20
>>Thanks for all the help guys... but I think I am going to blow away
>=20
> what
>=20
>>I have so far and install wamp5. I want to be able to get on with
>=20
> your
>=20
>>book Janet :) Thanks for the help though. I'm sure I will have plenty

>>more questions.
>>
>>Jacob Bergman
>>Network Technician
>>Pullman School District #267
>>(509) 432-4012
>>jbergman@psd267.wednet.edu
>>
>>-----Original Message-----
>>From: Janet Valade [mailto:jvalade@eoni.com]
>>Sent: Monday, July 09, 2007 9:17 AM
>>To: Jacob Bergman
>>Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>>
>>There error message means that the mysqli functions are not enabled.=20
>>This means one of two things: (1) you did not activate the mysqli=20
>>functions in php.ini by commenting the mysqli line. After editing=20
>>php.ini, you need to restart your web server. Also, be sure you are=20
>>editing the correct php.ini, as shown in the output of phpinfo().
>>
>>(2) PHP cannot the find one or both of the files: php_mysqli.dll=20
>>andlibmysqli.dll. The files must be located where PHP can find them.
>=20
> The
>=20
>>simplest way is to locate them in a folder that is in your system
>=20
> path.=20
>=20
>>If you added c:\php to your system path, copy them there. Or you can=20
>>copy them to your windows\system32 folder.
>>
>>Janet
>>
>>
>>Jacob Bergman wrote:
>>
>>
>>
>>>While trying to connect to the mysqll database with php, I use the=20
>>>following file:
>>>
>>>
>>>
>>> >>>
>>>/* Program: mysql_up.php
>>>
>>>* Desc: Connects to MySQL Server and=20
>>>
>>>* outputs settings.
>>>
>>>*/
>>>
>>>echo "
>>>
>>> Test MySQL
>>>
>>> ";
>>>
>>>$host=3D"PHP-AND-MYSQL";
>>>
>>>$user=3D"root";
>>>
>>>$password=3D"Britt9906";
>>>
>>>
>>>
>>>$cxn =3D mysqli_connect($host,$user,$password);
>>>
>>>$sql=3D"SHOW STATUS";
>>>
>>>$result =3D mysqli_query($cxn,$sql);
>>>
>>>if($result == false)
>>>
>>>{
>>>
>>> echo "

Error: ".mysqli_error($cxn)."

";
>>>
>>>}
>>>
>>>else
>>>
>>>{
>>>
>>> /* Table that displays the results */
>>>
>>> echo "
>>>
>>>
>>>
>>> ";
>>>
>>> for($i =3D 0; $i < mysqli_num_rows($result); $i++)
>>>
>>> {
>>>
>>> echo "";
>>>
>>> $row_array =3D mysqli_fetch_row($result);
>>>
>>> for($j =3D 0;$j < mysqli_num_fields($result);$j++)
>>>
>>> {
>>>
>>> echo "\n";
>>>
>>> }
>>>
>>> }
>>>
>>> echo "
Variable_nameValue
".$row_array[$j]."
";
>>>
>>>}
>>>
>>>?>
>>>
>>>
>>>
>>>
>>>
>>>When I access this file I I get "Fatal error: Call to undefined
>>
>>function
>>
>>
>>>mysqli_connect() in C:\Program Files\Apache=20
>>>Group\Apache2\htdocs\mysql_up.php on line 13"
>>>
>>>
>>>
>>>Not sure what is wrong... I'm pretty new to all this and grabbed
this
>>>out of a book. Thanks for the help!
>>>
>>>
>>>
>>>Jacob Bergman
>>>
>>>Network Technician
>>>
>>>Pullman School District #267
>>>
>>>(509) 432-4012
>>>
>>>jbergman@psd267.wednet.edu
>>>
>>>
>>>
>>>
>>
>>
>>
>=20
>=20


--
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Mysql_send.php

am 11.07.2007 18:05:48 von Jacob Bergman

Thanks that made it much clearer... I was just being dumb and in the php
file where I was supposed to change the "$host=3D"hostname"" line, I was
putting the actual name of my machine instead of just "localhost". Once
I changed that everything seems to be working now. Obviously it
couldn't find a user that was root@php-and-mysql because it didn't
exist. Thanks a bunch!!=20

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

-----Original Message-----
From: Janet Valade [mailto:jvalade@eoni.com]=20
Sent: Wednesday, July 11, 2007 9:03 AM
To: Jacob Bergman
Subject: Re: Mysql_send.php

The problem is the first error message. The others are just complaining=20
because the connect function wasn't successful.

The problem is with your MySQL account name. Chapter 5 explains MySQL=20
accounts. MySQL accounts are two part account names: the account and the

host that it is allowed to connect from. Such as root@localhost. The=20
error message shows that MySQL believes you are connecting from the host

PHP-AND-MYSQL.VMware.psd267.wednet.edu. I don't know where it gets that=20
host, but the account you are using is not allowed to connect from that=20
host. You need to set up a valid account.

Good luck,

Janet


Jacob Bergman wrote:
> When I try to run the mysql_send.php function from your website...
from
> the 3rd edition of the php and mysql for dummies, I get these errors:
>=20
>
************************************************************ ************
> **
> Warning: mysqli_connect() [function.mysqli-connect]: (00000/1130):
Host
> 'PHP-AND-MYSQL.VMware.psd267.wednet.edu' is not allowed to connect to
> this MySQL server in C:\xampp\htdocs\mysql_send.php on line 21
>=20
> Warning: mysqli_query() expects parameter 1 to be mysqli, boolean
given
> in C:\xampp\htdocs\mysql_send.php on line 22
> Database Selected:=20
> Query:=20
> Results
>=20
>
------------------------------------------------------------ ------------
> --------
>=20
> Warning: mysqli_error() expects parameter 1 to be mysqli, boolean
given
> in C:\xampp\htdocs\mysql_send.php on line 28
>=20
> Error:=20
>=20
>
------------------------------------------------------------ ------------
> --------
>
************************************************************ ************
> ****
>=20
> The screen with the database name and and query comes up ok, but I get
> what is displayed above as soon as I hit the submit query button.
> Thanks for the help.
>=20
> Jacob Bergman
> Network Technician
> Pullman School District #267
> (509) 432-4012
> jbergman@psd267.wednet.edu
>=20
> -----Original Message-----
> From: Janet Valade [mailto:jvalade@eoni.com]=20
> Sent: Monday, July 09, 2007 10:53 AM
> To: Jacob Bergman
> Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>=20
> Here you go. Hope the editing marks aren't too confusing. The lines=20
> through things don't mean they are crossed out. It means they are in a

> different type face.
>=20
> Janet
>=20
>=20
>=20
>=20
>=20
>=20
> Jacob Bergman wrote:
>=20
>=20
>>That would be great, thanks!
>>
>>Jacob Bergman
>>Network Technician
>>Pullman School District #267
>>(509) 432-4012
>>jbergman@psd267.wednet.edu
>>
>>-----Original Message-----
>>From: Janet Valade [mailto:jvalade@eoni.com]=20
>>Sent: Monday, July 09, 2007 10:04 AM
>>To: Jacob Bergman
>>Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>>
>>I have installed a document with complete, up-to-date instructions for
>=20
>=20
>>installing PHP on my web site at janet.valade.com. This might be
>=20
> helpful
>=20
>>for you.
>>
>>Also, I have instructions that I have just written for installing from
>=20
>=20
>>XAMPP on Windows. They are for the book I am writing now. I could send
>=20
>=20
>>the XAMPP instructions to you if you would like.
>>
>>Janet
>>
>>
>>Jacob Bergman wrote:
>>
>>
>>
>>>Thanks for all the help guys... but I think I am going to blow away
>>
>>what
>>
>>
>>>I have so far and install wamp5. I want to be able to get on with
>>
>>your
>>
>>
>>>book Janet :) Thanks for the help though. I'm sure I will have
plenty
>>>more questions.
>>>
>>>Jacob Bergman
>>>Network Technician
>>>Pullman School District #267
>>>(509) 432-4012
>>>jbergman@psd267.wednet.edu
>>>
>>>-----Original Message-----
>>>From: Janet Valade [mailto:jvalade@eoni.com]=20
>>>Sent: Monday, July 09, 2007 9:17 AM
>>>To: Jacob Bergman
>>>Subject: Re: [PHP-WIN] Testing MySQL PHP connection
>>>
>>>There error message means that the mysqli functions are not enabled.=20
>>>This means one of two things: (1) you did not activate the mysqli=20
>>>functions in php.ini by commenting the mysqli line. After editing=20
>>>php.ini, you need to restart your web server. Also, be sure you are=20
>>>editing the correct php.ini, as shown in the output of phpinfo().
>>>
>>>(2) PHP cannot the find one or both of the files: php_mysqli.dll=20
>>>andlibmysqli.dll. The files must be located where PHP can find them.
>>
>>The
>>
>>
>>>simplest way is to locate them in a folder that is in your system
>>
>>path.=20
>>
>>
>>>If you added c:\php to your system path, copy them there. Or you can=20
>>>copy them to your windows\system32 folder.
>>>
>>>Janet
>>>
>>>
>>>Jacob Bergman wrote:
>>>
>>>
>>>
>>>
>>>>While trying to connect to the mysqll database with php, I use the
>>>>following file:
>>>>
>>>>
>>>>
>>>> >>>>
>>>>/* Program: mysql_up.php
>>>>
>>>>* Desc: Connects to MySQL Server and=20
>>>>
>>>>* outputs settings.
>>>>
>>>>*/
>>>>
>>>>echo "
>>>>
>>>> Test MySQL
>>>>
>>>> ";
>>>>
>>>>$host=3D"PHP-AND-MYSQL";
>>>>
>>>>$user=3D"root";
>>>>
>>>>$password=3D"Britt9906";
>>>>
>>>>
>>>>
>>>>$cxn =3D mysqli_connect($host,$user,$password);
>>>>
>>>>$sql=3D"SHOW STATUS";
>>>>
>>>>$result =3D mysqli_query($cxn,$sql);
>>>>
>>>>if($result == false)
>>>>
>>>>{
>>>>
>>>> echo "

Error: ".mysqli_error($cxn)."

";
>>>>
>>>>}
>>>>
>>>>else
>>>>
>>>>{
>>>>
>>>> /* Table that displays the results */
>>>>
>>>> echo "
>>>>
>>>>
>>>>
>>>> ";
>>>>
>>>> for($i =3D 0; $i < mysqli_num_rows($result); $i++)=20
>>>>
>>>> {
>>>>
>>>> echo "";
>>>>
>>>> $row_array =3D mysqli_fetch_row($result);
>>>>
>>>> for($j =3D 0;$j < mysqli_num_fields($result);$j++)=20
>>>>
>>>> {
>>>>
>>>> echo "\n";
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>> echo "
Variable_nameValue
".$row_array[$j]."
";
>>>>
>>>>}
>>>>
>>>>?>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>When I access this file I I get "Fatal error: Call to undefined
>>>
>>>function
>>>
>>>
>>>
>>>>mysqli_connect() in C:\Program Files\Apache
>>>>Group\Apache2\htdocs\mysql_up.php on line 13"
>>>>
>>>>
>>>>
>>>>Not sure what is wrong... I'm pretty new to all this and grabbed
>=20
> this
>=20
>>>>out of a book. Thanks for the help!
>>>>
>>>>
>>>>
>>>>Jacob Bergman
>>>>
>>>>Network Technician
>>>>
>>>>Pullman School District #267
>>>>
>>>>(509) 432-4012
>>>>
>>>>jbergman@psd267.wednet.edu
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>=20
>=20


--=20
Janet Valade -- janet.valade.com

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

php default users

am 11.07.2007 19:54:52 von Jacob Bergman

So here's a question... I installed Xampp and was messing around with
phpmyadmin. I decided that I would delete the pma user that was created
(root and pma on the localhost were the two users created by default).
After I did this, I can no longer authenticate into phpmyadmin like I
was before by using the root account... it tells me I have a bad
username/password, which I know I don't since I use the same account to
just get onto the Xampp main page. Can anyone tell me why this is, and
if I can fix it or not without re-installing Xampp. Thanks a bunch!!

Jacob Bergman
Network Technician
Pullman School District #267
(509) 432-4012
jbergman@psd267.wednet.edu

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: php default users

am 11.07.2007 20:34:03 von Niel Archer

Hi

In case you forgot, this is a PHP list. I suggest you direct that
question to what ever support Xampp/PHPMyAdmin offers. Deleting one of
the default users to your MySQL database, definitely isn't a PHP
question.

--
Niel Archer

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php