[PHP] Re: old guy newbie needs some help

2004-07-17 Thread Michael Purdy
Bob

A. Example path

session.save_path = c:\http\cgi\session

Basically a directory under the root of your webserver

B. session_start() must be before any other commands in your script such as HTML.

So  Line 1: 

RE: [PHP] old guy newbie needs some help

2004-07-17 Thread bruce
bob...

when using the sesion_start(), it needs to be the 1st thing on the page...

--







--

i don't recall if there has to be anything within the php.ini file set to
enable sessions...

the reason you're getting the error msg, is that your page has essentially
already "sent" some initial header information to the client by the time it
saw your session_start function...

you can get around this by buffering the output, before you send it...

good luck..


-Original Message-
From: Bob Imperial [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 17, 2004 10:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] old guy newbie needs some help


While I realize this is elementary to most of you, I am just getting started
with php, moving from coldfusion :)
I am currently reading through the chapter on sessions and running into a
little issue that after making many changes to my php.ini file, I continue
to get the following errors while running this:

 Your session ID is ".session_id()."";

 ?>

Errors:

Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124,
O_RDWR) failed: No such file or directory (2) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Your session ID is ff8651f382492ae56f436690d81ff124


Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR)
failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0

sorry this is so elementary but have to start somewhere, I am running php 4
on a win2k box w/IIS5.
Though this does return a session id it's obviously not persistent on
reload, an example of a session.save_path on a windows box would be great

TIA  just another old guy trying to learn new stuff.

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



[PHP] old guy newbie needs some help

2004-07-17 Thread Bob Imperial
While I realize this is elementary to most of you, I am just getting started
with php, moving from coldfusion :)
I am currently reading through the chapter on sessions and running into a
little issue that after making many changes to my php.ini file, I continue
to get the following errors while running this:

 Your session ID is ".session_id()."";

 ?>

Errors:

Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124,
O_RDWR) failed: No such file or directory (2) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at
c:\inetpub\wwwroot\phptest\listing10.1.php:13) in
c:\inetpub\wwwroot\phptest\listing10.1.php on line 15

Your session ID is ff8651f382492ae56f436690d81ff124


Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR)
failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0

sorry this is so elementary but have to start somewhere, I am running php 4
on a win2k box w/IIS5.
Though this does return a session id it's obviously not persistent on
reload, an example of a session.save_path on a windows box would be great

TIA  just another old guy trying to learn new stuff.


RE: [PHP] building php to have mysqli support...

2004-07-17 Thread bruce
hi...

after further reading/screams... it appears that only php-5.0.0 supports the
"mysqli" interface. however, there appear to be numerous issues/problems
with getting this up/running.

my setup.
i have rh8.0 linux, with php-5.0.0 source.

i'm trying to build from souce, to do the configure/make/make install.

i have tried the following configure statements... they all seem to go
through the process with no error

./configure  --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with
-mysql=/usr  --with-mysqli=/usr/bin/mysql_config --with-ldap --with-pgsql


./configure  --with-config-file-path=/etc --with-mysql=/usr/local/mysql  --w
ith-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs2=/usr/sbin/apxs --w
ith-ldap --with-pgsql


./configure  --disable-all --with-pcre-regex --with-config-file-path=/etc --
with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config 
--with-apxs2=/usr/sbin/apxs --with-ldap --with-pgsql


./configure  --with-config-file-path=/etc --with-mysql=/usr/local/mysql  --w
ith-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap --with-pgsql


after each configure step, i then did a "make clean", followed by a "make".
never have been able to get the "make" to work...

in fact it dies with the following errors...

gcc  -Iext/mysqli/ -I/usr/src/php-5.0.0/ext/mysqli/ -DPHP_ATOM_INC -I/usr/sr
c/php-5.0.0/include -I/usr/src/php-5.0.0/main -I/usr/src/php-5.0.0 -I/usr/sr
c/php-5.0.0/Zend -I/usr/include/libxml2 -I/usr/local/mysql/include  -I/usr/s
rc/php-5.0.0/TSRM  -g -O2  -c /usr/src/php-5.0.0/ext/mysqli/mysqli.c -o
ext/mysqli/mysqli.o  && echo > ext/mysqli/mysqli.lo
In file included from /usr/src/php-5.0.0/ext/mysqli/mysqli.c:31:
/usr/src/php-5.0.0/ext/mysqli/php_mysqli.h:50: parse error before
"MYSQL_STMT"
/usr/src/php-5.0.0/ext/mysqli/php_mysqli.h:50: warning: no semicolon at end
of struct or union
/usr/src/php-5.0.0/ext/mysqli/php_mysqli.h:54: parse error before '}' token
/usr/src/php-5.0.0/ext/mysqli/php_mysqli.h:54: warning: data definition has
no type or storage class
/usr/src/php-5.0.0/ext/mysqli/php_mysqli.h:116: parse error before '*' token
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:91: parse error before '*' token
/usr/src/php-5.0.0/ext/mysqli/mysqli.c: In function `php_clear_stmt_bind':
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:93: `stmt' undeclared (first use in
this function)
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:93: (Each undeclared identifier is
reported only once
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:93: for each function it appears in.)
/usr/src/php-5.0.0/ext/mysqli/mysqli.c: In function
`mysqli_objects_free_storage':
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:145: parse error before ')' token
/usr/src/php-5.0.0/ext/mysqli/mysqli.c: In function `zm_startup_mysqli':
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:445: `STMT_ATTR_UPDATE_MAX_LENGTH'
undeclared (first use in this function)
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:495: `MYSQL_NO_DATA' undeclared
(first use in this function)
/usr/src/php-5.0.0/ext/mysqli/mysqli.c: In function
`php_mysqli_fetch_into_hash':
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:604: `MYSQL_STMT' undeclared (first
use in this function)
/usr/src/php-5.0.0/ext/mysqli/mysqli.c:604: parse error before ')' token
make: *** [ext/mysqli/mysqli.lo] Error 1

