Re: [PHP] Need to recompile php 4.3.4

2006-06-16 Thread chris smith
On 6/17/06, Mauricio Pellegrini <[EMAIL PROTECTED]> wrote: Hi , In order to enable bcmath I need to recompile php 4.3.4 on suse 8.2. but , I would like to preserve the actual installation just in case anything goes wrong ( as this is my production server) What files should I backup / restore i

Re: [PHP] Re: File Download Headers

2006-06-16 Thread Larry Garfield
On Friday 16 June 2006 08:10, Chris Shiflett wrote: > Richard's example is the correct Content-Type to use. Barry's is no > different than this: > > header('Content-Type: foo/bar'); > > It's better to use a valid type and to not have superfluous header() > calls that do nothing. > > Hope that help

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread tedd
At 3:48 PM -0500 6/16/06, Richard Lynch wrote: >On Fri, June 16, 2006 7:26 am, tedd wrote: >> So, there is NOT a way for one running php-application to call another >> and have it run while having the parent quit? > >> 1. There was the suggestion to use includes(). However, includes >> simply adds

Re: [PHP] Re: How to run one php app from another? RECAP

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 4:04 pm, tedd wrote: > How's this for the obvious -- the user doesn't see anything until php > is done with it. That doesn't mean that the entire operation must be > finished, but rather anything that the user see's (while and after > loading) php has already finished with. >

Re: [PHP] Javascript & PHP

2006-06-16 Thread tedd
At 4:06 PM -0500 6/16/06, Richard Lynch wrote: >On Fri, June 16, 2006 3:51 am, Rob W. wrote: >> Ok. I am trying to figure out if this would be the correct thing to >> do. I start off with Java script that looks like this. > >As far as PHP is concerned, Javascript is just "more HTML". As far as PHP

Re: [PHP] Re: File Download Headers

2006-06-16 Thread Richard Lynch
I have now officially GIVEN UP on this thread. On Fri, June 16, 2006 6:03 am, tedd wrote: > At 12:44 PM +0200 6/16/06, Barry wrote: >>tedd schrieb: >>>At 1:44 AM -0400 6/16/06, Chris Shiflett wrote: Richard Lynch wrote: >It is possible that all "modern" browsers have given >in to whi

Re: [PHP] file_exists() behind firewall

2006-06-16 Thread Richard Lynch
I dunno if AJAX will let you quit partway through, but you could definitely do this with the lean and mean hand-coded XmlHttpRequest object and sending HEAD to see if the URL is "there" or not. It will fail, of course, if they run this app from home or anything not behind the firewall. On Fri, Ju

Re: [PHP] Javascript & PHP

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 3:51 am, Rob W. wrote: > Ok. I am trying to figure out if this would be the correct thing to > do. I start off with Java script that looks like this. As far as PHP is concerned, Javascript is just "more HTML". Just cram it into the text of your HTML, or put it into a .js fil

Re: [PHP] Re: How to run one php app from another? RECAP

2006-06-16 Thread tedd
At 3:52 PM -0500 6/16/06, Richard Lynch wrote: >On Fri, June 16, 2006 8:26 am, tedd wrote: >> At 2:35 PM +0200 6/16/06, Barry wrote: >>>But once output is made. You can't remove it. >>> >>>That isn't possible with PHP. >> >> I think I get it now. >> >> PHP does everything before the user see's anyt

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 9:25 am, Martin Alterisio wrote: > You can fork a new process a run the other script in the child > process. But > forking is not always available so I also use another approach: > emulate a > web page request through sockets or curl to the script I want to run. Forking in a

Re: [PHP] Re: How to run one php app from another? RECAP

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 8:26 am, tedd wrote: > At 2:35 PM +0200 6/16/06, Barry wrote: >>But once output is made. You can't remove it. >> >>That isn't possible with PHP. > > I think I get it now. > > PHP does everything before the user see's anything. This is not quite 100% correct... PHP output is

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 7:26 am, tedd wrote: > So, there is NOT a way for one running php-application to call another > and have it run while having the parent quit? > 1. There was the suggestion to use includes(). However, includes > simply adds code into the current application. It does not termin

