[PHP] upload whole direcotry using ftp functions

2002-11-09 Thread electroteque
hi i was wondering if there was anyway to upload a whole directory using the
php ftp functions rather than single files ??



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




Re: [PHP] calculate bytes in string

2002-11-09 Thread Jason Wong
On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> Does anyone know of a function, or a method to calculate how many bytes are
> in a string?  Similar to the filesize file system function.
>
> Any help would be appreciated.

Assuming 1 character = 1 byte, then strlen().

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




Re: [PHP] calculate bytes in string

2002-11-09 Thread @ Edwin
Or,

"Jason Wong" <[EMAIL PROTECTED]> wrote:

> On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> > Does anyone know of a function, or a method to calculate how many bytes
are
> > in a string?  Similar to the filesize file system function.
> >
> > Any help would be appreciated.
>
> Assuming 1 character = 1 byte, then strlen().
>

Just write the string to a file first then check the filesize. This should
work (I think)
even if you're dealing with multi-byte characters wherein 1 character = 2
bytes
(or more?).

There's mb_strlen() but I don't think it'll be useful though...

- E

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




Re: [PHP] Need MENTOR for Fantasy football project

2002-11-09 Thread @ Edwin

"Karl James" <[EMAIL PROTECTED]> wrote:
> I have the php bible 4 book but it
> Doesn’t tell you how to do things all the way

Well, I don't think there's a book that would tell you how to do things
"all the way". Besides, if there is, programming wouldn't be fun anymore ;)

Start from small things--I'm sure you'll be glad that you did...

> And still leaves with lots of questions.

Bring 'em in one by one--I'm sure there's a lot of people here who will
be willing to help esp. if you throw in specific questions :)

- E

--

"Rome wasn't built in a day alone."

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




[PHP] Help with form

2002-11-09 Thread Karl James
http://www.ultimatefootballleague.com/Create_Account.htm
 
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
 
SO what im trying to do on this form  is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
 
Any help with this would be greatly appreciated.
 
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong 
As im starting from the beginning and trying to learn forms and php
together
 
Thanks for your understanding.
 
Sincerely
Karl James "The_Saint" irc tag



[PHP] FW: Form posted from Microsoft Internet Explorer.

2002-11-09 Thread Karl James
This is I get regarding the 
Email sent from my form
http://www.ultimatefootballleague.com/Create_Account.htm



-Original Message-
From: Karl James [mailto:karl.james@;verizon.net] 
Sent: Friday, November 08, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: Form posted from Microsoft Internet Explorer.




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


Re: [PHP] Securing PHP Code with GET | POST | SESSIONS or other things

2002-11-09 Thread @ Edwin
And, you can add to this

> Never trust data from the client...always filter it(I use an lib to do
that)!
> Make sure register_globals is off or code accordingly.

Make sure that you're using SSL (https).

Also, (maybe not directly related though...) if possible, separate your web
server from your database server. And also, you might want to create
different database users for different purposes (i.e. one user can ONLY
select, another ONLY for updating, etc.). You can even forget about a user
that can delete data--you can always do it yourself offline or at least not
via the web server.

HTH,

- E

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




Re: [PHP] Help with form

2002-11-09 Thread Paul Roberts
why don't you submit it to a php script (instead of using the mailto ) and get mail() 
to email it to you, you could also process it and save the info somewhere.


Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: "Karl James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 12:44 AM
Subject: [PHP] Help with form


http://www.ultimatefootballleague.com/Create_Account.htm
 
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
 
SO what im trying to do on this form  is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
 
Any help with this would be greatly appreciated.
 
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong 
As im starting from the beginning and trying to learn forms and php
together
 
Thanks for your understanding.
 
Sincerely
Karl James "The_Saint" irc tag



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




[PHP] HTTP POST FILE UPLOAD HELP - REVISITED

2002-11-09 Thread @ Darwin
Sorry about that guys, here is a bit more info that might be useful:

I forgot to tell you that I'm working on a Windows XP box with full rights,
which means the default temporary directory is C:\WINDOWS\Temp and there are
no limitations on what I can and cannot access on the system (running as
system administrator). I did change that default to C:\PHP\tmp_uploads. I
ran this script with the default temp directory as well, same result.

I tried the code at http://www.php.net/manual/sk/features.file-upload.php
and listed the results of the test below. I simplified the code a little,
and here it is:

