php-general Digest 6 Oct 2007 17:41:37 -0000 Issue 5058

Topics (messages 262861 through 262873):

Re: [PHP-DB]  Re: MySQL Identifying worst-performing codes
        262861 by: Lasitha Alawatta

Php session settings
        262862 by: Jeff Benetti
        262863 by: Nathan Nobbe
        262865 by: Jeff Benetti
        262866 by: Tom Friedhof
        262868 by: Jeff Benetti

Re: Beginner Tutorials for using CLASSES in PHP4
        262864 by: Nathan Nobbe
        262867 by: Tony Marston
        262869 by: Robert Cummings

Re: Empty Array?
        262870 by: tedd

Re: error messages
        262871 by: tedd

Re: A two flavored post
        262872 by: tedd
        262873 by: tedd

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Dear Col,


I'm highly appreciate your reply.



Best Regards,
Lasitha


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Colin Guthrie
Sent: Thursday, October 04, 2007 7:47 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] Re: MySQL Identifying worst-performing codes

Lasitha Alawatta wrote:
> There is  a tool call “idera” (SQL diagnostic manager). Basically it is
> a performance monitoring and diagnostics tool.
> 
> It has a feature; 
> 
>  
> 
> Identifying of worst-performing codes –
> 
> Identifies performance bottlenecks such as the worst-performing stored
> procedures, long-running queries, most frequently run queries, SQL
> Statements and SQL batches

You can just turn on the MySQL option "log slow queries" and it logs
them for you. Make those more efficient and you've already taken care of
a lot of the low hanging fruit for db optimisation.

Col.

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


DOTW DISCLAIMER:

This e-mail and any attachments are strictly confidential and intended for the 
addressee only. If you are not the named addressee you must not disclose, copy 
or take
any action in reliance of this transmission and you should notify us as soon as 
possible. If you have received it in error, please contact the message sender 
immediately.
This e-mail and any attachments are believed to be free from viruses but it is 
your responsibility to carry out all necessary virus checks and DOTW accepts no 
liability
in connection therewith. 

This e-mail and all other electronic (including voice) communications from the 
sender's company are for informational purposes only.  No such communication is 
intended
by the sender to constitute either an electronic record or an electronic 
signature or to constitute any agreement by the sender to conduct a transaction 
by electronic means.

--- End Message ---
--- Begin Message ---
Hi all, I am new to PHP this is my second post to this group.

I have tried using the following CMS systems on my web server (remote)
Joomla
CMS made simple
Phpwebsite

And more recently
Coppermine photo album

All of these apps use PHP heavily.

None of these apps seem to run very well and they all require constantly
refreshing the browser.  When I installed "CMS made simple" (nice install
program) it checked for MySQL database, permissions etc. everything passed
the test but it flagged low memory allocation as a possible problem.  The
install succeeded but the program indicated that performance would be poor
or crippled.

My hosting service allows me to add a customized php.ini in the same folder
as the app.  I know nothing about php.ini so I was hoping someone could
point me to which of the many settings would be best to tweak.

Any help would be much appreciated

Thanks,
Jeff

Quick recap: constantly refreshing browser, could tweak php.ini, total
newbie, no hair left to pull out.

--- End Message ---
--- Begin Message ---
Jeff,

is 
*memory_limit*<http://docs.php.net/manual/en/ini.core.php#ini.memory-limit>the
one youre looking for ?
that sounds strange; im sure the default would be appropriate.
i would recommend you create a script to show the current values
of the php.ini settings before you start changing them.

<?php
    echo phpinfo();
?>

-nathan

--- End Message ---
--- Begin Message ---
SERVER_SOFTWARE  Apache/1.3.34 (Unix) 
 
I have attached the output from phpinfo()
 
I cc'd the php-general group but I am not sure how an attachment will be
dealt with there.
 
Thanks,
Jeff
 


  _____  

From: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
Sent: October 6, 2007 9:08 AM
To: Jeff Benetti
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Php session settings


Jeff,

is  <http://docs.php.net/manual/en/ini.core.php#ini.memory-limit>
memory_limit the one youre looking for ?
that sounds strange; im sure the default would be appropriate.
i would recommend you create a script to show the current values
of the php.ini settings before you start changing them.

<?php
    echo phpinfo();
?>

-nathan 
System  FreeBSD cgi20 4.10-RELEASE-p21 FreeBSD 4.10-RELEASE-p21 #0: Mo i386  
Build Date  Mar 22 2007 23:48:30  
Configure Command  ./configure --prefix=/usr/local/nf/php5 
--exec-prefix=/usr/local/nf/php5 --enable-exif --enable-dbase --enable-mbstring 
--with-mysql=/usr/local/nf --enable-discard-path 
--with-config-file-path=/usr/local/nf/php5/etc --with-zlib-dir=/usr/local/nf 
--with-iconv=/usr/local/nf --with-libxml-dir=/usr/local/nf 
--with-png-dir=/usr/local/nf --with-jpeg-dir=/usr/local/nf 
--with-imagick=/usr/local/nf --with-gd --with-curl=/usr/local/nf 
--with-openssl=/usr/local/nf --without-xpm --without-freetype 
--with-libxml-dir=/usr/local/nf --with-mcrypt=/usr/local/nf  
Server API  CGI  
Virtual Directory Support  disabled  
Configuration File (php.ini) Path  /usr/local/nf/php5/etc/php.ini  
PHP API  20041225  
PHP Extension  20060613  
Zend Extension  220060519  
Debug Build  no  
Thread Safety  disabled  
Zend Memory Manager  enabled  
IPv6 Support  enabled  
Registered PHP Streams  php, file, data, http, ftp, compress.zlib, https, ftps  
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.*, consumed, convert.iconv.*, zlib.*  

 This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube 
