Re: [PHP] php and linux shell script

2005-04-19 Thread Rory Browne
> http://gtk.php.net/ > Can you elaborate on what gtk has to do with making command line dialog boxes? > -- > Like Music? > http://l-i-e.com/artists.htm > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing Li

Re: [PHP] can I join two mp3 files with php

2005-04-19 Thread Rory Browne
Are you on Windoze or Linux. If you're on linux, I'm sure you could rig up something with mencoder. If you're on windoze, you might still be able to use mencoder, but I'm not sure, and you may find yourself with the need to explore other options. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: Session variables are not stored when set in implicitly calledconstructor!??

2005-04-19 Thread Jason Barnett
Adam wrote: > Hallo again, > thank You for Your response. > > >>>// singleton for request >>>class Request { >>>function __destructor() { >>>$_SESSION["variable"] = "hallo"; >> >>The __destructor() method is supposed to be about killing the class >>(Request). It's probably bad practice

php-general@lists.php.net

2005-04-19 Thread David Dorward
For documents to conform to the XHTML recommendation, ampersand characters much be encoded as &. The documentation for PHP recognises this. The same applies to HTML (with some exceptions that the session code will never encounter), although the PHP documentation makes no mention of this. Given thi

Re: [PHP] set cookie function problem

2005-04-19 Thread Ospinto
Marek, you're right. Thanks. Solved the problem "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ospinto wrote: > > ok...what does that have to do with my problem? > > The time is send in GMT, and your computer is set to GMT -7. So the > cookie is set to expi

php-general@lists.php.net