i've seen various issues relating to this on google, but no real solution..

any ideas/comments/pointers/etc.. i need to be able to do transactional
processing which means i need to start looking at "mysqli" which means i
need php-5.0.0!!!

thanks

-bruce



-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 17, 2004 1:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP] building php to have mysqli support...


hi...

i'm trying to upgrade/install php-4.3.8 to include mysqli support. i'm
running on a rh8.0 linux with mysql-4.x.

i used the php-4.3.8 src rpm, and built using the following config

./configure  --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with
-mysql  --with-mysqli=/usr/bin/mysql_config --with-ldap --with-pgsql

i then used the following commands..

make clean
./configure
make
make install

everything seemed to go ok, as everything appeared to run to completion and
i didn't see any errors... i do appear to have created a new libphp4.so

however, when i look in the php-dist.ini it has no mention of "mysqli"...

so my question, have i screwed up somewhere?? or am i just looking for the
php.ini file in the wrong location.

has anybody managed to get php to work so you can actually use both
mysql/mysqli???

pointers/criticisms/assistance is greatly appreciated! searching through
google/php.net/etc.. hasn't turned up information on where i've gone wrong.

thanks..

-bruce

--
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



[PHP] Re: easiest way to CREATE XML with PHP5?

2004-07-17 Thread Manuel Lemos
Hello,
On 07/18/2004 01:40 AM, Cd Baby wrote:
I see all these articles and tutorials about reading and parsing XML files.
But what about creating and writing XML files with PHP5?
Is the DOM the only way?
It seems like such a bloated overkill.
I just want to make simple little XML files like this:
You may want to try this class. It generates automatically indented XML 
documents as nicely as you present.

http://www.phpclasses.org/xmlwriter
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] easiest way to CREATE XML with PHP5?

2004-07-17 Thread Robert Cummings
On Sun, 2004-07-18 at 00:40, CD Baby wrote:
> I see all these articles and tutorials about reading and parsing XML files.
> 
> But what about creating and writing XML files with PHP5?
> 
> Is the DOM the only way?
> It seems like such a bloated overkill.
> I just want to make simple little XML files like this:
> 
> 
> 
>   Pink Floyd
>Dark Side of the Moon
>
>  
>Comfortably Numb
>4:32
>  
>  
>Some Other Song Title
>6:15
>  
>
> 
> 

fprintf()

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] easiest way to CREATE XML with PHP5?

2004-07-17 Thread CD Baby
I see all these articles and tutorials about reading and parsing XML files.

But what about creating and writing XML files with PHP5?

Is the DOM the only way?
It seems like such a bloated overkill.
I just want to make simple little XML files like this:



  Pink Floyd
   Dark Side of the Moon
   
 
   Comfortably Numb
   4:32
 
 
   Some Other Song Title
   6:15
 
   




Any suggestions?

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



[PHP] php 5 rpm spec file?

2004-07-17 Thread bclem
I know this is a bit early to ask, but I thought I'd ask it anyway.

Does anyone have an rpm spec file for php 5 yet?


If I don't get any responses to this question, I'll build on and sent it to the 
list.

Have a great night!

-Brent

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



RE: [PHP] php.net like doc pages

2004-07-17 Thread Ed Lazor
phpNuke is also popular.

> -Original Message-
> You could always use a wiki. ;-) I've found tikiwiki to be very well
> suited to such things.
> 
> On Sat, 17 Jul 2004 17:44:29 -0500, [php]Walter <[EMAIL PROTECTED]>
> wrote:
> > Anyone know a blog (I think) that will let me create documentation and
> let
> > users add their comments to the tail of it, just like php.net can do??

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



Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Jason Wong
On Sunday 18 July 2004 01:42, Curt Zirzow wrote:

> I dont know what is more evil.. backports or Microsoft :)

No contest, M$, hands down.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Sex has no calories
-- Murphy's Laws on Sex n4
*/

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



Re: [PHP] Re: Embedded Email Directives

2004-07-17 Thread Manuel Lemos
Hello,
On 07/17/2004 03:11 AM, Curt Zirzow wrote:
remove carriage returns to prevent embedded email directives
In an other thread, I readed that sentence. I'm interested to find more 
information about that. I have some mail forms and want to make them as 
secure and possible, but do not know about what and where should I 
filter.

Should I filter all CR and LF Just in headers or also I should do that 
in the message body? (Which is sent in the SMTP DATA section).
For SMTP, all lines should be ended with CR+LF, or else messages may be 
discarded by spam filters or other programs. However, if you use the 
mail() function it may do some filtering on its own.

The mail() function does not do any filtering.
Read the source first to learn more about it.

I have read it, and am very familiar with it.  

Every time there is a post about mail() and the person is
unfamiliar with properly sending SMTP headers or data to sendmail,
You  *claim* its a bug with php's mail() call without knowing
what version of php they are using. You never ask if they are using
windows which uses php's built in sendmail tool.  Nor do you never
ask what MTA that sendmail is really representing.
If you pay more attention you may notice that I always say that it 
*sounds* like a PHP bug. I am not even saying that is necessarily a PHP bug.

After almost 5 years helping people that post messages asking for help 
about mail function problems, it is easy for me to make early 
diagnostics just from the sympthoms.

If somebody presents a correctly written piece of code that uses the 
mail() function and still have problems, those problems have to be 
somewhere else than the user code. It is rarely in the involved MTA, so 
it may only be in the user enviroment configuration or in the PHP mail() 
function implementation.

Certain sympthoms are usually related to bugs in the mail() function. 
You do not have to be wizard to realize that, just have reasonable 
experience on the subject will do.


My reponses to you're email's are not targeted against you, but
simply correcting the facts as of current.
So, you probably need to pay more attention because you seem to be 
departing from wrong assumptions.


As far as what filtering is going on, please enlighten me, this is
the logic of the mail function:
I don't know what you think I mean when I say filtering. To make it 
clear, filtering for me is processing some input to produce some output. 
In this case the inputs are the mail function arguments and output is 
the message that is fed to the MTA. It may not only remove, but also add 
or change characters. All that is filtering to me.


  trim leading space and make To: rfc822 compliant
  trim leading space and make Subject: rfc822 compliant