Ltd.
 


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

PHP Credits

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

Configuration
PHP Core
Directive Local Value Master Value 
allow_call_time_pass_reference On On 
allow_url_fopen On On 
allow_url_include Off Off 
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 no value no value 
expose_php On On 
extension_dir /usr/local/nf/php5/lib/php/extensions/no-debug-non-zts-20060613 
/usr/local/nf/php5/lib/php/extensions/no-debug-non-zts-20060613 
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/nf/php5/lib/php .:/usr/local/nf/php5/lib/php 
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 -1 -1 
open_basedir no value no value 
output_buffering 0 0 
output_handler no value no value 
post_max_size 8M 8M 
precision 14 14 
realpath_cache_size 16K 16K 
realpath_cache_ttl 120 120 
register_argc_argv On On 
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 /usr/local/php/bin /usr/local/php/bin 
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 20000000 20000000 
upload_tmp_dir /tmp/ /tmp/ 
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 


ctype
ctype functions  enabled  


curl
cURL support  enabled  
cURL Information  libcurl/7.11.1 OpenSSL/0.9.7d zlib/1.1.3  


date
date/time support  enabled  
Timezone Database Version  2006.14  
Timezone Database  internal  
Default timezone  America/New_York  

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


dom
DOM/XML  enabled  
DOM/XML API Version  20031129  
libxml Version  2.6.27  
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.5.2.4 2006/10/10 22:22:43 tony2001 Exp 
$  
Supported EXIF Version  0220  
Supported filetypes  JPEG,TIFF  


filter
Input Validation and Filtering enabled 
Revision  $Revision: 1.52.2.25 $  

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


gd
GD Support  enabled  
GD Version  bundled (2.0.28 compatible)  
GIF Read Support  enabled  
GIF Create Support  enabled  
JPG Support  enabled  
PNG Support  enabled  
WBMP Support  enabled  
XBM Support  enabled  


hash
hash support  enabled  
Hashing Engines  md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 
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  


iconv
iconv support  enabled  
iconv implementation  libiconv  
iconv library version  1.9  

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 


json
json support  enabled  
json version  1.2.1  


libxml
libXML support  active  
libXML Version  2.6.27  
libXML streams  enabled  


mbstring
Multibyte Support  enabled  
Multibyte string engine  libmbfl  
Multibyte (japanese) regex support  enabled  
Multibyte regex (oniguruma) version  4.4.4  
Multibyte regex (oniguruma) backtrack check  On  

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.strict_detection Off Off 
mbstring.substitute_character no value no value 


mcrypt
mcrypt support enabled 
Version  2.5.8  
Api No  20021217  
Supported ciphers  cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 
rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea 
blowfish enigma rc2 tripledes  
Supported modes  cbc cfb ctr ecb ncfb nofb ofb stream  

Directive Local Value Master Value 
mcrypt.algorithms_dir no value no value 
mcrypt.modes_dir no value no value 


mysql
MySQL Support enabled 
Active Persistent Links  0  
Active Links  0  
Client API version  3.23.55  
MYSQL_MODULE_TYPE  external  
MYSQL_SOCKET  /tmp/mysql.sock  
MYSQL_INCLUDE  -I/usr/local/nf/include/mysql  
MYSQL_LIBS  -L/usr/local/nf/lib/mysql -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.7d 17 Mar 2004  


pcre
PCRE (Perl Compatible Regular Expressions) Support  enabled  
PCRE Library Version  6.7 04-Jul-2006  


PDO
PDO support enabled 
PDO drivers  sqlite2, sqlite  


