php-general Digest 1 Mar 2006 23:47:18 -0000 Issue 3992

2006-03-01 Thread php-general-digest-help
= preg_replace('/(\d+\s\=\s)(\d+)/ie', 'incDate($1,$2)', $oldDate); file_put_contents($file, $newDate . \n); This works with one file but with multi lines I'm having trouble: if the file has: 20060301 = 34 20060302 = 3 the file after script will be: 20060302 = 4 I want it to preserve the previous

[PHP] PDO Changes from 5.0.x To 5.1.x

2006-03-01 Thread Chris Drozdowski
According to documentation, PDO globals constants in 5.0.3+ were changed to class constants in 5.1. Does anyone have a suggestion for portability of constants between the 5.0.x branch and the 5.1 branch without having to rewrite code. Besides the constants, what other differences exist in

[PHP] leading slash in SCRIPT_NAME variable

2006-03-01 Thread Roman Rumisek
Hi, i have configured apache 2.0.50 with mod_php 4.4.2 and $_SERVER['SCRIPT_NAME'] beginning with /// (three slash). Where have i a error ? (probably configuration) Application apache configuration: Alias /trsklad/ /.../projects/akce/src/html/ Directory /.../projects/akce/src/html/

Re: [PHP] Dynamic Form List - how to change values

2006-03-01 Thread tedd
I have a list from a MYSQL database that I am dumping to a screen. I'd like the user to be able to change the quantity on the form for any record on the screen, then post that information back so the user can review it, and I can then update the database. Simple checkout routine. Or so I

RE: [PHP] PDO Changes from 5.0.x To 5.1.x

2006-03-01 Thread Jared Williams
Hi, Only way I know is to import them into the global scope with define() If (!defined(PDO_FETCH_ASSOC)) define('PDO_FETCH_ASSOC', PDO::FETCH_ASSOC); As for further differences, I'm not aware of any. Jared According to documentation, PDO globals constants in 5.0.3+ were changed to

[PHP] Mailto members..?

2006-03-01 Thread Gustav Wiberg
Hi guys! Anyone knows of something like this, but for free? http://www.webscriptsdirectory.com/PHP/E-Mail-Systems/Php-Newsletter-Script-L1237/ All I want to do is to send a html mail to all my members at http://www.stammis.com/ (swedish site for pedigrees). It would be a informative letter

RE: [PHP] Mailto members..?

2006-03-01 Thread Jim Moseby
Hi guys! Anyone knows of something like this, but for free? http://www.webscriptsdirectory.com/PHP/E-Mail-Systems/Php-News letter-Script-L1237/ All I want to do is to send a html mail to all my members at http://www.stammis.com/ (swedish site for pedigrees). It would be a informative

Re: [PHP] ftp_get from an IBM Mainframe z/vm system ?

2006-03-01 Thread Robin Vickery
On 01/03/06, Nils Reimann [EMAIL PROTECTED] wrote: $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); $download = ftp_get($conn_id, $locale, TEST EXEC, FTP_ASCII); ftp_quit($conn_id); connection workd, but the download did not. i got

Re: [PHP] ftp_get from an IBM Mainframe z/vm system ?

2006-03-01 Thread Barry
Robin Vickery wrote: On 01/03/06, Nils Reimann [EMAIL PROTECTED] wrote: $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); $download = ftp_get($conn_id, $locale, TEST EXEC, FTP_ASCII); ftp_quit($conn_id); connection workd, but the

Re: [PHP] Mailto members..?

2006-03-01 Thread Gustav Wiberg
- Original Message - From: Kevin Davies - Bonhurst Consulting [EMAIL PROTECTED] To: 'Jim Moseby' [EMAIL PROTECTED]; 'Gustav Wiberg' [EMAIL PROTECTED]; 'PHP General' php-general@lists.php.net Sent: Wednesday, March 01, 2006 4:32 PM Subject: RE: [PHP] Mailto members..? snip Others

RE: [PHP] Mailto members..?

2006-03-01 Thread Kevin Davies - Bonhurst Consulting
snip Others here have mentioned the use of a mailer class I can't remember the name of (phpmailer maybe?). /snip PHPMailer is really good for sending HTML/Text/Both emails - I'm using it on a few different sites. Link: http://phpmailer.sourceforge.net/ Also, if you're going to use PHPMailer an