These actions are filtering.
  open pipe to sendmail
  send the To: address
  send the Subject:
  if headers was sepecified, send those as well
PHP adds several line feeds. These are filtering to me as well.
  send the message.
  close the pipe to sendmail.
Now I do wonder where in the world filtering is going on there.
What I wonder is why did you just mentioned what the mail function does 
when it calls sendmail!

AFAIK, PHP does not come with a built-in sendmail tool for Windows, 
unlike you mention above. Maybe you know something that I am not aware.

What I know is that when sendmail is not available, PHP calls Win32 code 
to send the message relaying in an SMTP server. There is plenty of 
filtering done there as you may see when reading the source.

--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Compare two TXT files

2004-07-17 Thread raditha dissanayake
C.F. Scheidecker Antunes wrote:
Hello all,
Is there a more efficient way to compare 2 TXT files other than 
reading line by line ?

What I was doing was reading line by line and compare both files, if 
one line is different the loops are interrupted and the function 
returns true.

Any ideas?
how about invoking the diff command?
--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Compare two TXT files

2004-07-17 Thread Justin Patrin
That sounds pretty efficient to me if all you want is whether they're
different. If you actually want to know how different, you could use
something like levenshtein() to compare the contents of the files as
strings.
http://www.php.net/manual/en/function.levenshtein.php

Or, for a more full solution, you could use PEAR::Text_Diff
http://pear.php.net/package/Text_Diff

On Sat, 17 Jul 2004 19:07:44 -0600, C.F. Scheidecker Antunes
<[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> Is there a more efficient way to compare 2 TXT files other than reading
> line by line ?
> 
> What I was doing was reading line by line and compare both files, if one
> line is different the loops are interrupted and the function returns true.
> 
> Any ideas?
> 
> Thanks in advance.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> !DSPAM:40f9cc90104731699226006!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



[PHP] Re: Emtying Variables

2004-07-17 Thread Trejkaz Xaoza
Php wrote:
> And you can also used a php variable to detect multiple submit:

Even better would be using a token which you give to the user when the form
is displayed.  That way they can't accidentally submit the form on first
entry to the site (and believe me, this can happen, because Konqueror
occasionally remembers a form submission page was in its window the last
time it was run, and tries to reload the page!)

You would generate a random number during the process of displaying the
form, then store that random number into the user's session under that
form's ID.  The number would have to be put into a hidden form field in the
HTML as well.

Then when they submit, you compare the value they send with the value you
have stored in their session.

The frameworks on Java like Struts can automate this.  Perhaps that MVC.PHP
which claims to be a port of Struts can also automate it.

TX


-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Re: Compare two TXT files

2004-07-17 Thread Paul Chvostek
On Sat, Jul 17, 2004 at 07:07:44PM -0600, C.F. Scheidecker Antunes wrote:
> 
> Is there a more efficient way to compare 2 TXT files other than reading 
> line by line ?
> 
> What I was doing was reading line by line and compare both files, if one 
> line is different the loops are interrupted and the function returns true.
> 
> Any ideas?

If all you're trying to do is determine whether the files are different,
and the files are relatively small, then it might be easiest to do
something like:

  function filediff($foo, $bar) {
$f_foo = file_get_contents($foo);
$f_bar = file_get_contents($bar);
return ($f_foo == $f_bar);
  }

Note that this has the opposite return value of your existing function:
it returns true if the files are THE SAME, like the unix "diff" command.

Alternately, if you want to know what differences exist between files,
you could load the files into arrays with the file() function, then use
the array_diff() function to spit out a list of lines in one file but
not the other.

Or, you could tell us more about what you're actually trying to do.  :)

p

-- 
  Paul Chvostek <[EMAIL PROTECTED]>
  Operations / Abuse / Whatever
  it.canada, hosting and development   http://www.it.ca/

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



Re: [PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Curt Zirzow wrote:
> A simple workaround is testing OS:
> 
> if (windows)
>   // use realpath method
> } else {
>   $absolute = $path{0} == '/';
> }

I don't know what the "realpath" method is since every one I've been given
that involves realpath so far doesn't work.

But here's what I'm doing now:

function is_absolute($path)
{
$regex = (PHP_OS == 'WINNT' || PHP_OS == 'WIN32')
? "/^([a-z][A-Z]:)?[\/\\]/"
: "/^\//";

return (boolean) preg_match($regex, $path);
}

Does that look safe enough?  It works for Linux but since I have no Windows
environments to test on I have no idea if it works properly on Windows.

TX

-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Compare two TXT files

2004-07-17 Thread C.F. Scheidecker Antunes
Hello all,
Is there a more efficient way to compare 2 TXT files other than reading 
line by line ?

What I was doing was reading line by line and compare both files, if one 
line is different the loops are interrupted and the function returns true.

Any ideas?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php.net like doc pages

2004-07-17 Thread Justin Patrin
You could always use a wiki. ;-) I've found tikiwiki to be very well
suited to such things.

On Sat, 17 Jul 2004 17:44:29 -0500, [php]Walter <[EMAIL PROTECTED]> wrote:
> Anyone know a blog (I think) that will let me create documentation and let
> users add their comments to the tail of it, just like php.net can do??
> 
> Thanks
> 
> Walter
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> !DSPAM:40f9a9c826601654356116!
> 
> 


-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

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



[PHP] php.net like doc pages

2004-07-17 Thread \[php\]Walter
Anyone know a blog (I think) that will let me create documentation and let
users add their comments to the tail of it, just like php.net can do??

Thanks

Walter

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



Re: [PHP] Is "Function Constants" the Correct Term?

2004-07-17 Thread John W. Holmes
Curt Zirzow wrote:
* Thus wrote gohaku:
Hi everyone,
I have been experimenting with defining functions as constants.
Below is what I am using to test "Function Constants":


