[PHP] popen returns true whether script exists or not?
Hi, I'm trying to popen a cgi script that was designed to be open via a SSI include, but cannot because of passing variable restrictions. I'm popening a cgi script and it is returning a process pointer regardless of whether the string passed to it points to anything. Is this the expected response? this returns a process pointer even though bannerz.cgi doesn't exist I then need to read the results of the cgi script and dump them to the screen like so; but this is not functioning, does anyone have any ideas? Regards Tom Hodder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] global variables in functions
Hi, I have a function like so function updateForm() { global $link; $query = "UPDATE badgers SET lname = '$lname', fname = '$fname' WHERE ID = '$ID'"; mysql_query( $query, $link ); } is there a simple way to access the global form values without working out which method was used and then using the global keyword on the HTTP_POST_VARS / HTTP_GET_VARS?? Regards Tom Hodder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: SV: [PHP] Sending alots of mail
You could write all the emails to a database with columns toAddress,fromAddress,subject,body and any others you might want, and then write a cron job to check the database every 10 mins for records it might also be possible to read the process list into a variable and then only start new sendmail processes when there are less than certain number of sendmails runnning to balance the load. -Original Message- From: Tim [mailto:[EMAIL PROTECTED]] Sent: 16 August 2001 17:39 To: Jimmy Bäckström Cc: Tyler Longren; [EMAIL PROTECTED] Subject: Re: SV: [PHP] Sending alots of mail I have a system where we send periodic batches of 60,000 messages at a time, so it's definitely doable. It helps to put some throttling in there (i.e. a sleep() periodically) to be kind to your e-mail server. - Tim On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote: > Hmm I knew that =) > I just wondered if it's such a good idea. 5000 mail is very much you know. > > /Jimmy > - Original Message - > From: Tyler Longren <[EMAIL PROTECTED]> > To: Jimmy Bäckström <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, August 16, 2001 6:25 PM > Subject: Re: [PHP] Sending alots of mail > > > > This was just discussed last week. Here's how: > > $connection = mysql_connect("host","user","pass"); > > $db = mysql_select_db("db_name", $connection); > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC"); > > while ($row = mysql_fetch_array($sql)) { > > $email = $row["email"]; > > $name = $row["name"]; > > // code to send email (use the mail() function) > > } > > > > Good luck, > > Tyler Longren > > Captain Jack Communications > > [EMAIL PROTECTED] > > www.captainjack.com > > > > > > > > On Thu, 16 Aug 2001 18:29:04 +0200 > > Jimmy Bäckström <[EMAIL PROTECTED]> wrote: > > > > > Hi list! > > > I'm about to write an application that takes about 5000 mailadresses > > > from a database, and then sends a mail to each one of them. I haven't > > > done this kind of apps before, so I don't know if it's a good idea. Does > > > anyone have any suggestions? > > > > > > /Jimmy > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Need to dynamically globalise variables
I have a function like this... function register_db_to_globals( $row ) { while( list( $key, $val) = each( $row ) ) { global $$key; // (I've tried this with $key as well print "$key : $val "; } } where the function prints this; job_ID : 2 jobTitle : testtestt jobDesc : esttest jobShortDesc : jobSalary : jobLocation : client_ID : 2 jobContractType : 1 I want to create global variables from the data ie $job_ID = 2, $jobTitle = testtestt but this is not working, the values are remaining empty. Has anyone got any ideas on this. Regards Tom Hodder -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how to execute PHP in CGI?
#!/usr/bin/php print "test"; // More code here etc etc -Original Message- From: Gershon [mailto:[EMAIL PROTECTED]] Sent: 13 September 2001 14:11 To: [EMAIL PROTECTED] Subject: [PHP] how to execute PHP in CGI? Hello All!! how to execute PHP in CGI? Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]