Re: [PHP] imagecopyresampled, GD

2004-06-25 Thread Curt Zirzow
* Thus wrote Chris: > Marek Kilimajer wrote: > > >Chris wrote --- napísal:: > > > >>Hi there, I've looked in many places but have not found any clues on > >>how to work around this problem. > >> > >>I'm using imagecopyresampled to resize an image and crop part of it > >>at the same time. The ar

Re: [PHP] TIFF images

2004-06-25 Thread Curt Zirzow
* Thus wrote Dan Joseph: > ... > > I was using ImageMagick, however it took a multipage tiff and turned it > into: > > 1.TIFF > > 1.JPG.0 > 1.JPG.1 > 1.JPG.2 > 1.JPG.3 > > Sometimes they are 1.JPG, sometimes only 2 pages, sometimes 10 pages. We've > decided to go with a TIFF viewer plug-in, an

Re: [PHP] Handling Code Continuation

2004-06-25 Thread Curt Zirzow
* Thus wrote gohaku: > Hi everyone, > I would like to know how to handle code breaks or code blocks > that takes up more than two lines. you just might start a war of the gods here > For readability, I would like to know if there is something like the > following: > function input($type,$si

Re: [PHP] socket_set_block undefined

2004-06-25 Thread Curt Zirzow
* Thus wrote Josh Close: > I want to get rid of the version on php in /urs/local, how do I do this? This can be a long story.. but basically in normal conditions if php is compiled with --prefix=/usr/local (by default) then you'll find the php binary in /usr/local/bin/php and stuff in /usr/local/

Re: [PHP] image upload woes

2004-06-25 Thread Curt Zirzow
* Thus wrote Edward Peloke: > I have code which attempts to upload some files and create thumbnails. The > same code on one server works ok, the same code on another server throws an > error everytime I hit submit that says "The document contains no data"...it > appears to be a javascript error.

Re: [PHP] string function that adds before and after

2004-06-25 Thread Curt Zirzow
* Thus wrote Richard Harb: > -Original Message- > From: Gabe > Sent: Friday, June 25, 2004, 9:06:15 PM > > Philip Olson wrote: > > ... > > I'd say it will do the job just fine if case sensitivity is not an > issue: > > $word = 'weather'; > $new = str_replace($word, "$word", $phrase); >

Re: [PHP] How to force mod_php to load php.ini ?

2004-06-25 Thread Curt Zirzow
* Thus wrote Nico Sabbi: > > Hi, > is there a way configure mod_php4 (for apache) so as to be *absolutely* sure > that it will always load all definitions in php.ini when apache starts up? > Maybe with some directive in http.conf ? As far as I know, there isn't a php directive in apache to tell

Re: [PHP] mail sent but not received?!

2004-06-25 Thread Curt Zirzow
* Thus wrote Bing Du: > > $rev = mail($to,$sbj,$msg); > > echo "mail from my.edu result is $rev"; > ?> > -- > > Since the result of the mail() returned is 1, the message should have been > delivered fine. but I did not get anything. Where can I look for more Negative! $rev will s

Re: [PHP] Understanding behavior of 'directories below files'

2004-06-25 Thread Curt Zirzow
Just to re-enforce Michael Sims, post... * Thus wrote KEVIN ZEMBOWER: > I'm a system administrator who's dabbled a bit in PHP, but am not very experienced > in it. My PHP developer came to me with a behavior which neither of us can > understand. > > If you go to this URL, you'll get a broken ve

Re: [PHP] malloc() failure - single function document

2004-06-25 Thread Curt Zirzow
* Thus wrote Joe Lewis: > The script works perfectly from the command line. It turns out to be > related directly to Apache 2.0 and the handling of buckets. yeah, I was afraid of that, and I'm really at a loss with any suggestions as is, except for: Ideal solution: use apache 1.x Alternate

Re: [PHP] Handling Code Continuation

2004-06-25 Thread Marek Kilimajer
gohaku wrote --- napísal:: Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return ">> name=\"$nam

Re: [PHP] Handling Code Continuation

2004-06-25 Thread Greg Donald
On Fri, 25 Jun 2004 22:13:03 -0400, gohaku <[EMAIL PROTECTED]> wrote: > > Hi everyone, > I would like to know how to handle code breaks or code blocks > that takes up more than two lines. > For readability, I would like to know if there is something like the > following: > function input($type,$si

[PHP] Handling Code Continuation

2004-06-25 Thread gohaku
Hi everyone, I would like to know how to handle code breaks or code blocks that takes up more than two lines. For readability, I would like to know if there is something like the following: function input($type,$size,$name,$value) { return ">> name=\"$name\">"; } Thanks. -gohaku -- PHP Genera

Re: [PHP] MYSQL Query results in pages

2004-06-25 Thread Geethanandh Kandasamy
No other way. Use one query to count the total record and then another query for limiting -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] word count on record insertion

2004-06-25 Thread Geethanandh Kandasamy
Did you try calling the word counter function in the onChange event of textbox and truncate the characters/words -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] string function that adds before and after