define(DBLOGIN,dblogin(LOGIN,PASS,DB));

This is simply not allowed.
see:
  http://php.net/define
damn... I had just rewritten my entire application to use this!!
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is "Function Constants" the Correct Term?

2004-07-17 Thread Curt Zirzow
* Thus wrote gohaku:
> Hi everyone,
> I have been experimenting with defining functions as constants.
> Below is what I am using to test "Function Constants":
> 
> 
>  define(LOGIN,"user");
> define(PASS,"pass");
> define(DB,"mysql");
> 
> define(DBLOGIN,dblogin(LOGIN,PASS,DB));

This is simply not allowed.

see:
  http://php.net/define


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



[PHP] Is "Function Constants" the Correct Term?

2004-07-17 Thread gohaku
Hi everyone,
I have been experimenting with defining functions as constants.
Below is what I am using to test "Function Constants":


define(DBLOGIN,dblogin(LOGIN,PASS,DB));
DBLOGIN;
$set = mysql_query("Select user FROM user limit 1,1");
$results = mysql_fetch_array($set);
echo "Results: ",$results["user"];
define(DBLOGIN,dblogin("user","incorrect_pass",DB));
DBLOGIN;
//Should print error
$set = mysql_query("Select user FROM user limit 1,1");
$results = mysql_fetch_array($set);
echo "Results: ",$results["user"];
function dblogin($login,$pass,$db)
{
$mysql = mysql_connect("localhost",$login,$pass);
mysql_select_db($db,$mysql);
}
?>

I would like to know what the right term for this kind of constant 
since a search for "function constants" php
did not return any relevant results.
I would also like to know why I was able to redefine DBLOGIN, I always 
thought redefining constants could
not be done.

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


[PHP] Re: Emtying Variables

2004-07-17 Thread PHP
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What's the best way of emptying my variables once my form has done with
them
> because although I disconnect from the database if the user refreshes the
> screen it sends another e-mail to me.
>
> -- 
> -
>  Michael Mason
>  Arras People
>  www.arraspeople.co.uk
> -

Hello,

I don't know if there is really a best way to do this but, some good ways:
- The first step is to avoid multiple submits with the same form when the
user submits severals times. You have to add a small script to avoid this:

var SubmitCount = 0;

function CheckSubmit() {
if (SubmitCount == 0) {
SubmitCount++;
pPost.submit();
 }
else {
// Anti stress alert ;-))
alert("The form has been sent. Please wait take time to drink a
coffee.");
return false;
}
}






- The second step is to avoid the refresh process:
You can use a redirect: header('location: ' . $_SERVER['PHP_SELF']); exit;
And you can also used a php variable to detect multiple submit:
The client side code becomes:
-- mypage.html

var SubmitCount = 0;

function CheckSubmit() {
if (SubmitCount == 0) {
SubmitCount++;
pPost.submit();
 }
else {
// Anti stress alert ;-))
alert("The form has been sent. Please wait");
return false;
}
}




...

...



-- myscript.php
// When you display the page with the form
// Load the form page
$template =& new CTemplate("mypage.html");
// Put the control value
$template->assign("[[CONTROL]]", "" . time() . mt_rand());
...

// When you get the form data
// Two cases:
if ($_SESSION['sav_control'] != $_POST['control']) {
// Really the first time: the sav_control variable has not been set
// your code to process the form data

// Keep the control variable
$_SESSION['sav_control'] =  $_POST['control'];

// Display the next page
...
}
else {
// Not the first time: the sav_control variable has been set
// Display the next page
...
}

So, if the user uses the back button, you keep in a session that this form
has already been sent.

Sorry if I use a template style... I think it is a better way to have a good
split between HTML and PHP and it's always easier when you want to explain
something ;-)

Hope this helps... Regards
Patrick

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



[PHP] Re: building php to have mysqli support...

2004-07-17 Thread Thomas Seifert
On Sat, 17 Jul 2004 13:11:41 -0700, Bruce wrote:

> has anybody managed to get php to work so you can actually use both
> mysql/mysqli???
> 
> pointers/criticisms/assistance is greatly appreciated! searching through
> google/php.net/etc.. hasn't turned up information on where i've gone wrong.
> 
> thanks..
> 
> -bruce

the docs say its for mysql-4.1.x and higher (you probably have
mysql-4.0.x) 
http://de.php.net/mysqli
also I think its php5 only.


thomas

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



Re: [PHP] Book Required

2004-07-17 Thread janet

In a message dated 7/17/2004 11:25:41 AM Pacific Daylight Time,
[EMAIL PROTECTED] writes:

>Tularis wrote:

>> Programming PHP by O`Reilly :)

>Write-up says it STILL uses MySQL as it's database material ;(

I don't know what Write-up you are refering to. The book is not tied to
MySQL. It mentions it only as one of the many databases that PHP supports.
The examples that I see, unless I missed something, on accessing a database
from PHP use PEAR DB. So, I think this Write-up is misleading.

Programming PHP an excellent book.

It's not clear to me what you mean by NON MYSQL books, so I don't know what
to recommend. There are other books that teach PHP without focusing on MySQL.
 For instance, Core PHP programming has chapters for several different
databases. PHP Developer's Cookbook shows how to make your programs database
independent. PHP cookbook mainly shows database access using PEAR DB. PHP
Bible focuses on MySQL and Oracle when showing how to write scripts for
database use. There are others. 

>Since I'm pushing PHP5 into all new sites, I'll wait for a PHP5 book :)

There are PHP 5 books available now. Already. For instance, Learning PHP 5 by
Sklar and PHP 5 Fast and Easy Web Development by Meloni. Core PHP programming
discusses PHP 5. And others. More PHP 5 books are due any day that you can
pre-order at Amazon or elsewhere. 

If you are looking for a PHP 5 non-MySQL book, PHP 5 for Dummies is available
now and is not focused on MySQL. It has examples in the database access
chapter from MySQL, Oracle, PostgreSQL, and others. And shows how to use PEAR
DB. 

Janet 



Janet Valade
Author, PHP 5 for Dummies
PHP & MySQL for Dummies

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



[PHP] building php to have mysqli support...

2004-07-17 Thread bruce
hi...

i'm trying to upgrade/install php-4.3.8 to include mysqli support. i'm
running on a rh8.0 linux with mysql-4.x.

i used the php-4.3.8 src rpm, and built using the following config

./configure  --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --with
-mysql  --with-mysqli=/usr/bin/mysql_config --with-ldap --with-pgsql

i then used the following commands..

make clean
./configure
make
make install

everything seemed to go ok, as everything appeared to run to completion and
i didn't see any errors... i do appear to have created a new libphp4.so

however, when i look in the php-dist.ini it has no mention of "mysqli"...

so my question, have i screwed up somewhere?? or am i just looking for the
php.ini file in the wrong location.

has anybody managed to get php to work so you can actually use both
mysql/mysqli???

pointers/criticisms/assistance is greatly appreciated! searching through
google/php.net/etc.. hasn't turned up information on where i've gone wrong.

thanks..

-bruce

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



Re: [PHP] Re: Book Required

2004-07-17 Thread Josh Close
Here's a php5 book, and there's a few others.

http://www.oreilly.com/catalog/learnphp5/index.html


On Sat, 17 Jul 2004 19:28:37 +0100, Lester Caine <[EMAIL PROTECTED]> wrote:
> Tularis wrote:
> 
> > Programming PHP by O`Reilly :)
> 
> Write-up says it STILL uses MySQL as it's database material ;(
> 
> Since I'm pushing PHP5 into all new sites, I'll wait for a PHP5 book :)
> 
> The Firebird Bible ( which has taken two years to write ) is being
> printed at the moment and should be out by next month - not sure how
> much of the PHP chapters actually made it in the final manuscript.
> 
> 
> 
> --
> Lester Caine
> -
> L.S.Caine Electronic Services
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
-Josh

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



Re: [PHP] if((strtolower(substr($author, 0, 1)) == $ausenquiry))

2004-07-17 Thread Skippy
On Mon, 12 Jul 2004 15:22:05 -0400 John Taylor-Johnston
<[EMAIL PROTECTED]> wrote:
> So how would I recode $ausenquiry so if ausenquiry=e, it will choose words
> that begin with "e", "é" sorted this way:

Before the actual sort, use strtr() with a translation array on a copy of the
string. Use the strtr() to transform all occurances of similar characters to
only one ie. "é" becomes "e". Then you can search for "e" and it will match.

If you have special characters in the search string too, use the translation
for it as well. Basically, it's all about bringing the strings you work with
to a common denominator.

-- 
Skippy - Romanian Web Developers - http://ROWD.ORG

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



[PHP] Re: Book Required