--[clip
start]
 Filename: " . $_FILES['userfile']['name']
   . " Mime-Type: " . $_FILES['userfile']['type']
   . " File Size: " . $_FILES['userfile']['size'] . " bytes"
   . " Temporary File Name: " . $_FILES['userfile']['tmp_name']
   . " Error: " . $_FILES['userfile']['error'];
} else {

?>



Send this file: 




--[clip
end]


Here is what's happening:

2. When the submit button is pushed, the files are uploaded through the form
but the temporary file is never created on the system. I did a search on the
entire C: drive for the temporary file that should have been created, but
it's not there.


Here is the data received after the file is supposedly uploaded with a GIF
image:
The temporary file exists
Filename: icon_processing.gif
Mime-Type: image/gif
File Size: 408 bytes
Temporary File Name: C:/PHP/tmp_uploads\php93.tmp
Error: 0


Here is the data received after the file is supposedly uploaded with a JPG
image:
The temporary file exists
Filename: Sunset.jpg
Mime-Type: image/pjpeg
File Size: 71189 bytes
Temporary File Name: C:/PHP/tmp_uploads\php95.tmp
Error: 0



NOTE: The error code 0 means that there was no error uploading the file.

THE QUESTION: Shouldn't PHP automatically create a temporary file of the
uploaded image? Is there something I'm missing in the php.ini settings?

If you have any other questions that might help you further your probe into
this problem, please let me know. Thanks...

- Darwin


--[old
message]

> Ok, I have a problem with my file upload. When I upload a file, say $img,
> only $img is available and when I echo $img to the screen it gives the
full
> path of the temporary image "supposedly" created by PHP. Echoing
> $_FILE['img']['tmp_name'], or any of the other $_FILE array elements,
> doesn't give anything. There is no array of information for the uploaded
> file, possibly because of the following problem I'm having:
>
> Another weird thing is that no temporary file is even created on the
server
> (I did a system search on the C: drive of the windows box I'm using). Here
> is the info from my php.ini file:
>
> --
--
> ---
>
> 
> ; File Uploads ;
> 
>
> ; Whether to allow HTTP file uploads.
> file_uploads = On
>
> ; Temporary directory for HTTP uploaded files (will use system default if
> not
> ; specified).
> upload_tmp_dir = C:\PHP\tmp_uploads
>
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 6M
>
> --
--
> 
>
> I even changed the upload_tmp_dir setting to the default and it still
didn't
> create a temporary file of the image on the server. GD is definately
> installed and enabled according to phpinfo() -- although GD has nothing to
> do with this. I'm uploading *.jpg/*.jpeg files only. register_globals is
on
> (I am aware of the risks). So what could be wrong? Is there another
setting
> in the php.ini file that I need to worry about that is not set by default?
> I've pondered and tested this long enough and I'm beyond frustration,
> someone please help me with some suggestions to get me through this...
>
> Thanks,
> - Darwin


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




Re: [PHP] Help with form

2002-11-09 Thread @ Edwin
Hello,

"Karl James" <[EMAIL PROTECTED]> wrote:

> http://www.ultimatefootballleague.com/Create_Account.htm
>
> Im Trying to create this form so that this will give you access to login
> Team action page
> Where you can do the add/drops Trades and submit starters..

I suggest you try something simpler.

> SO what im trying to do on this form  is have the results mailed to me
> in my in box and be able to view
> All the user imported on the form in my email body that I rec, but when
> I test this code out.
> It only provides a postdata.att
> With nonthing in the email body.

Why don't you try something like this first. Create a form that

1. When a visitor clicks on "Submit", the entered data would be echoed to
the browser.

Simply googling for "forms php", I found an interesting tutorial:

  http://www.phpfreaks.com/phpmanual/page/tutorial.forms.html

Try it first or the others in the results page. (I didn't really read it but
it looks good.) Then,

2. After that you might want to learn how to validate the data entered--you
don't want any bad/malicious data being sent to you or to your server, no?

  (Again, you can google for this or even search the archives how to do it.)

3. THEN, perhaps you can learn how to send mail using forms. You might want
to do some reading first in the manual:

  http://www.php.net/manual/en/ref.mail.php

> Any help with this would be greatly appreciated.

HTH,

- E

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




Re: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED

2002-11-09 Thread Jason Wong
On Saturday 09 November 2002 18:39, [EMAIL PROTECTED] wrote:
> Sorry about that guys, here is a bit more info that might be useful:
>
> I forgot to tell you that I'm working on a Windows XP box with full rights,
> which means the default temporary directory is C:\WINDOWS\Temp and there
> are no limitations on what I can and cannot access on the system (running
> as system administrator). I did change that default to C:\PHP\tmp_uploads.
> I ran this script with the default temp directory as well, same result.

Assuming that you webserver really does have access to write to those 
directories then ...

[snip 'simplified' code]

> Here is what's happening:
>
> 2. When the submit button is pushed, the files are uploaded through the
> form but the temporary file is never created on the system. I did a search
> on the entire C: drive for the temporary file that should have been
> created, but it's not there.

... you didn't read the manual like I suggested. Because otherwise you'll know 
that "the file will be deleted from the temporary directory at the end of the 
request if it has not been moved away or renamed."

If you didn't 'simplify' the example and removed the all important copy() or 
move_uploaded_file() then you would have had something that worked!

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Mount St. Helens should have used earth control.
*/


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




[PHP] Re: MySQL and PHP math problem...

2002-11-09 Thread @ Edwin
Hello,
(B
(B"Peter" <[EMAIL PROTECTED]> wrote in message
(B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
(B
(B...[snip]...
(B
(B> the result of echo, $tmp is displayed as '0.0002'.  What's wrong here?
(BThe
(B> problem only occurs when the value is greater than a 1,000?  Could the ','
(B> messed the computation up somehow?
(B
(BI think so because
(B
(B  1/5000 = 0.0002
(B
(B(Only the number *before* the ',' is being used.)
(B
(BTry taking away the ',' then by using str_replace() and calculate again.
(B
(B- E
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



[PHP] How can I start up a new and recompiled version of source PHP???

2002-11-09 Thread info
Hello PHP-ppl,

please help me with an easy question. 
I want to recompile my sorce-installation from tarball, because I forgot an essential
flag, the --enable-ftp flag:
./configure . --enable-ftp  --other-flags

Orderly I erased the  config.cache file, the make distclean

After  running 
./configure --  
make 
make install

How can I start up this new and recompiled version of PHP???

Oliver Etzel

lowcost domains
lowcost serverhousing www.t-host.de


Re: [PHP] How can I start up a new and recompiled version of source PHP???

2002-11-09 Thread @ Edwin
By restarting your web server?

- E

<[EMAIL PROTECTED]> wrote:


[snip]
> How can I start up this new and recompiled version of PHP???
[/snip]

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




Re: [PHP] Installation Kit

2002-11-09 Thread @ Edwin

"Stephen" <[EMAIL PROTECTED]> wrote:

> I've always had trouble doing that. Is there like a tutorial or anything
on
> how to setup PHP and MySQL?

Simple. Google for "setup PHP and MySQL".

- E

...[snip]...

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




php-general Digest 9 Nov 2002 13:57:57 -0000 Issue 1694

2002-11-09 Thread php-general-digest-help

php-general Digest 9 Nov 2002 13:57:57 - Issue 1694

Topics (messages 123529 through 123575):

Re: RE
123529 by: Charles Wiltgen

mkdir()
123530 by: Edward Peloke
123531 by: Marco Tabini

Need MENTOR for Fantasy football project
123532 by: Karl James
123534 by: Karl James
123542 by: Charles Wiltgen
123543 by: Kevin Myrick
123545 by: Karl James
123551 by: Jason Wong
123552 by: Karl James
123553 by: Jason Wong
123555 by: Karl James
123564 by: . Edwin

Re: Do I need the closing ?> tag
123533 by: David McArthur

php header function...
123535 by: Brad Apps
123537 by: Marco Tabini

Re: Unable to execute c++ .exe file from php
123536 by: Ladan Pickering

Re: For ... <= max($myArray) vs For ... <= $max
123538 by: Daevid Vincent

Re: Unable to execute c++ .exe file from php - Resolved
123539 by: Ladan Pickering

extension can't be found
123540 by: liug

Windows XP Session Issues
123541 by: Jason
123546 by: . Darwin
123547 by: Karl James

Viewing jpegs problem
123544 by: Andre Dubuc

Re: DHTML and PHP
123548 by: Jason Wong

W3C and PHP
123549 by: conbud
123557 by: Khalid El-Kary
123558 by: Rasmus Lerdorf
123560 by: conbud

Securing PHP Code with GET | POST | SESSIONS  or other things
123550 by: Creighton Brown
123556 by: Paul Nicholson
123567 by: . Edwin

calculate bytes in string
123554 by: Ian Newlands
123562 by: Jason Wong
123563 by: . Edwin

MySQL and PHP math problem...
123559 by: Peter
123572 by: . Edwin

upload whole direcotry using ftp functions
123561 by: electroteque

Help with form
123565 by: Karl James
123568 by: Paul Roberts
123570 by: . Edwin

Re: Form posted from Microsoft Internet Explorer.
123566 by: Karl James

HTTP POST FILE UPLOAD HELP - REVISITED
123569 by: . Darwin
123571 by: Jason Wong

How can I start up a new and recompiled version of source PHP???
123573 by: info.t-host.de
123574 by: . Edwin

Re: Installation Kit
123575 by: . Edwin

Administrivia:

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

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

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


--

--- Begin Message ---
Karl James wrote...

> Is there anyone online that can help me with a project
> For a fantasy football league
> Im trying to create a page where users login
> And then can either trade there players or claim
> Free agents of the free agent list and add them to there team
> And I want to have it happen in a real time scenario

There are several helpful people on the list, but you have to ask specific
questions.  If you want someone to do it for you, then you should give folks
an idea what what you're willing to pay per hour or for the entire project.

-- Charles Wiltgen


--- End Message ---
--- Begin Message ---
I have been using the mkdir function sucessfully on my windows test machine, but when 
I uploaded my pages to my hosting server (which is linux) I get a permission error 
when the mkdir function is called.  I know I can create directories because I can do 
it fine when I am using ws-ftp uploading pages...any ideas?  Here is the mkdir call..

mkdir("$uname",0777);

Thanks,
Eddie

--- End Message ---
--- Begin Message ---
The problem is that your webserver is not running as "you"...it's
running under a common user (probably nobody or apache) and that user
does not--and cannot--have access to your folder for security reasons.

You can try creating the directory through ftp via PHP.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

On Fri, 2002-11-08 at 21:11, Edward Peloke wrote:
> I have been using the mkdir function sucessfully on my windows test machine, but 
>when I uploaded my pages to my hosting server (which is linux) I get a permission 
>error when the mkdir function is called.  I know I can create directories because I 
>can do it fine when I am using ws-ftp uploading pages...any ideas?  Here is the mkdir 
>call..
> 
> mkdir("$uname",0777);
> 
> Thanks,
> Eddie



--- End Message ---
--- Begin Message ---
Ok here is what I need help with
 
I need help with how to set up the layout of this project
 
1st I know I need a create account page for owners to create 
there username and password.
 
Then once they successfully filled in the form they are logged in
And taken to the Team choice page..
 
Then once you click that you are taken two your team page.
Their you can view all team stats, Roster, and Schedules
For NFL and Fantasy Team Schedule 
 
Then you would have links on your team page
That wo

Re: [PHP] W3C and PHP

2002-11-09 Thread Ernest E Vogelsinger
At 07:12 09.11.2002, conbud said:
[snip]
>Hi,
>In some of my URLs I have to pass variables through the URL like
>nav.php?page=about§ion=linux - when i do this and then scan my site for
>W3C validation I get this
>Line 40, column 28:
>  ... O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




php-general@lists.php.net

2002-11-09 Thread Rich
PHP$B=i?4http://www.mydomain.com$B$G%;%C%7%g%s$r3+;O$7!"$=$N8e!"(B
(Bhttps://www.mydomain.com/regist.htm$B$X0\F0$7$?$H$-$K!"%;%C%7%g%s$O7QB3$5(B
$B$l$k$N$G$7$g$&$+!)(B
(B
$BJL%5!<%P!<$X0\F0$9$k$H%;%C%7%g%s$O=*N;$9$k$HJ9$-$^$7$?!#%I%a%$%sItJ,$,F1(B
$B$8$G$b(Bhttps://$B$K$J$k$3$H$G!"JL%I%a%$%s$H$7$FG'<1$5$l$k$N$G$O$J$$$+$H?4G[(B
$B$7$F$$$^$9!#$^$@(BSSL Cert$B$rGc$C$F$$$J$$$N$G!"%F%9%H$G$-$J$$$N$G$9!#(B
(B
$B$h$m$7$/$*4j$$CW$7$^$9!#(B
(B
$B:d!!N<2p(B
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] re: W3C and PHP

2002-11-09 Thread Ernest E Vogelsinger
At 07:45 09.11.2002, Khalid El-Kary said:
[snip]
>hi,
>just use & instead
>
[snip] 

Sorry, no. This would result in a quite funny variable:
$_GET = Array(
name=> khalid
amp;age => d
)


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] re: W3C and PHP

2002-11-09 Thread @ Edwin
Not really. Try it ;)

Khalid is correct.

- E

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote:
> At 07:45 09.11.2002, Khalid El-Kary said:
> [snip]
> >hi,
> >just use & instead
> >
> [snip] 
> 
> Sorry, no. This would result in a quite funny variable:
> $_GET = Array(
> name=> khalid
> amp;age => d
> )
> 
> 
> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 
> 
> 
> -- 
> 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] How can I start up a new and recompiled version of source PHP???

2002-11-09 Thread info
Hello Edwin,
Thank you for answering my question :

>- [snip]
> How can I start up this new and recompiled version of PHP???
>[/snip]

That´s all ?? Even for a -"NOT-DSO" but CGI-Installation.???
How can I check that all things were compiled?

Hope for help.

Oliver Etzel


lowcost domains
lowcost serverhousing www.t-host.com


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




Re: [PHP] W3C and PHP

2002-11-09 Thread @ Edwin
Hello,

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote:
[snip]

> If this is really what the W3C validator tells you you should file a bug
> report, IMHO. Passing GET variables should be valid HTML ;-)

[/snip]

True. And & IS a valid html. In fact, changing & to & is the only
way I could pass the xhtml validator. So, it's not really a bug when the
validator complains about the & sign...

- E

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




[PHP] Setup-dependent quotes problem

2002-11-09 Thread Daniele Baroncelli
Hi there,

I have just reinstalled a new PHP version, the 4.2.3.
Before I had the 4.0.6.


I now get the quotes problem in my scripts that connect to the database.
Also the phpMyAdmin gives me errors when I use the ' inside a field in a GUI
select.
Before everything was working fine.

Which parameters could be set to make the scripts work as before?


Cheers

Daniele



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




[PHP] upload whole direcotry using ftp functions

2002-11-09 Thread AKHIL KODALI
Hi,

I there anyway to upload entire directory.

-- 
AKHIL K
200101009
Room No. 15
BH-2
IIIT
--

Look at me. My life has no meaning or direction, and I'm happy



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




[PHP] starting recompiled php as a cgi-interpreter

2002-11-09 Thread info
Hi PHP-List,

Oh sorry, more concrete for an easy question:

How can I start up this new and recompiled version of PHP which was
recompiled
-not as a DSO-
 but runs PHP as a CGI-Interpreter???

How can I start this fresh and recompiled PHP as a CGI-Interpreter??

How to start and fire up?
Please help.

Oliver Etzel
lowcost domains
lowcost serverhousing www.t-host.com


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




php-general@lists.php.net

2002-11-09 Thread BAROILLER Pierre-Emmanuel
Hi !
Could you write it in english please ?



"Rich" <[EMAIL PROTECTED]> a ecrit dans le message de news:
[EMAIL PROTECTED]
> PHP$B=i?4 $B$*CN7C$rGR
> $BNc$($P!"(Bhttp://www.mydomain.com$B$G%;%C%7%g%s$r3+;O$7!"$=$N8e!"(B
> https://www.mydomain.com/regist.htm$B$X0\F0$7$?$H$-$K!"%;%C%7%g%s$O7QB3$5(B
> $B$l$k$N$G$7$g$&$+!)(B
>
> $BJL%5!<%P!<$X0\F0$9$k$H%;%C%7%g%s$O=*N;$9$k$HJ9$-$^$7$?!#%I%a%$%sItJ,$,F1(B
> $B$8$G$b(Bhttps://$B$K$J$k$3$H$G!"JL%I%a%$%s$H$7$FG'<1$5$l$k$N$G$O$J$$$+$H?4G[(B
> $B$7$F$$$^$9!#$^$@(BSSL Cert$B$rGc$C$F$$$J$$$N$G!"%F%9%H$G$-$J$$$N$G$9!#(B
>
> $B$h$m$7$/$*4j$$CW$7$^$9!#(B
>
> $B:d!!N<2p(B
>



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




Re: [PHP] Setup-dependent quotes problem

2002-11-09 Thread Marco Tabini
Ciao Daniele,

Check this out:

http://ca.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc

Also, programmatically:

http://ca.php.net/manual/en/function.set-magic-quotes-runtime.php

Hope it helps.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com


On Sat, 2002-11-09 at 09:19, Daniele Baroncelli wrote:
> Hi there,
> 
> I have just reinstalled a new PHP version, the 4.2.3.
> Before I had the 4.0.6.
> 
> 
> I now get the quotes problem in my scripts that connect to the database.
> Also the phpMyAdmin gives me errors when I use the ' inside a field in a GUI
> select.
> Before everything was working fine.
> 
> Which parameters could be set to make the scripts work as before?
> 
> 
> Cheers
> 
> Daniele
> 
> 
> 
> -- 
> 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] How can I start up a new and recompiled version of source PHP???

2002-11-09 Thread @ Edwin
Well, *I think* if you've overwritten the previous files, then you'll be
able to use the new versions.

Try phpinfo() or php -v (or something) and perhaps you'll see if indeed the
new version is running.

- E

<[EMAIL PROTECTED]> wrote:

> Hello Edwin,
> Thank you for answering my question :
>
> >- [snip]
> > How can I start up this new and recompiled version of PHP???
> >[/snip]
>
> That´s all ?? Even for a -"NOT-DSO" but CGI-Installation.???
> How can I check that all things were compiled?
>
> Hope for help.
>
> Oliver Etzel
>
>
> lowcost domains
> lowcost serverhousing www.t-host.com
>
>
> --
> 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] Need MENTOR for Fantasy football project

2002-11-09 Thread Michael Geier
As this is the industry I am in, maybe I can offer a few hints/suggestions to 
start you on your way:

start with the database
  - is your user table built (how much information about the user do you need) ?
  - are you validating the incoming email address (sending an email to confirm
entry) ?
  - are you using a seperate table for storing their selection information ?
- yes, are you storing transactions (logging changes) ?
- no, what happens if they want more than one team ?
  - do you have your rules for your game planned out (deadlines, team size, 
salary cap) ?
  - do you have a support methodology prepared ?

I can answer some generalized questions about methodology of the game (so as 
not to violate my employment agreement), and some general programming issues 
that you may have.

ps. Just to give you an idea, we maintain a staff of programmers, support 
commisioners and system administrators (about 35 people), not to mention 
accounting, advertising and graphic development, to run about 40-50 games a 
year, including games for USA Today, Excite/iWon and Tops.  This development 
has been over 10 years going.  What I am trying to get at is, are you trying to 
make a friendly 'office league' type interface for your friends, or are you 
trying to make something alot bigger?  Be prepared for everything you could 
potentially need for a large operation (did I mention legal department?).

===
Michael Geier
CDM Sports, Inc. Systems Administration
   email: [EMAIL PROTECTED]
   phone: 314.991.1511 x 6505

Quoting Karl James <[EMAIL PROTECTED]>:

> Jason, I am trying small with forms, reading php
> But I have so many questions that books cant answer sometimes
> Thus the reason I need a guide...
> Would you be able to help me with that?
> 
> -Original Message-
> From: Jason Wong [mailto:php-general@;gremlins.com.hk] 
> Sent: Friday, November 08, 2002 10:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Need MENTOR for Fantasy football project
> 
> On Saturday 09 November 2002 04:33, Karl James wrote:
> > I have the php bible 4 book but it
> > Doesn't tell you how to do things all the way
> > And still leaves with lots of questions.
> 
> Questions such as? If you have fairly specific questions then they are
> usually 
> answered quite quickly on this list. 
> 
> Open-ended requests such as yours, as you've found out for yourself, are
> 
> usually ignored.
> 
> Honestly it looks as if you're trying to do something beyond your
> current 
> capabilities and you don't even know where to begin. 
> 
> If this is a commercial project just save yourself some grief and pay
> someone 
> to do it for you.
> 
> Otherwise start small. Try the many tutorials that are available on the
> web, 
> learn about how to connect/retrieve/display information from a database,
> how 
> to perform user authentication etc. Once you've broadened your knowledge
> you 
> may be able to see where the pieces fit together and then you can start
> your 
> project.
> 
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> 
> /*
> Innovation is hard to schedule.
>   -- Dan Fylstra
> */
> 
> 
> -- 
> 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
> 



---
 This email sent using CDM Sports Webmail v3.1
  [ http://webmail.cdmsports.com ]

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




Re: [PHP] Setup-dependent quotes problem

2002-11-09 Thread @ Edwin
> > Also the phpMyAdmin gives me errors when I use the ' inside a field in a
(BGUI
(B> > select.
(B
(BAnd since you're using 4.2.3, make sure that you've read this as well (if
(Byou haven't yet):
(B
(B  http://bugs.php.net/bug.php?id=19404
(B
(B- E
(B
(B...still using 4.2.2...
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RegExp for Forum-List-Code

2002-11-09 Thread Jens Lehmann
Hi out there,

I encountered a lot of problems while trying to convert a list
in Forum-Code (like UBB-Code).

[list]
[*] item 1
[*] item 2
[*] item 3
[/list]

should be converted to


item 1
item 2
item 3


I converted the first one to


[*] item 1
[*] item 2
[*] item 3


Now I need a Regexp for converting every [*] foo to foo.

I started with

$text = preq_replace('/\[\*\]([^(\[\*\])]*)/i','$1',$text);

The RegExp starts from [*] and saves every char in $1 until [*]
occurs again. That's fine, but what I need is a RegExp which starts
from [*] and saves every char in $1 until [*] OR  occurs in
$text. I tested a lot, but didn't find a solution. I'd be glad about
any help.

Jens







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




Re: [PHP] W3C and PHP

2002-11-09 Thread Jens Lehmann
>>  ...  If this is really what the W3C validator tells you you should file a bug
> report, IMHO. Passing GET variables should be valid HTML ;-)

Usually entities start with "&" and end with ";". The "entity" §ion
doesn't end with ";" and is not defined, that's why it's not valid.

Jens

PS: Be aware of not writing something like
header("Location: script.php?foo1=a&foo2=b");
or use $amp; in mails, which are send thorugh the PHP-
mail-function.



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




[PHP] preg_split problem

2002-11-09 Thread samug
Could someone tell me why isn't this working?

$text = "And what did I tell you?";
list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
print($rest);

The result would be "I" and not "I tell you?"
Why?



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




Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Marek Kilimajer
untested:

preq_replace('/\[\*\]([^(\[\*\])(<\/ul>)]*)/i','$1',$text);



Jens Lehmann wrote:


Hi out there,

I encountered a lot of problems while trying to convert a list
in Forum-Code (like UBB-Code).

[list]
[*] item 1
[*] item 2
[*] item 3
[/list]

should be converted to


item 1
item 2
item 3


I converted the first one to


[*] item 1
[*] item 2
[*] item 3


Now I need a Regexp for converting every [*] foo to foo.

I started with

$text = preq_replace('/\[\*\]([^(\[\*\])]*)/i','$1',$text);

The RegExp starts from [*] and saves every char in $1 until [*]
occurs again. That's fine, but what I need is a RegExp which starts
from [*] and saves every char in $1 until [*] OR  occurs in
$text. I tested a lot, but didn't find a solution. I'd be glad about
any help.

Jens







 



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




[PHP] Automatic Colspan from database data

2002-11-09 Thread Dhaval Desai




Hi everybody!


Well this is how it goes...

For the month of January there are 31 days...
so there are 2 rows in this table on the top row there are 31 columns 
showing 31 days...and in the row below this one we will have to 
generatecolspan based on the below information pulled from the 
database...

211


in the above case we will have to get a colspan as follows:

 2 
 1 
 9 
colspan="4"> 2 



This is all I want to doI know it is difficult...but still waiting for 
some genius!


Thank You!
Dhaval


_
Add photos to your messages with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail


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



[PHP] Re: MySQL and PHP math problem...

2002-11-09 Thread Peter
Thanks...the thing that I did wrong was I retrieved the number with
FORMAT(SUM(amount), 2), which formats the number and return it in the string
format...so that's what happened during the computation (it only took the
number prior to the ','.  I miss the type-checking in C. :-)

Thanks,
-Peter
"@ Edwin" <[EMAIL PROTECTED]> wrote in message
news:20021109134728.65621.qmail@;pb1.pair.com...
> Hello,
>
> "Peter" <[EMAIL PROTECTED]> wrote in message
> news:20021109065959.35268.qmail@;pb1.pair.com...
>
> ...[snip]...
>
> > the result of echo, $tmp is displayed as '0.0002'.  What's wrong here?
> The
> > problem only occurs when the value is greater than a 1,000?  Could the
','
> > messed the computation up somehow?
>
> I think so because
>
>   1/5000 = 0.0002
>
> (Only the number *before* the ',' is being used.)
>
> Try taking away the ',' then by using str_replace() and calculate again.
>
> - E
>



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




Re: [PHP] preg_split problem

2002-11-09 Thread Marek Kilimajer
list throws away the other two array elements, you need
list($one,$two,$three,$rest) = preg_split("/\s+/", $text, 4);



samug wrote:


Could someone tell me why isn't this working?

$text = "And what did I tell you?";
list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
print($rest);

The result would be "I" and not "I tell you?"
Why?



 



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




Re: [PHP] preg_split problem

2002-11-09 Thread Jason Wong
On Sunday 10 November 2002 00:58, samug wrote:
> Could someone tell me why isn't this working?
>
> $text = "And what did I tell you?";
> list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
> print($rest);
>
> The result would be "I" and not "I tell you?"
> Why?

Because that is what you asked for!

$doo = preg_split("/\s+/", $text);
print_r($doo); // each word is a separate element in $doo.

In your list() you're only taking up to the 4th element which is "I".

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Something unpleasant is coming when men are anxious to tell the truth.
-- Benjamin Disraeli
*/


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




[PHP] Re: Request entity too large (already seen the FAQ)

2002-11-09 Thread Brian Fahrlander
On Thu, 7 Nov 2002 11:31:52 -0600, [EMAIL PROTECTED] (Brian Fahrlander) wrote:

OK, thanks for no help whatsoever.  But I'm not bitter; I'm here to report what I 
found so that the next guy with this problem isn't stuck:

The PHP docs say to change variables in /etc/php.ini (like the whole world knows 
about) but the key is to *also* look into php.CONF, too.  That's where the problem 
was.  

And though I don't understand why the second file was there, or why no one piped 
up about it, this is the obscure answer to an obscure problem.
  

Brian Fahrländer  GNU/Linux Zealot, Conservative, and Technomad
Evansville, INMy Voyage: http://www.CounterMoon.com
ICQ  5119262

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCM d- s:+ a C++ UL+++ P+ L+++ E--- W++ N+ o- K+ w---
O- M- V PS- PE+ Y PGP++ t+ 5 X R- tv++ b- DI++ D+
G++ e h r y
--END GEEK CODE BLOCK--

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




[PHP] Re: preg_split problem

2002-11-09 Thread samug
Thanks.
But what if you don't know how many elements there will be ahead?

"Samug" <[EMAIL PROTECTED]> kirjoitti viestissä
news:20021109165530.58233.qmail@;pb1.pair.com...
> Could someone tell me why isn't this working?
>
> $text = "And what did I tell you?";
> list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
> print($rest);
>
> The result would be "I" and not "I tell you?"
> Why?
>
>



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




Re: [PHP] W3C and PHP

2002-11-09 Thread Ernest E Vogelsinger
At 15:22 09.11.2002, @ Edwin said:
[snip]
>True. And & IS a valid html. In fact, changing & to & is the only
>way I could pass the xhtml validator. So, it's not really a bug when the
>validator complains about the & sign...
[snip] 

Right you are (and shame on me).
I just now doublechecked the RFC's - the '&' character is reserved within
HTML, it always starts a character entity, either a named or a numbered one.

So: YOU are right, the W3C Validator was right, and I was simply WRONG -
apologies for any misinformation.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Re: preg_split problem

2002-11-09 Thread Marek Kilimajer
if you use
list($one,$two,$three,$rest) = preg_split("/\s+/", $text, *4*);
you get the remaining elements in $rest as a single string

samug wrote:


Thanks.
But what if you don't know how many elements there will be ahead?

"Samug" <[EMAIL PROTECTED]> kirjoitti viestissä
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 

Could someone tell me why isn't this working?

$text = "And what did I tell you?";
list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
print($rest);

The result would be "I" and not "I tell you?"
Why?


   




 



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




Re: [PHP] preg_split problem

2002-11-09 Thread Ernest E Vogelsinger
At 17:58 09.11.2002, samug said:
[snip]
>$text = "And what did I tell you?";
>list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
>print($rest);
>
>The result would be "I" and not "I tell you?"
[snip] 

Your regex splits the entire string, and since you have only a list of four
elements, the fourth element happens to be the "I".

If you want the rest in $rest, you need a thried parameter to preg_split
telling it how many elements the resulting array should have:

$text = "And what did I tell you?"; 
list($one,$two,$three,$rest) = preg_split("/\s+/", $text, 4); 
print($rest);

will correctly output "I tell you?"


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




RE: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED

2002-11-09 Thread @ Darwin

You're absolutely correct. The script works perfectly fine now, and I have
you to thank. I went back to "Handling file uploads" and re-read the entire
thing. I guess I missed the part that said the following before the actual
script example. My fault and my apologies. Thanks Jason, and thanks to all
the others who replied as well.

"...Whatever the logic, you should either delete the file from the temporary
directory or move it elsewhere."
"The file will be deleted from the temporary directory at the end of the
request if it has not been moved away or renamed."






> -Original Message-
> From: Jason Wong [mailto:php-general@;gremlins.com.hk]
> Sent: Saturday, November 09, 2002 5:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] HTTP POST FILE UPLOAD HELP - REVISITED
>
>
> On Saturday 09 November 2002 18:39, [EMAIL PROTECTED] wrote:
> > Sorry about that guys, here is a bit more info that might be useful:
> >
> > I forgot to tell you that I'm working on a Windows XP box with
> full rights,
> > which means the default temporary directory is C:\WINDOWS\Temp and there
> > are no limitations on what I can and cannot access on the
> system (running
> > as system administrator). I did change that default to
> C:\PHP\tmp_uploads.
> > I ran this script with the default temp directory as well, same result.
>
> Assuming that you webserver really does have access to write to those
> directories then ...
>
> [snip 'simplified' code]
>
> > Here is what's happening:
> >
> > 2. When the submit button is pushed, the files are uploaded through the
> > form but the temporary file is never created on the system. I
> did a search
> > on the entire C: drive for the temporary file that should have been
> > created, but it's not there.
>
> ... you didn't read the manual like I suggested. Because
> otherwise you'll know
> that "the file will be deleted from the temporary directory at
> the end of the
> request if it has not been moved away or renamed."
>
> If you didn't 'simplify' the example and removed the all
> important copy() or
> move_uploaded_file() then you would have had something that worked!
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Mount St. Helens should have used earth control.
> */
>
>
> --
> 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: preg_split problem

2002-11-09 Thread Ernest E Vogelsinger
At 18:59 09.11.2002, samug said:
[snip]
>Thanks.
>But what if you don't know how many elements there will be ahead?
>
>"Samug" <[EMAIL PROTECTED]> kirjoitti viestissä
>news:20021109165530.58233.qmail@;pb1.pair.com...
>> Could someone tell me why isn't this working?
>>
>> $text = "And what did I tell you?";
>> list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
>> print($rest);
[snip] 

You don't need the number of elements _ahead_, just the number of elements
you want to receive - the "rest" will be in the last element.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




[PHP] HTML forms & php 4.2.3 - how to get cvs fix applied

2002-11-09 Thread andy

I recently updated from 4.2.0 to 4.2.3 - since doing so values submitted 
to php from HTML forms using keys  - value="foo[bar]" - get truncated in 
php - example: if I submit "[EMAIL PROTECTED]" it will come out as 
"eight13.com" with a print_r($_POST)

I found these bug reports which say what appears to be the same bug has 
been "fixed in CVS":

http://bugs.php.net/bug.php?id=20024
http://bugs.php.net/bug.php?id=19829

I'm wondering where to go from this point. I have a production server 
which I need this fixed on.

Is my only choice to checkout the entire branch for the latest version 
4.2.x? (I'm assuming its branched - I've not looked at any of this yet)

Is there not a patch? Could I just checkout the applicable files?

http://snaps.php.net/ wasn't avilable at the time of writing this - 
possibly it would have given me more information.


Apache 1.3.20
php from source as module
Mandrake 8


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



Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
How is your database organized? you might be able to pull this
information from the query by using an appropriate group-by clause.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Sat, 2002-11-09 at 11:57, Dhaval Desai wrote:
> 
> 
> 
> 
> Hi everybody!
> 
> 
> Well this is how it goes...
> 
> For the month of January there are 31 days...
> so there are 2 rows in this table on the top row there are 31 columns 
> showing 31 days...and in the row below this one we will have to 
> generatecolspan based on the below information pulled from the 
> database...
> 
> 211
> 
> 
> in the above case we will have to get a colspan as follows:
> 
>   2 
>   1 
>   9 
>  colspan="4"> 2 
> 
> 
> 
> This is all I want to doI know it is difficult...but still waiting for 
> some genius!
> 
> 
> Thank You!
> Dhaval
> 
> 
> _
> Add photos to your messages with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> -- 
> 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] RegExp for Forum-List-Code

2002-11-09 Thread Jens Lehmann
That's what I thought, too. But it doesn't work.

test.php:

$text = ' [*] jusfj [*] ijusnf [*] jsf [*] jusdf ';
$text = preg_replace('/\[\*\]([^(\[\*\])(<\/ul>)]*)/i','$1',$text);
$text = htmlentities($text);

Output:

  jusfj  ijusnf  jsf  jusdf 

I tested some different things, which didn't work. Any more ideas
are appreciated.

Jens

> untested:
>
> preq_replace('/\[\*\]([^(\[\*\])(<\/ul>)]*)/i','$1',$text);
>
>
>
> Jens Lehmann wrote:
>
> >Hi out there,
> >
> >I encountered a lot of problems while trying to convert a list
> >in Forum-Code (like UBB-Code).
> >
> >[list]
> >[*] item 1
> >[*] item 2
> >[*] item 3
> >[/list]
> >
> >should be converted to
> >
> >
> >item 1
> >item 2
> >item 3
> >
> >
> >I converted the first one to
> >
> >
> >[*] item 1
> >[*] item 2
> >[*] item 3
> >
> >
> >Now I need a Regexp for converting every [*] foo to foo.
> >
> >I started with
> >
> >$text = preq_replace('/\[\*\]([^(\[\*\])]*)/i','$1',$text);
> >
> >The RegExp starts from [*] and saves every char in $1 until [*]
> >occurs again. That's fine, but what I need is a RegExp which starts
> >from [*] and saves every char in $1 until [*] OR  occurs in
> >$text. I tested a lot, but didn't find a solution. I'd be glad about
> >any help.
> >
> >Jens
> >



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




Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Dhaval Desai
Hi!

Well I have 12 table for 2 years which makes it 24 tables named as:
jan_2002, feb_2002 ...etc dec_2002
jan_2003, feb_2003 ...etc dec_2003

Each table has fields according to the number of days in the month plus 1 
field as a unique key.

Each registration will create 1 entry in 24 tables each and it can only be 
modified as 1 entry per registrant per table.
the fields in each table will take values ranging rom 1-20.

Well that's all about how my tables are in the database.


Thank You for your time

Dhaval Desai









From: Marco Tabini <[EMAIL PROTECTED]>
To: Dhaval Desai <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Automatic Colspan from database data
Date: 09 Nov 2002 13:34:20 -0500

How is your database organized? you might be able to pull this
information from the query by using an appropriate group-by clause.


Marco
--

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Sat, 2002-11-09 at 11:57, Dhaval Desai wrote:
>
>
>
>
> Hi everybody!
>
>
> Well this is how it goes...
>
> For the month of January there are 31 days...
> so there are 2 rows in this table on the top row there are 31 columns
> showing 31 days...and in the row below this one we will have to
> generatecolspan based on the below information pulled from the
> database...
>
> 211
>
>
> in the above case we will have to get a colspan as follows:
> 
>   2 
>   1 
>   9 
>  colspan="4"> 2 
> 
>
>
> This is all I want to doI know it is difficult...but still waiting 
for
> some genius!
>
>
> Thank You!
> Dhaval
>
>
> _
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



[PHP] Rotating Ads

2002-11-09 Thread Stephen
I have a link exchange script and I need to rotate the ads each time a page refreshes. 
How exactly can I do this?

I have an id field for each ad. How could I display a different ad each time the page 
refreshes using the id field?

Thanks,
Stephen Craton
http://www.melchior.us

"Life is a gift from God. Wasting it is like destroying a gift you got from the person 
you love most." -- http://www.melchior.us


[PHP] Rotating Ads

2002-11-09 Thread Stephen
I have a link exchange script and I need to rotate the ads each time a page refreshes. 
How exactly can I do this?

I have an id field for each ad. How could I display a different ad each time the page 
refreshes using the id field?

Thanks,
Stephen Craton
http://www.melchior.us

"Life is a gift from God. Wasting it is like destroying a gift you got from the person 
you love most." -- http://www.melchior.us


[PHP] header function

2002-11-09 Thread Donahue Ben
I am using the header function what i have is this:

header("Location:
http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/".$relative_url

$relative_url is a php file

when i run this script with this header function in
it, i get an error saying:"Redirection limit for this
URL has exceeded. Unable to load the requested page."

I dont understand why i get this error and how to fix
this.

Ben

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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




Re: [PHP] header function

2002-11-09 Thread Stephen
The file loading may be too long for PHP to recognize it or whatever. Try
shortening it in some way.


- Original Message -
From: "Donahue Ben" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 2:47 PM
Subject: [PHP] header function


> I am using the header function what i have is this:
>
> header("Location:
>
http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/".$relative_u
rl
>
> $relative_url is a php file
>
> when i run this script with this header function in
> it, i get an error saying:"Redirection limit for this
> URL has exceeded. Unable to load the requested page."
>
> I dont understand why i get this error and how to fix
> this.
>
> Ben
>
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
>
> --
> 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] Rotating Ads

2002-11-09 Thread Andrew Brampton
you can use SQL:
SELECT id, url, image FROM tblAdds ORDER BY RAND() LIMIT 1

I think thats just about it, that should evenly show them, if you want to
bias the displying of your ads you would need to get a count of the ads in
the DB, then use some random number generated from PHP to chose which to
use.

Andrew
- Original Message -
From: "Stephen" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 7:45 PM
Subject: [PHP] Rotating Ads


I have a link exchange script and I need to rotate the ads each time a page
refreshes. How exactly can I do this?

I have an id field for each ad. How could I display a different ad each time
the page refreshes using the id field?

Thanks,
Stephen Craton
http://www.melchior.us

"Life is a gift from God. Wasting it is like destroying a gift you got from
the person you love most." -- http://www.melchior.us


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




Re: [PHP] RegExp for Forum-List-Code

2002-11-09 Thread Ernest E Vogelsinger
At 17:19 09.11.2002, Jens Lehmann said:
[snip]
>Hi out there,
>
>I encountered a lot of problems while trying to convert a list
>in Forum-Code (like UBB-Code).
>
>[list]
>[*] item 1
>[*] item 2
>[*] item 3
>[/list]
>
>should be converted to
>
>
>item 1
>item 2
>item 3
>
[snip] 

Maybe you could use this solution. It supports newlines and special
characters in the item's data as well:

' . join("\n\t", $ar) . "\n\n";
return $result;
}

$ubb = '[list]
   [*] item 1 äöü line 1
item 1 line 2
  [*]   item 2
[*] item 3
[/list]';

echo ubb2ul($ubb);
?>

-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




[PHP] How to know files in a directory

2002-11-09 Thread Mohd_Q
I wonder if there is a way to get the files names in a given directory.




Re: [PHP] header function

2002-11-09 Thread Ernest E Vogelsinger
At 20:47 09.11.2002, Donahue Ben said:
[snip]
>I am using the header function what i have is this:
>
>header("Location:
>http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/".$relative_url
>
>$relative_url is a php file
>
>when i run this script with this header function in
>it, i get an error saying:"Redirection limit for this
>URL has exceeded. Unable to load the requested page."
[snip] 

This message might mean that $relative_url points to the same script...
what browser make&model are you using? IE simply loops, without any error.

A small glitch: in case dirname($_SERVER['PHP_SELF']) is empty (root
directory), your header would look as:
http://www.yourdomain.com//relative.php

Note the double slash... 


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] How to know files in a directory

2002-11-09 Thread Marco Tabini
Try readdir()

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


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com


On Sat, 2002-11-09 at 15:01, Mohd_Q wrote:
> I wonder if there is a way to get the files names in a given directory.
> 



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




[PHP] Errors and Logging Configuration Options: docref-root

2002-11-09 Thread Stefan Schiller
I updated my development-server

--> FreeBSD 4.7-REALEASE, Apache/1.3.27 (Port-Build), PHP 4.2.3
(Port-Build) ...]

After this I found

http://www.php.net/manual/en/ref.errorfunc.php#ini.docref-root

In the manual. I downloaded the manual and changed some config-item

[httpd.conf]
Alias /manual/ "/X//manual/"

[php.ini]
docref_roof = /manual/php4_manual
docref_ext = .html


But I noticed no changes!

- is this a future of php ?.?.? ??

- are some configure options needed for the build?

- is it useful, how does it look like?


[some more options out php.ini]
error_reporting  =  E_ALL
display_errors = On
log_errors = On
html_errors = On
error_log = "/XX/Y/Z/php.err"
docref_roof = /manual/php4_manual
docref_ext = .html

Best regards

Stefan Schiller


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




Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
Ouch...


well, assuming you have two columns: day_id and value, here's a possible
solution:

$rs = mysql_query ('select day_id, value from my_table order by
day_id');
$a = mysql_fetch_assoc ($rs);

do
{
$i = 1;
$control = $a['value'];

while (($a = mysql_fetch_assoc ($rs)) && $a['value'] == $control)
$i++;

echo '' . $control . '';
} while ($a);

This is a bit rough and can probably be optimized quite a bit, plus I
can't test it, so I'm not sure that it will work the first time.
Hopefully, it gives you an idea of how it could be done.

If I could make a suggestion without knowing how your system works, I
think you should revisit your database design a little.

Hope this helps,


Marco

-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Sat, 2002-11-09 at 14:32, Dhaval Desai wrote:
> Hi!
> 
> Well I have 12 table for 2 years which makes it 24 tables named as:
> jan_2002, feb_2002 ...etc dec_2002
> jan_2003, feb_2003 ...etc dec_2003
> 
> Each table has fields according to the number of days in the month plus 1 
> field as a unique key.
> 
> Each registration will create 1 entry in 24 tables each and it can only be 
> modified as 1 entry per registrant per table.
> the fields in each table will take values ranging rom 1-20.
> 
> Well that's all about how my tables are in the database.
> 
> 
> Thank You for your time
> 
> Dhaval Desai
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >From: Marco Tabini <[EMAIL PROTECTED]>
> >To: Dhaval Desai <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [PHP] Automatic Colspan from database data
> >Date: 09 Nov 2002 13:34:20 -0500
> >
> >How is your database organized? you might be able to pull this
> >information from the query by using an appropriate group-by clause.
> >
> >
> >Marco
> >--
> >
> >php|architect - The magazine for PHP Professionals
> >The first monthly worldwide magazine dedicated to PHP programmers
> >Check us out on the web at http://www.phparch.com
> >
> >On Sat, 2002-11-09 at 11:57, Dhaval Desai wrote:
> > >
> > >
> > >
> > >
> > > Hi everybody!
> > >
> > >
> > > Well this is how it goes...
> > >
> > > For the month of January there are 31 days...
> > > so there are 2 rows in this table on the top row there are 31 columns
> > > showing 31 days...and in the row below this one we will have to
> > > generatecolspan based on the below information pulled from the
> > > database...
> > >
> > > 211
> > >
> > >
> > > in the above case we will have to get a colspan as follows:
> > > 
> > >   2 
> > >   1 
> > >   9 
> > >  colspan="4"> 2 
> > > 
> > >
> > >
> > > This is all I want to doI know it is difficult...but still waiting 
> >for
> > > some genius!
> > >
> > >
> > > Thank You!
> > > Dhaval
> > >
> > >
> > > _
> > > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> 
> 
> _
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 
> 
> -- 
> 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] PHP 4.3.0 and Zend Engine 2

2002-11-09 Thread Andi Gutmans
On Tue, 5 Nov 2002 [EMAIL PROTECTED] wrote:
> Can anybody tell me if PHP 4.3.0 will use Zend Engine 2?

Hi,

The Zend Engine 2 is likely to appear officially only in PHP 5.
However, I have released a couple of alphas with the Engine 2 bundled
against the latest CVS of PHP (i.e. almost PHP 4.3.0).
Hopefully within the next few weeks I'll bundle another alpha based on the
latest version of the engine 2 and the latest CVS version.

Andi


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




Re: [PHP] Weird behaviour with references to objects...

2002-11-09 Thread Tim Molendijk

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021108175627.00b44880@;mail.vogelsinger.at...
>
> This is clearly said in your PHP.ini file:
>
> ; Whether to enable the ability to force arguments to be passed by
reference
> ; at function call time.  This method is deprecated and is likely to be
> ; unsupported in future versions of PHP/Zend.  The encouraged method of
> ; specifying which arguments should be passed by reference is in the
function
> ; declaration.  You're encouraged to try and turn this option Off and make
> ; sure your scripts work properly with it in order to ensure they will
work
> ; with future versions of the language (you will receive a warning each
time
> ; you use this feature, and the argument will be passed by value instead
of by
> ; reference).
> allow_call_time_pass_reference = On
>
> ...god has spoken :)

yup that's one hell of an argument :)

>
> I'd rather have the abilty to pass A reference like "foo(&$a)" and have
the
> opportunity to choose at runtime if I want to use a reference here or not,
> but it's how they say...
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>



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




[PHP] php5 features?

2002-11-09 Thread ed
Hi all.  I was wondering if there are resources on the
web that will help me get an 
idea of the changes and new features that will be in
php5.
I'm particularly interested in what's gonna be added
or changed to php in regards to 
its OOP capabilities.

I already love this language.  I'm just looking
forward to seeing in what areas it is going to be made
even better.

tia,
--ed


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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




[PHP] php5 features?

2002-11-09 Thread ed
Hi all.  I was wondering if there are resources on the
web that will help me get an 
idea of the changes and new features that will be in
php5.
I'm particularly interested in what's gonna be added
or changed to php in regards to 
its OOP capabilities.

I already love this language.  I'm just looking
forward to seeing in what areas it is going to be made
even better.

tia,
--ed



__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

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




Re: [PHP] php5 features?

2002-11-09 Thread Maxim Maletsky

Try searching the list archives, particularly of PHP-DEV lists (but
hesitate asking these questions there)


-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Sat, 9 Nov 2002 13:27:05 -0800 (PST) ed <[EMAIL PROTECTED]> wrote:

> Hi all.  I was wondering if there are resources on the
> web that will help me get an 
> idea of the changes and new features that will be in
> php5.
> I'm particularly interested in what's gonna be added
> or changed to php in regards to 
> its OOP capabilities.
> 
> I already love this language.  I'm just looking
> forward to seeing in what areas it is going to be made
> even better.
> 
> tia,
> --ed
> 
> 
> 
> __
> Do you Yahoo!?
> U2 on LAUNCH - Exclusive greatest hits videos
> http://launch.yahoo.com/u2
> 
> -- 
> 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] starting recompiled php as a cgi-interpreter

2002-11-09 Thread Maxim Maletsky

read the manual regarding the installation of php as cgi. There you will
find the clues. I am not very sure what exactly you meant.

-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Sat, 9 Nov 2002 15:34:47 +0100 <[EMAIL PROTECTED]> wrote:

> Hi PHP-List,
> 
> Oh sorry, more concrete for an easy question:
> 
> How can I start up this new and recompiled version of PHP which was
> recompiled
> -not as a DSO-
>  but runs PHP as a CGI-Interpreter???
> 
> How can I start this fresh and recompiled PHP as a CGI-Interpreter??
> 
> How to start and fire up?
> Please help.
> 
> Oliver Etzel
> lowcost domains
> lowcost serverhousing www.t-host.com
> 
> 
> -- 
> 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: Rotating Ads

2002-11-09 Thread BAROILLER Pierre-Emmanuel
The fastest way to do this is very simple :
store the last Id of your banner , get another from your SQL table (with
rand) and display it (repeat if the Id is the same)..
And, in your html page, add a refresh=xx to refresh the ad page.

Regards,
P.E. Baroiller

"Stephen" <[EMAIL PROTECTED]> a écrit dans le message de news:
001901c28827$d69d72a0$[EMAIL PROTECTED]
I have a link exchange script and I need to rotate the ads each time a page
refreshes. How exactly can I do this?

I have an id field for each ad. How could I display a different ad each time
the page refreshes using the id field?

Thanks,
Stephen Craton
http://www.melchior.us

"Life is a gift from God. Wasting it is like destroying a gift you got from
the person you love most." -- http://www.melchior.us



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




[PHP] Re: How to know files in a directory

2002-11-09 Thread BAROILLER Pierre-Emmanuel
use opendir() , and readdir()..
you'll get a var like $file,
then check is_file($file) to see if it's a file :)

(take a look at the php doc.)

"Mohd_q" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
I wonder if there is a way to get the files names in a given directory.




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




[PHP] Handling Errors Gracefully

2002-11-09 Thread Monty
Is there any way to gracefully handle errors that happen after output to the
screen has begun (the point where header(Location:) doesn't work) without
using ob_ functions?

I have a separate PHP page I'd like to display with the error if one happens
using the error_handler() and trigger_error() functions. But, I can't make
it work because if the error happens after output starts, I just get an
error stating header() won't work.

I'm also not sure of the best way to pass all the error data to the error
page. Its too much for a $_GET.

Anyone have any suggestions or links to articles that explain how this can
be done?? Thanks a lot.

Monty 


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




Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Rasmus Lerdorf
Just turn off display_errors in your php.ini file

On Sat, 9 Nov 2002, Monty wrote:

> Is there any way to gracefully handle errors that happen after output to the
> screen has begun (the point where header(Location:) doesn't work) without
> using ob_ functions?
>
> I have a separate PHP page I'd like to display with the error if one happens
> using the error_handler() and trigger_error() functions. But, I can't make
> it work because if the error happens after output starts, I just get an
> error stating header() won't work.
>
> I'm also not sure of the best way to pass all the error data to the error
> page. Its too much for a $_GET.
>
> Anyone have any suggestions or links to articles that explain how this can
> be done?? Thanks a lot.
>
> Monty
>
>
> --
> 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] Handling Errors Gracefully

2002-11-09 Thread Marco Tabini
I think the only way to do it the way you want to do it is through
buffering (with the ob_functions or via the php.ini file). Turning off
error printing is another possibility--that way you can have the errors
logged to a file rather than to the screen.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

 On Sat, 2002-11-09 at 17:42, Monty wrote:
> Is there any way to gracefully handle errors that happen after output to the
> screen has begun (the point where header(Location:) doesn't work) without
> using ob_ functions?
> 
> I have a separate PHP page I'd like to display with the error if one happens
> using the error_handler() and trigger_error() functions. But, I can't make
> it work because if the error happens after output starts, I just get an
> error stating header() won't work.
> 
> I'm also not sure of the best way to pass all the error data to the error
> page. Its too much for a $_GET.
> 
> Anyone have any suggestions or links to articles that explain how this can
> be done?? Thanks a lot.
> 
> Monty 
> 
> 
> -- 
> 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] Handling Errors Gracefully

2002-11-09 Thread Ernest E Vogelsinger
At 23:42 09.11.2002, Monty said:
[snip]
>Is there any way to gracefully handle errors that happen after output to the
>screen has begun (the point where header(Location:) doesn't work) without
>using ob_ functions?
>
>I have a separate PHP page I'd like to display with the error if one happens
>using the error_handler() and trigger_error() functions. But, I can't make
>it work because if the error happens after output starts, I just get an
>error stating header() won't work.
>
>I'm also not sure of the best way to pass all the error data to the error
>page. Its too much for a $_GET.
[snip] 

One way, as you just have ruled out, would be using the ob_ functions.

However you can redirect the browser using JavaScript, with the drawback
that this will only work with compliant clients and JS not disabled.

Passing data to the error page could be done by using session data, or if
you don't want to use sessions, create a temp file and pass the name and
location to the error page.

Sending the javascript:

',
 'document.location.href="', $url, '">',
 '',
 '',
 'A nasty error has occurred. If you are not redirected ',
 'to the correct page, click here to',
 'continue (sorry folks)';
}
// else no error - continue

?>

Hope this helps,

-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Ernest E Vogelsinger
At 23:57 09.11.2002, Ernest E Vogelsinger said:
[snip]
>if ($we_found_an_error) {
>$url = 'http://' . $_SERVER['SERVER_NAME'] .
>   '/my_error_handler.php?any_parameters_you_need';
>echo '',
> 'document.location.href="', $url, '">',
> '',
> '',
> 'A nasty error has occurred. If you are not redirected ',
> 'to the correct page, click here to',
> 'continue (sorry folks)';

// I FORGOT THIS LINE...
exit;

>}
>// else no error - continue
>
>?>
[snip] 

-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Ernest E Vogelsinger
Ok, it's late, and my last post for today, but I need to get this right ;-)

',
'document.location.href="', $url, '">',
'',
'',
'A nasty error has occurred. If you are not redirected ',
'to the correct page, click here to',
'continue (sorry folks)',
  '';
exit;
}
// else no error - continue

?>

-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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




Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Marco Tabini
imho there are many problems with a handler of this type... since an
error could occur anywhere--in the middle of an HTML tag, or within a
block of client-side script code--you don't know for sure that the
Javascript is going to be interpreted properly by the browser...and
therefore it may look messy and/or not work at all.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Sat, 2002-11-09 at 18:05, Ernest E Vogelsinger wrote:
> Ok, it's late, and my last post for today, but I need to get this right ;-)
> 
>  if ($we_found_an_error) {
>$url = 'http://' . $_SERVER['SERVER_NAME'] .
>   '/my_error_handler.php?any_parameters_you_need';
>echo '',
> 'document.location.href="', $url, '">',
> '',
> '',
> 'A nasty error has occurred. If you are not redirected ',
> 'to the correct page, click here to',
> 'continue (sorry folks)',
>   '';
> exit;
> }
> // else no error - continue
> 
> ?>
> 
> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 
> 
> 
> -- 
> 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] How to know files in a directory

2002-11-09 Thread John Nichel
Yeah, spend a milisecond looking at the manual, and you'll find 
"Filesystem Functions"

Mohd_Q wrote:
I wonder if there is a way to get the files names in a given directory.





--
By-Tor.com
It's all about the Rush
http://www.by-tor.com


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




[PHP] Looping through formfields...

2002-11-09 Thread Brad Apps
Hey Guys,

Can anyone please point me to any URLs or give me some code which will loop
through form fields and delete the particular file which is passed from the
form.  The user will click a checkbox next to each file needed deleting and
we must perform a unlink() to each file.

Thanks.



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




Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
Well I tried that, however I was saving dynamically generated .XLS files.
Because I was using addslashes before hand it was reporting the wrong file
size.

So it was my mistake, thanks for your help!

Regards,

Ian Newlands


"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:200211091639.43919.php-general@;gremlins.com.hk...
> On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> > Does anyone know of a function, or a method to calculate how many bytes
are
> > in a string?  Similar to the filesize file system function.
> >
> > Any help would be appreciated.
>
> Assuming 1 character = 1 byte, then strlen().



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




Re: [PHP] calculate bytes in string

2002-11-09 Thread Ian Newlands
This was exactly what I was trying to avoid.  See I was porting a reporting
module to write .XLS files to a database, rather than to files.  It's easier
for me to clean up old reports that way.

Anyway, thanks for your help!

Regards,

Ian Newlands


"@ Edwin" <[EMAIL PROTECTED]> wrote in message
news:OE54PDGNZzahL7szm8x1367@;hotmail.com...
> Or,
>
> "Jason Wong" <[EMAIL PROTECTED]> wrote:
>
> > On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> > > Does anyone know of a function, or a method to calculate how many
bytes
> are
> > > in a string?  Similar to the filesize file system function.
> > >
> > > Any help would be appreciated.
> >
> > Assuming 1 character = 1 byte, then strlen().
> >
>
> Just write the string to a file first then check the filesize. This should
> work (I think)
> even if you're dealing with multi-byte characters wherein 1 character = 2
> bytes
> (or more?).
>
> There's mb_strlen() but I don't think it'll be useful though...
>
> - E



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




[PHP] Errant include file works everywhere but here

2002-11-09 Thread Andre Dubuc
I've run into a problem with an include file that I can't figure out why it's 
happening. 

Certain text files on my site are rather long. Originally, when these pages 
loaded, the menu structure would load first, followed by the text in a box  
to the right of the Menu.  However, the long text files would load over on 
top of the menu, but once the loading was complete, the text box would shift 
to its proper position. Very messy looking!

What I have done successfuly on about twelve different files, is to put the 
include statement at the very end, after the final closing and before 
. For all files but two, this works admirably.

On these errant last two files (they have the same div sheet and include 
file, but exhibit very different behavior), the text loads fine, but then the 
menu overlays upon it - contrary to what the div sheet says. If I put the 
include in the 'normal' place at the top of the file, everything works OK.

I've tried resetting the names of both the div sheet and the links sheet (the 
Menu) so that both are executed only once and only by the page in question. 
No change -- same effect. 

Snippet of 'Normal' placement:
. . .



. . .


Snippet of 'End' placement:
. . .





Any ideas of what's going wrong? And why only these two files exhibit this 
behavior? Btw, the code of the two pages is exactly similar to all others 
that work OK. (Only the text is changed).

Any help of what might be happening here would be greatly appreciated,
Tia,
Andre


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




Re: [PHP] re: W3C and PHP

2002-11-09 Thread Brad Thomas
Alternatively, you could set php.ini to use the semi-colon (;) to seperate
arguments.

HTH
Brad

"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
news:Pine.LNX.4.44.0211082246320.2586-10@;www.lerdorf.com...
> and in your php.ini file add:
>
> arg_separator.output = "&"
>
> On Sat, 9 Nov 2002, Khalid El-Kary wrote:
>
> > hi,
> > just use & instead
> > 
> >
> >
> >
> >
> >
> > _
> > Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
> >
> >
> > --
> > 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] confusion in session vars

2002-11-09 Thread Khalid El-Kary
hi,
did any one face a prob when session vars get mixed from a website to 
another when you use the same browser window ?






_
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


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



php-general Digest 10 Nov 2002 02:10:06 -0000 Issue 1695

2002-11-09 Thread php-general-digest-help

php-general Digest 10 Nov 2002 02:10:06 - Issue 1695

Topics (messages 123576 through 123641):

Re: W3C and PHP
123576 by: Ernest E Vogelsinger
123578 by: Ernest E Vogelsinger
123579 by: . Edwin
123581 by: . Edwin
123592 by: Jens Lehmann
123600 by: Ernest E Vogelsinger
123640 by: Brad Thomas

http$B$G%;%C%7%g%s$r3+;O(B$B$7$?>l9g!"(Bhttps$B$X(B$B9T$C$F$b7QB3$5$l$k$N$G(B$B$7$g$&$+!)(B
123577 by: Rich

Re: How can I start up a new and recompiled version of source PHP???
123580 by: info.t-host.de
123587 by: . Edwin

Setup-dependent quotes problem
123582 by: Daniele Baroncelli
123586 by: Marco Tabini
123589 by: . Edwin

upload whole direcotry using ftp functions
123583 by: AKHIL KODALI

starting recompiled php as a cgi-interpreter
123584 by: info.t-host.de
123625 by: Maxim Maletsky

Re: http$B$G%;%C%7%g%s$r3+;O$7$?>l9g!"(Bhttps$B$X9T$C$F$b7QB3$5$l$k$N$G$7$g$&$+!)(B
123585 by: BAROILLER Pierre-Emmanuel

Re: Need MENTOR for Fantasy football project
123588 by: Michael Geier

RegExp for Forum-List-Code
123590 by: Jens Lehmann
123594 by: Marek Kilimajer
123607 by: Jens Lehmann
123614 by: Ernest E Vogelsinger

Re: Request entity too large (already seen the FAQ)
123591 by: Brian Fahrlander

preg_split problem
123593 by: samug
123597 by: Marek Kilimajer
123598 by: Jason Wong
123599 by: samug
123601 by: Marek Kilimajer
123602 by: Ernest E Vogelsinger
123604 by: Ernest E Vogelsinger

Automatic Colspan from database data
123595 by: Dhaval Desai
123606 by: Marco Tabini
123608 by: Dhaval Desai
123619 by: Marco Tabini

Re: MySQL and PHP math problem...
123596 by: Peter

Re: HTTP POST FILE UPLOAD HELP - REVISITED
123603 by: . Darwin

HTML forms & php 4.2.3 - how to get cvs fix applied
123605 by: andy

Rotating Ads
123609 by: Stephen
123610 by: Stephen
123613 by: Andrew Brampton
123626 by: BAROILLER Pierre-Emmanuel

header function
123611 by: Donahue Ben
123612 by: Stephen
123616 by: Ernest E Vogelsinger

How to know files in a directory
123615 by: Mohd_Q
123617 by: Marco Tabini
123627 by: BAROILLER Pierre-Emmanuel
123635 by: John Nichel

Errors and Logging Configuration Options: docref-root
123618 by: Stefan Schiller

Re: PHP 4.3.0 and Zend Engine 2
123620 by: Andi Gutmans

Re: Weird behaviour with references to objects...
123621 by: Tim Molendijk

php5 features?
123622 by: ed
123623 by: ed
123624 by: Maxim Maletsky

Handling Errors Gracefully
123628 by: Monty
123629 by: Rasmus Lerdorf
123630 by: Marco Tabini
123631 by: Ernest E Vogelsinger
123632 by: Ernest E Vogelsinger
123633 by: Ernest E Vogelsinger
123634 by: Marco Tabini

Looping through formfields...
123636 by: Brad Apps

Re: calculate bytes in string
123637 by: Ian Newlands
123638 by: Ian Newlands

Errant include file works everywhere but here
123639 by: Andre Dubuc

confusion in session vars
123641 by: Khalid El-Kary

Administrivia:

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

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

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


--

--- Begin Message ---
At 07:12 09.11.2002, conbud said:
[snip]
>Hi,
>In some of my URLs I have to pass variables through the URL like
>nav.php?page=about§ion=linux - when i do this and then scan my site for
>W3C validation I get this
>Line 40, column 28:
>  ... O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



--- End Message ---
--- Begin Message ---
At 07:45 09.11.2002, Khalid El-Kary said:
[snip]
>hi,
>just use & instead
>
[snip] 

Sorry, no. This would result in a quite funny variable:
$_GET = Array(
name=> khalid
amp;age => d
)


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



--- End Message ---
--- Begin Message ---
Not really. Try it ;)

Khalid is correct.

- E

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote:
> At 07:45 09.11.2002, Khalid El-Kary said:
> [snip]
> >hi,
> >just use & instead
> >
> [snip] 
> 
> Sorry, no. This would result in a quite funny variable:
> $_GET = Array(
> name=> khalid
> amp;age => d
> )
> 
> 
> -- 
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
> 

Re: [PHP] HTML forms & php 4.2.3 - how to get cvs fix applied

2002-11-09 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey,
Reconfigure php without "--enable-mbstr-enc-trans" and that will fix the 
problem.
HTH!
~Paul

On Friday 08 November 2002 06:56 pm, andy wrote:
> I recently updated from 4.2.0 to 4.2.3 - since doing so values submitted
> to php from HTML forms using keys  - value="foo[bar]" - get truncated in
> php - example: if I submit "[EMAIL PROTECTED]" it will come out as
> "eight13.com" with a print_r($_POST)
>
> I found these bug reports which say what appears to be the same bug has
> been "fixed in CVS":
>
> http://bugs.php.net/bug.php?id=20024
> http://bugs.php.net/bug.php?id=19829
>
> I'm wondering where to go from this point. I have a production server
> which I need this fixed on.
>
> Is my only choice to checkout the entire branch for the latest version
> 4.2.x? (I'm assuming its branched - I've not looked at any of this yet)
>
> Is there not a patch? Could I just checkout the applicable files?
>
> http://snaps.php.net/ wasn't avilable at the time of writing this -
> possibly it would have given me more information.
>
>
> Apache 1.3.20
> php from source as module
> Mandrake 8

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]
www.webpowerdesign.net

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE9zcldDyXNIUN3+UQRArDSAKCRyBACPvmlkvHv5335p5jzNijyQACXaRPA
JTBavZvIutTMj9eHFdu+zA==
=xhW8
-END PGP SIGNATURE-

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




Re: [PHP] Errors and Logging Configuration Options: docref-root

2002-11-09 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Did you restart apache?
HTH!
~Paul

On Saturday 09 November 2002 03:14 pm, Stefan Schiller wrote:
> I updated my development-server
>
> --> FreeBSD 4.7-REALEASE, Apache/1.3.27 (Port-Build), PHP 4.2.3
> (Port-Build) ...]
>
> After this I found
>
> http://www.php.net/manual/en/ref.errorfunc.php#ini.docref-root
>
> In the manual. I downloaded the manual and changed some config-item
>
> [httpd.conf]
> Alias /manual/ "/X//manual/"
>
> [php.ini]
> docref_roof = /manual/php4_manual
> docref_ext = .html
>
>
> But I noticed no changes!
>
> - is this a future of php ?.?.? ??
>
> - are some configure options needed for the build?
>
> - is it useful, how does it look like?
>
>
> [some more options out php.ini]
> error_reporting  =  E_ALL
> display_errors = On
> log_errors = On
> html_errors = On
> error_log = "/XX/Y/Z/php.err"
> docref_roof = /manual/php4_manual
> docref_ext = .html
>
> Best regards
>
> Stefan Schiller

- -- 
~Paul Nicholson
Design Specialist @ WebPower Design
"The webthe way you want it!"
[EMAIL PROTECTED]
www.webpowerdesign.net

"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9zcwODyXNIUN3+UQRAqXDAJ9V0D2msdGLtwL9IxNtEKm+7bzPsQCfdmzr
sE5SgBnX6WgcAT7rm2GrLQ0=
=kibB
-END PGP SIGNATURE-

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




Re: [PHP] Need MENTOR for Fantasy football project

2002-11-09 Thread Justin French
Hi,

This is a big, complex project for a newbie, and I doubt you're going to
find anyone with the time available to give you a hand.

Can I suggest you start by learning some PHP in relation to forms, form
validation, login, sessions, etc etc.

There's a good article by Kevin Yank on sitepoint.com / webmasterbase.com,
which formed the basis of my own user/login/member/session library which
I've used on many projects. http://www.WebmasterBase.com/article/319  You'll
need register globals ON in your php.ini from memory.


Then, get stuck into form validation and database design...


But please, please, PLEASE stop emailing the same massive emails asking very
non-specific questions, and looking for help... this list works best when
dealing with small, specific problems like "where can I find a good article
on member/session management" NOT "how do I build an entire website".



My suggestion would be to start with a smaller project (like a
search/edit/add/delete/categorise system to catalogue your CD collection),
or pay someone to work on it with you, and teach you as they go.  As you
learn more about the principals, you'll learn the best way(s) to approach
larger projects, like the one you describe.


Justin





on 09/11/02 3:34 AM, Karl James ([EMAIL PROTECTED]) wrote:

> Ok here is what I need help with
> 
> I need help with how to set up the layout of this project
> 
> 1st I know I need a create account page for owners to create
> there username and password.
> 
> Then once they successfully filled in the form they are logged in
> And taken to the Team choice page..
> 
> Then once you click that you are taken two your team page.
> Their you can view all team stats, Roster, and Schedules
> For NFL and Fantasy Team Schedule
> 
> Then you would have links on your team page
> That would be like
> Claim
> Drop
> Trade
> Submit starters
> 
> Claim
> Would take you to a page that showed you all of the available players,
> with there stats and bye week.
> You would then choose your player by checking the box to the right of
> the total stats column.
> Once you hit claim is one of the hard parts for me.
> 
> The player claim after selecting him and hitting saved. Will have a
> decision of being added to the roster or denied added to roster, there
> are three ways that are denied.  1.over roster size 2. over salary cap
> 3. after deadline.
> 
> If over Roster size you are take to Roster to drop player to get under
> rosters size
> Then take back to the page to claim player then hit claim on player and
> save and the transaction is completed. This is the same thing for the
> salary cap if decision is
> Under $40.000.00.
> 
> This is a major problem for me. Im not sure how to link all of this
> together.
> I Can create normal pages and tables and forms. But the paths and php
> code I need 
> Help with..
> 
> Drop 
> You can always just drop a player and his name would appear on the free
> agent list in real time fashion.
> I want all this to be done I Real time fashion and also I want emails
> sent to me as they were done. And completed.
> 
> Trades
> Trades can happen the same way has the rules 1 2 3 for claim players
> They have to meet all criteria.
> But the interface I want side by side teams and owners be able to choose
> the players and hit check and save..
> 
> If met all criteria it happens and I get email. Then you see the players
> traded on there new Teams.
> 
> Submit starters
> Can be a table with check boxes and hit save total players aloud to
> start we can determine when site is made
> Then once you hit save you are back at you team page. But it has to be
> in before you league deadline.
> Once starters are submitted I want owners to be able to go to a page to
> view all starters that all owners did for that week.
> 
> 
> And I need to have all these issues done in real time.
> 
> And my database is setup in mysql
> Would any want to help me with this please get with me asap
> I need to be able to talk to you thru the end and make sure I do shit
> right.
> I want to do all the work, just need a teacher. Please any help would be
> greatly appreciated.
> Please email back
> Sincerely Karl James
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


Creative Director
http://Indent.com.au



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




[PHP] Php | Architect Magazine?

2002-11-09 Thread Nick Oostveen
Has anyone taken a look at this magazine yet (www.phparch.com)? I came 
across mention of it on Slashdot earlier today and it looks interesting.  I 
am considering subscribing but wouldn't mind some feedback about the 
overall quality of the publication beforehand.

Nick Oostveen


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



Re: [PHP] Need MENTOR for Fantasy football project

2002-11-09 Thread Bob Eldred
So experiment.  That's exactly how I made my fantasy league stuff work.
Along with a few questions here when I had *specific* issues with code.

Bob

- Original Message -
From: "Karl James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 12:33 PM
Subject: RE: [PHP] Need MENTOR for Fantasy football project


I have the php bible 4 book but it
Doesn’t tell you how to do things all the way
And still leaves with lots of questions.

-Original Message-
From: Charles Wiltgen [mailto:lists@;wiltgen.net]
Sent: Friday, November 08, 2002 9:03 PM
To: List ˆ PHP General
Subject: Re: [PHP] Need MENTOR for Fantasy football project

Karl James wrote...

> Would any want to help me with this please get with me asap I need to
be able
> to talk to you thru the end and make sure I do shit right. I want to
do all
> the work, just need a teacher.

As they say, "Just Do It".  Ask specific, PHP-related questions as you
have
them.  If you don't know anything about using PHP and MySQL, buy one of
the
many fine books available on the subject.  Or, you could just pay
someone
to do it for you.

-- Charles Wiltgen


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




[PHP] fopen() using non-standard port

2002-11-09 Thread Tim Lan
Is there anyway to use fopen() to open a webpage through a non-standard
port? For example, the webpage I need must be accessed through port 2734
instead of the standard HTTP port 80, and PHP seems to ignore port
information in the URL (e.g. fopen( "http://www.domain.com:2734/..."; ); )

Thanks in advance.


Tim



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




Re: [PHP] fopen() using non-standard port

2002-11-09 Thread Khalid El-Kary
hi,
i suggest that you use CURL, check the PHP manual

if CURL did't help you can use the lower-level PHP sockets extension
also check the PHP manual

khalid

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



[PHP] date problem

2002-11-09 Thread Michael P. Carel
to all;


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


[PHP] converting decimal to fraction and vice versa

2002-11-09 Thread Michael P. Carel


hi to all;

is there any way to convert decimal numbers to fraction and fraction to decimal 
format. i need to convert the inputed fractional value in the field before inserting 
it to the mysql database, such us 1/2 = 0.5 .
thanx in advance.

regards,

mike

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


Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Dhaval Desai
Hi!


Well let's make it simple.. We can see that the following values:

211
are stored in just one row in 31 different columns.

Bsaed on this if we were to make a table with colspans how would it go..?


Thank you

Dhaval










From: Marco Tabini <[EMAIL PROTECTED]>
To: Dhaval Desai <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Automatic Colspan from database data
Date: 09 Nov 2002 15:10:39 -0500

Ouch...


well, assuming you have two columns: day_id and value, here's a possible
solution:

$rs = mysql_query ('select day_id, value from my_table order by
day_id');
$a = mysql_fetch_assoc ($rs);

do
{
	$i = 1;
	$control = $a['value'];

	while (($a = mysql_fetch_assoc ($rs)) && $a['value'] == $control)
		$i++;

	echo '' . $control . '';
} while ($a);

This is a bit rough and can probably be optimized quite a bit, plus I
can't test it, so I'm not sure that it will work the first time.
Hopefully, it gives you an idea of how it could be done.

If I could make a suggestion without knowing how your system works, I
think you should revisit your database design a little.

Hope this helps,


Marco

--

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com

On Sat, 2002-11-09 at 14:32, Dhaval Desai wrote:
> Hi!
>
> Well I have 12 table for 2 years which makes it 24 tables named as:
> jan_2002, feb_2002 ...etc dec_2002
> jan_2003, feb_2003 ...etc dec_2003
>
> Each table has fields according to the number of days in the month plus 
1
> field as a unique key.
>
> Each registration will create 1 entry in 24 tables each and it can only 
be
> modified as 1 entry per registrant per table.
> the fields in each table will take values ranging rom 1-20.
>
> Well that's all about how my tables are in the database.
>
>
> Thank You for your time
>
> Dhaval Desai
>
>
>
>
>
>
>
>
>
> >From: Marco Tabini <[EMAIL PROTECTED]>
> >To: Dhaval Desai <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [PHP] Automatic Colspan from database data
> >Date: 09 Nov 2002 13:34:20 -0500
> >
> >How is your database organized? you might be able to pull this
> >information from the query by using an appropriate group-by clause.
> >
> >
> >Marco
> >--
> >
> >php|architect - The magazine for PHP Professionals
> >The first monthly worldwide magazine dedicated to PHP programmers
> >Check us out on the web at http://www.phparch.com
> >
> >On Sat, 2002-11-09 at 11:57, Dhaval Desai wrote:
> > >
> > >
> > >
> > >
> > > Hi everybody!
> > >
> > >
> > > Well this is how it goes...
> > >
> > > For the month of January there are 31 days...
> > > so there are 2 rows in this table on the top row there are 31 
columns
> > > showing 31 days...and in the row below this one we will have to
> > > generatecolspan based on the below information pulled from the
> > > database...
> > >
> > > 211
> > >
> > >
> > > in the above case we will have to get a colspan as follows:
> > > 
> > >   2 
> > >   1 
> > >   9 
> > >  colspan="4"> 2 
> > > 
> > >
> > >
> > > This is all I want to doI know it is difficult...but still 
waiting
> >for
> > > some genius!
> > >
> > >
> > > Thank You!
> > > Dhaval
> > >
> > >
> > > _
> > > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
>
>
> _
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> --
> 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


_
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: [PHP] date problem

2002-11-09 Thread Maxim Maletsky
say it again?


-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Sun, 10 Nov 2002 12:37:48 +0800 "Michael P. Carel" <[EMAIL PROTECTED]> wrote:

> to all;
> 


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




Re: [PHP] fopen() using non-standard port

2002-11-09 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

You can't use fopen, but you can use fsockopen ( php.net/fsockopen ).

$fp = fsockopen ( "www.domain.com", 2734);
fputs($fp, "GET / HTTP/1.0\r\n\r\n");
while ( !feof($fp) )
echo fgets($fp, 256);

CURL is kinda overkill, sockets are overkill and hard to use.

Of course, then you have to worry about headers, but that's easy enough to 
overcome... just test each line. The first empty line is the end of the 
headers. So wait for the first empty line, set a variable to TRUE...



On Saturday 09 November 2002 08:36 pm, Khalid El-Kary wrote:
> hi,
> i suggest that you use CURL, check the PHP manual
>
> if CURL did't help you can use the lower-level PHP sockets extension
> also check the PHP manual
>
> khalid
>
> _
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail

- -- 
I am convinced that the teaching of the church is in theory a crafty and evil 
lie, and in practice a concoction of gross superstition and witchcraft 

- -Leo Nikolaevich Tolstoy

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ze44/rncFku1MdIRAkBRAJ9C89eQx390eh1khrfq/CdaQjPHgQCfc8sf
oic6DqIPISSeqcWPivZcsJs=
=0D39
-END PGP SIGNATURE-


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




[PHP] set_error_handler() Keeps Triggering Errors

2002-11-09 Thread Monty
When I use set_error_handler('error_function') in my scripts, errors are
constantly being triggered that I've never seen before. If I comment the
handler function out, the errors go away. I have the error reporting set
very loosely: error_reporting (E_ERROR | E_USER_ERROR) - so not sure why it
keeps triggering an error, because the error I keep getting is:

Undefined variable: target

This is the same error message no matter what script I run. I don't even use
a variable named $target anywhere in any of my scripts, so, this is
baffling. And this seems like an E_NOTICE error message, but, I'm only
asking for E_ERROR and E_USER_ERROR notices.

My error handling function is fairly simple. It just loads the error info in
a session var then sends the user to the error page, which reads the error
info from the session vars and displays it.

function show_error($type, $msg, $file, $line, $context) {

// Setup error message in Session var...
$_SESSION['error']['type'] = $type;
$_SESSION['error']['msg'] = $msg;
$_SESSION['error']['file'] = $file;
$_SESSION['error']['line'] = $line;
  
header("Location:./error_page.php");
}

Anyone have any clues why when I set_error_handler to the above function
errors are being triggered for every page?

Monty


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




[PHP] Suggestions Please

2002-11-09 Thread Mike Miller
Ok I am building a site similar in purpose to elance for a client, and part
of their terms and conditions is no contact info till a bid has been
awarded. So they want all contact info that is posted to be removed on
submission of the bid, and any on site contact between buyer, and provider.

I have been beating my head against the wall trying to think of how to do
this but cannot think of a way, I know  the regex() function will probably
be the best way, but how to make it verifiy the info before posting to the
database , is just beyond my creativity:) besides that there are a million
ways to say things, like email for instance, [EMAIL PROTECTED]
somoeone at somplace Dot com
 and so on and on for email, phone, web address, instant messenger type
contact.


So I am truning to all of you that have been doing this a whole lot longer
than i have for suggestions.

Any help would be greatly appreciated,


Mike



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




[PHP] Function Problem

2002-11-09 Thread conbud
Hey
Im trying to create a fucntion in an include file
function db_conn($host,$user,$pass,$dab)
{
$db = mysql_connect("$host", "$user","$pass")mysql_select_db("$dab",$db);
}


In the page ide use:
require('func.inc.php');
db_conn("$host","$user","$pass","$dab");
$result = mysql_query("select * FROM $page",$db);
$myrow = mysql_fetch_array($result);

echo $myrow['general_info'];

...
...
however when I use the db_conn on the webpage I just get a mysql error
saying not a valid resource, so how do I get the db_conn to actually return
the data, ive tried using

function db_conn($host,$user,$pass,$db)
{
$db = mysql_connect("$host", "$user","$pass")mysql_select_db("$db",$db);

return $db
}

and various other thing but still nothing, I have to actually put the echo
statements in the function too to get it to work properlly, any ideas?



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




Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
Dhaval,

did you try the code I sent you?


Marco

On Sat, 2002-11-09 at 23:59, Dhaval Desai wrote:
> Hi!
> 
> 
> Well let's make it simple.. We can see that the following values:
> 
> 211
> are stored in just one row in 31 different columns.
> 
> Bsaed on this if we were to make a table with colspans how would it go..?
> 
> 
> Thank you
> 
> Dhaval
> 
> 
> 
> 
> 
> 
> 
> 
> 
> >From: Marco Tabini <[EMAIL PROTECTED]>
> >To: Dhaval Desai <[EMAIL PROTECTED]>
> >CC: [EMAIL PROTECTED]
> >Subject: Re: [PHP] Automatic Colspan from database data
> >Date: 09 Nov 2002 15:10:39 -0500
> >
> >Ouch...
> >
> >
> >well, assuming you have two columns: day_id and value, here's a possible
> >solution:
> >
> >$rs = mysql_query ('select day_id, value from my_table order by
> >day_id');
> >$a = mysql_fetch_assoc ($rs);
> >
> >do
> >{
> > $i = 1;
> > $control = $a['value'];
> >
> > while (($a = mysql_fetch_assoc ($rs)) && $a['value'] == $control)
> > $i++;
> >
> > echo '' . $control . '';
> >} while ($a);
> >
> >This is a bit rough and can probably be optimized quite a bit, plus I
> >can't test it, so I'm not sure that it will work the first time.
> >Hopefully, it gives you an idea of how it could be done.
> >
> >If I could make a suggestion without knowing how your system works, I
> >think you should revisit your database design a little.
> >
> >Hope this helps,
> >
> >
> >Marco
> >
> >--
> >
> >php|architect - The magazine for PHP Professionals
> >The first monthly worldwide magazine dedicated to PHP programmers
> >Check us out on the web at http://www.phparch.com
> >
> >On Sat, 2002-11-09 at 14:32, Dhaval Desai wrote:
> > > Hi!
> > >
> > > Well I have 12 table for 2 years which makes it 24 tables named as:
> > > jan_2002, feb_2002 ...etc dec_2002
> > > jan_2003, feb_2003 ...etc dec_2003
> > >
> > > Each table has fields according to the number of days in the month plus 
> >1
> > > field as a unique key.
> > >
> > > Each registration will create 1 entry in 24 tables each and it can only 
> >be
> > > modified as 1 entry per registrant per table.
> > > the fields in each table will take values ranging rom 1-20.
> > >
> > > Well that's all about how my tables are in the database.
> > >
> > >
> > > Thank You for your time
> > >
> > > Dhaval Desai
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > >From: Marco Tabini <[EMAIL PROTECTED]>
> > > >To: Dhaval Desai <[EMAIL PROTECTED]>
> > > >CC: [EMAIL PROTECTED]
> > > >Subject: Re: [PHP] Automatic Colspan from database data
> > > >Date: 09 Nov 2002 13:34:20 -0500
> > > >
> > > >How is your database organized? you might be able to pull this
> > > >information from the query by using an appropriate group-by clause.
> > > >
> > > >
> > > >Marco
> > > >--
> > > >
> > > >php|architect - The magazine for PHP Professionals
> > > >The first monthly worldwide magazine dedicated to PHP programmers
> > > >Check us out on the web at http://www.phparch.com
> > > >
> > > >On Sat, 2002-11-09 at 11:57, Dhaval Desai wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Hi everybody!
> > > > >
> > > > >
> > > > > Well this is how it goes...
> > > > >
> > > > > For the month of January there are 31 days...
> > > > > so there are 2 rows in this table on the top row there are 31 
> >columns
> > > > > showing 31 days...and in the row below this one we will have to
> > > > > generatecolspan based on the below information pulled from the
> > > > > database...
> > > > >
> > > > > 211
> > > > >
> > > > >
> > > > > in the above case we will have to get a colspan as follows:
> > > > > 
> > > > >   2 
> > > > >   1 
> > > > >   9 
> > > > >  colspan="4"> 2 
> > > > > 
> > > > >
> > > > >
> > > > > This is all I want to doI know it is difficult...but still 
> >waiting
> > > >for
> > > > > some genius!
> > > > >
> > > > >
> > > > > Thank You!
> > > > > Dhaval
> > > > >
> > > > >
> > > > > _
> > > > > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > > > > http://join.msn.com/?page=features/featuredemail
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > >
> > >
> > > _
> > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> > > http://join.msn.com/?page=features/junkmail
> > >
> > >
> > > --
> > > 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
> 
> 
> _
> The new MSN 8: advanced junk mail protection and 2 months FREE* 
> http://join.msn.com/?page=features/junkmail
> 

Re: [PHP] Function Problem

2002-11-09 Thread Marco Tabini
Either add

global $db;

as the first line of the function or change your function call to:

$db = db_conn("$host","$user","$pass","$dab");

I assume that $host, $user, $pass and $dab actually contain some correct
values.


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
Check us out on the web at http://www.phparch.com



On Sun, 2002-11-10 at 01:58, conbud wrote:
> Hey
> Im trying to create a fucntion in an include file
> function db_conn($host,$user,$pass,$dab)
> {
> $db = mysql_connect("$host", "$user","$pass")mysql_select_db("$dab",$db);
> }
> 
> 
> In the page ide use:
> require('func.inc.php');
> db_conn("$host","$user","$pass","$dab");
> $result = mysql_query("select * FROM $page",$db);
> $myrow = mysql_fetch_array($result);
> 
> echo $myrow['general_info'];
> 
> ...
> ...
> however when I use the db_conn on the webpage I just get a mysql error
> saying not a valid resource, so how do I get the db_conn to actually return
> the data, ive tried using
> 
> function db_conn($host,$user,$pass,$db)
> {
> $db = mysql_connect("$host", "$user","$pass")mysql_select_db("$db",$db);
> 
> return $db
> }
> 
> and various other thing but still nothing, I have to actually put the echo
> statements in the function too to get it to work properlly, any ideas?
> 
> 
> 
> -- 
> 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




  1   2   >