2004-06-25 Thread Richard Harb
-Original Message- From: Gabe Sent: Friday, June 25, 2004, 9:06:15 PM > Philip Olson wrote: >There's a number of functions in PHP that will give me the position of >the *first* instance of the matched string, but it doesn't look like the >function would keep searching after the

Re: [PHP] imagecopyresampled, GD

2004-06-25 Thread Chris
Marek Kilimajer wrote: Chris wrote --- napísal:: Hi there, I've looked in many places but have not found any clues on how to work around this problem. I'm using imagecopyresampled to resize an image and crop part of it at the same time. The area I need to crop, unfortunately, is sometimes a fl

Re: [PHP] imagecopyresampled, GD

2004-06-25 Thread Marek Kilimajer
Chris wrote --- napísal:: Hi there, I've looked in many places but have not found any clues on how to work around this problem. I'm using imagecopyresampled to resize an image and crop part of it at the same time. The area I need to crop, unfortunately, is sometimes a float, which leads to my

Re: [PHP] word count on record insertion

2004-06-25 Thread Matt M.
> I want to have something similar to this but as mentioned above want > something more reliable so does anyone know a php function to do this or > have a better option? http://us3.php.net/manual/en/function.str-word-count.php, also some good suggestions in the user comments -- PHP General Maili

[PHP] word count on record insertion

2004-06-25 Thread Chris
Hi There, I'm trying to develop a band listing site and was just wondering if there is a php function that could limit the amount of words added into a text area. I'm aware that this can be done in javascript but the only one I found doesn't work properly if you try and paste in text to the text b

[PHP] imagecopyresampled, GD

2004-06-25 Thread Chris
Hi there, I've looked in many places but have not found any clues on how to work around this problem. I'm using imagecopyresampled to resize an image and crop part of it at the same time. The area I need to crop, unfortunately, is sometimes a float, which leads to my problem. imagecopyresample

RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
I want to get rid of the version on php in /urs/local, how do I do this? There is no src to do a "make uninstall" from. I deleted some file/directories, but when I do "php -v" it's still looking for the version in /usr/local/bin instead of /usr/bin. -Josh > -Original Message- > From: P

RE: [PHP] socket_set_block undefined

2004-06-25 Thread Philip Olson
Perhaps you have multiple PHP versions on your system? Like an old CLI or CGI laying around somewhere? Maybe try checking the PHP version in the code as well. If it's not that then I have no idea. Regards, Philip On Fri, 25 Jun 2004, Josh Close wrote: > Well, here's the code i'm using. Let

RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
also, i know socket_set_option() used to be socket_setopt(), that's why i ask -Josh > -Original Message- > From: Philip Olson [mailto:[EMAIL PROTECTED] > Sent: Friday, June 25, 2004 2:11 PM > To: Josh Close > Cc: PHP (E-mail) > Subject: Re: [PHP] socket_set_block undefined > > > > > I'm

