php-general Digest 23 Oct 2007 12:08:54 -0000 Issue 5087

2007-10-23 Thread php-general-digest-help

php-general Digest 23 Oct 2007 12:08:54 - Issue 5087

Topics (messages 263525 through 263537):

Re: problem with foreach
263525 by: Robert Cummings

MySQL connector installation/upgrade problems
263526 by: David Zentgraf
263530 by: Martin Marques
263531 by: David Zentgraf

Re: [PHP-INSTALL] MySQL connector installation/upgrade problems
263527 by: Colin Guthrie
263534 by: Colin Guthrie
263536 by: David Zentgraf
263537 by: Colin Guthrie

Re: Thoughts on multiple servers
263528 by: Per Jessen

Re: Proposal of DOM non-standard method: 
DOMDocument::loadCharacterEntitiesFromDtd($path)
263529 by: Per Jessen

Re: Php generated html email
263532 by: Richard Heyes

window.open() and search engines
263533 by: Richard Heyes
263535 by: Edward Kay

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]


--
---BeginMessage---
On Mon, 2007-10-22 at 19:59 -0400, Bastien Koert wrote:
 I am sure that I am late to the party, but am sure that
 double or single quotes at least are needed around the
 attribute values to make this work

Late to the party and completely off the mark taboot. Don't need quotes
at all. It's bad practice to omit them, but it works fine.

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

Leveraging the buying power of the masses!
...
---End Message---
---BeginMessage---

Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date  
MySQL 5 installation + PHP4. I installed the MySQL 5 package, server  
and client, via RPMs and they work fine, the client tells me it's  
version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, but  
it's still using MySQL client libraries version 3.23.58. I'm kind of  
at a loss where it takes these versions from or how I can get it to  
use the newer libraries.


Any hints would be greatly appreciated.

Chrs,
Dav
---End Message---
---BeginMessage---

David Zentgraf escribió:

Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 
installation + PHP4. I installed the MySQL 5 package, server and client, 
via RPMs and they work fine, the client tells me it's version 5.0.45. I 
went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL 
client libraries version 3.23.58. I'm kind of at a loss where it takes 
these versions from or how I can get it to use the newer libraries.


Any hints would be greatly appreciated.


Wouldn't it be easier to upgrade to CentOS 5?
---End Message---
---BeginMessage---

On  23. Oct 2007, at 19:55, Martin Marques wrote:


Wouldn't it be easier to upgrade to CentOS 5?


We tried to explain that to our host, but their service *major  
expletive*, and other hosts in Tokyo ain't better either. :-(


Chrs,
Dav
---End Message---
---BeginMessage---
David Zentgraf wrote:
 Hi,
 
 I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5
 installation + PHP4. I installed the MySQL 5 package, server and client,
 via RPMs and they work fine, the client tells me it's version 5.0.45. I
 went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL
 client libraries version 3.23.58. I'm kind of at a loss where it takes
 these versions from or how I can get it to use the newer libraries.
 
 Any hints would be greatly appreciated.

Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
have lying around. Specifically look for the devel libraries/packages.
Remove the 3.x versions via RPM and make sure you've installed the
relevant -devel package from MySQL 5.

You can also use the MySQL 5 -shared-compat package to replace the
shared libraries needed by other apps in Fedora, although you may have
to do an rpm -e --nodeps to get rid of the currently installed library
prior to installing -shared-compat due to file conflicts. I always like
to test that this has worked tho (typically testing one of the apps in
the packages rpm moaned about when doing a normal rpm -e (sans
--nodeps) or by trying to rpm -e the newly installed -shared-compat just
to make sure it is providing the correct deps at least!

HTH


gripe
Be warned tho. If you use custom aggregate UDFs in MySQL 5 it the
current version will segfault on you. I tore my hair out over this.
Upstream MySQL have been pretty crap at responding or releasing
something that I reported months ago. The fact they removed all the
daily snapshots has not helped me help them to fix it either.

http://bugs.mysql.com/bug.php?id=30312

I had to stick with 5.0.27 for now.
/gripe

Col
---End Message---
---BeginMessage---
David Christopher Zentgraf wrote:
 On  23. Oct 2007, at 17:22, Colin Guthrie 

RE: [PHP] window.open() and search engines

2007-10-23 Thread Edward Kay

 Can anyone say for sure whether window.open() links get spidered by
 search engines?


From my experience they don't, but I use a custom Javascript function to
open pop-ups.

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf

On  23. Oct 2007, at 20:33, Colin Guthrie wrote:


If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).

What is the output of:
rpm -qa --nosignature --nodigest | grep -i mysql

This should give some clues.


$ rpm -qa --nosignature --nodigest | grep -i mysql
MySQL-server-community-5.0.45-0.rhel3
mod_auth_mysql-20030510-2.ent
MySQL-shared-compat-5.0.45-0.rhel3
MySQL-client-community-5.0.45-0.rhel3
mysql-bench-3.23.58-16.RHEL3.1
MySQL-python-0.9.1-6
libdbi-dbd-mysql-0.6.5-5
perl-DBD-MySQL-2.1021-4.EL3
qt-MySQL-3.1.2-17.RHEL3
php-mysql-4.3.2-43.ent
MySQL-devel-community-5.0.45-0.rhel3

Now I'm even more confused, the 5.0.45 devel package *is* there.

I would imagine (don't know) that PHP would use the mysql_config  
program

to work out which mysql is installed and get the relevent cflags and
linking options. For me this is provided by the
MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
installed?


$ mysql_config
Usage: /usr/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/include/mysql -g -pipe -march=i386 - 
mcpu=i686]

--include[-I/usr/include/mysql]
--libs   [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt  
-lnsl -lm]
--libs_r [-L/usr/lib/mysql -lmysqlclient_r -lz - 
lpthread -lcrypt -lnsl -lm -lpthread]

--socket [/var/lib/mysql/mysql.sock]
--port   [3306]
--version[5.0.45]
--libmysqld-libs [-L/usr/lib/mysql -lmysqld -lz -lpthread - 
lcrypt -lnsl -lm -lpthread -lrt]


Doing a simple ls -l on both /usr/lib/mysql and /usr/include/mysql  
shows me that all libraries in there are from Jul 5th, which is too  
old to be my recent MySQL install. So these seem to be the files that  
need updating. Which package will do that for me?


Chrs,
Dav

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote:
 On  23. Oct 2007, at 20:33, Colin Guthrie wrote:
 
 If you compile PHP and it finds v3 of mysql that means that you must
 have the old development libraries for mysql 3 installed in some
 capacity (I believe).

 What is the output of:
 rpm -qa --nosignature --nodigest | grep -i mysql

 This should give some clues.
 
 $ rpm -qa --nosignature --nodigest | grep -i mysql
 MySQL-server-community-5.0.45-0.rhel3
 mod_auth_mysql-20030510-2.ent
 MySQL-shared-compat-5.0.45-0.rhel3
 MySQL-client-community-5.0.45-0.rhel3
 mysql-bench-3.23.58-16.RHEL3.1
 MySQL-python-0.9.1-6
 libdbi-dbd-mysql-0.6.5-5
 perl-DBD-MySQL-2.1021-4.EL3
 qt-MySQL-3.1.2-17.RHEL3
 php-mysql-4.3.2-43.ent
 MySQL-devel-community-5.0.45-0.rhel3
 
 Now I'm even more confused, the 5.0.45 devel package *is* there.