2004-07-17 Thread Lester Caine
Tularis wrote:
Programming PHP by O`Reilly :)
Write-up says it STILL uses MySQL as it's database material ;(
Since I'm pushing PHP5 into all new sites, I'll wait for a PHP5 book :)
The Firebird Bible ( which has taken two years to write ) is being 
printed at the moment and should be out by next month - not sure how 
much of the PHP chapters actually made it in the final manuscript.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Curt Zirzow
* Thus wrote Jason Wong:
> On Saturday 17 July 2004 15:01, Ed Lazor wrote:
> > Is the RedHat Network Up2Date really only on version 4.3.2 of PHP?  If so,
> > any idea why they're so far behind?  Any idea of when it will be brought
> > current?
> >
> > I have an ISP telling me that the security of their systems rely entirely
> > on the RedHat Network.  They acknowledge that RedHat's behind and that
> > their security is compromised.  It's silly, but they seem to just sit there
> > blaming RedHat rather than doing anything to protect their customers.
> 
> RedHat usually backports majority security fixes to their currently supported 
> distribution(s). Anyway questions such as these ought to be asked on a RedHat 
> list.

I dont know what is more evil.. backports or Microsoft :)



Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



Re: [PHP] Re: CGI / PHP max_exec_time

2004-07-17 Thread Curt Zirzow
* Thus wrote Head:
> mh i tracked the bug down to be an FOPEN on a URL so i need to set a timeout
> on FOPEN hows that possible ? Using php version 4.3.7

see:
  http://php.net/stream_set_timeout


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



Re: [PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Curt Zirzow
* Thus wrote Trejkaz Xaoza:
> Jason Barnett wrote:
> > A, methinks I have a competitor for a FileSystem Manager :)  Perhaps I
> > misunderstand your problem, but this works fine for me (WinXP) because
> > realpath
> > [quote]Returns canonicalized absolute pathname[/quote]:
> > 
> >  > 
> > // we know __FILE__ is an absolute path
> > $file = __FILE__;
> > echo realpath(__FILE__) == $file ? 'The same path' : 'Not the same path';
> > 
> > ?>
> > 
> > http://www.php.net/realpath
> 
> That works because the value in __FILE__ seems to be both canonicalised and
> absolute.
> 
> For an example which breaks, realpath('/home') on my server returns
> '/usr/home', so your example would claim that /home is not absolute.  Yet,
> it is. :-/

A simple workaround is testing OS:

if (windows) 
  // use realpath method
} else {
  $absolute = $path{0} == '/';
}


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



[PHP] Re: Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Harlequin
yeah.

I should have noticed that. Thanks again Torsten :)

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-
"Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Harlequin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I've generated a page where the user selects and completes a form. One
of
> > these is a free text area with the name "TXT_Question". this is used
later
> > as "$Question   = $_Post['TXT_Question'];"
>
> Shouldn't this be $_POST['TXT_Question'] (upper case)?
>
> > but for some reason when I send
> > this in an e-mail like so:
> >
> >   \nUser has selected eventID:\t$EventID
> >   \nAnd their question is:\t$Question
> >
> > Nothing gets posted.
>
> Why should it be posted? You wrote that you wanted to send the data in an
> email.
>
> >
> > Any ideas...?
> >
> > The form is located at:
> > http://www.arrasresources.co.uk/pmoclinic/
>
> Regards, Torsten Roehr

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



[PHP] Re: CGI / PHP max_exec_time

2004-07-17 Thread Head
mh i tracked the bug down to be an FOPEN on a URL so i need to set a timeout
on FOPEN hows that possible ? Using php version 4.3.7

"Head" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hello list,
>
> im running a php script from CLI/CGI on linux which has a variable
execution
> time, some times it doesnt terminates by itself so i have to set a
> max_execution_time to terminate the script. My problem is that the
> max_exec_time on CGI versions is always 0 (never time out) which produces
> zombie php prozesses.
>
> any help/sugesstions ?
>
> thanks - Head

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



[PHP] Re: Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Torsten Roehr
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've generated a page where the user selects and completes a form. One of
> these is a free text area with the name "TXT_Question". this is used later
> as "$Question   = $_Post['TXT_Question'];"

Shouldn't this be $_POST['TXT_Question'] (upper case)?

> but for some reason when I send
> this in an e-mail like so:
>
>   \nUser has selected eventID:\t$EventID
>   \nAnd their question is:\t$Question
>
> Nothing gets posted.

Why should it be posted? You wrote that you wanted to send the data in an
email.

>
> Any ideas...?
>
> The form is located at:
> http://www.arrasresources.co.uk/pmoclinic/

Regards, Torsten Roehr

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



[PHP] Re: Emtying Variables

2004-07-17 Thread Torsten Roehr
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What's the best way of emptying my variables once my form has done with
them
> because although I disconnect from the database if the user refreshes the
> screen it sends another e-mail to me.

Even when you reset all variables on the page (e.g. with $_POST = array())
the user can always refresh and therefore re-submit your form.

To avoid this you could do a redirect after processing the form:

// process form here

header('location: ' . $_SERVER['PHP_SELF']); exit;

Of course then you will have to pass any notices for the user via get (or
store it in a session variable).

Hope this helps.


Regards, Torsten Roehr

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



[PHP] CGI / PHP max_exec_time

2004-07-17 Thread Head
hello list,

im running a php script from CLI/CGI on linux which has a variable execution
time, some times it doesnt terminates by itself so i have to set a
max_execution_time to terminate the script. My problem is that the
max_exec_time on CGI versions is always 0 (never time out) which produces
zombie php prozesses.

any help/sugesstions ?

thanks - Head

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



Re: [PHP] Re: Templates Are Driving me Nuts

2004-07-17 Thread Sean Malloy
The template system I use is extremely simple.

Template.php:
Items = array();
$this->_document = $document;
}

function Render()
{
echo $this->ToString();
}

function ToString()
{
$template = $this->Items;
ob_start();
require($this->_document);
return ob_get_clean();
}
}
?>

and to use it?

templates/index.html:



Hello , it is currently 



index.php:
Items['name'] = 'User';
$template->Items['time'] = date('d M Y', time());
$template->Render();
?>

why use it?

Because you keep your html and your php code separate. That is the
goal when using any templating system.

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



[PHP] Emtying Variables

2004-07-17 Thread Harlequin
What's the best way of emptying my variables once my form has done with them
because although I disconnect from the database if the user refreshes the
screen it sends another e-mail to me.

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

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



[PHP] Problem Stuffing Variable Value into an E-mail

2004-07-17 Thread Harlequin
I've generated a page where the user selects and completes a form. One of
these is a free text area with the name "TXT_Question". this is used later
as "$Question   = $_Post['TXT_Question'];" but for some reason when I send
this in an e-mail like so:

  \nUser has selected eventID:\t$EventID
  \nAnd their question is:\t$Question

Nothing gets posted.

Any ideas...?

The form is located at:
http://www.arrasresources.co.uk/pmoclinic/


-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

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



[PHP] Re: Book Required

2004-07-17 Thread rush
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> There's loads and loads of books available on the subject of PHP & MySQL.
>
> Does anyone have any recommendations...?

here are some:

http://www.templatetamer.org/index.php?RecommendedBooks

rush
--
http://www.templatetamer.com/

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



[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Jason Barnett wrote:
> A, methinks I have a competitor for a FileSystem Manager :)  Perhaps I
> misunderstand your problem, but this works fine for me (WinXP) because
> realpath
> [quote]Returns canonicalized absolute pathname[/quote]:
> 
>  
> // we know __FILE__ is an absolute path
> $file = __FILE__;
> echo realpath(__FILE__) == $file ? 'The same path' : 'Not the same path';
> 
> ?>
> 
> http://www.php.net/realpath

That works because the value in __FILE__ seems to be both canonicalised and
absolute.

For an example which breaks, realpath('/home') on my server returns
'/usr/home', so your example would claim that /home is not absolute.  Yet,
it is. :-/

TX


-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Re: Templates Are Driving me Nuts

2004-07-17 Thread Skrol 29
Hello,

Here is a shema to explain Template Engines:
  http://www.tinybutstrong.com/index.php?page=template

Some developers complain about Template Engines because they are too complex
or because they are a kind of new language over PHP. The one you will found
on the URL above is expected to be different.

---
Skrol 29
www.skrol29.com
www.tinybutstrong.com
---
"Ee" <[EMAIL PROTECTED]> a écrit dans le message de
news:[EMAIL PROTECTED]
> Dears,
>
> Please help. This template thing is driving my nuts. I though maybe when
> I read more articles things will clear up; however, things got even
> worse. Every article writer has a different idea. Can anyone explain to
> me what are Templates for? What are the advantages of using them? If I
> use a third party template, will my site have a different look or is it
> only a parser that will take my designed template and data and combine
> them. I really don't know.

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



Re: [PHP] Getting the primary key from a MySQL insert

2004-07-17 Thread zareef ahmed
Hi !

You can user mysql_insert_id() for this purpose.

zareef ahmed 

--- Andrew Wood <[EMAIL PROTECTED]> wrote:
> If the primary key in a MySQL DB is an
> autoincrementing integer, is 
> there anyway of automatically getting it back when I
> do an insert in 
> PHP.  In other words taking the status returned by
> mysql_query and 
> extracting the PK of the record we just entered?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com



__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

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



[PHP] Re: Book Required

2004-07-17 Thread Michelle Konzack
Am 2004-07-17 09:29:37, schrieb Lester Caine:
>Harlequin wrote:
>
>>There's loads and loads of books available on the subject of PHP & MySQL.
>
>It would be nice to find one's that DON'T rely on MySQL ;)

O'Reilly:   Programming PHP
Practical PostgreSQL

>Anybody seen a good NON MySQL one.

:-)

>Lester Caine


Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] Re: Book Required

2004-07-17 Thread Michelle Konzack
Am 2004-07-17 08:16:36, schrieb Harlequin:
>Morning
>
>There's loads and loads of books available on the subject of PHP & MySQL.
>
>Does anyone have any recommendations...?

I can recommend Books from O'Reily

Programming PHP

The second book I use is

Practical PostgreSQL

But there is a book for MySQL tooo.

Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/ 
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Jason Barnett

Anyway it's looking a lot like I'll have to detect the Win32 build of PHP
at runtime, and choose the method based on that.  All because PHP doesn't
have an is_absolute function or anything similarly convenient. :-/
TX
A, methinks I have a competitor for a FileSystem Manager :)  Perhaps I 
misunderstand your problem, but this works fine for me (WinXP) because realpath
[quote]Returns canonicalized absolute pathname[/quote]:


// we know __FILE__ is an absolute path
$file = __FILE__;
echo realpath(__FILE__) == $file ? 'The same path' : 'Not the same path';
?>
http://www.php.net/realpath
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Tularis wrote:

> c:/ wouldn't even work as a path on unix systems.

[134] [EMAIL PROTECTED]:/tmp> mkdir c:
[135] [EMAIL PROTECTED]:/tmp> ls -la c:/
total 8
drwxr-xr-x   2 trejkaz users 4096 Jul 17 21:01 .
drwxrwxrwt  52 rootroot  4096 Jul 17 21:01 ..

You were saying?

Anyway it's looking a lot like I'll have to detect the Win32 build of PHP
at runtime, and choose the method based on that.  All because PHP doesn't
have an is_absolute function or anything similarly convenient. :-/

TX

-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Re: Book Required

2004-07-17 Thread Tularis
Programming PHP by O`Reilly :)
Lester Caine wrote:
Harlequin wrote:
There's loads and loads of books available on the subject of PHP & MySQL.