pdo_sqlite
PDO Driver for SQLite 3.x enabled 
PECL Module version  (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6 2006/01/01 
12:50:12 sniper Exp $  
SQLite Library  3.3.7  


posix
Revision  $Revision: 1.70.2.3.2.6 $  


Reflection
Reflection enabled 
Version  $Id: php_reflection.c,v 1.164.2.33.2.31 2006/10/18 16:35:15 johannes 
Exp $  


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 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_httponly Off Off 
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 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 /mnt/web_z/.phpsessions /mnt/web_z/.phpsessions 
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.151.2.22.2.15 $  
Schema 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, RecursiveRegexIterator, RegexIterator, 
RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, 
SplObjectStorage, SplTempFileObject, UnderflowException, 
UnexpectedValueException  


SQLite
SQLite support enabled 
PECL Module version  2.0-dev $Id: sqlite.c,v 1.166.2.13.2.5 2006/10/20 21:28:31 
tony2001 Exp $  
SQLite Library  2.8.17  
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 
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,form=,fieldset= 
a=href,area=href,frame=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.27  


xmlreader
XMLReader  enabled  


xmlwriter
XMLWriter  enabled  


zlib
ZLib Support  enabled  
Stream Wrapper support  compress.zlib://  
Stream Filter support  zlib.inflate, zlib.deflate  
Compiled Version  1.1.3  
Linked Version  1.1.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 
dbase 
ionCube Loader 


Environment
Variable Value 
PATH  /usr/local/bin:/usr/bin:/bin  
DOCUMENT_ROOT  /mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/  
HTTP_ACCEPT  */*  
HTTP_ACCEPT_ENCODING  gzip, deflate  
HTTP_ACCEPT_LANGUAGE  en-ca  
HTTP_CONNECTION  close  
HTTP_COOKIE  213d9c3b08413c2e4e14f32c4e0aac96=8ea81a79995a4bbbad375e39fa6e686b; 
cpg143_data=YTo0OntzOjI6IklEIjtzOjMyOiIzNGQ1NzRjOTc2YmVlNGU0OTQyNGZmMjcyNzEwNmMwZiI7czoyOiJhbSI7aTowO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToyOntpOjA7czoxOiI0IjtpOjE7czoxOiI1Ijt9fQ%3D%3D
  
HTTP_HOST  alansyliboy.com  
HTTP_NFFWDDIR  /--mywebsite--/  
HTTP_NFUSERADDR  142.167.221.0  
HTTP_USER_AGENT  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)  
HTTP_X_FORWARDED_FOR  142.167.221.0  
HTTP_X_FORWARDED_HOST  --mywebsite--  
NF_MYSQL_HOST  10.8.12.4:3306  
REMOTE_ADDR  142.167.221.0  
REMOTE_PORT  58663  
SCRIPT_FILENAME  /mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php 
 
SCRIPT_URI  http://--mywebsite--/web07.2/info.php  
SCRIPT_URL  /web07.2/info.php  
SERVER_ADMIN  [EMAIL PROTECTED]  
SERVER_NAME  --mywebsite--  
SERVER_PORT  80  
SERVER_SOFTWARE  Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26  
GATEWAY_INTERFACE  CGI/1.1  
SERVER_PROTOCOL  HTTP/1.1  
REQUEST_METHOD  GET  
QUERY_STRING  no value  
REQUEST_URI  /web07.2/info.php  
SCRIPT_NAME  /web07.2/info.php  
DOCUMENT_ROOT_OLD  /mnt/w0401/d03/s04/b02bae8c  
HOMEDIR  /mnt/w0401/d03/s04/b02bae8c  
LD_LIBRARY_PATH  /usr/local/nf/lib:  
ORIG_SCRIPT_NAME  /web07.2/info.php  
ORIG_SCRIPT_FILENAME  
/mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php  


PHP Variables
Variable Value 
PHP_SELF  /web07.2/info.php  
_REQUEST["213d9c3b08413c2e4e14f32c4e0aac96"] 8ea81a79995a4bbbad375e39fa6e686b 
_REQUEST["cpg143_data"] 
YTo0OntzOjI6IklEIjtzOjMyOiIzNGQ1NzRjOTc2YmVlNGU0OTQyNGZmMjcyNzEwNmMwZiI7czoyOiJhbSI7aTowO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToyOntpOjA7czoxOiI0IjtpOjE7czoxOiI1Ijt9fQ==
 
_COOKIE["213d9c3b08413c2e4e14f32c4e0aac96"] 8ea81a79995a4bbbad375e39fa6e686b 
_COOKIE["cpg143_data"] 
YTo0OntzOjI6IklEIjtzOjMyOiIzNGQ1NzRjOTc2YmVlNGU0OTQyNGZmMjcyNzEwNmMwZiI7czoyOiJhbSI7aTowO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToyOntpOjA7czoxOiI0IjtpOjE7czoxOiI1Ijt9fQ==
 
_SERVER["PATH"] /usr/local/bin:/usr/bin:/bin 
_SERVER["DOCUMENT_ROOT"] /mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/ 
_SERVER["HTTP_ACCEPT"] */* 
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate 
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-ca 
_SERVER["HTTP_CONNECTION"] close 
_SERVER["HTTP_COOKIE"] 
213d9c3b08413c2e4e14f32c4e0aac96=8ea81a79995a4bbbad375e39fa6e686b; 
cpg143_data=YTo0OntzOjI6IklEIjtzOjMyOiIzNGQ1NzRjOTc2YmVlNGU0OTQyNGZmMjcyNzEwNmMwZiI7czoyOiJhbSI7aTowO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToyOntpOjA7czoxOiI0IjtpOjE7czoxOiI1Ijt9fQ%3D%3D
 
_SERVER["HTTP_HOST"] --mywebsite-- 
_SERVER["HTTP_NFFWDDIR"] /--mywebsite--/ 
_SERVER["HTTP_NFUSERADDR"] 142.167.221.0 
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 
_SERVER["HTTP_X_FORWARDED_FOR"] 142.167.221.0 
_SERVER["HTTP_X_FORWARDED_HOST"] --mywebsite-- 
_SERVER["NF_MYSQL_HOST"] 10.8.12.4:3306 
_SERVER["REMOTE_ADDR"] 142.167.221.0 
_SERVER["REMOTE_PORT"] 58663 
_SERVER["SCRIPT_FILENAME"] 
/mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php 
_SERVER["SCRIPT_URI"] http://--mywebsite--/web07.2/info.php 
_SERVER["SCRIPT_URL"] /web07.2/info.php 
_SERVER["SERVER_ADMIN"] [EMAIL PROTECTED] 
_SERVER["SERVER_NAME"] --mywebsite-- 
_SERVER["SERVER_PORT"] 80 
_SERVER["SERVER_SOFTWARE"] Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26 
_SERVER["GATEWAY_INTERFACE"] CGI/1.1 
_SERVER["SERVER_PROTOCOL"] HTTP/1.1 
_SERVER["REQUEST_METHOD"] GET 
_SERVER["QUERY_STRING"] no value 
_SERVER["REQUEST_URI"] /web07.2/info.php 
_SERVER["SCRIPT_NAME"] /web07.2/info.php 
_SERVER["DOCUMENT_ROOT_OLD"] /mnt/w0401/d03/s04/b02bae8c 
_SERVER["HOMEDIR"] /mnt/w0401/d03/s04/b02bae8c 
_SERVER["LD_LIBRARY_PATH"] /usr/local/nf/lib: 
_SERVER["ORIG_SCRIPT_NAME"] /web07.2/info.php 
_SERVER["ORIG_SCRIPT_FILENAME"] 
/mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php 
_SERVER["PHP_SELF"] /web07.2/info.php 
_SERVER["REQUEST_TIME"] 1191676454 
_SERVER["argv"] Array
(
)
 
_SERVER["argc"] 0 
_ENV["PATH"] /usr/local/bin:/usr/bin:/bin 
_ENV["DOCUMENT_ROOT"] /mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/ 
_ENV["HTTP_ACCEPT"] */* 
_ENV["HTTP_ACCEPT_ENCODING"] gzip, deflate 
_ENV["HTTP_ACCEPT_LANGUAGE"] en-ca 
_ENV["HTTP_CONNECTION"] close 
_ENV["HTTP_COOKIE"] 
213d9c3b08413c2e4e14f32c4e0aac96=8ea81a79995a4bbbad375e39fa6e686b; 
cpg143_data=YTo0OntzOjI6IklEIjtzOjMyOiIzNGQ1NzRjOTc2YmVlNGU0OTQyNGZmMjcyNzEwNmMwZiI7czoyOiJhbSI7aTowO3M6NDoibGFuZyI7czo3OiJlbmdsaXNoIjtzOjM6ImxpdiI7YToyOntpOjA7czoxOiI0IjtpOjE7czoxOiI1Ijt9fQ%3D%3D
 
_ENV["HTTP_HOST"] --mywebsite-- 
_ENV["HTTP_NFFWDDIR"] /--mywebsite--/ 
_ENV["HTTP_NFUSERADDR"] 142.167.221.0 
_ENV["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 
_ENV["HTTP_X_FORWARDED_FOR"] 142.167.221.0 
_ENV["HTTP_X_FORWARDED_HOST"] --mywebsite-- 
_ENV["NF_MYSQL_HOST"] 10.8.12.4:3306 
_ENV["REMOTE_ADDR"] 142.167.221.0 
_ENV["REMOTE_PORT"] 58663 
_ENV["SCRIPT_FILENAME"] 
/mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php 
_ENV["SCRIPT_URI"] http://--mywebsite--/web07.2/info.php 
_ENV["SCRIPT_URL"] /web07.2/info.php 
_ENV["SERVER_ADMIN"] [EMAIL PROTECTED] 
_ENV["SERVER_NAME"] --mywebsite-- 
_ENV["SERVER_PORT"] 80 
_ENV["SERVER_SOFTWARE"] Apache/1.3.34 (Unix) mod_fastcgi/2.4.2 mod_perl/1.26 
_ENV["GATEWAY_INTERFACE"] CGI/1.1 
_ENV["SERVER_PROTOCOL"] HTTP/1.1 
_ENV["REQUEST_METHOD"] GET 
_ENV["QUERY_STRING"] no value 
_ENV["REQUEST_URI"] /web07.2/info.php 
_ENV["SCRIPT_NAME"] /web07.2/info.php 
_ENV["DOCUMENT_ROOT_OLD"] /mnt/w0401/d03/s04/b02bae8c 
_ENV["HOMEDIR"] /mnt/w0401/d03/s04/b02bae8c 
_ENV["LD_LIBRARY_PATH"] /usr/local/nf/lib: 
_ENV["ORIG_SCRIPT_NAME"] /web07.2/info.php 
_ENV["ORIG_SCRIPT_FILENAME"] 
/mnt/w0401/d03/s04/b02bae8c/www/--mywebsite--/web07.2/info.php 

--- End Message ---
--- Begin Message ---
I almost always up the memory_limit in the php.ini.  Set the memory limit to
16M, or 32M (the default is 8M).  You want a higher memory_limit if you're
working with big file uploads or creating images with php or anything else
that takes a lot of memory.

Also, if you're still researching which CMS to use, don't forget to check
out Drupal at http://drupal.org.  You can learn a lot about PHP by diving
into a well written project.  The Drupal code is very clean and organized.

Tom Friedhof

On 10/6/07, Jeff Benetti <[EMAIL PROTECTED]> wrote:
>
>  SERVER_SOFTWARE  Apache/1.3.34 (Unix)
>
> I have attached the output from phpinfo()
>
> I cc'd the php-general group but I am not sure how an attachment will be
> dealt with there.
>
> Thanks,
> Jeff
>
>
>  ------------------------------
> *From:* Nathan Nobbe [mailto:[EMAIL PROTECTED]
> *Sent:* October 6, 2007 9:08 AM
> *To:* Jeff Benetti
> *Cc:* [EMAIL PROTECTED]
> *Subject:* Re: [PHP] Php session settings
>
> Jeff,
>
> is *memory_limit*
> <http://docs.php.net/manual/en/ini.core.php#ini.memory-limit>the one youre
> looking for ?
> that sounds strange; im sure the default would be appropriate.
> i would recommend you create a script to show the current values
> of the php.ini settings before you start changing them.
>
> <?php
>     echo phpinfo();
> ?>
>
> -nathan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Thanks,
I added a one line file called php.ini with the following line 
memory_limit = 16M
 
so far CMS made simple seems to run better (faster, no need for page
refresh)
 
Yes I will check out drupal
Jeff

  _____  

From: Tom Friedhof [mailto:[EMAIL PROTECTED] 
Sent: October 6, 2007 11:18 AM
To: Jeff Benetti
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Php session settings


I almost always up the memory_limit in the php.ini.  Set the memory limit to
16M, or 32M (the default is 8M).  You want a higher memory_limit if you're
working with big file uploads or creating images with php or anything else
that takes a lot of memory. 

Also, if you're still researching which CMS to use, don't forget to check
out Drupal at http://drupal.org.  You can learn a lot about PHP by diving
into a well written project.  The Drupal code is very clean and organized. 

Tom Friedhof


On 10/6/07, Jeff Benetti <[EMAIL PROTECTED]> wrote: 

SERVER_SOFTWARE  Apache/1.3.34 (Unix) 
 
I have attached the output from phpinfo()
 
I cc'd the php-general group but I am not sure how an attachment will be
dealt with there.
 
Thanks,
Jeff
 


  _____  

From: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
Sent: October 6, 2007 9:08 AM
To: Jeff Benetti
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Php session settings


Jeff,

is  <http://docs.php.net/manual/en/ini.core.php#ini.memory-limit>
memory_limit the one youre looking for ?
that sounds strange; im sure the default would be appropriate.
i would recommend you create a script to show the current values
of the php.ini settings before you start changing them.

<?php
    echo phpinfo();
?>

-nathan 

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





--- End Message ---
--- Begin Message ---
On 10/3/07, Tony Marston <[EMAIL PROTECTED]> wrote:
>
>
> ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On 10/3/07, Tony Marston <[EMAIL PROTECTED]> wrote:
> >>
> >> Encapsulation is NOT data hiding. Take a look at
> >
> >
> > please stop putting words into my mouth.  i never once said
> encapsulation
> > is
> > data hiding.
> > I stated PublicPrivateProctected facilitates encapsulation.
>
> The dictionary definition of "facilitate" is to make easier or better.
> Data
> and methods are either contained within the same capsule or they are not.
> There are no intermediate levels of encapsulation.  Data hiding has
> absolutely no effect on encapsulation. Hiding data does not make
> encapsulation better, and not hiding data does not make encapsulation
> worse.
>
> Encapsulation and data hidng are NOT connected in any way. You can have
> encapsulation without data hiding, and you can have data hiding without
> encapsulation.



i will now be strengthening my previous statements and issuing the new
statement;
information hiding is an integral part of encapsulation.  here are excerpts
from 4
books, 2 on java, one on c++, and one on php:

This abstraction works only if we are careful to respect its boundaries.  An
object should be self-governing, which means
that the variables contained in an object should be modified only within the
object.  Only the methods within an object should
have access to the variables in that object.  For example, the methods of
the Coin class should be solely responsible for changing
the value of the face variable.  We should make it difficult, if not
impossible, for code outside of a class to "reach in" and change the
value of a variable that is declared inside the class.
Page 220. - 221
Java Software Solutions foundations of program design 3rd edition Lewis &
Loftus

The specification of what a function does and how it is invoked defines its
interface.  By hiding a module implementation, or encapsulating
the module, we can make changes to it without changing the main function, as
long as the interface remains the same.  For example, you
might rewrite the body of a function using a more efficient algorithm.
Encpasulation: Hiding a module implementation in a separate block with a
formally specified interface.
Page 354
Programming and Problem Solving with C++ Second Edition
Nell Dale, Chip Weems, Mark Headington

OOP revolves around the concept of grouping code and data together in
logical units called classes.  This process is usually referred to as
encapsulation, or information hiding, since its goal is that of dividing an
application into separate entities whose internal components can
change without altering their external interfaces.
Page 113.
Zend PHP5 Certification Study Guide
Davey Shafik

Access control is often referred to as implementation hiding.  Wrapping data
and methods within classes in combination with implementation
hiding is often called encapsulation4*  The result is a data type with
characteristics and behaviors.
* However, people often refer to implementation hiding alone as
encapsulation.
Page 231
Thinking in Java Third Edition
Bruce Eckel

> tonight when i get home ill post
> > a  snippet from an entry level oop book (such that i recommend earlier)
> > that
> > says almost
> > verbatim what i have.
> >
> > practically any non-trivial class will have member variables that it
> uses
> > in
> > order to facilitate
> > its member functions.
>
> So what? Those variables do not have to be private or protected in order
> to
> function.


They dont have to be marked private or protected to function, but in order
to prevent
client code from latching onto the implementation details of the class; they
need to be
hidden.

>  many of those variables have nothing to do w/ the
> > functionality the
> > class exposes to client code.  if those variables are modified directly,
> > because they cant be
> > protected by ppp, then the functionality of the class can be distorted.
> > that is why ppp exists.
>
> PPP exists to place restrictions on stupid programmers. It does not add an
> functionality, or make the code run faster.


Run faster, who said anything about that?   Given that ive shown examples
from 4
books, some with multiple authors, we can either assume there are a lot of
stupid
programmers out there or your opinion is the less popular of the 2.
what you dont seem to understand is the important of stressing the
distinction
between specification and implementation.  maybe youve had the benefit of
working
with other developers that arent infact stupid; and they know not to access
class
member variables directly; but the point is that is a very delicate system.
stupid,
or more likely uneducated developers will go in and latch onto class
implementation
details which leads to tight coupling, which makes systems a massive pain to
extend
and maintain.

lets be fair though; youve defined encapsulation as grouping variables and
methods,
and defined data-hiding as a separate concept, fair enough.  my criticism of
php4,
based upon those definitions can be revised to,
php4 is inferior, because although it provides encapsulation, it does not
provide data-hiding
capabilities.  this can lead to very fragile object oriented systems unless
developers rely
heavily on external documentation, communication and agree to strictly avoid
accessing
class member variables directly.
the language also lacks many other powerful object oriented facilities.

> if a class has variables client code doesnt need to know about to do its

> > job, then client code
> > by no means should have access to it.
> > interfaces are a powerful mechanism.  its a shame youre turning your
> back
> > on
> > them.
>
> Using interfaces does not give me access to any functionality that I do
> not
> have by accessing methods directly, so why waste time in using them?
>

given that you dont understand the fundamental concepts of oop; im not going
to take the
time to try and explain the power of the interface construct.  imho, you
have a long way to
go before you can grasp the power of the mechanism.

in summary, i still maintain, based upon the contents of this post and the
many previous posts
that sitting down and trying to learn oop with php4 is a waste of time.  at
the very least php5
could still be used by marking everything public, which just illustrates how
silly the lack of
data-hiding really is.

-nathan

--- End Message ---
--- Begin Message ---
""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> On 10/3/07, Tony Marston <[EMAIL PROTECTED]> wrote:
>>
>>
>> ""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > On 10/3/07, Tony Marston <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Encapsulation is NOT data hiding. Take a look at
>> >
>> >
>> > please stop putting words into my mouth.  i never once said
>> encapsulation
>> > is
>> > data hiding.
>> > I stated PublicPrivateProctected facilitates encapsulation.
>>
>> The dictionary definition of "facilitate" is to make easier or better.
>> Data
>> and methods are either contained within the same capsule or they are not.
>> There are no intermediate levels of encapsulation.  Data hiding has
>> absolutely no effect on encapsulation. Hiding data does not make
>> encapsulation better, and not hiding data does not make encapsulation
>> worse.
>>
>> Encapsulation and data hidng are NOT connected in any way. You can have
>> encapsulation without data hiding, and you can have data hiding without
>> encapsulation.
>
>
>
> i will now be strengthening my previous statements and issuing the new
> statement;
> information hiding is an integral part of encapsulation.

Encapsulation and information hiding are separate topics. It is possible to 
have one without the other.

> here are excerpts from 4
> books, 2 on java, one on c++, and one on php:
>
> This abstraction works only if we are careful to respect its boundaries. 
> An
> object should be self-governing, which means
> that the variables contained in an object should be modified only within 
> the
> object.  Only the methods within an object should
> have access to the variables in that object.

The principle of encapsulation has no such rule! Encapsulation is merely the 
act of placing variables and the methods which act upon those variables in 
the same object. It is not necessary to hide any variables.

Encapsulation is NOT data hiding. Take a look at

http://www.javaworld.com/javaworld/jw-05-2001/jw-0518-encapsulation.html
http://www.itmweb.com/essay550.htm
http://c2.com/cgi/wiki?EncapsulationIsNotInformationHiding

>  For example, the methods of
> the Coin class should be solely responsible for changing
> the value of the face variable.  We should make it difficult, if not
> impossible, for code outside of a class to "reach in" and change the
> value of a variable that is declared inside the class.
> Page 220. - 221
> Java Software Solutions foundations of program design 3rd edition Lewis &
> Loftus
> The specification of what a function does and how it is invoked defines 
> its
> interface.  By hiding a module implementation, or encapsulating
> the module, we can make changes to it without changing the main function, 
> as
> long as the interface remains the same.  For example, you
> might rewrite the body of a function using a more efficient algorithm.
> Encpasulation: Hiding a module implementation in a separate block with a
> formally specified interface.

The implementation is the CODE behind the method, not the DATA that the code 
manipulates. Encapsulation is IMPLEMENTATION hiding, not DATA hiding.

> Page 354
> Programming and Problem Solving with C++ Second Edition
> Nell Dale, Chip Weems, Mark Headington
>
> OOP revolves around the concept of grouping code and data together in
> logical units called classes.  This process is usually referred to as
> encapsulation,

Correct.

> or information hiding,

INCORRECT

> since its goal is that of dividing an
> application into separate entities whose internal components can
> change without altering their external interfaces.

No. The idea behind encapsulation is that the implementation, the code 
behind a method, can change at any time without the outside world being 
aware of it. Data is *NOT* the implemetation.

> Page 113.
> Zend PHP5 Certification Study Guide
> Davey Shafik
>
> Access control is often referred to as implementation hiding.

But wrongly! Access control is NOT implementation hiding, it is a totally 
separate issue.

> Wrapping data
> and methods within classes in combination with implementation
> hiding is often called encapsulation4*

That is correct. But only the implementation (the code behnd each method) is 
hidden, not the data.

>  The result is a data type with
> characteristics and behaviors.
> * However, people often refer to implementation hiding alone as
> encapsulation.
> Page 231
> Thinking in Java Third Edition
> Bruce Eckel
>
>> tonight when i get home ill post
>> > a  snippet from an entry level oop book (such that i recommend earlier)
>> > that
>> > says almost
>> > verbatim what i have.
>> >
>> > practically any non-trivial class will have member variables that it
>> uses
>> > in
>> > order to facilitate
>> > its member functions.
>>
>> So what? Those variables do not have to be private or protected in order
>> to
>> function.
>
>
> They dont have to be marked private or protected to function, but in order
> to prevent
> client code from latching onto the implementation details of the class; 
> they
> need to be
> hidden.

Wrong! DATA does not define the implementation, it is the CODE which 
manipulates that data which defines the implementation. The idea of 
encapsulation is that you can change the code within any method at will 
without the outside world being aware of it.

>>  many of those variables have nothing to do w/ the
>> > functionality the
>> > class exposes to client code.  if those variables are modified 
>> > directly,
>> > because they cant be
>> > protected by ppp, then the functionality of the class can be distorted.
>> > that is why ppp exists.
>>
>> PPP exists to place restrictions on stupid programmers. It does not add 
>> an
>> functionality, or make the code run faster.
>
>
> Run faster, who said anything about that?   Given that ive shown examples
> from 4
> books, some with multiple authors, we can either assume there are a lot of
> stupid
> programmers out there or your opinion is the less popular of the 2.

Encapsulation is NOT data hiding. Take a look at

http://www.javaworld.com/javaworld/jw-05-2001/jw-0518-encapsulation.html
http://www.itmweb.com/essay550.htm
http://c2.com/cgi/wiki?EncapsulationIsNotInformationHiding


> what you dont seem to understand is the important of stressing the
> distinction
> between specification and implementation.  maybe youve had the benefit of
> working
> with other developers that arent infact stupid; and they know not to 
> access
> class
> member variables directly; but the point is that is a very delicate 
> system.
> stupid,
> or more likely uneducated developers will go in and latch onto class
> implementation
> details which leads to tight coupling, which makes systems a massive pain 
> to
> extend
> and maintain.
>
> lets be fair though; youve defined encapsulation as grouping variables and
> methods,
> and defined data-hiding as a separate concept, fair enough.  my criticism 
> of
> php4,
> based upon those definitions can be revised to,
> php4 is inferior, because although it provides encapsulation, it does not
> provide data-hiding
> capabilities.  this can lead to very fragile object oriented systems 
> unless
> developers rely
> heavily on external documentation, communication and agree to strictly 
> avoid
> accessing
> class member variables directly.
> the language also lacks many other powerful object oriented facilities.
>
>> if a class has variables client code doesnt need to know about to do its
>
>> > job, then client code
>> > by no means should have access to it.
>> > interfaces are a powerful mechanism.  its a shame youre turning your
>> back
>> > on
>> > them.
>>
>> Using interfaces does not give me access to any functionality that I do
>> not
>> have by accessing methods directly, so why waste time in using them?
>>
>
> given that you dont understand the fundamental concepts of oop;

The fundamental concepts of OOP consist of nothing more than encapsulation, 
inheritance and polymorphism. Data hiding, interfaces and all that other 
fancy stuff are irrelevant.

> im not going to take the
> time to try and explain the power of the interface construct.  imho, you
> have a long way to
> go before you can grasp the power of the mechanism.

I have never seen any gain from using interfaces in PHP, only pain, 
therefore I refuse to use them. Yet what functinality I am losing? None 
whatsoever.

> in summary, i still maintain, based upon the contents of this post and the
> many previous posts
> that sitting down and trying to learn oop with php4 is a waste of time.

I strongly disagee. It *IS* possible to write perfectly adequate OO programs 
using PHP 4. If you cannot then you have been taught some bad habits.

> at the very least php5
> could still be used by marking everything public, which just illustrates 
> how
> silly the lack of
> data-hiding really is.

That is just your opinion. My opinion is totally different.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org 

--- End Message ---
--- Begin Message ---
On Sat, 2007-10-06 at 15:42 +0100, Tony Marston wrote:
> >
> > OOP revolves around the concept of grouping code and data together in
> > logical units called classes.  This process is usually referred to as
> > encapsulation,
> 
> Correct.
> 
> > or information hiding,
> 
> INCORRECT
> 
> > since its goal is that of dividing an
> > application into separate entities whose internal components can
> > change without altering their external interfaces.
> 
> No. The idea behind encapsulation is that the implementation, the code 
> behind a method, can change at any time without the outside world being 
> aware of it. Data is *NOT* the implemetation.

Tony is right here. Encapsulation is about hiding the details of the
implementation and this *can* include information hiding in cases where
the purpose of the member variables is likely to change. However,
encapsulation does not necessarily imply information hiding. That said
information hiding is often achieved using private members and
encapsulation. There is a strong relationship between the two, but they
are not the same thing.

Also, don't forget that abstraction, encapsulation, and information
hiding all have a price.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

--- End Message ---
--- Begin Message ---
At 10:33 AM -0400 10/5/07, marek wrote:
Even better:

<?php
$request_id = $_GET['id'];
$current_user = substr($_SERVER['AUTH_USER'], 13);

$lock_query = "SELECT id, locked_by_user FROM locked_payments WHERE id =
'$request_id'";

SQL injection?

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 10:27 PM +0200 10/5/07, Zoltán Németh wrote:
2007. 10. 5, péntek keltezéssel 12.57-kor tedd ezt írta:

 > I long for the time where my editor said "Offending syntax on line 236".

my editor still says "parse error" and shows me the line number... ;)

greets
Zoltán Németh

Consider yourself lucky, or me unfortunate.  :-)

All my development is spent online -- the browser god is not forgiving.

One of these days I'll get the Zend IDE to work.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 12:58 PM -0400 10/5/07, Daniel Brown wrote:

<?
$s = $_GET['s'];
?>
<script language="JavaScript">
function writeHREF(value,title) {
        var url = "http://www.crusar.org/test.php";;
        var currentTime = new Date();
        var month = currentTime.getMonth();
        var day = currentTime.getDate();
        var year = currentTime.getFullYear();
        var jsvalue = month + '/' + day + '/' + year;
        document.write('<a href="' + url + '?s=' + value + '&jsvalue='
+ jsvalue + '">' + title + '</a>');
}
</script>

This is where your JS link will appear, Tedd:
<script language="JavaScript">
        writeHREF('<?=$s;?>','Test Link');
</script>


Daniel

That's slick.

I solved the problem by using:

<a href="img.php?i=<?php echo($value);?>" onclick="window.location = this.getAttribute( 'href' ) + '&s=' + s; return false;">

But, I am sure I will be using your's sometime soon.

Thanks,

tedd



--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 1:26 PM -0400 10/5/07, Nathan Nobbe wrote:
strange; i missed that when i put it together; my bad, it was late.
here is a revision that works.

<html>
    <head>
        <script type="text/javascript">
            window.onload = function() {
                var someLink = document.getElementById('someLink');
                someLink.href += "&anotherVar=8";
                alert(document.getElementById('someLink').href);
            }
        </script>
    </head>
    <body>
        <a id="someLink" href=" http://somesite.com?a=5";>
            click here
        </a>
    </body>
</html>

the problem was the local variable was being assigned the value of the
attribute, not the reference
to the tag in the dom.  i have now set it to be a reference to the variable
in the dom.

-nathan:

Not that I provided information otherwise, but document.getElementById won't work in this case because there are several links involved. As such, I have to use document.getElementByClass and that has problems.

Unfortunately, my solution isn't unobtrusive.

<a href="img.php?i=<?php echo($value);?>" onclick="window.location = this.getAttribute( 'href' ) + '&s=' + s; return false;">

However, I couldn't see a way to make it so.

Many thanks for your time and effort.

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---

Reply via email to