2005-04-19 Thread Tom Rogers
Hi, Wednesday, April 20, 2005, 5:56:44 AM, you wrote: DD> For documents to conform to the XHTML recommendation, ampersand characters DD> much be encoded as &. The documentation for PHP recognises this. The DD> same applies to HTML (with some exceptions that the session code will never DD> encounte

php-general@lists.php.net

2005-04-19 Thread Roger B.A. Klorese
On Wed, 20 Apr 2005, Tom Rogers wrote: > You can set this with arg_separator.output in php.ini That doesn't really answer why the choice was made to default to what not only shouldn't be the default, but should probably be illegal altogether. -- PHP General Mailing List (http://www.php.net/)

php-general@lists.php.net

2005-04-19 Thread Jared Williams
> > For documents to conform to the XHTML recommendation, > ampersand characters much be encoded as &. The > documentation for PHP recognises this. The same applies to > HTML (with some exceptions that the session code will never > encounter), although the PHP documentation makes no mention of

Re: [PHP] Last visitors

2005-04-19 Thread Ryan A
Hey, Thanks for replying, I tried using the test example of Petar Nedyalkov, but when i try to create the following: CREATE TABLE `profile_log` ( `profile_id` int(10) default NULL, `user_id` int(10) default NULL, `last_login` timestamp NOT NULL ) ENGINE=MyISAM CHARSET=utf8 I get an err

[PHP] Matching Number of Times a Word Occurs...

2005-04-19 Thread Russell P Jones
Im trying to count the number of times a word occurs in a string - is the only way to do this preg_match_all? Russ Jones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general@lists.php.net

2005-04-19 Thread Tom Rogers
Hi, Wednesday, April 20, 2005, 9:05:39 AM, you wrote: RBAK> On Wed, 20 Apr 2005, Tom Rogers wrote: >> You can set this with arg_separator.output in php.ini RBAK> That doesn't really answer why the choice was made to default to what RBAK> not only shouldn't be the default, but should probably be

[PHP] Encoding help!

2005-04-19 Thread Brian Dunning
I know this is a common question but I have RTFM and STFW until I'm blue in the face - I really need some help here. :) I've got some forms into which users are going to enter text that frequently contains funny characters (pilcrows, foreign text, etc). So I need to encode it before writing i

[PHP] Re: Matching Number of Times a Word Occurs...

2005-04-19 Thread Al
Russell P Jones wrote: Im trying to count the number of times a word occurs in a string - is the only way to do this preg_match_all? Russ Jones No, there are hundreds of other ways; but, preg_match_all() is probably the easiest. $number= preg_match_all("%$word%sm", $string, $matches); -- PHP Gen

[PHP] Re: Convert gif to jpg

2005-04-19 Thread scottkovach
This should work for you: $image_dimensions = @getimagesize($uploadedfilename); $src_image = @imagecreatefromgif($uploadedfilename); $resized_image = @imagecreatetruecolor($width,$height); // can be resized, or else set these vars to the same as the original if (($src_image) && ($resized_image))

Re: [PHP] Sorting table columns dynamically on normalized MySQL tables

2005-04-19 Thread Kim Briggs
Greetings, If you are still looking for "tips" and want to get complicated/fancy, I have seen columns used called sort_order more than a few times. This should not be too hard to maintain for things like a few buildings, etc., where the lookup table does not change much over time. You would th

Re: [PHP] Matching Number of Times a Word Occurs...

2005-04-19 Thread Matthew Fonda
Hello, http://us4.php.net/substr_count Regards, Matthew Fonda Russell P Jones wrote: Im trying to count the number of times a word occurs in a string - is the only way to do this preg_match_all? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Date class

2005-04-19 Thread Rob Agar
Matthias wrote: > Have you looked at the PEAR Date class? > > http://pear.php.net/package/Date PEAR Date is good - I use it a lot - but watch out for this bug if you're running on Windows http://pear.php.net/bugs/bug.php?id=2344 basically, there's some getenv/putenv trickery in the Date_Timezone

[PHP] PHP script problem (with MySQL)

2005-04-19 Thread Sugimoto
Hello, (BI need your help about PHP (ver 4.3.1) and MySQL (ver 3.23) database. (BI am struggling to customise a database (using left command etc), and am (Bstuck now. (BPlease have a brief look at my scripts below. (B (BWhat I do like to do is to get first 3 letters from "loc1" column from (

[PHP] script

2005-04-19 Thread tommy
I'm hoping someone on this list can help me with something I've been struggling with lately... I have a php based web page that I'd like to have load an include file only when it is Tuesday 11pm - Weds 1 am Eastern Standard time (USA). At other times I would like my page to load and alternate i

Re: [PHP] script

2005-04-19 Thread Stephen Johnson
http://php.net/time http://php.net/date http://php.net/mktime one or a combination of these functions will help you do what you want. HTH On Apr 19, 2005, at 6:37 PM, tommy wrote: I'm hoping someone on this list can help me with something I've been struggling with lately... I have a php based web

Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 6:25 pm, Sugimoto said: > What I do like to do is to get first 3 letters from "loc1" column from > openart_table (MySQL). select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table ... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (

Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Richard Lynch
[Connective issues may make this a duplicate post. Sorry.] On Tue, April 19, 2005 6:25 pm, Sugimoto said: > What I do like to do is to get first 3 letters from "loc1" column from openart_table (MySQL). select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table ... -- Like Music? h

RE: [PHP] script

2005-04-19 Thread Rob Agar
here's the clue to the other half of the puzzle: you can do this kind of thing in php if (whatever) { include 'something.php'; } else { include 'something else.php'; } hth, Rob > -Original Message- > From: Stephen Johnson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 2

Re: [PHP] Last visitors

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 4:46 pm, Ryan A said: > Hey, > Thanks for replying, I tried using the test example of Petar Nedyalkov, > but > when i try to create the following: > > CREATE TABLE `profile_log` ( >`profile_id` int(10) default NULL, >`user_id` int(10) default NULL, >`last_login`

[PHP] Re: post & redirect

2005-04-19 Thread Matthew Weier O'Phinney
* Jem777 <[EMAIL PROTECTED]>: > If I submit a post and then, serverside, I redirect the request to another > page, do the post variables still live in the new page? No. HTTP requests are stateless, meaning they have no memory of what requests happened before or after, or how those requests were ma

php-general@lists.php.net

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 4:05 pm, Roger B.A. Klorese said: > On Wed, 20 Apr 2005, Tom Rogers wrote: >> You can set this with arg_separator.output in php.ini > > That doesn't really answer why the choice was made to default to what > not only shouldn't be the default, but should probably be illegal

[PHP] Re: Sessions - going back in browser

2005-04-19 Thread Matthew Weier O'Phinney
* Craig Donnelly <[EMAIL PROTECTED]>: > I had an issue that I needed to be able to go back in the browser while in a > session without getting "page has expired", I was reading through the manual > and came across a comment about adding the following to the sessions page to > allow users to travers

Re: [PHP] php and linux shell script

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 2:24 pm, Rory Browne said: >> http://gtk.php.net/ >> > > Can you elaborate on what gtk has to do with making command line dialog > boxes? Well, you run it from the command line. And it makes dialog boxes. Maybe not the kind of dialog boxes you wanted or whatever, but that

php-general@lists.php.net

2005-04-19 Thread Roger B.A. Klorese
Richard Lynch wrote: Why in the world should we be forced to follow your narrow-minded so-called "standard"? :-) Hint: smileys indicate that you're joking. If you're joking, I don't get what's humorous -- please explain. If you're making a serious point but trying to have the rhetorical equ

Re: [PHP] can I join two mp3 files with php

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 1:17 pm, QT said: > is it easy like this, I tried and works good. Shouldn't I need to handle > something inside mp3? just easy to put each file together in the another > file? Some players will play it, and some won't. Technically, it's an invalid MP3, but most players will

[PHP] Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Sugimoto
Thank you, Richard, (B (BI simply change this part (B(select * from openart_table) into (B(select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table) (Bbut Ive got this error, whats wrong with it? (B (BWarning: mysql_num_rows(): supplied argument is not a valid MySQL result (B

Re: [PHP] Sorting table columns dynamically on normalized MySQL tables

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 12:10 pm, Leif Gregory said: > I've been wrestling with this one for a bit and wanted to see if > anyone had a nice magic bullet (yeah right) to do this. Yes. > Now, I want to display all the courses and have the names instead of > id numbers show up, so I'd select from Cou

Re: [PHP] set cookie function problem

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 2:20 pm, Ospinto said: > Can someone help me with this problem? > setcookie('myCookie',"blah"); > works fine. but when i try to set it with an expiry time, it doesn't. > setcookie('myCookie',"blah",time()+3600); > > I have cookies enabled on my browser of course. And the way

[PHP] dynamic class loaders

2005-04-19 Thread php
Hi there i was wondering if there is such an extension available or possbility to have a dynamicclass loader extension which would use the request_uri as loading the class constructors ? I justthink building such a thing in php which is what i am doing too slow for each request and think itshould

Re: [PHP] Sessions - going back in browser

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 9:26 am, Craig Donnelly said: > I had an issue that I needed to be able to go back in the browser while in > a > session without getting "page has expired", I was reading through the > manual > and came across a comment about adding the following to the sessions page > to > a

Re: [PHP] Images - Converting TIFF Format?

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 7:39 am, The Disguised Jedi said: > Is there a quick way to convert a TIFF format picture to a GIF quickly? I I'm reasonably certain you can get GD to read TIFF files, if you install TIFF on your server, and then the GD extension again... Start reading at http://php.net/gd

Re: [PHP] explode a string

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 7:03 am, Jochem Maas said: > The 'other' guy mentioned that while() is faster than foreach, > is this true? Don't know ; Don't care. You should never loop through so many things in PHP that it matters in the first place :-) > I read a few days ago somewhere on php.net that

Re: [PHP] Last visitors

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 5:57 am, Ryan A said: > On the profile page there should be "last 10 visitors", it will not > register > the guests, but if someone had logged in and visited your profile, it > should > show their usernameif there are 10 enteries in the db and when the > 11th > person com

Re: [PHP] Matching Number of Times a Word Occurs...

2005-04-19 Thread Prathaban Mookiah
substr_count() should be more easy, but limited in functionality. Prathap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php output fills apache buffer for clients with slow internet connections

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 2:13 am, Martin Mandl said: > Therefore (finally) here come the questions: > Is there a way to control the output speed of the php script according > to the actual download speed between the browser and the server? > Or is there a way to monitor the memory usage of the apache

Re: [PHP] dynamic class loaders

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 8:28 pm, [EMAIL PROTECTED] said: > Hi there i was wondering if there is such an extension available or > possbility to have a dynamicclass loader extension which would use the > request_uri as loading the > class constructors ? I justthink building such a thing in php which i

php-general@lists.php.net

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 7:45 pm, Roger B.A. Klorese said: > Richard Lynch wrote: > >>Why in the world should we be forced to follow your narrow-minded >>so-called "standard"? :-) >> >> > > Hint: smileys indicate that you're joking. If you're joking, I don't > get what's humorous -- please explain.

Re: [PHP] Images - Converting TIFF Format?

2005-04-19 Thread Tom Rogers
Hi, Wednesday, April 20, 2005, 12:39:54 AM, you wrote: TDJ> Is there a quick way to convert a TIFF format picture to a GIF quickly? I TDJ> can only find support for GIFs in PHP, but maybe I'm missing something. I TDJ> have a client running a photography business, and I have designed an image TDJ>

Re: [PHP] dynamic class loaders

2005-04-19 Thread Dan Rossi
On 20/04/2005, at 2:52 PM, Richard Lynch wrote: I don't quite see how: can be sped up much... The problem isn't in the require function, but in the Class source bloat... But maybe I'm just being stoopid. First thing first, I am sure you are not new to the list and so arent I but dont try and

[PHP] Re: dynamic class loaders

2005-04-19 Thread Markus Fischer
[EMAIL PROTECTED] wrote: Hi there i was wondering if there is such an extension available or possbility to have a dynamicclass loader extension which would use the request_uri as loading the class constructors ? I justthink building such a thing in php which is what i am doing too slow for each r

[PHP] Re: PHP script problem (with MySQL)

2005-04-19 Thread Satyam
May I sugest that you assemble the SQL statement in a different way? With such a big conditional, it will slow down the Sql server. if ($tit != '') $condition .= "and tit1 like '%$tit%'"; and so on for each search field ... $sql = "Select *, substring(loc1, 1, 3) as loc1 from openart_tabl

Re: [PHP] Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Petar Nedyalkov
On Wednesday 20 April 2005 06:07, Sugimoto wrote: (B> Thank you, Richard, (B> (B> I simply change this part (B> (select * from openart_table) into (B> (select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table) (B> but Ive got this error, whats wrong with it? (B> (B> Warning:

Re: [PHP] dynamic class loaders

2005-04-19 Thread Petar Nedyalkov
On Wednesday 20 April 2005 06:28, [EMAIL PROTECTED] wrote: > Hi there i was wondering if there is such an extension available or > possbility to have a dynamicclass loader extension which would use the > request_uri as loading the class constructors ? I justthink building such a > thing in php whic

[PHP] Re: Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Satyam
I think that in your database it is : substring(loc, 1, 3) as loc1 Anyway, the error is not where you are getting the message, the query failed and this you don't have a valid resource to ask the number of rows or do anything else. You should add an 'or die("message: " . mysql_error()) to you

Re: [PHP] Re: dynamic class loaders

2005-04-19 Thread Dan Rossi
Thanks this seemed to work except say you had a class Packagename_Classname its trying to load the file like that Packagename_Classname.php On 20/04/2005, at 4:23 PM, Markus Fischer wrote: [EMAIL PROTECTED] wrote: Hi there i was wondering if there is such an extension available or possbility to

<    1   2