[PHP] Re: fopen failing, permission denied

2006-03-01 Thread Dan Baker
Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan Baker wrote: I have the following code snippet: $h = fopen($path/file.txt, 'x+'); And it generates the following error: Warning: fopen(/home/./myarea/file.txt): failed to open stream: Permission denied The path is

[PHP] Failed to open stream

2006-03-01 Thread tedd
Hi gang: I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? I can provide code if

RE: [PHP] Failed to open stream

2006-03-01 Thread jblanchard
[snip] I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. [/snip] Is safe mode 'on' on one and not the other? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Failed to open stream

2006-03-01 Thread Robin Vickery
On 01/03/06, tedd [EMAIL PROTECTED] wrote: Hi gang: I have two *identical*l routines residing on two difference hosts -- one works and the other doesn't. Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any

[PHP] preg_replace problem

2006-03-01 Thread Benjamin Adams
', 'incDate($1,$2)', $oldDate); file_put_contents($file, $newDate . \n); This works with one file but with multi lines I'm having trouble: if the file has: 20060301 = 34 20060302 = 3 the file after script will be: 20060302 = 4 I want it to preserve the previous lines so output should

Re: [PHP] About date time...

2006-03-01 Thread Gustav Wiberg
- Original Message - From: Marcus Gnaß [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 5:24 PM Subject: Re: [PHP] About date time... Gustav Wiberg schrieb: function currenttime() { $t = date('h\:\ i\:\ s'); $returnTime = str_replace( , ,

Re: [PHP] Mailto members..?

2006-03-01 Thread Gustav Wiberg
- Original Message - From: Marcus Gnaß [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 5:29 PM Subject: Re: [PHP] Mailto members..? Gustav Wiberg schrieb: while ($dbArray = mysql_fetch_array($querys)) { ...sendmail (from, to, htmltext...)... }

RE: [PHP] Mailto members..?

2006-03-01 Thread Jim Moseby
Gustav Wiberg schrieb: while ($dbArray = mysql_fetch_array($querys)) { ...sendmail (from, to, htmltext...)... } Why let PHP do all the work? If the body is all the same for all recipients you could send only one mail with all recipients in the BCC-field and only one dummy-adress

Re: [PHP] Mailto members..?

2006-03-01 Thread John Nichel
Gustav Wiberg wrote: - Original Message - From: Marcus Gnaß [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 5:29 PM Subject: Re: [PHP] Mailto members..? Gustav Wiberg schrieb: while ($dbArray = mysql_fetch_array($querys)) { ...sendmail (from, to,

Re: [PHP] Failed to open stream

2006-03-01 Thread tedd
Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? Yes. You're violating google's terms of service. Okay, so one is violating google's terms of service and failing while

Re: [PHP] Mailto members..?

2006-03-01 Thread Gustav Wiberg
- Original Message - From: Jim Moseby [EMAIL PROTECTED] To: 'Gustav Wiberg' [EMAIL PROTECTED]; Marcus Gnaß [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Wednesday, March 01, 2006 7:29 PM Subject: RE: [PHP] Mailto members..? Gustav Wiberg schrieb: while

RE: [PHP] Mailto members..?

2006-03-01 Thread Jim Moseby
This type of email may be more susceptible to being caught in spam traps. Check with your webhost to learn of any limits to the number of recipients per message, and number of messages per day/hour/etc. JM Aha.. that's a reason good enough for me for not using this method. It

Re: [PHP] Failed to open stream

2006-03-01 Thread Robin Vickery
On 01/03/06, tedd [EMAIL PROTECTED] wrote: In any event, considering the Google Police here, I've removed the offending code. Google Police? Aye, right! You asked why your script was failing. It's failing because they detected you were breaking their terms. Couldn't care less myself; it's

Re: [PHP] Failed to open stream

2006-03-01 Thread John Nichel
tedd wrote: Please review (this works): http://www.webbytedd.com/examples/rank.php However, this doesn't: http://www.xn--ovg.com/rank.php Any idea as to what is wrong? Yes. You're violating google's terms of service. Okay, so one is violating google's terms of service and

[PHP] internal error when mailing...

2006-03-01 Thread Gustav Wiberg
Here's my code ?php //Thanx to jcwebb at dicoe dot com //base of the code at php.net is used here // Is the OS Windows or Mac or Linux // if (strtoupper(substr(PHP_OS,0,3)=='WIN')): $eol=\r\n; elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')): $eol=\r; else: $eol=\n; endif; //Message Subject

[PHP] binding adodb

2006-03-01 Thread Raúl Castro Marín
I got a little question, I just start to use binding adodb but I got a problem: my primary query on Oracle is: $query = SELECT munici_mun, UPPER(nombre_mun) FROM MUNI WHERE departa_dpt = ? AND munici_mun = 994; It is execute with any problem, but when I add another clause with keyword: AND

Re: [PHP] internal error when mailing...

2006-03-01 Thread John Nichel
Gustav Wiberg wrote: Here's my code ?php //Thanx to jcwebb at dicoe dot com //base of the code at php.net is used here // Is the OS Windows or Mac or Linux // if (strtoupper(substr(PHP_OS,0,3)=='WIN')): $eol=\r\n; elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')): $eol=\r; else: $eol=\n; endif;

[PHP] Re: fopen failing, permission denied

2006-03-01 Thread Dan Baker
(SOLVED, see below) Dan Baker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan Baker wrote: I have the following code snippet: $h = fopen($path/file.txt, 'x+'); And it generates the following error: Warning:

Re: [PHP] Mailto members..?

2006-03-01 Thread Gustav Wiberg
- Original Message - From: Jim Moseby [EMAIL PROTECTED] To: 'Gustav Wiberg' [EMAIL PROTECTED]; Jim Moseby [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Wednesday, March 01, 2006 9:17 PM Subject: RE: [PHP] Mailto members..? This type of email may be more

Re: [PHP] internal error when mailing...

2006-03-01 Thread Gustav Wiberg
- Original Message - From: John Nichel [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 9:57 PM Subject: Re: [PHP] internal error when mailing... Gustav Wiberg wrote: Here's my code ?php //Thanx to jcwebb at dicoe dot com //base of the code at

[PHP] subtract dates

2006-03-01 Thread Benjamin Adams
I'm trying subtract to dates the user enters in and get the days between. Dates are stored as date('mdY') is there a built in function to subtract to dates is this format? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] subtract dates

2006-03-01 Thread John Nichel
Benjamin Adams wrote: I'm trying subtract to dates the user enters in and get the days between. Dates are stored as date('mdY') is there a built in function to subtract to dates is this format? Thanks Built in, not that I'm aware of. However, if you're the one storing the dates, you could

Re: [PHP] subtract dates

2006-03-01 Thread tedd
Benjamin: I'm trying subtract to dates the user enters in and get the days between. Dates are stored as date('mdY') is there a built in function to subtract to dates is this format? Try this for starters: ?php $century = mktime(12, 0, 0, 1, 1, 2001); $today = time(); $difference = $today -

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-03-01 Thread Aleksandar Skodric
Hi, I have changed the directory to the same disk. Results are _much_ better! So nothing to blame on PHP, only my lack of knowledge about *nix-like system *blush* Thank all for the advice and help! Cheers, Aleks PS. defining of php_value in virtual host of apache did not work, so I changed

[PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Remember14a
You have written, Now do a var_dump($res) and see what *is* in $res or do print_r(). Can you precisely mention where you want me to put this piece of code.

Re: [PHP] internal error when mailing...

2006-03-01 Thread Chris
Gustav Wiberg wrote: - Original Message - From: John Nichel [EMAIL PROTECTED] To: Gustav Wiberg [EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 9:57 PM Subject: Re: [PHP] internal error when mailing... Gustav Wiberg wrote: Here's my code ?php //Thanx to jcwebb at dicoe dot com

[PHP] image in memory to mySQL

2006-03-01 Thread tedd
Hi: I know how to upload an image from a file into a BLOB in mySQL, but how do you place an image that's in memory into mySQL? For example, if I create an image via resampling another image or create a new image, how do I get that image into mySQL? I know I can save it as a file and load

Re: [PHP] leading slash in SCRIPT_NAME variable

2006-03-01 Thread Chris
Roman Rumisek wrote: Hi, i have configured apache 2.0.50 with mod_php 4.4.2 and $_SERVER['SCRIPT_NAME'] beginning with /// (three slash). Where have i a error ? (probably configuration) Application apache configuration: Alias /trsklad/ /.../projects/akce/src/html/ Directory

Re: [PHP] preg_replace problem

2006-03-01 Thread Chris
= preg_replace('/(\d+\s\=\s)(\d+)/ie', 'incDate($1,$2)', $oldDate); file_put_contents($file, $newDate . \n); This works with one file but with multi lines I'm having trouble: if the file has: 20060301 = 34 20060302 = 3 the file after script will be: 20060302 = 4 I want it to preserve the previous lines so

Re: [PHP] binding adodb

2006-03-01 Thread Chris
Raúl Castro Marín wrote: I got a little question, I just start to use binding adodb but I got a problem: my primary query on Oracle is: $query = SELECT munici_mun, UPPER(nombre_mun) FROM MUNI WHERE departa_dpt = ? AND munici_mun = 994; It is execute with any problem, but when I add

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-03-01 Thread Chris
Aleksandar Skodric wrote: Hi, I have changed the directory to the same disk. Results are _much_ better! So nothing to blame on PHP, only my lack of knowledge about *nix-like system *blush* Thank all for the advice and help! It's not *nix systems - it's all operating systems. When you move

Re: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Chris
[EMAIL PROTECTED] wrote: You have written, Now do a var_dump($res) and see what *is* in $res or do print_r(). Can you precisely mention where you want me to put this piece of code. Please include your original post so we can all see it so we don't have to search to find what you're

Re: [PHP] subtract dates

2006-03-01 Thread tedd
Benjamin: I'm trying subtract to dates the user enters in and get the days between. Dates are stored as date('mdY') is there a built in function to subtract to dates is this format? Try this for starters: ?php $century = mktime(12, 0, 0, 1, 1, 2001); $today = time(); $difference = $today -

[PHP] image in memory to mySQL

2006-03-01 Thread tedd
Hi: I know how to upload an image from a file into a BLOB in mySQL, but how do you place an image that's in memory into mySQL? For example, if I create an image via resampling another image or create a new image, how do I get that image into mySQL? I know I can save it as a file and load

Re: [PHP] Re: How can I stop PHP from resolving symlinks?

2006-03-01 Thread Chris
Roy Souther wrote: It is and the key word here is Follow as in resolve the real file location before parsing. This is clearly an Apache problem. I have asked this question on a few Apache forums and lists now and have not had any response. Is there any way to make Apache parse the files

Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Remember14a
let me give you more details to understand problem with the said code. go to this link, please. http://www.abcdefg.us/search/search.php in search enter, Justice, you get response without an error. Now enter law, you get error, pasted below, Warning: usort(): The argument should be an array

Re: [PHP] image in memory to mySQL

2006-03-01 Thread Chris
tedd wrote: Hi: I know how to upload an image from a file into a BLOB in mySQL, but how do you place an image that's in memory into mySQL? For example, if I create an image via resampling another image or create a new image, how do I get that image into mySQL? I know I can save it as a

Re: Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Chris
[EMAIL PROTECTED] wrote: let me give you more details to understand problem with the said code. go to this link, please. http://www.abcdefg.us/search/search.php in search enter, Justice, you get response without an error. Now enter law, you get error, pasted below, *Warning*:

Re: [PHP] Dynamic Form List - how to change values

2006-03-01 Thread Pat
tedd wrote: I have a list from a MYSQL database that I am dumping to a screen. I'd like the user to be able to change the quantity on the form for any record on the screen, then post that information back so the user can review it, and I can then update the database. Simple checkout routine.

Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Remember14a
I have done as per your instructions, and put var_dump($res);BEFOREusort($res, "cmp"); Please, go again to http://www.abcdefg.us/search/search.php Enter law we get this output. NULL Warning: usort(): The argument should be an array in /home2/wwwabcde/public_html/search/searchfuncs.php on

Re: Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Chris
[EMAIL PROTECTED] wrote: I have done as per your instructions, and put var_dump($res); BEFORE usort($res, cmp); Please, go again to http://www.abcdefg.us/search/search.php Enter law we get this output. NULL *Warning*: usort(): The argument should be an array in

Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Remember14a
If I put this code $res = array();while($row = mysql_fetch_assoc($query_result)) { before usort($res, "cmp"); give this error Parse error: parse error, unexpected $ in /home2/wwwabcde/public_html/search/searchfuncs.php on line 316 evenputting this code before $res[$i]['size'] = $row[5];

Re: Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Chris
[EMAIL PROTECTED] wrote: *If I put this *code $res = array(); while($row = mysql_fetch_assoc($query_result)) { before usort($res, cmp); give this error ** ** *Parse error*: parse error, unexpected $ in */home2/wwwabcde/public_html/search/searchfuncs.php* on line *316* ** *even *

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread Chris Lott
Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP system. Anytime I tried

Re: [PHP] Dynamic Form List - how to change values

2006-03-01 Thread tedd
Pat: I would suggest changing to: http://.../chkout.php?imagename=NATURE-1.jpgcount=6continue=Continue+Checkout, $newqty = $_GET['count']; $imagename = $_GET['imagename']; Also, to see what you are actually getting try: echo (br/); echo (pre); echo (GET info:\n); print_r($_GET); echo(/pre);

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread John Meyer
Chris Lott wrote: Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP

[PHP] Re: preg_replace problem

2006-03-01 Thread Rafael
)', $oldDate); file_put_contents($file, $newDate . \n); This works with one file but with multi lines I'm having trouble: if the file has: 20060301 = 34 20060302 = 3 the file after script will be: 20060302 = 4 I want it to preserve the previous lines so output should be: 20060301 = 34 20060302 = 4

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-03-01 Thread Chris
Chris Lott wrote: Thanks for the advice-- I've run Linux without a GUI for a long time, so I'm quite familiar with hand compilations-- but I always wondered if I was just missing something with packaging systems that it seemed to REQUIRE hand-compilation to get a workable development LAMP

Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Remember14a
Belowis the detailed code and error thisis giving, Warning: usort(): The argument should be an array in /home2/wwwabcde/public_html/search/searchfuncs.php on line 311 --- Once I enter for example,lawat

Re: Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Robert Cummings
On Wed, 2006-03-01 at 22:26, [EMAIL PROTECTED] wrote: Is there a good reason for why you're clogging the mailing list with your fancy shmancy HTML emails? Cheers, Rob. -- .. | InterJinn Application Framework -

Re: Fwd: [PHP] Re: usort(): The argument should be an array

2006-03-01 Thread Chris
[EMAIL PROTECTED] wrote: Below is the detailed code and error this is giving, *Warning*: usort(): The argument should be an array in */home2/wwwabcde/public_html/search/searchfuncs.php* on line *311* *---* *Once I enter for

Re: [PHP] Dynamic Form List - how to change values

2006-03-01 Thread Pat
Thanks to all who helped. The answer...drumroll arrays for each entry: load routine (partial): print td align='center' valign='top'input type='text' name='imageqty[]' size='5' value='$qty'/td; print input type='hidden' name='hiddenalbum[]' value='.$row[cialbum].'; print input

[PHP] Php Setup Question

2006-03-01 Thread Christopher Taylor
I am trying to setup a webserver for testing at home. I can execute php scripts fine, but I cannot include local files like include (test.php). The page comes up with a permission denied. The url is http://mojo.hst-percussion.com/index.php. The phpinfo is

Re: [PHP] Php Setup Question

2006-03-01 Thread Chris
Christopher Taylor wrote: I am trying to setup a webserver for testing at home. I can execute php scripts fine, but I cannot include local files like include (test.php). The page comes up with a permission denied. The url is http://mojo.hst-percussion.com/index.php. The phpinfo is

[PHP] url of code pasted

2006-03-01 Thread Remember14a
Here is the url http://pastebin.com/579621

[PHP] PHP Calendar script

2006-03-01 Thread Robin Hastings
I have been trolling through hotscripts.com and google all night and have tried out a couple of promising-looking PHP-based calendar scripts with no luck, so I'm turning to the collective wisdom of the list to help me out. I'm looking for a calendar script that I can plug into a web site that can