It would be nice to find one's that DON'T rely on MySQL ;)
Does anyone have any recommendations...?

Anybody seen a good NON MySQL one.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Tularis
Trejkaz Xaoza wrote:
Michael Ochs wrote:
Hi,
maybe you could try it with regular expressions! "[A-Z]:\\" or better
"[C-Z]:\\" because A and B is used just for floppy drives...
Take a look at www.php.net/preg_match/

I'm not sure if you noticed, but I said I wanted it to be portable.
Sure, "([A-Za-z]:)?[/\\]" would work to some extent, but would it work
perfectly?  As far as I can tell, the path "C:/" is _relative_ on Linux and
BSD.  Am I wrong?
TX
c:/ wouldn't even work as a path on unix systems. I don't know how paths 
look on MacOS systems, so can't help you with that. However, after 
removing the [a-z]: part of the path, you're stuck with an abosulute 
path that is of the same type as in Unix. In Unix systems absolute paths 
start with a forward-slash (eg. /usr/local or /home/me/, etc). After 
removing the c: from eg. c:/this/and/that, you're left with 
/this/and/that which looks pretty much the same :)

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


[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Michael Ochs wrote:
> Hi,
> maybe you could try it with regular expressions! "[A-Z]:\\" or better
> "[C-Z]:\\" because A and B is used just for floppy drives...
> Take a look at www.php.net/preg_match/

I'm not sure if you noticed, but I said I wanted it to be portable.

Sure, "([A-Za-z]:)?[/\\]" would work to some extent, but would it work
perfectly?  As far as I can tell, the path "C:/" is _relative_ on Linux and
BSD.  Am I wrong?

TX

-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



Re: [PHP] Re: Book Required

2004-07-17 Thread raditha dissanayake
Lester Caine wrote:
Harlequin wrote:
There's loads and loads of books available on the subject of PHP & 
MySQL.

It would be nice to find one's that DON'T rely on MySQL ;)
Does anyone have any recommendations...?

Anybody seen a good NON MySQL one.
Very true it's time to change partners, php's current partner does not 
seem to love php all that much.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Michael Ochs
Hi,
maybe you could try it with regular expressions! "[A-Z]:\\" or better
"[C-Z]:\\" because A and B is used just for floppy drives...
Take a look at www.php.net/preg_match/

Bye, Michael


"Trejkaz Xaoza" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi!
>
> I used to detect whether a path is absolute by seeing if the first
character
> is a forward slash.
>
> Unfortunately, Windows absolute paths are in a different syntax like
"C:\",
> and I don't know what other random systems might have for their syntax in
> the future.
>
> So, is there a portable way to tell if a path is absolute or not?  I
thought
> about comparing the start of the path with realpath('/'), but this only
> works if the path starts with "C:" and fails for "D:" and other drives.
>
> TX
>
> --
> 'Every sufficiently advanced technology is indistinguishable from magic' -
> Arthur C Clarke
> 'Every sufficiently advanced magic is indistinguishable from technology' -
> Tom Graves
>
>  Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
>   Web site: http://xaoza.net/trejkaz/
>  Jabber ID: [EMAIL PROTECTED]
>GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Re: Book Required

2004-07-17 Thread Lester Caine
Harlequin wrote:
There's loads and loads of books available on the subject of PHP & MySQL.
It would be nice to find one's that DON'T rely on MySQL ;)
Does anyone have any recommendations...?
Anybody seen a good NON MySQL one.
--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How can I tell if a path is absolute?