Re: [PHP] Serving a graphic downloads it instead of displaying it

2006-06-16 Thread Mariano Guadagnini
Brian Dunning wrote: I'm trying to serve up a jpeg like this: header("Content-type: image/jpg"); readfile('images/banner-ad.jpg'); It works on other browsers, but on Safari it downloads the graphic like a file, rather than displaying it. What's up with that --PHP General Mailing List (ht

Re: [PHP] Serving a graphic downloads it instead of displaying it

2006-06-16 Thread Richard Lynch
On Fri, June 16, 2006 9:30 am, Brian Dunning wrote: > I'm trying to serve up a jpeg like this: > > header("Content-type: image/jpg"); > readfile('images/banner-ad.jpg'); > > It works on other browsers, but on Safari it downloads the graphic > like a file, rather than displaying it. What's up with t

RE: [PHP] Re: File Download Headers

2006-06-16 Thread Kristen G. Thorson
> -Original Message- > From: Chris Shiflett [mailto:[EMAIL PROTECTED] > Sent: Friday, June 16, 2006 9:11 AM > To: tedd > Cc: [EMAIL PROTECTED]; Barry; php-general@lists.php.net > Subject: Re: [PHP] Re: File Download Headers > > tedd wrote: > > Barry says you can use these three: > > > > he

[PHP] Re: tag and PHP

2006-06-16 Thread Manuel Lemos
Hello, on 06/16/2006 04:46 AM weetat said the following: > I have a for country in the php file . I would like to load > the country and city belong to the country dynamically from the database. > > Anyone have ideas how to do it ? Take a look at this forms class. It comes with a linked sele

[PHP] Serving a graphic downloads it instead of displaying it

2006-06-16 Thread Brian Dunning
I'm trying to serve up a jpeg like this: header("Content-type: image/jpg"); readfile('images/banner-ad.jpg'); It works on other browsers, but on Safari it downloads the graphic like a file, rather than displaying it. What's up with that -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Martin Alterisio
2006/6/16, tedd <[EMAIL PROTECTED]>: Hi gang: So, there is NOT a way for one running php-application to call another and have it run while having the parent quit? For example, program "a" runs and presents the user with a web page. The user responds in some fashion (i.e., enters text) and clic

[PHP] Need to recompile php 4.3.4

2006-06-16 Thread Mauricio Pellegrini
Hi , In order to enable bcmath I need to recompile php 4.3.4 on suse 8.2. but , I would like to preserve the actual installation just in case anything goes wrong ( as this is my production server) What files should I backup / restore if after compilation php is not working? My actual installa

Re: [PHP] How to run one php app from another? RECAP

2006-06-16 Thread Rabin Vincent
On 6/16/06, tedd <[EMAIL PROTECTED]> wrote: So, what say you fine php people, can anyone give me an example of a php application running (i.e., calling) another? What about something like the code below? I use an extension of that to fake some threading/multi-processing. echo file_get_content

Re: [PHP] bcdiv() function not recognized

2006-06-16 Thread Jochem Maas
Mauricio Pellegrini wrote: > Hi all, > I'm usuing bcdiv like this (you wouldn't believe the number of times I type 'I sue' instead of 'I use' - and I don't even live on the continental US ;-) > >> $someVar=bcdiv($timedifference,86400); > > and it works perfectly on my local server apache 1.329

[PHP] Re: How to run one php app from another? RECAP

2006-06-16 Thread tedd
At 2:35 PM +0200 6/16/06, Barry wrote: >But once output is made. You can't remove it. > >That isn't possible with PHP. I think I get it now. PHP does everything before the user see's anything. Any links (direct or via a form) are objects that the browser can act upon per the user through html or

[PHP] bcdiv() function not recognized

2006-06-16 Thread Mauricio Pellegrini
Hi all, I'm usuing bcdiv like this > $someVar=bcdiv($timedifference,86400); and it works perfectly on my local server apache 1.329 , php 4.34 and suse 8.2 But when I put that module on the production server I get this error Fatal error:Call to undefined function:bcdiv() in /www/tst.php on li

Re: [PHP] Re: File Download Headers

2006-06-16 Thread Chris Shiflett
tedd wrote: Barry says you can use these three: header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); Richard says only use this one: header("Content-type: application/octet-stream"); And, you say us

Re: [PHP] Simple class declaration returns error [SOLVED]

2006-06-16 Thread Jochem Maas
Dave M G wrote: > Jochem, > > Thank you for your advice. I was able to use your suggested code to > develop the results I wanted. > > I found I could simplify the "self" references down to just the name of > the class. that sounds backwards - self == 'database' with the added bonus that if you c

Re: [PHP] Simple class declaration returns error [SOLVED]

2006-06-16 Thread Dave M G
Jochem, Thank you for your advice. I was able to use your suggested code to develop the results I wanted. I found I could simplify the "self" references down to just the name of the class. The syntax I ended up with is class database { private static $database; public static function getDB

[PHP] Re: How to run one php app from another? RECAP

2006-06-16 Thread Barry
tedd schrieb: 1. There was the suggestion to use includes(). However, includes simply adds code into the current application. It does not terminate the parent nor start another application. It simply bloats the parent. Well it would if the webpage showed would also be included. You have one m

[PHP] How to run one php app from another? RECAP

2006-06-16 Thread tedd
Hi gang: So, there is NOT a way for one running php-application to call another and have it run while having the parent quit? For example, program "a" runs and presents the user with a web page. The user responds in some fashion (i.e., enters text) and clicks "Submit". Then the application ana

Re: [PHP] Re: File Download Headers

2006-06-16 Thread tedd
At 12:44 PM +0200 6/16/06, Barry wrote: >tedd schrieb: >>At 1:44 AM -0400 6/16/06, Chris Shiflett wrote: >>>Richard Lynch wrote: It is possible that all "modern" browsers have given in to whichever johnny-come-lately 'standard' made up the Content-disposition header. >>>The original RFC

Re: [PHP] file_exists() behind firewall

2006-06-16 Thread tedd
At 7:57 AM +0100 6/16/06, George Pitcher wrote: >Hi, > >I have several websites that are using a common set of pages (to reduce >maintenance, development and upgrading) and use configuration files to give >the customer the feeling that it is their own unique site. The customers are >all universitie

[PHP] Re: Automatic email sending

2006-06-16 Thread Barry
Murtaza Chang schrieb: Hi everyone, my website need to automatically send an email to people when thier account is about to expire, but iam not sure how to do it. In other words its easy to put a check if an account is about to expire and send automatic email when admin logs in to system, but how

Re: [PHP] Re: File Download Headers

2006-06-16 Thread Barry
tedd schrieb: At 1:44 AM -0400 6/16/06, Chris Shiflett wrote: Richard Lynch wrote: It is possible that all "modern" browsers have given in to whichever johnny-come-lately 'standard' made up the Content-disposition header. The original RFC for it is dated June 1995, so it's not too recent. Ther

Fwd: [PHP] Automatic email sending

2006-06-16 Thread kartikay malhotra
u can use PHP as an offline scripting language. it gives u the power of PHP without the web interface. see tutorial on that. make a PHP and run it in the background by appending &. Or add it to /etc/rc.d/rc.local/ and run it automatically from system startup onwards KM On 6/16/06, Murtaza Cha

Re: [PHP] Re: File Download Headers

2006-06-16 Thread tedd
At 1:44 AM -0400 6/16/06, Chris Shiflett wrote: >Richard Lynch wrote: >>It is possible that all "modern" browsers have given >>in to whichever johnny-come-lately 'standard' made >>up the Content-disposition header. > >The original RFC for it is dated June 1995, so it's not too recent. There are >p

Re: [PHP] Automatic email sending

2006-06-16 Thread Rob W.
If you have a unix box, Use cron to run a script to exec a php file to do it. If you have a windows box, you can setup a scheduled time to run a php file as well. - Rob - Original Message - From: "Murtaza Chang" <[EMAIL PROTECTED]> To: ; Sent: Friday, June 16, 2006 5:15 AM Subject

[PHP] Automatic email sending

2006-06-16 Thread Murtaza Chang
Hi everyone, my website need to automatically send an email to people when thier account is about to expire, but iam not sure how to do it. In other words its easy to put a check if an account is about to expire and send automatic email when admin logs in to system, but how is it possible to do it

Re: [PHP] Javascript & PHP

2006-06-16 Thread Rob W.
Yeah, I think something like that might work. ( I also know it's javascript and not java - Little tired being up @ 5am and havnt slept for over 24 hrs already. ) - Rob - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTECTED]> Cc: Sent: Friday, J

Re: [PHP] Javascript & PHP

2006-06-16 Thread Jochem Maas
Rob W. wrote: > Well for example > > when I pull my mysql db variable > > $serverid=mysql_result($result,$i,"serverid"); > > How do I bind it so this ^^ to the java var below? (I hope english is not you first language - or maybe you write in shorthand *and* you don't bother to reread what you h

Re: [PHP] Javascript & PHP

2006-06-16 Thread Rob W.
Well for example when I pull my mysql db variable $serverid=mysql_result($result,$i,"serverid"); How do I bind it so this ^^ to the java var below? var serverid = serveradd.serverid.value; - Rob - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTE

Re: [PHP] Javascript & PHP

2006-06-16 Thread Jochem Maas
Rob W. wrote: > Well i'm trying to figure out how to bind the php variables to the > javascript variables after I pull them out of the mysql database. something like this? ... $data = getServerTypeDataOrSomething(); ?> ... etc or am I missing the point completely? > > -

Re: [PHP] Javascript & PHP

2006-06-16 Thread Rob W.
Well i'm trying to figure out how to bind the php variables to the javascript variables after I pull them out of the mysql database. - Rob - Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Rob W." <[EMAIL PROTECTED]> Cc: Sent: Friday, June 16, 2006 4:13 AM Subject: Re

Re: [PHP] Javascript & PHP

2006-06-16 Thread Jochem Maas
Rob W. wrote: > Ok. I am trying to figure out if this would be the correct thing to do. I > start off with Java script that looks like this. > > /* > function getType(what,available,owner) { > var serverid = serveradd.serverid.value; > var cabinetid = serveradd.cabinetid.value; >

[PHP] Javascript & PHP

2006-06-16 Thread Rob W.
Ok. I am trying to figure out if this would be the correct thing to do. I start off with Java script that looks like this. /* function getType(what,available,owner) { var serverid = serveradd.serverid.value; var cabinetid = serveradd.cabinetid.value; var rowid = serveradd.

Re: [PHP] tag and PHP

2006-06-16 Thread Jochem Maas
weetat wrote: > Hi all , > > I have a for country in the php file . I would like to load > the country and city belong to the country dynamically from the database. > > Anyone have ideas how to do it ? below is a function that generates a select tag based on the criteria you give it, the fir

[PHP] Re: tag and PHP

2006-06-16 Thread weetat
Thanks barry for input . Barry wrote: weetat schrieb: Hi all , I have a for country in the php file . I would like to load the country and city belong to the country dynamically from the database. Anyone have ideas how to do it ? Thanks - weetat www.php.net/foreach -- PHP General M

[PHP] Re: tag and PHP

2006-06-16 Thread Barry
weetat schrieb: Hi all , I have a for country in the php file . I would like to load the country and city belong to the country dynamically from the database. Anyone have ideas how to do it ? Thanks - weetat www.php.net/foreach -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o

[PHP] tag and PHP

2006-06-16 Thread weetat
Hi all , I have a for country in the php file . I would like to load the country and city belong to the country dynamically from the database. Anyone have ideas how to do it ? Thanks - weetat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu