Re: [PHP] PHP & MySQL -> Field Title

2007-04-30 Thread Oliver Block
Am Montag, 30. April 2007 07:47 schrieb Christian Haensel:
> but now I have the problem with the field names and all... can someone
> point me into the right direction?



php-db at lists.php.net

If you need to use an assoc array, use the following SQL Syntax:

INSERT INTO new_table SET key0=value0, key2=value2, ..., 

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sockets as a module or a separate PHP CLI instance?

2007-05-02 Thread Oliver Block
Am Mittwoch, 2. Mai 2007 13:29 schrieb [EMAIL PROTECTED]:
> I need to do some socket work on a production machine that is constantly
> busy so I don't dare re-compile php. Anybody know if it's possible to load
> the socket functions dynamically, maybe as if they were in a module?

It's possible if it's possible to compile it as shared object. It is, as far 
as I know. 

--with-socket=shared

There might be some obstacles with threaded servers. I am not sure.

> Alternatively, would it be possible to compile PHP without apache and with
> sockets for command line use only?

--enable-cli

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sockets as a module or a separate PHP CLI instance?

2007-05-02 Thread Oliver Block
Am Mittwoch, 2. Mai 2007 14:36 schrieb Oliver Block:
> --with-socket=shared

Actually it should be --enable-sockets=shared

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Bounce composition

2007-05-02 Thread Oliver Block
Am Mittwoch, 2. Mai 2007 20:11 schrieb Richard Lynch:
> Does anybody have or know of a good simple PHP script that can take an
> email as an input, and compose a "Bounce" email as output?
>
> I need something that does just that, without a huge framework or a
> zillion other "features"...

please try this:

$env['from'] = '[EMAIL PROTECTED]';
$env['to'] = '[EMAIL PROTECTED]';
$env['remail'] = imap_fetchheader($stream, $msgno);

$part0['contents.data'] = imap_body($stream, $msgno);
$body[0] = $part0;

$bounce_msg = imap_mail_compose($env, $body);

Not you should get rid of the 'Received-' headers.

I did not test it. If something goes wrong, please post again.

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] passing GET via include

2007-05-04 Thread Oliver Block
Am Freitag, 4. Mai 2007 09:22 schrieb Mark Smith:
> Hello all,
> Is there a way to allow the passing of variables to included scripts

See it another way: The includED script will be part of the includING script. 

---includeme.inc-

---includer.php--

-

Will be the same as
---dont_like_inclusions.php---

---


Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using timezones

2007-05-04 Thread Oliver Block
Am Freitag, 4. Mai 2007 13:39 schrieb Rob Desbois:
> What's the best way to go about providing this functionality? Should I just
> provide an option of all regional timezones (how do I use this?

If the user specifies the timezone, it might be comfortable to use the time 
zones as described in Appendix I.



> The manual 
> says where to download a pre-compiled Windows DLL but doesn't explain how
> to use it). Even if I do that how should I obtain UTC time if UTC is a
> deprecated timezone?

AFAIK the timezone data is builtin by default, so you would not need to 
install anything else.

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mail() only working with php-cli

2007-05-05 Thread Oliver Block
Hello Andy,

did you take a look into the apache log files?

Regards,

Oliver


Am Samstag, 5. Mai 2007 22:53 schrieb Andy B.:
> Is there any way to debug the mail() function within PHP4 or PHP5?
>
> The following code is not working when called from a browser, but it does
> work from the command line:
>
>  $to  = '[EMAIL PROTECTED]';
> $subject = 'the subject';
> $message = 'hello...';
> $headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
> 'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
> 'X-Mailer: PHP/' . phpversion();
>
> if(mail($to, $subject, $message, $headers))
> echo "IT WORKED";
> else
> echo "DAMN!!!";
> ?>
>
>
> php and php-cli use the same php.ini file. Php via Apache is launched as a
> module, NOT as CGI!
>
> sendmail_path is correctly set to /usr/sbin/sendmail -t -i
>
> the /var/log/mail.log only shows activity when I try my code via command
> line, so my best guess is that sendmail is never reached when run from the
> browser.
>
> I went a little deeper and modified the sendmail_path to /tmp/test.sh,
> which contains:
>
> #!/bin/bash
> echo "I was used!!" > /tmp/test.log
>
> (chmod 777 /tmp/test.sh)
>
> Again I tried my script from the web and from the command line. Same
> result... command line is fine and generates the test.log file. In the
> browser no log file is created.
>
> I have already made numerous LAMP installations, but I never had this kind
> of mail() issue. This installation is quite simple: standard Apache 2.0
> with php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-(
>
> What am I missing?
>
> Thanks a lot!!
>
> 
> Andy

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SESSION LOST!

2007-05-10 Thread Oliver Block
Am Donnerstag, 10. Mai 2007 08:59 schrieb Sascha Braun:
> but after a little
> time, the session is just lost.

That doesn't say anything to me. Could you be more verbose on what you mean by 
"the sessin is lost"?

Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mime type over http post?

2007-05-16 Thread Oliver Block
Hello Ray,

1. create the xml markup (dom)
2. open a connection to the 3rd party server (fsockopen)
3. send the header (fputs)
4. send the body (fputs)
5. close the connection

Additional Questions?

Best Regards,

Oliver

P.S: I just know better where to look for information:-)

- original Nachricht 

Betreff: [PHP] mime type over http post?
Gesendet: Mi, 16. Mai 2007
Von: Ray<[EMAIL PROTECTED]>

> Hello,
> I'm trying to write a web-based aplication that talks to a third party
> server. 
> I'm having a hard time getting support from from them. the method of 
> comunication (direct quote from their docs is:
> "Data will be transferred to [server] via an HTTP POST operation using the 
> MIME type, text/xml"
> 
> can anybody tell me what this means or how I do it using php?
> Thanks,
> Ray
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- original Nachricht Ende 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to check value in multidimensional array

2006-11-18 Thread Oliver Block
Am Samstag, 18. November 2006 22:08 schrieb Erik Gyepes:
> Oliver Block wrote:
> > Am Samstag, 18. November 2006 19:46 schrieb Erik Gyepes:
> >
> > What exactly do you need to do? You should read the manual too, at
>
> I would like to check if the value is really in the array, if it is not
> then I would like do some other things. (so not check if it is an array
> or not, as in your example) But my iteration not worked in
> multidimensional arrays.

>>$navigationItemArr = array("Home"=>"home",
>>                  "Profile"=>"profile",
>>                  "Photogallery"=>"photogallery",
>>                  "Contact"=>array("contact","subsection")
>>                  );

foreach($navigationItemArr as $k => $v) {
   if(is_array($v) {
  /* $v is array */
  foreach($v as $kk => $vv) {
  /* $kk hold the keys, $vv the associated values */
  }
  } else {
  /* $v is no array*/
  }
}

If you have to handle deeper nesting, i.e. $vv can hold arrays too, you should 
use a recursion. If only $v can hold an array and not $vv the above should 
work.

Regards,

Oliver


-- 
Leben ist mehr als ... 
<http://www.nak-nrw.de/index.php?id=71>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Sessions

2006-06-06 Thread Oliver Block
Hi, 

is there any easy way to use differnt sessions on the same domain? I didn't 
really dig for a solution, but if anybody has one ready?

Best Regards,

Oliver

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sessions

2006-06-06 Thread Oliver Block
Am Dienstag, 6. Juni 2006 20:51 schrieb Jay Blanchard:
> Yes. http://www.php.net/session

session_set_cookie_params() ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php