2004-07-17 Thread Trejkaz Xaoza
Hi!

I used to detect whether a path is absolute by seeing if the first character
is a forward slash.

Unfortunately, Windows absolute paths are in a different syntax like "C:\",
and I don't know what other random systems might have for their syntax in
the future.

So, is there a portable way to tell if a path is absolute or not?  I thought
about comparing the start of the path with realpath('/'), but this only
works if the path starts with "C:" and fails for "D:" and other drives.

TX

-- 
'Every sufficiently advanced technology is indistinguishable from magic' -
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' -
Tom Graves

 Email: Trejkaz Xaoza <[EMAIL PROTECTED]>
  Web site: http://xaoza.net/trejkaz/
 Jabber ID: [EMAIL PROTECTED]
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73

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



[PHP] Re: Book Required

2004-07-17 Thread Michael Purdy
Michael

Your right there is a wide selection available and as such you need to select based on 
your particular development slant.

PHP and Mysql Web Development ISBN 0-672-32525-X 2nd Edition by Welling & Thomson is a 
good general text.

Did you solve your table results printing question?

Mike
Melb.au

Re: [PHP] Book Required

2004-07-17 Thread [EMAIL PROTECTED]
I agree that PHP & MySQL Web Development (By Luke Welling and Laura 
Thompson) is a great resource for learning PHP.  Armed with that book 
and the online PHP manual (with user comments), and you're on your way 
to being a well-informed developer.

The second edition (2003) covers PHP 4.3, so it's still quite useful... 
I'm pretty sure the third edition will be written to cover 5.0.

Dan
Will Collins wrote:
I apologize for requesting a read receipt.  Won't happen again - I hope. :)
-Original Message-
From: Will Collins [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 2:27 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Book Required

PHP & MySQL Web Development is a pretty good one.  It does a good job of
giving a fairly thorough explanation on things, considering the broad range
of topics to be covered.  I never have really been a fan of the "Fast and
Easy... " series, or the "Learn * In 24 Hours" series.
Will
-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 2:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Book Required

Morning
There's loads and loads of books available on the subject of PHP & MySQL.
Does anyone have any recommendations...?
 

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


RE: [PHP] Book Required

2004-07-17 Thread Will Collins
I apologize for requesting a read receipt.  Won't happen again - I hope. :)

-Original Message-
From: Will Collins [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 2:27 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Book Required

PHP & MySQL Web Development is a pretty good one.  It does a good job of
giving a fairly thorough explanation on things, considering the broad range
of topics to be covered.  I never have really been a fan of the "Fast and
Easy... " series, or the "Learn * In 24 Hours" series.

Will

-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 2:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Book Required

Morning

There's loads and loads of books available on the subject of PHP & MySQL.

Does anyone have any recommendations...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

-- 
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

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



Re: [PHP] Book Required

2004-07-17 Thread Chris
Harlequin wrote:
Morning
There's loads and loads of books available on the subject of PHP & MySQL.
Does anyone have any recommendations...?
 

PHP and MySQL Web Development by Luke Welling and Laura Thomson has 
always been my favorite.

http://www.samspublishing.com/title/067232525X
That's the 2nd edition (3rd is coming out in October). I have the 1st 
edition, I would assume the 2nd and 3rd would be just as well written.

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


RE: [PHP] Book Required

2004-07-17 Thread Will Collins
PHP & MySQL Web Development is a pretty good one.  It does a good job of
giving a fairly thorough explanation on things, considering the broad range
of topics to be covered.  I never have really been a fan of the "Fast and
Easy... " series, or the "Learn * In 24 Hours" series.

Will

-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 17, 2004 2:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Book Required

Morning

There's loads and loads of books available on the subject of PHP & MySQL.

Does anyone have any recommendations...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

-- 
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



[PHP] Book Required

2004-07-17 Thread Harlequin
Morning

There's loads and loads of books available on the subject of PHP & MySQL.

Does anyone have any recommendations...?

-- 
-
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-

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



Re: [PHP] RedHat Network Up2Date

2004-07-17 Thread Jason Wong
On Saturday 17 July 2004 15:01, Ed Lazor wrote:
> Is the RedHat Network Up2Date really only on version 4.3.2 of PHP?  If so,
> any idea why they're so far behind?  Any idea of when it will be brought
> current?
>
> I have an ISP telling me that the security of their systems rely entirely
> on the RedHat Network.  They acknowledge that RedHat's behind and that
> their security is compromised.  It's silly, but they seem to just sit there
> blaming RedHat rather than doing anything to protect their customers.

RedHat usually backports majority security fixes to their currently supported 
distribution(s). Anyway questions such as these ought to be asked on a RedHat 
list.

If you want the latest PHP then compile your own and don't use RedHat's.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Death is God's way of telling you not to be such a wise guy.
*/

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



[PHP] RedHat Network Up2Date

2004-07-17 Thread Ed Lazor
Is the RedHat Network Up2Date really only on version 4.3.2 of PHP?  If so,
any idea why they're so far behind?  Any idea of when it will be brought
current?

 

I have an ISP telling me that the security of their systems rely entirely on
the RedHat Network.  They acknowledge that RedHat's behind and that their
security is compromised.  It's silly, but they seem to just sit there
blaming RedHat rather than doing anything to protect their customers.

 

-Ed

 

 



[PHP] Re: PHPEclipse?

2004-07-17 Thread Lester Caine
Dan Joseph wrote:
I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0?
I'm having trouble getting it working.  I downloaded the July .ZIP file and
unzipped it into the plugins directory.  Its not recognizing it.  Anyone
have this working?
I have some success with PHPEclipse on Windows, even with PHP5, but it 
is still work in progress, so some niggles are to be expected.

That said, the more people who try it out and identify problems, the 
quicker it will become more stable ?

As David has said, a rogue zip did get out, and that seems to be still 
accessible on some mirrors, so the next snapshot could be worth waiting for.

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php