php-general Digest 10 Jul 2011 10:39:00 -0000 Issue 7396
php-general Digest 10 Jul 2011 10:39:00 - Issue 7396 Topics (messages 313994 through 313997): PEAR Mail $obj-send() 313994 by: Brian Smither 313995 by: Jim Lucas 313996 by: Brian Smither using wget in shell for download(snort) 313997 by: Negin Nickparsa Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- A client has: PHP 5.3 on Win7x64 running a local web app that needs to send mail. (This app was once hosted on a linux-based hosted space.) Apache 2.2 is installed but apparently not being used. I think the IIS service is actually the web server that is engaged. During troubleshooting a wide range of problems, I discovered that the PEAR Mail module needed to be installed. So I installed PEAR (the PEAR Installer) and the Mail module with all dependencies. The PEAR_ENV was added. The system was rebooted. A test php script instantiates the Mail class and the script proceeds fine until the send() method is called. I get a browser with Waiting for localhost for more than 60 seconds. (I used die(); to trace the script. Instead of 'auth'= true, I used 'auth' = PLAIN as suggested by a user comment on the Mail documentation page.) I believe all the parameters are correct. The actual web app works - except emailing. I added a firewall rule allowing outbound port 465 just for kicks. I can double-check for the PHP timeout setting but would PHP timeout in this case (waiting for a socket??)? Any suggestions? ---End Message--- ---BeginMessage--- On 7/8/2011 9:50 AM, Brian Smither wrote: A client has: PHP 5.3 on Win7x64 running a local web app that needs to send mail. (This app was once hosted on a linux-based hosted space.) Apache 2.2 is installed but apparently not being used. I think the IIS service is actually the web server that is engaged. During troubleshooting a wide range of problems, I discovered that the PEAR Mail module needed to be installed. So I installed PEAR (the PEAR Installer) and the Mail module with all dependencies. The PEAR_ENV was added. The system was rebooted. A test php script instantiates the Mail class and the script proceeds fine until the send() method is called. I get a browser with Waiting for localhost for more than 60 seconds. (I used die(); to trace the script. Instead of 'auth'= true, I used 'auth' = PLAIN as suggested by a user comment on the Mail documentation page.) Do you have a mail server running on localhost? If the previous system was linux, then it was probably handing it off to sendmail. If you do not have a local MTA then you need to change the params so it uses a remote mail server. I believe all the parameters are correct. The actual web app works - except emailing. I added a firewall rule allowing outbound port 465 just for kicks. I can double-check for the PHP timeout setting but would PHP timeout in this case (waiting for a socket??)? Any suggestions? ---End Message--- ---BeginMessage--- Instead of 'auth'= true, I used 'auth' = PLAIN as suggested by a user comment on the Mail documentation page.) $obj = Mail::factory('smtp', array ('host' = $host, 'port' = $port, 'auth' = true, 'username' = $username, 'password' = $password)); (Variables are set. $host = smtp.gmail.com, $port = 465) Do you have a mail server running on localhost? No. If you do not have a local MTA then you need to change the params so it uses a remote mail server. It does. ---End Message--- ---BeginMessage--- I want to make a batch file and then exec it in php I have a problem in batch file wget have been installed in Yast I want to download a RuleFile from snort.org I used this on shell: $ wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O snortrules-snapshot-2900.tar.gz that string is an oinkcode from the site this commandline has error and I don't know why ---End Message---
[PHP] using wget in shell for download(snort)
I want to make a batch file and then exec it in php I have a problem in batch file wget have been installed in Yast I want to download a RuleFile from snort.org I used this on shell: $ wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O snortrules-snapshot-2900.tar.gz that string is an oinkcode from the site this commandline has error and I don't know why
Re: [PHP] using wget in shell for download(snort)
On Jul 10, 2011, at 5:38 AM, Negin Nickparsa wrote: I want to make a batch file and then exec it in php I have a problem in batch file wget have been installed in Yast I want to download a RuleFile from snort.org I used this on shell: $ wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5 \-O snortrules-snapshot-2900.tar.gz that string is an oinkcode from the site this commandline has error and I don't know why What is the error? This: b5\-O at the end of URL looks suspicious. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using wget in shell for download(snort)
On Sun, 10 Jul 2011, Tamara Temple wrote: On Jul 10, 2011, at 5:38 AM, Negin Nickparsa wrote: I want to make a batch file and then exec it in php I have a problem in batch file wget have been installed in Yast I want to download a RuleFile from snort.org I used this on shell: $ wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O snortrules-snapshot-2900.tar.gz that string is an oinkcode from the site this commandline has error and I don't know why What is the error? This: b5\-O at the end of URL looks suspicious. That's the problem. The \ should be a space. Geoff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using wget in shell for download(snort)
Hello Try wget 'url' BR -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
[PHP] Re: using wget in shell for download(snort)
On Sun, 10 Jul 2011 17:57:26 +0300 (IDT), Geoff Shang wrote: On Sun, 10 Jul 2011, Tamara Temple wrote: On Jul 10, 2011, at 5:38 AM, Negin Nickparsa wrote: I want to make a batch file and then exec it in php I have a problem in batch file wget have been installed in Yast I want to download a RuleFile from snort.org I used this on shell: $ wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O snortrules-snapshot-2900.tar.gz that string is an oinkcode from the site this commandline has error and I don't know why What is the error? This: b5\-O at the end of URL looks suspicious. That's the problem. The \ should be a space. As a Good Practice, a 'raw' URL in a wget command should always be enclosed in 'single quotes'. For URLs with internal, variable substitutions ... well ... you just have to roll up your sleeves a little further. Jonesy -- Marvin L Jones| jonz | W3DHJ | linux 38.24N 104.55W | @ config.com | Jonesy | OS/2 * Killfiling google banter.com: jonz.net/ng.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] vend-bot?
I already subscribe, of recent. On 7/7/2011 11:58 AM, Tamara Temple wrote: On Jul 7, 2011, at 9:07 AM, Stuart Dallas wrote: Now, what do I win? A free subscription to InformationWeek. -- end Very Truly yours, - Kirk Bailey, Largo Florida kniht +-+ | BOX | +-+ think -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linking A C Program Example to PHP
On Sun, Jul 10, 2011 at 5:56 PM, Thomas Dineen tdin...@ix.netcom.comwrote: I am attempting to link a C Program example to PHP using the tutorial shown at the link below: http://voloreport.com/making-**a-c-extension-for-php-in-11-**easy-stepshttp://voloreport.com/making-a-c-extension-for-php-in-11-easy-steps Everything worked fine up through step 9 in the tutorial: Now the problem: The example works fine from the command line with either of the commands shown below: php test.php php -c /etc/apache2/php.ini test.php But the example will NOT work via the web browser on my Apache 2 (2.2.17) / PHP (5.3.5) Web Server! Did you reload or restart apache after making the edits to php.ini? For example: $ /etc/init.d/apache2 restart Adam -- Nephtali: A simple, flexible, fast, and security-focused PHP framework http://nephtaliproject.com
Re: [PHP] Re: using wget in shell for download(snort)
I tried with single quotes,no need to qoutes cause when I enter it with quotes it tells me: command not found BUT when I enter this one: wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5\-O snortrules-snapshot-2900.tar.gz it tells me: http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5 = `snortrules-snapshot-2900.tar.gz' Resolving www.snort.org... 68.177.102.20 Connecting to www.snort.org|68.177.102.20|:80... connected. HTTP request sent, awaiting response... 403 Forbidden ERROR 403: Forbidden.
Re: [PHP] Re: using wget in shell for download(snort)
I also tried Goeff's suggest: wget http://www.snort.org/reg-rules/snortrules-snapshot-2900.tar.gz/c0e9480af637e53c7aae823a40a131edc1343db5-Osnortrules-snapshot-2900.tar.gz here is the output: Resolving www.snort.org... 68.177.102.20 Connecting to www.snort.org|68.177.102.20|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 09:57:36 ERROR 403: Forbidden. --09:57:36-- http://snortrules-snapshot-2900.tar.gz/ = `index.html' Resolving snortrules-snapshot-2900.tar.gz... failed: Name or service not known. FINISHED --09:57:36-- Downloaded: 0 bytes in 0 files Why failed?