RE: [PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
Well, here's the code i'm using. Let me know if I'm doing something silly. if(!socket_set_nonblock($this->socket)){ if($this->logging){ syslog(LOG_ERR, "Could not set socket to nonblock."); } exit(); } //connection part goes here if(!socket_set_block($this->socket)){ if($

Re: [PHP] socket_set_block undefined

2004-06-25 Thread Philip Olson
> I'm trying to use socket_set_block and php.net says (php4 >= 4.2, php5). > > I'm using version 4.3.1 but I get this error > > Fatal error: Call to undefined function: socket_set_block() in . > > Any idea why this is? Has the name changed or been something else? > > socket_set_nonblock()

Re: [PHP] a stupid question

2004-06-25 Thread Blake Schroeder
Everyone Thank you for all the great feedback. Since my function doesnt return data it just echos it to the browser. When I use this format it does not display correctly echo "some text" . aFunction() . "some more text"; If I use the orginal code it displays fine. echo "Some text"; aFunction();

Re: [PHP] string function that adds before and after

2004-06-25 Thread Gabe
Philip Olson wrote: There's a number of functions in PHP that will give me the position of the *first* instance of the matched string, but it doesn't look like the function would keep searching after the first match. Anyway, am I overlooking a function that already has the functionality that I'm s

Re: [PHP] string function that adds before and after

2004-06-25 Thread Philip Olson
> >>There's a number of functions in PHP that will give me the position of > >>the *first* instance of the matched string, but it doesn't look like the > >>function would keep searching after the first match. Anyway, am I > >>overlooking a function that already has the functionality that I'm > >>s

[PHP] socket_set_block undefined

2004-06-25 Thread Josh Close
I'm trying to use socket_set_block and php.net says (php4 >= 4.2, php5). I'm using version 4.3.1 but I get this error Fatal error: Call to undefined function: socket_set_block() in . Any idea why this is? Has the name changed or been something else? socket_set_nonblock() work fine. -Josh

RE: [PHP] a stupid question

2004-06-25 Thread Philip Olson
>> I cant figureout the syntax please help >> >> echo "Some text".aFunction()."some more text"; >> >> The function is not working. > > Your problem is the paren's > > echo "'some text' $aFunction 'some more text'"; > > You need double quotes for the entire string, but single > quotes around t

Re: [PHP] a stupid question

2004-06-25 Thread Randy C Boland
That would work if aFunction was a variable - more less. It would display the inner single quotes, so you'd really want: echo "some text $aFunction some more text"; However, aFunction is, ironically, a function, so it needs to be a function call. echo "some text" . aFunction() . "some more text";

Re: [PHP] string function that adds before and after

2004-06-25 Thread Gabe
Matt M. wrote: There's a number of functions in PHP that will give me the position of the *first* instance of the matched string, but it doesn't look like the function would keep searching after the first match. Anyway, am I overlooking a function that already has the functionality that I'm search

RE: [PHP] image upload woes

2004-06-25 Thread Jay Blanchard
[snip] I have code which attempts to upload some files and create thumbnails. The same code on one server works ok, the same code on another server throws an error everytime I hit submit that says "The document contains no data"...it appears to be a javascript error. It is not an error that I am t

RE: [PHP] mail sent but not received?!

2004-06-25 Thread Josh Close
Your message could have bounced or been rejected for some other reason, in which case you wouldn't have recieved it, but it'll look like it's sent fine. -Josh > -Original Message- > From: Bing Du [mailto:[EMAIL PROTECTED] > Sent: Friday, June 25, 2004 11:08 AM > To: [EMAIL PROTECTED] >

Re: [PHP] string function that adds before and after

2004-06-25 Thread Matt M.
> There's a number of functions in PHP that will give me the position of > the *first* instance of the matched string, but it doesn't look like the > function would keep searching after the first match. Anyway, am I > overlooking a function that already has the functionality that I'm > searching f

[PHP] image upload woes

2004-06-25 Thread Edward Peloke
I have code which attempts to upload some files and create thumbnails. The same code on one server works ok, the same code on another server throws an error everytime I hit submit that says "The document contains no data"...it appears to be a javascript error. It is not an error that I am throwin

[PHP] string function that adds before and after

2004-06-25 Thread Gabe
What I'm trying to do is find a substring in a much longer string and insert another string before and after the substring. For example: string to find: weather string to search in: "This is the worst weather ever. Weather around here is terrible." string to add before: string to add after:

RE: [PHP] Understanding behavior of 'directories below files'

2004-06-25 Thread KEVIN ZEMBOWER
Michael, thank you for finding out this information. I think you're right on the money. Unfortunately, when I tried to implement the --disable-path-info-check on my PHP system, it didn't work. Reading the fine print at http://www.php.net/manual/en/configure.php showed: --disable-path-info-check

Re: [PHP] mail sent but not received?!

2004-06-25 Thread Stut
On Fri, 25 Jun 2004 11:08:26 -0500 (CDT), Bing Du <[EMAIL PROTECTED]> wrote: > Since the result of the mail() returned is 1, the message should have been > delivered fine. but I did not get anything. Where can I look for more > clues of what the problem might be, like possible log, or turn on som

[PHP] Re: Date Select

2004-06-25 Thread Gerben
select * from table where TO_DAYS(date_field) > ( TO_DAYS(NOW()) -7 ) this will give the entries of the last 7 days (and the ones that are in the future) "Tom Chubb" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How can I query a MySQL table to get the latest results from a date f

RE: [PHP] Understanding behavior of 'directories below files'

2004-06-25 Thread Michael Sims
KEVIN ZEMBOWER wrote: > If you go to this URL, you'll get a broken version of the main home > page on our site: http://www.hcpartnership.org/index.php/search . We > can't understand this, because 'index.php' is a file, not a > directory. (The correct web page is just at > http://www.hcpartnership.o

[PHP] TIFF images

2004-06-25 Thread Dan Joseph
Hi Everyone, Last week I posted about having a problem displaying TIFFs thru PHP. This week I'm back to issues, tho slightly different. I'll start over with my case. I have a docroot: /usr/local/apache/htdocs-chm/ I have an images dir: /usr/local/apache/chm-images/ These are sensitiv

[PHP] mail sent but not received?!

2004-06-25 Thread Bing Du
Hi, I've been pulling my hair out over this problem for a while... -- Since the result of the mail() returned is 1, the message should have been delivered fine. but I did not get anything. Where can I look for more clues of what the problem might be, like possible

[PHP] Understanding behavior of 'directories below files'

2004-06-25 Thread KEVIN ZEMBOWER
I'm a system administrator who's dabbled a bit in PHP, but am not very experienced in it. My PHP developer came to me with a behavior which neither of us can understand. If you go to this URL, you'll get a broken version of the main home page on our site: http://www.hcpartnership.org/index.php/s

Re: [PHP] How to force mod_php to load php.ini ?

2004-06-25 Thread Marek Kilimajer
Nico Sabbi wrote --- napísal:: Hi, is there a way configure mod_php4 (for apache) so as to be *absolutely* sure that it will always load all definitions in php.ini when apache starts up? Maybe with some directive in http.conf ? Almost every time I reboot my pc apache and php start, but php is no

RE: [PHP] a stupid question

2004-06-25 Thread Alicia Riggs
Your problem is the paren's echo "'some text' $aFunction 'some more text'"; You need double quotes for the entire string, but single quotes around the text so it knows it is text. Alicia Riggs Professional Services Group Senior Web Development Engineer 214-550-7452 -Original Message---

[PHP] How to force mod_php to load php.ini ?

2004-06-25 Thread Nico Sabbi
Hi, is there a way configure mod_php4 (for apache) so as to be *absolutely* sure that it will always load all definitions in php.ini when apache starts up? Maybe with some directive in http.conf ? Almost every time I reboot my pc apache and php start, but php is not running with /etc/php.ini, s

RE: [PHP] socket_bind

2004-06-25 Thread Josh Close
Thanks, changing the port worked. -Josh > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Friday, June 25, 2004 9:22 AM > To: [EMAIL PROTECTED] > Cc: PHP (E-mail) > Subject: Re: [PHP] socket_bind > > > I think all sockets less then 1024 need superuser perm

Re: [PHP] socket_bind

2004-06-25 Thread bbonkosk
I think all sockets less then 1024 need superuser permission to bind. And because Apache typically runs as nobody you don't have permission, so either run apache as root (DANGER!) or choose a socket above 1024. -Brad - Original Message - From: Josh Close <[EMAIL PROTECTED]> Date: Frida

[PHP] socket_bind

2004-06-25 Thread Josh Close
I'm trying to do socket_bind() and it works fine from the command line as root, but when I try to use it through apache I get this error Warning: socket_bind() unable to bind address [13]: Permission denied in .. Is there a way to have this run through apache? -Josh -- PHP General Mailing

Re: [PHP] No MySQL in Fedora?

2004-06-25 Thread Marek Kilimajer
Install php-mysql package Jough P wrote --- napísal:: Greetings all, just installed Fedora with the bundled PHP Version 4.3.4. Upon calliing mysql_* functions I get errors like: Fatal error: Call to undefined function: mysql_pconnect() blah blah blah A call to phpinfo() reveals it was configured

[PHP] No MySQL in Fedora?

2004-06-25 Thread Jough P
Greetings all, just installed Fedora with the bundled PHP Version 4.3.4. Upon calliing mysql_* functions I get errors like: Fatal error: Call to undefined function: mysql_pconnect() blah blah blah A call to phpinfo() reveals it was configured with: --with-mysql=shared,/usr' And doing a "locate m

RE: [PHP] Streaming

2004-06-25 Thread Stephen Craton
What I'm basically trying to do is make the database display out the information from it's tables as soon as it possibly can without the need for refreshing. For example: Someone enters in some text, and it's put into the database. As soon as possible, the text is shown in a page that wasn't refre

[PHP] gd2 functions without gd2?

2004-06-25 Thread Edward Peloke
I have a small image resize function which works great on my local server as I have the gd2 library. It uses the imagecreatetruecolor function which makes the thumbnails look good, without it, they look bad. The problem is, my webhost is not going to upgrade to gd2 sois there anyway I can pul

Re: [PHP] Form Submission

2004-06-25 Thread Marek Kilimajer
Shaun wrote --- napísal:: "Matt M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] another button to the form that utilises my JavaScript popup function and takes the values from the same form? This is not a php question. All you need to do is loop through the form fields on you page a

Re: [PHP] Form Submission

2004-06-25 Thread Matt M.
> Thanks for your reply, the problem here is that if I loop through the values > and them to the URL when the other button is pressed to submit the form the > form action will still kink to itself rather than opening a new popup > window... that should stop form submission if they click your but

Re: [PHP] Form Submission

2004-06-25 Thread Shaun
"Matt M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > another button to the form that utilises my JavaScript popup function and > > takes the values from the same form? > > This is not a php question. > > All you need to do is loop through the form fields on you page and add >

Re: [PHP] Form Submission

2004-06-25 Thread Matt M.
> another button to the form that utilises my JavaScript popup function and > takes the values from the same form? This is not a php question. All you need to do is loop through the form fields on you page and add them to the end of your url. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] problems with system() call

2004-06-25 Thread Jason Wong
On Friday 25 June 2004 13:20, Jim Rainville wrote: > system("write_port 0x"); > > When I call this from the script the port does not get written to. 1) Enable FULL error reporting 2) Use /full/path/to/write_port -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Softwa