Yeah that looks pretty OK to me (tho' not overly knowledgeable with
Fedora/Centos packaging)

 I would imagine (don't know) that PHP would use the mysql_config program
 to work out which mysql is installed and get the relevent cflags and
 linking options. For me this is provided by the
 MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
 installed?
 
 $ mysql_config
 Usage: /usr/bin/mysql_config [OPTIONS]
 Options:
 --cflags [-I/usr/include/mysql -g -pipe -march=i386
 -mcpu=i686]
 --include[-I/usr/include/mysql]
 --libs   [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt
 -lnsl -lm]
 --libs_r [-L/usr/lib/mysql -lmysqlclient_r -lz -lpthread
 -lcrypt -lnsl -lm -lpthread]
 --socket [/var/lib/mysql/mysql.sock]
 --port   [3306]
 --version[5.0.45]
 --libmysqld-libs [-L/usr/lib/mysql -lmysqld -lz -lpthread
 -lcrypt -lnsl -lm -lpthread -lrt]
 
 Doing a simple ls -l on both /usr/lib/mysql and /usr/include/mysql shows
 me that all libraries in there are from Jul 5th, which is too old to be
 my recent MySQL install. So these seem to be the files that need
 updating. Which package will do that for me?

No, I reckon Jul 5th could be about right when was .45 released? I
had it in my head it was august but Jul doesn't seem too far before that
so entirely possible.

Use rpm -qf filename to see which package owns which files.

you can also use rpm -V pck to verify that the package has not be
modified on disk.

Does PHP 4 perhaps come with it's own mysql library in the source?
Perhaps you have to pass an argument?

Try using something like: --with-mysql=shared,/usr in the configure to
PHP. That's certainly how I configure PHP5. The args for 4 may be
different tho'.

Col.

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf

On  23. Oct 2007, at 21:07, Colin Guthrie wrote:


No, I reckon Jul 5th could be about right when was .45 released? I
had it in my head it was august but Jul doesn't seem too far before  
that

so entirely possible.


Ah sorry, I was thinking about source installs. RPMs keep the  
original creation date I guess. Not overly used to that.



Use rpm -qf filename to see which package owns which files.


Probing two random files in include/mysql and and lib/mysql show they  
belong to MySQL-devel-community-5.0.45-0.rhel3.



you can also use rpm -V pck to verify that the package has not be
modified on disk.


$ rpm -V MySQL-devel-community-5.0.45-0.rhel3
missing  d /usr/share/man/man1/comp_err.1.gz
missing  d /usr/share/man/man1/mysql_config.1.gz

I suppose this is, albeit not ideal, tolerable?


Does PHP 4 perhaps come with it's own mysql library in the source?
Perhaps you have to pass an argument?


Yes, as of PHP4 the --with-mysql is on by default. I tried specifying  
--with-mysql-dir=/usr and also shared,/usr, but to no avail.


Chrs,
Dav

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote:
 $ rpm -V MySQL-devel-community-5.0.45-0.rhel3
 missing  d /usr/share/man/man1/comp_err.1.gz
 missing  d /usr/share/man/man1/mysql_config.1.gz
 
 I suppose this is, albeit not ideal, tolerable?

Yeah this is fine. Your system is probably not setup to install docs and
therefore these files just didn't get installed.

 Does PHP 4 perhaps come with it's own mysql library in the source?
 Perhaps you have to pass an argument?
 
 Yes, as of PHP4 the --with-mysql is on by default. I tried specifying
 --with-mysql-dir=/usr and also shared,/usr, but to no avail.

Sorry mate I'm out of ideas... Without tracing through the configure
script to nail it down, I'm kinda stumped.

Col

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



[PHP] libmm.so.14

2007-10-23 Thread Jeff Mckeon
Hey all,

Setting up a php based ticket system on a new OpenSuse 10.3 64bit system.

The ticket sys requires qmail so I had to uninstall postfix and install
qmail.

Qmail injects emails into this ticket sys with the following line... 

/usr/bin/php -q /srv/www/virtual/support/mailpipe.php

I now get this error however:

/usr/bin/php: error while loading shared libraries: libmm.so.14: cannot open
shared object file: No such file or directory

Libmm.so.14 is installed in:

/usr/lib64/libmm.so.14

Any idea what it is I'm missing?

Version PHP5

Thanks,

jeff

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



Re: [PHP] libmm.so.14

2007-10-23 Thread Daniel Brown
On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
 Hey all,

 Setting up a php based ticket system on a new OpenSuse 10.3 64bit system.

 The ticket sys requires qmail so I had to uninstall postfix and install
 qmail.

 Qmail injects emails into this ticket sys with the following line...

 /usr/bin/php -q /srv/www/virtual/support/mailpipe.php

 I now get this error however:

 /usr/bin/php: error while loading shared libraries: libmm.so.14: cannot open
 shared object file: No such file or directory

 Libmm.so.14 is installed in:

 /usr/lib64/libmm.so.14

 Any idea what it is I'm missing?

 Version PHP5

 Thanks,

 jeff

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



Check to see where PHP is searching for the extensions.  Chances
are, all you'll need to do is symlink it from the /usr/lib64/
directory to wherever PHP is expecting to find it.

Also, be sure it really is still there.  When's the last time you
did a `locate -u` on your server (if that's the method you used)?  It
could be showing an old slocatedb.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished

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



RE: [PHP] libmm.so.14

2007-10-23 Thread Jeff Mckeon
 -Original Message-
 From: Daniel Brown [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 23, 2007 10:47 AM
 To: Jeff Mckeon
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] libmm.so.14
 
 On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
  Hey all,
 
  Setting up a php based ticket system on a new OpenSuse 10.3 64bit
 system.
 
  The ticket sys requires qmail so I had to uninstall postfix and
 install
  qmail.
 
  Qmail injects emails into this ticket sys with the following line...
 
  /usr/bin/php -q /srv/www/virtual/support/mailpipe.php
 
  I now get this error however:
 
  /usr/bin/php: error while loading shared libraries: libmm.so.14:
 cannot open
  shared object file: No such file or directory
 
  Libmm.so.14 is installed in:
 
  /usr/lib64/libmm.so.14
 
  Any idea what it is I'm missing?
 
  Version PHP5
 
  Thanks,
 
  jeff
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 Check to see where PHP is searching for the extensions.  Chances
 are, all you'll need to do is symlink it from the /usr/lib64/
 directory to wherever PHP is expecting to find it.
 
 Also, be sure it really is still there.  When's the last time you
 did a `locate -u` on your server (if that's the method you used)?  It
 could be showing an old slocatedb.
 
 --
 Daniel P. Brown
 [office] (570-) 587-7080 Ext. 272
 [mobile] (570-) 766-8107
 
 Give a man a fish, he'll eat for a day.  Then you'll find out he was
 allergic and is hospitalized.  See?  No good deed goes unpunished

Tried that,

I did a simlink to /usr/lib but it complained that:

/usr/bin/php: error while loading shared libraries: libmm.so.14: wrong ELF
class: ELFCLASS64



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



[PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Julien Pauli
Hello everyone.

We all know the difference between print and echo, but has someone ever
tried to combine them together ??

Right, try this :

?php
echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) .
'tata ' . print('zozo ' . print('pupu '));


And guess the result ...

Can someone explain it ?
( the result is : toctoc hihi u 1pupu zozo 1v 1tata 1coucou 1 )


Re: [PHP] problem with foreach

2007-10-23 Thread tedd

At 12:01 PM -0500 10/22/07, Adam Williams wrote:

I have an html page with checkboxes:

form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern 
Mississippibr

input type=checkbox name=option[] value=Civil RightsCivil Rightsbr
input type=checkbox name=option[] value=Military 
HistoryMilitaryHistorybr

input type=submit name=submit value=Submit

and mailform2.php containing:

echo you selected: br;
/* line 81 */ foreach ($_POST[option] as $a)
   {
   echo $a;
   }

but I'm getting the error:

you selected:

*Warning*: Invalid argument supplied for foreach() in 
*/var/www/sites/mdah-test/museum/mmhsurvey/mailform2.php* on line 
*81*


I googled some checkbox/foreach pages on google, but I don't see 
where I'm going wrong.  I'm running php 5.2.5 on Apache 2.2.4 on 
Fedora Linux.  Any help?



There's nothing wrong with your php code, but there is something 
wrong with your html and methodology.


First, always use quotes in html for attributes and values (i.e., 
type=checkbox value =Submit).


Second, always plan for what the user may do (IOW clean your input). 
If none of the above is an acceptable answer, then plan for it.


Cheers,

tedd

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

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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote:
 ?php
 echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi
 ') ) .
 'tata ' . print('zozo ' . print('pupu '));

That's not cool, that's a mess. Why doe sit happen the way it does?
First off, print() is a function so nesting functions means the
innermost functions get processed first, this is why the output has
mangled order. The 1's show up in the output because you're
concatenating the return value of the print() function which is true for
success.

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

Leveraging the buying power of the masses!
...

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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
 On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote:
  ?php
  echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi
  ') ) .
  'tata ' . print('zozo ' . print('pupu '));

 That's not cool, that's a mess. Why doe sit happen the way it does?
 First off, print() is a function so nesting functions means the
 innermost functions get processed first, this is why the output has
 mangled order. The 1's show up in the output because you're
 concatenating the return value of the print() function which is true for
 success.

Agreed it's a mess, and I don't know why anyone would do it, but
that's only part of the story. I don't think the OP was wondering
where the 1s came from; at least I'm not. I am wondering why it
displays:

toctoc hihi u 1pupu zozo 1v 1tata 1coucou 1

instead of

toctoc u 1hihi v 1pupu zozo 1coucou 1tata 1

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



[PHP] Looking for a framework

2007-10-23 Thread Merlin

Hi there,

I am looking for a framework to integrate some AJAX Functionality into 
my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit 
function that opens up a layer with an edit field and shifts the content 
underneath further down.


I had a look on prototype and sript.aculo.us but could not get the 
desired function with the edit field.


Thank you in advance for any hint on this and maybe a few tipps how to 
get it startet.


Best regards,

Merlin

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



[PHP] Re: window.open() and search engines

2007-10-23 Thread Freyjkell

Richard Heyes wrote:
Can anyone say for sure whether window.open() links get spidered by 
search engines?




Not This Group

--
Freyjkell

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



Re: [PHP] Looking for a framework

2007-10-23 Thread Dave Goodchild
You mean a javscript library? If so, check out jquery and moo.fx.

On 10/23/07, Merlin [EMAIL PROTECTED] wrote:

 Hi there,

 I am looking for a framework to integrate some AJAX Functionality into
 my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit
 function that opens up a layer with an edit field and shifts the content
 underneath further down.

 I had a look on prototype and sript.aculo.us but could not get the
 desired function with the edit field.

 Thank you in advance for any hint on this and maybe a few tipps how to
 get it startet.

 Best regards,

 Merlin

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




Re: [PHP] problem with foreach

2007-10-23 Thread Andrew Ballard
On 10/23/07, tedd [EMAIL PROTECTED] wrote:
 At 12:01 PM -0500 10/22/07, Adam Williams wrote:
 I have an html page with checkboxes:
 
 form action=mailform2.php method=POST
 input type=checkbox name=option[] value=Modern MississippiModern
 Mississippibr
 input type=checkbox name=option[] value=Civil RightsCivil Rightsbr
 input type=checkbox name=option[] value=Military
 HistoryMilitaryHistorybr
 input type=submit name=submit value=Submit
 
 and mailform2.php containing:
 
 echo you selected: br;
 /* line 81 */ foreach ($_POST[option] as $a)
 {
 echo $a;
 }
 
 but I'm getting the error:
 
 you selected:
 
 *Warning*: Invalid argument supplied for foreach() in
 */var/www/sites/mdah-test/museum/mmhsurvey/mailform2.php* on line
 *81*
 

[I just realized that when I hit reply yesterday I forgot to switch
the addresses around it sent it directly to the OP instead of the
list. Not that there is anything earth shattering here.]

I usually run $_GET, $_POST, etc. through array_key_exists before
using the value to prevent any warnings that happen and for better
flow control.

/**
Check to see that at least one value for 'option' exists. If no
options are checked, this will be false.
 */
if (array_key_exists('option', $_POST)) {
   // include the quotes as already mentioned
echo you selected: br;
   foreach ($_POST['option'] as $a)
   {
   echo $a;
   }
}
else
{
  echo 'you did not select any options.';
}


Andrew

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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread tedd

At 11:46 AM -0400 10/23/07, Robert Cummings wrote:

On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote:

 ?php
 echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi
 ') ) .
 'tata ' . print('zozo ' . print('pupu '));


That's not cool, that's a mess. Why doe sit happen the way it does?
First off, print() is a function so nesting functions means the
innermost functions get processed first, this is why the output has
mangled order. The 1's show up in the output because you're
concatenating the return value of the print() function which is true for
success.

Cheers,
Rob.
--


Rob:

Good call on the 1 return.

Maybe this will help:

http://www.webbytedd.com/bbb/echo-print/

Cheers,

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

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



Re: [PHP] Looking for a framework

2007-10-23 Thread Merlin

Hi Dave,

thanx for the hint. I looked into those two. They seem to provide the 
functionality I am looking for. The reason I did post it here in the PHP 
forum, is that I want to select a framework that will work with PHP for 
deaper AJAX integration. There are so many ones out there, like for 
example prototype or the sript.aculo.us and the jquery that I am not 
sure which to pick. I am worried about that I might pick the wrong wagon 
and have to switch to another one later on.


Best regards,

Merlin

Dave Goodchild schrieb:

You mean a javscript library? If so, check out jquery and moo.fx.

On 10/23/07, Merlin [EMAIL PROTECTED] wrote:

Hi there,

I am looking for a framework to integrate some AJAX Functionality into
my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit
function that opens up a layer with an edit field and shifts the content
underneath further down.

I had a look on prototype and sript.aculo.us but could not get the
desired function with the edit field.

Thank you in advance for any hint on this and maybe a few tipps how to
get it startet.

Best regards,

Merlin

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






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



Re: [PHP] Re: window.open() and search engines

2007-10-23 Thread Richard Heyes

Freyjkell wrote:

Richard Heyes wrote:
Can anyone say for sure whether window.open() links get spidered by 
search engines?




Not This Group


Not what group?

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



RE: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Instruct ICC

 Hello everyone.
 
 We all know the difference between print and echo, but has someone ever
 tried to combine them together ??
 
 Right, try this :
 
 ?php
 echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi ') ) .
 'tata ' . print('zozo ' . print('pupu '));
 
 
 And guess the result ...
 
 Can someone explain it ?
 ( the result is : toctoc hihi u 1pupu zozo 1v 1tata 1coucou 1 )

Precedence.

_
Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it 
now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033

Re: [PHP] window.open() and search engines

2007-10-23 Thread Rafael

It depends on the way you do it, for instance, something like
  a href=url onclick=return open('url')...
will, but if you use something like
  a href=javascript:open()...
chances are it won't.

Edward Kay wrote:

Can anyone say for sure whether window.open() links get spidered by
search engines?


From my experience they don't, but I use a custom Javascript function to
open pop-ups.


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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 11:54 -0400, Andrew Ballard wrote:
 On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
  On Tue, 2007-10-23 at 17:34 +0200, Julien Pauli wrote:
   ?php
   echo coucou  . print('v ' . print('u ' . print('toctoc ') . 'hihi
   ') ) .
   'tata ' . print('zozo ' . print('pupu '));
 
  That's not cool, that's a mess. Why doe sit happen the way it does?
  First off, print() is a function so nesting functions means the
  innermost functions get processed first, this is why the output has
  mangled order. The 1's show up in the output because you're
  concatenating the return value of the print() function which is true for
  success.
 
 Agreed it's a mess, and I don't know why anyone would do it, but
 that's only part of the story. I don't think the OP was wondering
 where the 1s came from; at least I'm not. I am wondering why it
 displays:
 
 toctoc hihi u 1pupu zozo 1v 1tata 1coucou 1
 
 instead of
 
 toctoc u 1hihi v 1pupu zozo 1coucou 1tata 1

My bad, print is not a function, and so:

print( 'toctoc ' ).'hihi ';

is equivalent to:

print( 'tocktoc '.'hihi ' );

Parenthesis are option and only server to control precedence. But unlike
echo print does return a value.

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

Leveraging the buying power of the masses!
...

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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Andrew Ballard
On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
 My bad, print is not a function, and so:

 print( 'toctoc ' ).'hihi ';

 is equivalent to:

 print( 'tocktoc '.'hihi ' );


Ah. I see. I knew they were optional, but I didn't know that when you
include them PHP evaluates ('toctoc') before it passes the value off
to print(). I just figured that with or without the parentheses it
would pass 'toctoc' to print() and return a result that would be
concatenated inline with the other values. I guess that's the part I
didn't understand about the difference between a function and a
language construct in PHP.

As for the OP, I still don't know why anyone would even dream of
creating code that does this other than to see what would happen if
we   :-)

Andrew

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



Re: [PHP] echo VS print : that's a cool behavior !

2007-10-23 Thread Julien Pauli
That's just the case : too see what happens if 

I agree that anyone will never meet such a case in everydays' programming.
;-)

2007/10/23, Andrew Ballard [EMAIL PROTECTED]:

 On 10/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
  My bad, print is not a function, and so:
 
  print( 'toctoc ' ).'hihi ';
 
  is equivalent to:
 
  print( 'tocktoc '.'hihi ' );
 

 Ah. I see. I knew they were optional, but I didn't know that when you
 include them PHP evaluates ('toctoc') before it passes the value off
 to print(). I just figured that with or without the parentheses it
 would pass 'toctoc' to print() and return a result that would be
 concatenated inline with the other values. I guess that's the part I
 didn't understand about the difference between a function and a
 language construct in PHP.

 As for the OP, I still don't know why anyone would even dream of
 creating code that does this other than to see what would happen if
 we   :-)

 Andrew

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




[PHP] EMPTY??

2007-10-23 Thread Dan Shirah
I am having some issues with empty().

On my page I have a text area:

table align=center border=0 cellpadding=0 cellspacing=0
width=680
 tr
 td width=600 align=centerspan class=inputlblComments:
  textarea name=comments tabindex=39 rows=3 cols=45
wrap=soft/textarea
  /span /td
 /tr
/table

I then submit my page and on the following page I put the posted value into
two variables.

  $comments = strtoupper($_POST['comments']);
  $check_comments = $_POST['comments'];

I made two variables for the same posted value because I believe empty()
does not work with strtoupper in front of the value. It only works with a
standalone variable, correct?

So, once I have assigned my comments to a variable I am doing:

if(!empty($check_comments)) {
  echo Do Something;
}

However, if the comments textarea is left blank I just get a generic error
Changed database context to database

I've tried the below and get the same result:
if($check_comments != ) {
  echo Do Something;
}

When comments is left blank and I echo out the value for $check_comments it
returns nothing at all which is why I think empty() or  should work, but
they don't.

Ideas?


Re: [PHP] EMPTY??

2007-10-23 Thread David Giragosian
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

 I am having some issues with empty().

 On my page I have a text area:

 table align=center border=0 cellpadding=0 cellspacing=0
 width=680
 tr
 td width=600 align=centerspan class=inputlblComments:
  textarea name=comments tabindex=39 rows=3 cols=45
 wrap=soft/textarea
  /span /td
 /tr
 /table

 I then submit my page and on the following page I put the posted value
 into
 two variables.

 $comments = strtoupper($_POST['comments']);
 $check_comments = $_POST['comments'];

 I made two variables for the same posted value because I believe empty()
 does not work with strtoupper in front of the value. It only works with a
 standalone variable, correct?

 So, once I have assigned my comments to a variable I am doing:

 if(!empty($check_comments)) {
 echo Do Something;
 }

 However, if the comments textarea is left blank I just get a generic error

 Changed database context to database

 I've tried the below and get the same result:
 if($check_comments != ) {
 echo Do Something;
 }

 When comments is left blank and I echo out the value for $check_comments
 it
 returns nothing at all which is why I think empty() or  should work, but
 they don't.

 Ideas?


I've been tripped up by spaces in text fields/boxes, so I've learned to trim
before testing for strlen == 0.

strtoupper returns a string. If there were a zero-length string in the
textarea, I'd guess it would return a zero-length string.

Are you sure there are no carriage returns, etc... in your textarea ?

David


Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
I did a simple test like this on my save page:

?php
$comments = $_POST['comments'];
echo .$comments.;
?

And it returns 

So, that should show me that there are no place holders, no characters, and
no carriage returns for the value of $comments, correct?


On 10/23/07, David Giragosian [EMAIL PROTECTED] wrote:

  On 10/23/07, Dan Shirah [EMAIL PROTECTED]  wrote:
 
  I am having some issues with empty().
 
  On my page I have a text area:
 
  table align=center border=0 cellpadding=0 cellspacing=0
  width=680
  tr
  td width=600 align=centerspan class=inputlblComments:
   textarea name=comments tabindex=39 rows=3 cols=45
  wrap=soft/textarea
   /span /td
  /tr
  /table
 
  I then submit my page and on the following page I put the posted value
  into
  two variables.
 
  $comments = strtoupper($_POST['comments']);
  $check_comments = $_POST['comments'];
 
  I made two variables for the same posted value because I believe empty()
  does not work with strtoupper in front of the value. It only works with
  a
  standalone variable, correct?
 
  So, once I have assigned my comments to a variable I am doing:
 
  if(!empty($check_comments)) {
  echo Do Something;
  }
 
  However, if the comments textarea is left blank I just get a generic
  error
  Changed database context to database
 
  I've tried the below and get the same result:
  if($check_comments != ) {
  echo Do Something;
  }
 
  When comments is left blank and I echo out the value for $check_comments
  it
  returns nothing at all which is why I think empty() or  should work,
  but
  they don't.
 
  Ideas?


 I've been tripped up by spaces in text fields/boxes, so I've learned to
 trim before testing for strlen == 0.

 strtoupper returns a string. If there were a zero-length string in the
 textarea, I'd guess it would return a zero-length string.

 Are you sure there are no carriage returns, etc... in your textarea ?

 David







Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

 I made two variables for the same posted value because I believe empty()
 does not work with strtoupper in front of the value. It only works with a
 standalone variable, correct?


no; strtoupper modifies its argument, that is all.
empty evaluates the argument it is given that is all.
therefore, if empty is passed an string with no contents that has been
passed through
strtoupper, it will still be regarded as empty.

?php
$var = strtoupper('');
 if(empty($var)) { echo 'var is empty'; }
?

When comments is left blank and I echo out the value for $check_comments it
 returns nothing at all which is why I think empty() or  should work, but
 they don't.


try using var_dump(); you will see that it is a string that has no contents,
or perhaps some
whitespace characters.

-nathan


Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Hawks


Note:  empty() only checks variables as anything else will result in a
parse error. In other words, the following will not work:
empty(trim($name)).


http://www.php.net/manual/en/function.empty.php



On Tue, 2007-10-23 at 13:20 -0400, Dan Shirah wrote:
 I am having some issues with empty().
 
 On my page I have a text area:
 
 table align=center border=0 cellpadding=0 cellspacing=0
 width=680
  tr
  td width=600 align=centerspan class=inputlblComments:
   textarea name=comments tabindex=39 rows=3 cols=45
 wrap=soft/textarea
   /span /td
  /tr
 /table
 
 I then submit my page and on the following page I put the posted value into
 two variables.
 
   $comments = strtoupper($_POST['comments']);
   $check_comments = $_POST['comments'];
 
 I made two variables for the same posted value because I believe empty()
 does not work with strtoupper in front of the value. It only works with a
 standalone variable, correct?
 
 So, once I have assigned my comments to a variable I am doing:
 
 if(!empty($check_comments)) {
   echo Do Something;
 }
 
 However, if the comments textarea is left blank I just get a generic error
 Changed database context to database
 
 I've tried the below and get the same result:
 if($check_comments != ) {
   echo Do Something;
 }
 
 When comments is left blank and I echo out the value for $check_comments it
 returns nothing at all which is why I think empty() or  should work, but
 they don't.
 
 Ideas?

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



Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
doing a var_dump($_POST['comments'];

returns  string(0) 

So the value of $comments in $comments = $_POST['comments']; SHOULD be equal
to 0 or , right?

In which case when I do my original:

if (!empty($comments)) {
  echo Do Something;
}

It SHOULD just bypass that and continue with my code, but instead it gives
me the error, Changed database context to Database.


On 10/23/07, Nathan Nobbe [EMAIL PROTECTED] wrote:

 On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:
 
  I made two variables for the same posted value because I believe empty()
  does not work with strtoupper in front of the value. It only works with
  a
  standalone variable, correct?


 no; strtoupper modifies its argument, that is all.
 empty evaluates the argument it is given that is all.
 therefore, if empty is passed an string with no contents that has been
 passed through
 strtoupper, it will still be regarded as empty.

 ?php
 $var = strtoupper('');
  if(empty($var)) { echo 'var is empty'; }
 ?



  When comments is left blank and I echo out the value for $check_comments
  it
  returns nothing at all which is why I think empty() or  should work,
  but
  they don't.


 try using var_dump(); you will see that it is a string that has no
 contents, or perhaps some
 whitespace characters.


 -nathan





Re: [PHP] EMPTY??

2007-10-23 Thread David Giragosian
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

 I did a simple test like this on my save page:

 ?php
 $comments = $_POST['comments'];
 echo .$comments.;
 ?

 And it returns 

 So, that should show me that there are no place holders, no characters,
 and no carriage returns for the value of $comments, correct?


Does it look the same way if you view source?


Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
Correct, which is why in my original post I set two variables.

$comments = strtoupper($_POST['comments']); //This is the value I want saved
in my database.
$check_comments = $_POST['comments']; //This is the value I am using to
determine if there were any comments entered.


On 10/23/07, Nathan Hawks [EMAIL PROTECTED] wrote:



 Note:  empty() only checks variables as anything else will result in a
 parse error. In other words, the following will not work:
 empty(trim($name)).


 http://www.php.net/manual/en/function.empty.php



 On Tue, 2007-10-23 at 13:20 -0400, Dan Shirah wrote:
  I am having some issues with empty().
 
  On my page I have a text area:
 
  table align=center border=0 cellpadding=0 cellspacing=0
  width=680
   tr
   td width=600 align=centerspan class=inputlblComments:
textarea name=comments tabindex=39 rows=3 cols=45
  wrap=soft/textarea
/span /td
   /tr
  /table
 
  I then submit my page and on the following page I put the posted value
 into
  two variables.
 
$comments = strtoupper($_POST['comments']);
$check_comments = $_POST['comments'];
 
  I made two variables for the same posted value because I believe empty()
  does not work with strtoupper in front of the value. It only works with
 a
  standalone variable, correct?
 
  So, once I have assigned my comments to a variable I am doing:
 
  if(!empty($check_comments)) {
echo Do Something;
  }
 
  However, if the comments textarea is left blank I just get a generic
 error
  Changed database context to database
 
  I've tried the below and get the same result:
  if($check_comments != ) {
echo Do Something;
  }
 
  When comments is left blank and I echo out the value for $check_comments
 it
  returns nothing at all which is why I think empty() or  should work,
 but
  they don't.
 
  Ideas?




Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah


 
 Does it look the same way if you view source?



Yes.







Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

 doing a var_dump($_POST['comments'];

 returns  string(0) 

 So the value of $comments in $comments = $_POST['comments']; SHOULD be
 equal to 0 or , right?

 In which case when I do my original:

 if (!empty($comments)) {
   echo Do Something;
 }

 It SHOULD just bypass that and continue with my code, but instead it gives
 me the error, Changed database context to Database.


i think we are missing something; perhaps you can show us the portion of
code that contains the string
Changed database context to Database.

it seems to me like the echo statement is getting skipped over, otherwise
you would see the string Do Something.
since it is getting bypassed, that statement is not getting executed and
processing is continuing probly to the point
where the string about the database is echoed out.

-nathan


RE: [PHP] libmm.so.14

2007-10-23 Thread Nathan Hawks
http://www.qmailrocks.com/

I am mailserver-challenged and I changed my VPS from exim to qmail with
only one practice run using their guides, patch-kits, and add-on
bundles.


On Tue, 2007-10-23 at 10:52 -0400, Jeff Mckeon wrote:
  -Original Message-
  From: Daniel Brown [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 23, 2007 10:47 AM
  To: Jeff Mckeon
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] libmm.so.14
  
  On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
   Hey all,
  
   Setting up a php based ticket system on a new OpenSuse 10.3 64bit
  system.
  
   The ticket sys requires qmail so I had to uninstall postfix and
  install
   qmail.
  
   Qmail injects emails into this ticket sys with the following line...
  
   /usr/bin/php -q /srv/www/virtual/support/mailpipe.php
  
   I now get this error however:
  
   /usr/bin/php: error while loading shared libraries: libmm.so.14:
  cannot open
   shared object file: No such file or directory
  
   Libmm.so.14 is installed in:
  
   /usr/lib64/libmm.so.14
  
   Any idea what it is I'm missing?
  
   Version PHP5
  
   Thanks,
  
   jeff
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  Check to see where PHP is searching for the extensions.  Chances
  are, all you'll need to do is symlink it from the /usr/lib64/
  directory to wherever PHP is expecting to find it.
  
  Also, be sure it really is still there.  When's the last time you
  did a `locate -u` on your server (if that's the method you used)?  It
  could be showing an old slocatedb.
  
  --
  Daniel P. Brown
  [office] (570-) 587-7080 Ext. 272
  [mobile] (570-) 766-8107
  
  Give a man a fish, he'll eat for a day.  Then you'll find out he was
  allergic and is hospitalized.  See?  No good deed goes unpunished
 
 Tried that,
 
 I did a simlink to /usr/lib but it complained that:
 
 /usr/bin/php: error while loading shared libraries: libmm.so.14: wrong ELF
 class: ELFCLASS64
 
 
 

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



Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Hawks
Wow, OK... Can you get this same error reducing a copy of the the script
down to just core PHP, and that scenario?

If so, what version of PHP on what OS is giving you this error?

I have seen PHP give some incredibly wonky errors and sometimes they had
nothing at all to do with the part of the code it was reporting about,
and nothing to do with the message it chose to cough up.  Story of my
joining the list actually.



On Tue, 2007-10-23 at 13:59 -0400, Dan Shirah wrote:
 doing a var_dump($_POST['comments'];
 
 returns  string(0) 
 
 So the value of $comments in $comments = $_POST['comments']; SHOULD be equal
 to 0 or , right?
 
 In which case when I do my original:
 
 if (!empty($comments)) {
   echo Do Something;
 }
 
 It SHOULD just bypass that and continue with my code, but instead it gives
 me the error, Changed database context to Database.
 
 
 On 10/23/07, Nathan Nobbe [EMAIL PROTECTED] wrote:
 
  On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:
  
   I made two variables for the same posted value because I believe empty()
   does not work with strtoupper in front of the value. It only works with
   a
   standalone variable, correct?
 
 
  no; strtoupper modifies its argument, that is all.
  empty evaluates the argument it is given that is all.
  therefore, if empty is passed an string with no contents that has been
  passed through
  strtoupper, it will still be regarded as empty.
 
  ?php
  $var = strtoupper('');
   if(empty($var)) { echo 'var is empty'; }
  ?
 
 
 
   When comments is left blank and I echo out the value for $check_comments
   it
   returns nothing at all which is why I think empty() or  should work,
   but
   they don't.
 
 
  try using var_dump(); you will see that it is a string that has no
  contents, or perhaps some
  whitespace characters.
 
 
  -nathan
 
 
 

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



Re: [PHP] window.open() and search engines

2007-10-23 Thread Eric Butera
On 10/23/07, Richard Heyes [EMAIL PROTECTED] wrote:
 Can anyone say for sure whether window.open() links get spidered by
 search engines?

 Thanks.

 --
 Richard Heyes
 +44 (0)800 0213 172
 http://www.websupportsolutions.co.uk

 Knowledge Base and HelpDesk software
 that can cut the cost of online support

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



I know that Google Bot looks through all the text a site spits back at
it looking for url's.  I had some that I wasn't ever expecting Google
to traverse through and it did because it read the URL out of the
Javascript variable I had.

If you want search engines to pick up your link then you can always
use noscript. :)

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



Re: [PHP] EMPTY??

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

 Correct, which is why in my original post I set two variables.

 $comments = strtoupper($_POST['comments']); //This is the value I want
 saved
 in my database.
 $check_comments = $_POST['comments']; //This is the value I am using to
 determine if there were any comments entered.



there is no reason to have 2 variables.  just have one variable and
initialize it.

$comment = '';

if(!empty($_POST['comment])) {
   $comment = strtoupper(trim($_POST['comment']));
}

later you can check $comment using empty($comment)
where is the code w/ the statement about the database ?

-nathan


Re: [PHP] EMPTY??

2007-10-23 Thread Dan Shirah
Nathan,

I do not have a hard coded string for Changed database context to
Database.

It is simply the get_last_message function like below:
if (!empty($check_comments)) {
  echo Do Something;
}
or die (Query failed: br /.mssql_get_last_message());

O M G!  I am a tard! my Do Something was a series of insert statements,
each of them having the or die (Query failed: br
/.mssql_get_last_message()); at the end.  My very last or die message
was OUTSIDE of the closing curly brace! And as such it was trying to execute
a query that didn't exist because its condition had not been met!





On 10/23/07, Nathan Nobbe [EMAIL PROTECTED] wrote:

 On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:
 
  doing a var_dump($_POST['comments'];
 
  returns  string(0) 
 
  So the value of $comments in $comments = $_POST['comments']; SHOULD be
  equal to 0 or , right?
 
  In which case when I do my original:
 
  if (!empty($comments)) {
echo Do Something;
  }
 
  It SHOULD just bypass that and continue with my code, but instead it
  gives me the error, Changed database context to Database.
 

 i think we are missing something; perhaps you can show us the portion of
 code that contains the string
 Changed database context to Database.

 it seems to me like the echo statement is getting skipped over, otherwise
 you would see the string Do Something.
 since it is getting bypassed, that statement is not getting executed and
 processing is continuing probly to the point
 where the string about the database is echoed out.

 -nathan





Re: [PHP] window.open() and search engines

2007-10-23 Thread Richard Heyes

If you want search engines to pick up your link then you can always
use noscript. :)


Interesting. I hadn't thought of that.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



[PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Dare Williams
Dear Pals,
   
  Please I need a book called : Oracle Database 10g Express Edition PHP Web 
Programming (Osborne Oracle Press Series): Books: by Michael McLaughlin.
   
  Please if anyone with the E-Book Version of it should be contact me on my 
Email
  ([EMAIL PROTECTED]). 
   
  NOTE: I would prefer the E-Book Version if it is Available.
  Thanks.
  Darren.

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [PHP] EMPTY??

2007-10-23 Thread Philip Thompson
On 10/23/07, Dan Shirah [EMAIL PROTECTED] wrote:

O M G!  I am a tard! my Do Something was a series of insert statements,
 each of them having the or die (Query failed: br
 /.mssql_get_last_message()); at the end.  My very last or die message
 was OUTSIDE of the closing curly brace! And as such it was trying to
 execute
 a query that didn't exist because its condition had not been met!



*Kick*

Hehehe. Been there. Done that.


Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Stut

Dare Williams wrote:

Dear Pals,
   
  Please I need a book called : Oracle Database 10g Express Edition PHP Web Programming (Osborne Oracle Press Series): Books: by Michael McLaughlin.
   
  Please if anyone with the E-Book Version of it should be contact me on my Email
  ([EMAIL PROTECTED]). 
   
  NOTE: I would prefer the E-Book Version if it is Available.

  Thanks.
  Darren.


AFAIK this title is not available electronically, but it's readily 
available from Amazon or any other reputable bookseller.


Is there a particular reason why you want it electronically?

-Stut

--
http://stut.net/

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



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Robert Cummings
On Tue, 2007-10-23 at 20:34 +0100, Stut wrote:
 Dare Williams wrote:
  Dear Pals,
 
Please I need a book called : Oracle Database 10g Express Edition PHP 
  Web Programming (Osborne Oracle Press Series): Books: by Michael 
  McLaughlin.
 
Please if anyone with the E-Book Version of it should be contact me on my 
  Email
([EMAIL PROTECTED]). 
 
NOTE: I would prefer the E-Book Version if it is Available.
Thanks.
Darren.
 
 AFAIK this title is not available electronically, but it's readily 
 available from Amazon or any other reputable bookseller.
 
 Is there a particular reason why you want it electronically?

Pirate??

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

Leveraging the buying power of the masses!
...

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



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Stut

Please include the list in replies.

Dare Williams wrote:

Dear Stut,
 
Thanks for your message, With regard to your message, the main reason 
why I want it Electronically is because, Am a PHP Student Who has no 
enough Cash to buy from Amazon or any bookseller and more over, the book 
is not available in my West African Continent.
 
So therefore, If you have any way of assisting me in getting it apart 
from E-Book Format, Please advice..
 
Expecting your response

Regards.
Darren.


Being a poor student is not an excuse to ignore copyright, nor is your 
location. If you cannot get this particular book, for whatever reason, I 
can guarantee it says nothing that isn't available on the web for free, 
you just need to work a bit harder to find it.


Please don't ask this list to break the law for you again, it's just not 
polite.


-Stut

--
http://stut.net/



-

*/Stut [EMAIL PROTECTED]/* wrote:

Dare Williams wrote:
  Dear Pals,
 
  Please I need a book called : Oracle Database 10g Express
Edition PHP Web Programming (Osborne Oracle Press Series): Books: by
Michael McLaughlin.
 
  Please if anyone with the E-Book Version of it should be contact
me on my Email
  ([EMAIL PROTECTED]).
 
  NOTE: I would prefer the E-Book Version if it is Available.
  Thanks.
  Darren.

AFAIK this title is not available electronically, but it's readily
available from Amazon or any other reputable bookseller.

Is there a particular reason why you want it electronically?

-Stut

-- 
http://stut.net/


-- 
PHP General Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



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



RE: [PHP] libmm.so.14

2007-10-23 Thread Jeff Mckeon
 -Original Message-
 From: Jeff Mckeon [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 23, 2007 10:52 AM
 To: 'Daniel Brown'
 Cc: php-general@lists.php.net
 Subject: RE: [PHP] libmm.so.14
 
  -Original Message-
  From: Daniel Brown [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 23, 2007 10:47 AM
  To: Jeff Mckeon
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] libmm.so.14
 
  On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
   Hey all,
  
   Setting up a php based ticket system on a new OpenSuse 10.3 64bit
  system.
  
   The ticket sys requires qmail so I had to uninstall postfix and
  install
   qmail.
  
   Qmail injects emails into this ticket sys with the following
 line...
  
   /usr/bin/php -q /srv/www/virtual/support/mailpipe.php
  
   I now get this error however:
  
   /usr/bin/php: error while loading shared libraries: libmm.so.14:
  cannot open
   shared object file: No such file or directory
  
   Libmm.so.14 is installed in:
  
   /usr/lib64/libmm.so.14
  
   Any idea what it is I'm missing?
  
   Version PHP5
  
   Thanks,
  
   jeff
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
  Check to see where PHP is searching for the extensions.  Chances
  are, all you'll need to do is symlink it from the /usr/lib64/
  directory to wherever PHP is expecting to find it.
 
  Also, be sure it really is still there.  When's the last time you
  did a `locate -u` on your server (if that's the method you used)?  It
  could be showing an old slocatedb.
 
  --
  Daniel P. Brown
  [office] (570-) 587-7080 Ext. 272
  [mobile] (570-) 766-8107
 
  Give a man a fish, he'll eat for a day.  Then you'll find out he was
  allergic and is hospitalized.  See?  No good deed goes unpunished
 
 Tried that,
 
 I did a simlink to /usr/lib but it complained that:
 
 /usr/bin/php: error while loading shared libraries: libmm.so.14: wrong
 ELF
 class: ELFCLASS64
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

Ok, removed php and libmm14 and re-installed.  Now command line php works
but Apache2 is no longer serving php pages.

Re-installed apache2 checked all the config files but I can't seem to make
it work.  When you go to the site with a  php page it offers it as a
download instead of handing the file off to php to process... UGH!!!

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



RE: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Daevid Vincent
 

 -Original Message-
 Please I need a book called : Oracle Database 10g 
 Express Edition PHP Web Programming (Osborne Oracle Press 
 Series): Books: by Michael McLaughlin.
  
 Please if anyone with the E-Book Version of it should 
 be contact me on my Email
  
 NOTE: I would prefer the E-Book Version if it is Available.
  
  AFAIK this title is not available electronically, but it's readily 
  available from Amazon or any other reputable bookseller.
  
  Is there a particular reason why you want it electronically?
 
 Pirate??

Or perhaps the OP doesn't want to cause more pollution via paper, or toxins
via all the ink used.

Or perhaps lugging around a huge 3 lb book in his brief-case or backpack is
not appealing.

Or perhaps it's the fact that most PDF books are all cross linked and
referenced with indexes and such so you can simply click.

Or perhaps b/c PDFs are convenient to keep on your PDA (or phone even these
days) so you always have the reference material handy.

Or perhaps they are a pirate and just didn't want to pay for the book and
a PDF is easier to obtain on USENET or other news feeds...

My point is, you don't know what the OP's reasons are, but there were FOUR
very real, very plausible reasons I just listed for wanting an eBook, vs.
your ONE single accusatory comment. Last I checked, it was not illegal to
purchase an eBook from someone that didn't want their copy anymore. Perhaps
he was requesting a private dialog for that reason and to keep the list
clear of unnecessary clutter.

I have a garage full of paper books/manuals that I have no idea WTF to do
with because they're all outdated and the recycle people won't take them b/c
it's too heavy in the blue bin. Libraries don't want them. I can't sell
them, shipping alone would cost too much -- I can't even give many of them
away. I *WISH* I had them in PDF form -- then I could sell them to people
over the internet, simply delete them, or archive them off to CD/DVD.

I always prefer PDF books to paper books now-a-days for the very reasons I
listed.

Whatever happened to innocent until proven guilty? How sad we've become as
a society.


D.Vin

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



RE: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Daevid Vincent
 

 -Original Message-
 Please include the list in replies.
 
  Thanks for your message, With regard to your message, the 
 main reason 
  why I want it Electronically is because, Am a PHP Student 
 Who has no 
  enough Cash to buy from Amazon or any bookseller and more 
 over, the book 
  is not available in my West African Continent.
   
  So therefore, If you have any way of assisting me in 
 getting it apart from E-Book Format, Please advice..
   
 
 Being a poor student is not an excuse to ignore copyright, 
 nor is your 
 location. If you cannot get this particular book, for 
 whatever reason, I 
 can guarantee it says nothing that isn't available on the web 
 for free, 
 you just need to work a bit harder to find it.
 
 Please don't ask this list to break the law for you again, 
 it's just not polite.

Okay. I stand corrected. It was for illegal reasons, 
but I still think people should be given the benefit of the doubt 
before being accused of anything. At least he was honest about it.

:)

d

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



Re: [PHP] libmm.so.14

2007-10-23 Thread Daniel Brown
On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
  -Original Message-
  From: Jeff Mckeon [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, October 23, 2007 10:52 AM
  To: 'Daniel Brown'
  Cc: php-general@lists.php.net
  Subject: RE: [PHP] libmm.so.14
 
   -Original Message-
   From: Daniel Brown [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, October 23, 2007 10:47 AM
   To: Jeff Mckeon
   Cc: php-general@lists.php.net
   Subject: Re: [PHP] libmm.so.14
  
   On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
Hey all,
   
Setting up a php based ticket system on a new OpenSuse 10.3 64bit
   system.
   
The ticket sys requires qmail so I had to uninstall postfix and
   install
qmail.
   
Qmail injects emails into this ticket sys with the following
  line...
   
/usr/bin/php -q /srv/www/virtual/support/mailpipe.php
   
I now get this error however:
   
/usr/bin/php: error while loading shared libraries: libmm.so.14:
   cannot open
shared object file: No such file or directory
   
Libmm.so.14 is installed in:
   
/usr/lib64/libmm.so.14
   
Any idea what it is I'm missing?
   
Version PHP5
   
Thanks,
   
jeff
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  
   Check to see where PHP is searching for the extensions.  Chances
   are, all you'll need to do is symlink it from the /usr/lib64/
   directory to wherever PHP is expecting to find it.
  
   Also, be sure it really is still there.  When's the last time you
   did a `locate -u` on your server (if that's the method you used)?  It
   could be showing an old slocatedb.
  
   --
   Daniel P. Brown
   [office] (570-) 587-7080 Ext. 272
   [mobile] (570-) 766-8107
  
   Give a man a fish, he'll eat for a day.  Then you'll find out he was
   allergic and is hospitalized.  See?  No good deed goes unpunished
 
  Tried that,
 
  I did a simlink to /usr/lib but it complained that:
 
  /usr/bin/php: error while loading shared libraries: libmm.so.14: wrong
  ELF
  class: ELFCLASS64
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php

 Ok, removed php and libmm14 and re-installed.  Now command line php works
 but Apache2 is no longer serving php pages.

 Re-installed apache2 checked all the config files but I can't seem to make
 it work.  When you go to the site with a  php page it offers it as a
 download instead of handing the file off to php to process... UGH!!!

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



1.) What parameters did you run ./configure with when building PHP
(or did you build automatically with cPanel, etc.)?
2.) Did you add/uncomment the module entry in httpd.conf?
3.) Did you restart Apache after everything else was done?
4.) When attempting to restart Apache, are there any errors?

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished

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



Re: [PHP] PHP Oracle Ebook Request.

2007-10-23 Thread Nathan Nobbe
On 10/23/07, Daevid Vincent [EMAIL PROTECTED] wrote:

 I have a garage full of paper books/manuals that I have no idea WTF to do
 with because they're all outdated and the recycle people won't take them
 b/c
 it's too heavy in the blue bin.


maybe you could put them in there a few at a time ?

-nathan


RE: [PHP] libmm.so.14 SOLVED

2007-10-23 Thread Jeff Mckeon
 -Original Message-
 From: Daniel Brown [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, October 23, 2007 4:10 PM
 To: Jeff Mckeon
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] libmm.so.14
 
 On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
   -Original Message-
   From: Jeff Mckeon [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, October 23, 2007 10:52 AM
   To: 'Daniel Brown'
   Cc: php-general@lists.php.net
   Subject: RE: [PHP] libmm.so.14
  
-Original Message-
From: Daniel Brown [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 23, 2007 10:47 AM
To: Jeff Mckeon
Cc: php-general@lists.php.net
Subject: Re: [PHP] libmm.so.14
   
On 10/23/07, Jeff Mckeon [EMAIL PROTECTED] wrote:
 Hey all,

 Setting up a php based ticket system on a new OpenSuse 10.3
 64bit
system.

 The ticket sys requires qmail so I had to uninstall postfix and
install
 qmail.

 Qmail injects emails into this ticket sys with the following
   line...

 /usr/bin/php -q /srv/www/virtual/support/mailpipe.php

 I now get this error however:

 /usr/bin/php: error while loading shared libraries:
 libmm.so.14:
cannot open
 shared object file: No such file or directory

 Libmm.so.14 is installed in:

 /usr/lib64/libmm.so.14

 Any idea what it is I'm missing?

 Version PHP5

 Thanks,

 jeff

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


   
Check to see where PHP is searching for the extensions.
 Chances
are, all you'll need to do is symlink it from the /usr/lib64/
directory to wherever PHP is expecting to find it.
   
Also, be sure it really is still there.  When's the last time
 you
did a `locate -u` on your server (if that's the method you used)?
 It
could be showing an old slocatedb.
   
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
   
Give a man a fish, he'll eat for a day.  Then you'll find out he
 was
allergic and is hospitalized.  See?  No good deed goes
 unpunished
  
   Tried that,
  
   I did a simlink to /usr/lib but it complained that:
  
   /usr/bin/php: error while loading shared libraries: libmm.so.14:
 wrong
   ELF
   class: ELFCLASS64
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
  Ok, removed php and libmm14 and re-installed.  Now command line php
 works
  but Apache2 is no longer serving php pages.
 
  Re-installed apache2 checked all the config files but I can't seem to
 make
  it work.  When you go to the site with a  php page it offers it as a
  download instead of handing the file off to php to process... UGH!!!
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 1.) What parameters did you run ./configure with when building PHP
 (or did you build automatically with cPanel, etc.)?
 2.) Did you add/uncomment the module entry in httpd.conf?
 3.) Did you restart Apache after everything else was done?
 4.) When attempting to restart Apache, are there any errors?
 
 --
 Daniel P. Brown
 [office] (570-) 587-7080 Ext. 272
 [mobile] (570-) 766-8107
 
 Give a man a fish, he'll eat for a day.  Then you'll find out he was
 allergic and is hospitalized.  See?  No good deed goes unpunished
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


/etc/sysconfig/apache2 was missing php5 init's module list...

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



Re: [PHP] EMPTY??

2007-10-23 Thread tedd

I then submit my page and on the following page I put the posted value into
two variables.

  $comments = strtoupper($_POST['comments']);
  $check_comments = $_POST['comments'];

I made two variables for the same posted value because I believe empty()
does not work with strtoupper in front of the value. It only works with a
standalone variable, correct?

So, once I have assigned my comments to a variable I am doing:

if(!empty($check_comments)) {
  echo Do Something;
}



Try:

$comments = isset($_POST['comments']) ? $_POST['comments'] : null;

if ($comment == null)
   {
   echo 'do something';
   }
else
   {
   echo 'do something else';
   }

Cheers,

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

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



[PHP] Re[PHP] direct to an IP address but keep the URL name

2007-10-23 Thread tnorton

I have a web site hosted at http://rexel.adam.com.au, which has basically the
home page only on it.

My main site is at http://210.8.133.142 with the major links on the home
page going to http://210.8.133.142/index.php and
http://210.8.133.142/classes/phpbb3/
 
I would like to make the web page address show as
http://rexel.adam.com.au/IntegratorSupport and
http://rexel.adam.com.au/Forum respectivally.

I have been looking at loaction.replace but not getting far.

Tim Norton
-- 
View this message in context: 
http://www.nabble.com/Redirect-to-an-IP-address-but-keep-the-URL-name-tf4681341.html#a13376974
Sent from the PHP - General mailing list archive at Nabble.com.

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



Re: [PHP] Looking for a framework

2007-10-23 Thread Larry Garfield
I don't think any really integrate with PHP better or worse than others, since 
all of them can only speak HTTP.  I will say that in my professional PHP work 
I've standardized on jQuery because jQuery itself rocks, and doesn't try to 
turn Javascript into some language it isn't.  The fact that it's also 
integrated by default into Drupal, a leading PHP CMS and the one I use daily, 
made that decision somewhat easier. :-)

On Tuesday 23 October 2007, Merlin wrote:
 Hi Dave,

 thanx for the hint. I looked into those two. They seem to provide the
 functionality I am looking for. The reason I did post it here in the PHP
 forum, is that I want to select a framework that will work with PHP for
 deaper AJAX integration. There are so many ones out there, like for
 example prototype or the sript.aculo.us and the jquery that I am not
 sure which to pick. I am worried about that I might pick the wrong wagon
 and have to switch to another one later on.

 Best regards,

 Merlin

 Dave Goodchild schrieb:
  You mean a javscript library? If so, check out jquery and moo.fx.
 
  On 10/23/07, Merlin [EMAIL PROTECTED] wrote:
  Hi there,
 
  I am looking for a framework to integrate some AJAX Functionality into
  my PHP4 MySQL Apache webapp. First thing I would like to do, is an edit
  function that opens up a layer with an edit field and shifts the content
  underneath further down.
 
  I had a look on prototype and sript.aculo.us but could not get the
  desired function with the edit field.
 
  Thank you in advance for any hint on this and maybe a few tipps how to
  get it startet.
 
  Best regards,
 
  Merlin
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it.  -- Thomas 
Jefferson

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



Re: [PHP] Looking for a framework

2007-10-23 Thread mike
On 10/23/07, Larry Garfield [EMAIL PROTECTED] wrote:
 I don't think any really integrate with PHP better or worse than others, since
 all of them can only speak HTTP.  I will say that in my professional PHP work
 I've standardized on jQuery because jQuery itself rocks, and doesn't try to
 turn Javascript into some language it isn't.  The fact that it's also
 integrated by default into Drupal, a leading PHP CMS and the one I use daily,
 made that decision somewhat easier. :-)

agreed.

jquery is the basis for any of my javascript needs.
then extjs or interface for any eye candy. haven't really decided yet
which i prefer.

php framework wise haven't found one that i think is decent. i just
use my own basic framework that has served me well for years.

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



[PHP] MySQL connector installation/upgrade problems

2007-10-23 Thread David Zentgraf

Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date  
MySQL 5 installation + PHP4. I installed the MySQL 5 package, server  
and client, via RPMs and they work fine, the client tells me it's  
version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, but  
it's still using MySQL client libraries version 3.23.58. I'm kind of  
at a loss where it takes these versions from or how I can get it to  
use the newer libraries.


Any hints would be greatly appreciated.

Chrs,
Dav

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



[PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Zentgraf wrote:
 Hi,
 
 I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5
 installation + PHP4. I installed the MySQL 5 package, server and client,
 via RPMs and they work fine, the client tells me it's version 5.0.45. I
 went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL
 client libraries version 3.23.58. I'm kind of at a loss where it takes
 these versions from or how I can get it to use the newer libraries.
 
 Any hints would be greatly appreciated.

Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
have lying around. Specifically look for the devel libraries/packages.
Remove the 3.x versions via RPM and make sure you've installed the
relevant -devel package from MySQL 5.

You can also use the MySQL 5 -shared-compat package to replace the
shared libraries needed by other apps in Fedora, although you may have
to do an rpm -e --nodeps to get rid of the currently installed library
prior to installing -shared-compat due to file conflicts. I always like
to test that this has worked tho (typically testing one of the apps in
the packages rpm moaned about when doing a normal rpm -e (sans
--nodeps) or by trying to rpm -e the newly installed -shared-compat just
to make sure it is providing the correct deps at least!

HTH


gripe
Be warned tho. If you use custom aggregate UDFs in MySQL 5 it the
current version will segfault on you. I tore my hair out over this.
Upstream MySQL have been pretty crap at responding or releasing
something that I reported months ago. The fact they removed all the
daily snapshots has not helped me help them to fix it either.

http://bugs.mysql.com/bug.php?id=30312

I had to stick with 5.0.27 for now.
/gripe

Col

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



Re: [PHP] Thoughts on multiple servers

2007-10-23 Thread Per Jessen
Ronald Wiplinger wrote:

 Questions:
 1. Any hints on above configuration?

I would take a look at LinuxHA for a high-availability N+1 solution.

 2. Has anybody experience with a cluster mysql?
 3. How to get the web servers working with the closest connection
 (according to the users IP) ?

You could set up two different views on your DNS, and then try to pick
the right view depending on the geographical location of your customer. 
There are also systems out there that will examine the routing tables,
and pick the closest server based on that.  I think UltraMonkey will
do something like that.

 4. How do I get info about the users IP (within the web server) to
 provide startup settings, like Time zone  so time of the user,
 language, country, ... ?

Geographical mapping of the IP is your best option.  Lookup the IP in a
database to determine the country, then set a default for timezone,
language etc., but let the user override it. 

 5. How to make it fail-fall-over if one of the server (web and/or
 database server!) is not working?

A high availability for geographically dispersed servers?  Maybe you
should take a look at Linux Virtual Server, I'm not certain it'll help
though. 


/Per Jessen, Zürich

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



Re: [PHP] Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)

2007-10-23 Thread Per Jessen
Freyjkell wrote:

 DOMDocument::loadCharacterEntitiesFromDtd($path);
 
 I like to load character entities (not whole document type
 definition).
 

Whilst we're on this subject - where do you guys normally load character
entities from?  I recently ported some stuff from the PHPH4 XSLT
implementation (with saxon) to PHP5, and I seem to recall having
problems with getting entities defined.  


/Per Jessen, Zürich

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



Re: [PHP] MySQL connector installation/upgrade problems

2007-10-23 Thread Martin Marques

David Zentgraf escribió:

Hi,

I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 
installation + PHP4. I installed the MySQL 5 package, server and client, 
via RPMs and they work fine, the client tells me it's version 5.0.45. I 
went on to recompile PHP 4.4.7 --with-mysql, but it's still using MySQL 
client libraries version 3.23.58. I'm kind of at a loss where it takes 
these versions from or how I can get it to use the newer libraries.


Any hints would be greatly appreciated.


Wouldn't it be easier to upgrade to CentOS 5?

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



Re: [PHP] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf

On  23. Oct 2007, at 19:55, Martin Marques wrote:


Wouldn't it be easier to upgrade to CentOS 5?


We tried to explain that to our host, but their service *major  
expletive*, and other hosts in Tokyo ain't better either. :-(


Chrs,
Dav

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



Re: [PHP] Php generated html email

2007-10-23 Thread Richard Heyes

Ronald Wiplinger wrote:

How can I create a html email directly from a web page via Php?
The page will include tables, background colors and pictures within the 
tables. The received email should be readable without Internet 
connection (pictures, must be sent with the email)


http://www.phpguru.org/static/htmlMimeMail5.html

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



[PHP] window.open() and search engines

2007-10-23 Thread Richard Heyes
Can anyone say for sure whether window.open() links get spidered by 
search engines?


Thanks.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



Re: [PHP] Re: [PHP-INSTALL] MySQL connector installation/upgrade problems

2007-10-23 Thread Colin Guthrie
David Christopher Zentgraf wrote:
 On  23. Oct 2007, at 17:22, Colin Guthrie wrote:
 
 Do rpm -qa --nosignature | grep -i mysql and see what old libraries you
 have lying around. Specifically look for the devel libraries/packages.
 Remove the 3.x versions via RPM and make sure you've installed the
 relevant -devel package from MySQL 5.

 You can also use the MySQL 5 -shared-compat package to replace the
 shared libraries needed by other apps in Fedora, although you may have
 to do an rpm -e --nodeps to get rid of the currently installed library
 prior to installing -shared-compat due to file conflicts. I always like
 to test that this has worked tho (typically testing one of the apps in
 the packages rpm moaned about when doing a normal rpm -e (sans
 --nodeps) or by trying to rpm -e the newly installed -shared-compat just
 to make sure it is providing the correct deps at least!
 
 I did install the shared-compat package (sorry, forgot to mention),
 which littered libmysqlclient.so.10 to .so.15 around my /usr/lib, and I
 guess that PHP is using .so.10 for some reason instead of .so.15 (or
 simply libmysqlclient.so, which is symlinked to .so.15).
 Are you saying that it's save to remove the old libs or the whole
 shared-compat package and simply install the current libs instead? I was
 thinking about it, but then again, these things are there for
 compatibility, so I hoped there was a way to explicitly tell PHP to use
 the latest version while leaving the others around.

The .so file (without the .10 or .15) is just used for compile time
linking, it's not used at runtime.

No, the shared-compat is the correct one ot use here as some of the core
Centos rpms may need a mysql v3 compatible client library.


If you compile PHP and it finds v3 of mysql that means that you must
have the old development libraries for mysql 3 installed in some
capacity (I believe).

What is the output of:
rpm -qa --nosignature --nodigest | grep -i mysql

This should give some clues.

I would imagine (don't know) that PHP would use the mysql_config program
to work out which mysql is installed and get the relevent cflags and
linking options. For me this is provided by the
MySQL-devel-community-5.0.27 package from MySQL... Is this definitely
installed?

Col

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