[PHP] Form Submission

2004-06-25 Thread Shaun
Hi, I have a form on my page. The form action is linked to itself so that the values entered will refresh the page accordingly. Is it possible to add another button to the form that utilises my JavaScript popup function and takes the values from the same form? function openQueryWindow(URL) { va

[PHP] Re: Date Select

2004-06-25 Thread pete M
select * from table where week(date_field) = ( week(now()) -1 ) Tom Chubb wrote: How can I query a MySQL table to get the latest results from a date field? Basically, I am inserting several records at a time at the end of each week. I want to have a page that displays the results for the last week

[PHP] RE: [PHP-DB] Date Select

2004-06-25 Thread Tom Chubb
Jeffrey, Thanks for this, I've just realised that it's always the same no of inserts, so perhaps I should just order by date then my previous sort field and then limit the result to 20? (It's all 20 results that I need displayed) Thanks, Tom -Original Message- From: [EMAIL PROTECTED] [mai

[PHP] Re: [PHP-DB] Date Select

2004-06-25 Thread jeffrey_n_Dyke
>How can I query a MySQL table to get the latest results from a date field? >Basically, I am inserting several records at a time at the end of each week. >I want to have a page that displays the results for the last week only. >The date format in the field is -MM-DD if you want the latest

[PHP] Date Select

2004-06-25 Thread Tom Chubb
How can I query a MySQL table to get the latest results from a date field? Basically, I am inserting several records at a time at the end of each week. I want to have a page that displays the results for the last week only. The date format in the field is -MM-DD

[PHP] [Newbie Guide] For the benefit of new members

2004-06-25 Thread Ma Siva Kumar
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try htt

[PHP] Re: a 4 days diary

2004-06-25 Thread Alireza Balouch
since there aren't much data you can do something like this: 1 . make db table tableName id INT title VARCHAR(30) Data TEXT timestamp VARCHAR(30) 2. just dump the data you get from the user into a db.. 3. when you are ready to get the data back for view from database you can simply

Re: [PHP] How? First big letter

2004-06-25 Thread Labunski
Thank you very much! That helps! As I sad before, I would look for it myself , but I wasn't sleepinng all the night, this way I think it would be a liittle bit difficult to find it. Thank you once more, Lab. wrote in message news:[EMAIL PROTECTED] > Use ucfirst() > > Labunski wrote: > > >Hello,

Re: [PHP] How? First big letter

2004-06-25 Thread "Miguel J. Jiménez"
Use ucfirst() Labunski wrote: Hello, how to make the firs letter of the word Big? for example I have: $colour = "car is red"; but I need: $colour = "Car is big". Thank you very much, I would look for the answer myself using google, but I have no time for it. I hope there is an easy solution for thi

[PHP] How? First big letter

2004-06-25 Thread Labunski
Hello, how to make the firs letter of the word Big? for example I have: $colour = "car is red"; but I need: $colour = "Car is big". Thank you very much, I would look for the answer myself using google, but I have no time for it. I hope there is an easy solution for this. Lab. -- PHP General M

[PHP] R: [PHP] MYSQL Query results in pages

2004-06-25 Thread Alessandro Vitale
Here is a nice trick guys... if you want to page the result of this query : SELECT * FROM user; turn it into this one: SELECT SQL_CALC_FOUND_ROWS * FROM user LIMIT $offset,$limit; so in the end all you have to do is to perform one single query and even before fetching the rows you can call the

[PHP] Re: a stupid question

2004-06-25 Thread David Robley
Blake Schroeder wrote: > Hey > > I cant figureout the syntax please help > > echo "Some text".aFunction()."some more text"; > > The function is not working. > > Thanks > > -B What is it you expect, and what is actually happening? -- David Robley What do batteries run on? -- PHP General M