Re: [PHP] include html

2010-11-01 Thread Karl DeSaulniers


On Nov 2, 2010, at 12:37 AM, Nathan Nobbe wrote:

On Mon, Nov 1, 2010 at 11:22 PM, Karl DeSaulniers  
 wrote:
I need to basically grab the source of the page as text. Then I can  
do a replace() on the  tag. Then insert the text into an  
Iframe. In theory, this I thought would be handled better server  
side. Is this possible?


yes, there are a few options, fopen wrappers, curl or raw sockets  
all come to mind.  fopen wrappers sound like they may be easiest  
for you.


Any examples or urls to make a fopen wrapper? Or is there a simple  
function for getting the source text from a URL?
Thats all I really need, if I can get ... in text, I'm  
good!
From that point I can insert the text into a hidden form field and  
grab the text via javascript if need be (but very hackish) or with php.
I think that may be a solution, if I assign an include statement or  
echo of the url inside a hidden form field.
A hidden form field will force the text to be saved and not parsed. I  
think.




I think the problem I'm having is that the domain I'm requesting  
from is not the same domain as mine so their may be some security  
issue.


right, this is why you would setup a server side proxy, to avoid  
client side cross domain security restrictions, however you'll have  
to change all the instances of the remote domain to your domain,  
and ensure that your server actually is able to fulfill requests  
for those resources.


Server side proxy.. I have  heard of this, but do not know exactly  
what a proxy does to know if it would be a solution.
I also have not seen one in action nor made one (that I know of), any  
beginner tuts you can lend?




I also thought about injecting a link tag into the iframe at the  
same time I load the HTML.


when you say link tag are you talking about  tags?  you lost me  
on this last line here.


IE:  [code]
Get the text from their source, something like:

$htmlTextresult = 

media="all" />



... their content



then do a string replace on the link tag..
$newTextresult = str_replace($htmlTextresult, '',  
'media="all" />');

or
$newTextresult = str_replace($htmlTextresult, 'css/ 
fromtheirsite.css', 'css/frommysite.css');


insert new text into the iframe..
$newTextresult = 

media="all" />



... their content/ my style :)



Or is there a way to strip the text that is in the  ,   
and 

[PHP] RE: search is not case insensitive

2010-11-01 Thread Dr Michael Daly
I have a fix. Thanks to the list for steering me in the right direction 

Just in case anyone else is lost, here it is, via use of the CONVERT
function to convert the binary data to text which can then be searched case
insensitively in mysql:
Replace this line:
"AND LOWER(C.description) LIKE '%".strtolower($search_for)."%' AND
C.start_time > $start_time AND C.start_time < $end_time ORDER BY
C.start_time";

with:
"AND CONVERT(C.description USING latin1) LIKE '%".($search_for)."%' AND
C.start_time > $start_time AND C.start_time < $end_time ORDER BY
C.start_time";

(the only bit that changes is the text betw the first two 'ANDS')

It comes from PBCS online appointment software. 

Thanks
Michael




-Original Message-
From: Dr Michael Daly [mailto:g...@holisticgp.com.au] 
Sent: Sunday, 31 October 2010 3:47 PM
To: php-general@lists.php.net
Subject: search is not case insensitive 

Hi
Using a php search form produces a nil return on any information that is
capitalised within a mysql database; retrieval is fine for non-capitalised
data. Could someone tweak this please? The relevant code I think is as
follows:

// Description is a BLOB in MySQL... we need to UPPER the blob
//values to make the search case-insensitive.

$query = "SELECT C.*, A.surname, A.name, A.surname_prefix, A.id AS
user
FROM pbcs_user A, pbcs_join_table_user_app B, pbcs_appointment C".

"WHERE A.id = B.user_id AND B.appointment_id
= C.id  ".

"AND LOWER(C.description) LIKE
'%".strtolower($search_for)."%' AND
C.start_time > $start_time AND C.start_time < $end_time ORDER BY
C.start_time";
$result = pbcs_db_query($query);

Thanks
Michael
Melb, Aust.


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



Re: [PHP] include html

2010-11-01 Thread Nathan Nobbe
On Mon, Nov 1, 2010 at 11:22 PM, Karl DeSaulniers wrote:

> I need to basically grab the source of the page as text. Then I can do a
> replace() on the  tag. Then insert the text into an Iframe. In theory,
> this I thought would be handled better server side. Is this possible?


yes, there are a few options, fopen wrappers, curl or raw sockets all come
to mind.  fopen wrappers sound like they may be easiest for you.


> I think the problem I'm having is that the domain I'm requesting from is
> not the same domain as mine so their may be some security issue.


right, this is why you would setup a server side proxy, to avoid client side
cross domain security restrictions, however you'll have to change all the
instances of the remote domain to your domain, and ensure that your server
actually is able to fulfill requests for those resources.


> I also thought about injecting a link tag into the iframe at the same time
> I load the HTML.


when you say link tag are you talking about  tags?  you lost me on this
last line here.


> Browsers load the last style sheet on top of others.


this is true, but i doubt you'll be able to have it load a css file from
your domain atop a css file from a remote domain.


>  If I could just get the link tag into the iframes contents right after I
> get the source text in there, it may work. But there is also the issue of
> correctly assigning the classes and I'd that are used in the iframe. Like
>
> iframe.holder .someclassusedbythem {}
>
> Or do I do?
>
> iframe#holder .someclassusedbythem {}
>
> Or
>
> #holder .someclassusedbythem {}
>
> Sorry if I'm OT with that.
>

shrug, no worries, but im too lazy to dig into the details of client side
options. :)

-nathan


Re: [PHP] time zone ignored (both via ini or in code)

2010-11-01 Thread Nathan Nobbe
On Mon, Nov 1, 2010 at 12:54 PM, Dan Yost  wrote:

> Greetings,
>
> I've looked through a number of different archived threads (some
> rather heated) and samples as well, but clearly I'm just missing
> something.
>
> PHP 5.1.6
> CentOS release 5.5 (Final)
>
> My server is in Central Time (US). We do observe DST. I noticed
> functions like strftime() display UTC time. So I undertook fixing
> this.
>
> I read several threads about setting date.timezone in php.ini, and
> arguments for/against different timezone methods. But in my case I see
> no reason why setting the timezone in php.ini would hurt us--we can
> live with that. And yet:
>
> [...@ez2 html 13:47:20]$ date
> Mon Nov  1 13:50:05 CDT 2010
>
> Good.
>
> [...@ez2 html 13:50:05]$ grep -i timezone /etc/php.ini
> date.timezone = "America/Chicago"
>
> Good--and yes, Apache was restarted. So far, we're Central, life is good.
>
> Let's hit PHP now:
>
> 
>  if (date_default_timezone_get()) {
>echo 'date_default_timezone_get: ' . date_default_timezone_get() . ' />';
> }
>
> if (ini_get('date.timezone')) {
>echo 'date.timezone: ' . ini_get('date.timezone');
> }
>
> echo "";
>
> $localtime = localtime();
> $localtime_assoc = localtime(time(), true);
> print_r($localtime);
> print_r($localtime_assoc);
>
>
> echo "" . strftime("%D %T %z %Z") . "";
>
> ?>
> 
>
>
> Which produces:
>
>
> date_default_timezone_get: America/Chicago
> date.timezone: America/Chicago
> Array ( [0] => 14 [1] => 51 [2] => 18 [3] => 1 [4] => 10 [5] => 110
> [6] => 1 [7] => 304 [8] => 0 ) Array ( [tm_sec] => 14 [tm_min] => 51
> [tm_hour] => 18 [tm_mday] => 1 [tm_mon] => 10 [tm_year] => 110
> [tm_wday] => 1 [tm_yday] => 304 [tm_isdst] => 0 )
> 11/01/10 18:51:14 + UTC
>
>
> Timezone is America/Chicago, yet date functions completely ignore this
> and continue to display UTC.
>
> Please help me understand where I'm blind here.
>

a few thoughts,

1. set error_reporting to E_ALL to see if the engine is trying to tell you
something you may be overlooking

2. for grins, maybe see if the TZ environment variable is set on your system
var_dump(getenv('TZ'));

3. another test would be to set date.timezone to something else and see if
date_default_timezone_get() returns that new value, which would indicate
it's falling through to the third option in the precedence chain.

lastly you might see if the calling date_default_timezone_set() does the
trick.

-nathan


RE: [PHP] search is not case insensitive

2010-11-01 Thread Tommy Pham
> -Original Message-
> From: tedd [mailto:tedd.sperl...@gmail.com]
> Sent: Sunday, October 31, 2010 9:00 AM
> To: g...@holisticgp.com.au; php-general@lists.php.net
> Subject: Re: [PHP] search is not case insensitive
> 
> At 3:47 PM +1100 10/31/10, Dr Michael Daly wrote:
> >Hi
> >Using a php search form produces a nil return on any information that
> >is capitalised within a mysql database; retrieval is fine for
> >non-capitalised data. Could someone tweak this please? The relevant
> >code I think is as
> >follows:
> >
> >// Description is a BLOB in MySQL... we need to UPPER the blob //values
> >to make the search case-insensitive.
> >
> > $query = "SELECT C.*, A.surname, A.name, A.surname_prefix, A.id
> AS user
> >FROM pbcs_user A, pbcs_join_table_user_app B, pbcs_appointment C
>   ".
> >
> > "WHERE A.id = B.user_id AND
> >B.appointment_id = C.id  ".
> >
> > "AND LOWER(C.description) LIKE
> >'%".strtolower($search_for)."%' AND
> >C.start_time > $start_time AND C.start_time < $end_time ORDER BY
> >C.start_time";
> > $result = pbcs_db_query($query);
> >
> >Thanks
> >Michael
> >Melb, Aust.
> 
> Why are you using a BLOB?
> 
> You are just storing text data, right? If so, then a VARCHAR will work.
> 
> Additionally, using a BLOB changes things somewhat in that all data are
> stored as binary strings and as such makes all comparisons case-sensitive.
> Too many double negatives for me.
> 
> Cheers,
> 
> tedd
> --
> ---
> http://sperling.com/
> 

IIRC, the VARCHAR (for MySQL) has a limit of 255 chars.  You may have to use
one of the *TEXT variants if you need to store a lot of text.

Regards,
Tommy


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



Re: [PHP] include html

2010-11-01 Thread Karl DeSaulniers
I need to basically grab the source of the page as text. Then I can do  
a replace() on the  tag. Then insert the text into an Iframe. In  
theory, this I thought would be handled better server side. Is this  
possible? I think the problem I'm having is that the domain I'm  
requesting from is not the same domain as mine so their may be some  
security issue. I also thought about injecting a link tag into the  
iframe at the same time I load the HTML. Browsers load the last style  
sheet on top of others.  If I could just get the link tag into the  
iframes contents right after I get the source text in there, it may  
work. But there is also the issue of correctly assigning the classes  
and I'd that are used in the iframe. Like


iframe.holder .someclassusedbythem {}

Or do I do?

iframe#holder .someclassusedbythem {}

Or

#holder .someclassusedbythem {}

Sorry if I'm OT with that.

Karl

Sent from losPhone

On Nov 1, 2010, at 11:50 PM, Nathan Nobbe   
wrote:



On Sunday, October 31, 2010, a...@ashleysheridan.co.uk
 wrote:
This can only be done with javascript, as the iframe is client- 
side, which php knows nothing about.


sounds to me like OP is building the page which will have the iframe
in it which means this is totally doable server side.  in fact, id
almost prefer server side as that allows masking of the origin making
overriding css values easier afaict.


I am building a website for a tshirt company that uses another
company to get garments and promo items to print on.
The client wants to just have those pages load on top of their
website, but wants the layout to go with their look and feel. their  
css.

We have the go ahead from the other companies to do so as well.


Karl,

this could be done server or client side, however the trouble is
altering the css for every page inside the iframe could be a real
pain.  basically what you could do is act as a proxy, each 'page' from
the original site should be 'made a page' on your site.  basically
youll have to change anchor tag href attributes so each request that
would go back to the original site goes through your site first.  that
way youll have the chance to change the result before handing it back
to the client.  also youll obviously need to change the url to css
file(s) per your primary requirement.  if you do as i suggested above
and make the remote site appear as being served from your domain, you
should be able to get away w/ using a css file served from your domain
as well.

as one of my college professors used to say however, the devil is in
the details, mwahaha.  i would recommend initially experimening to see
if you can use w/e look & feel customizations the remote site offers
to determine if embedding in the iframe w/o any proxy effort is
possible.

-nathan


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



RE: [PHP] search is not case insensitive

2010-11-01 Thread Tommy Pham
> -Original Message-
> From: a...@ashleysheridan.co.uk [mailto:a...@ashleysheridan.co.uk]
> Sent: Sunday, October 31, 2010 2:10 AM
> To: Dr Michael Daly; php-general@lists.php.net
> Subject: Re: [PHP] search is not case insensitive
> 
> This isn't a php question but a mysql one. Take out the lower() part of the
> sql statement, as like is case insensitive by default.
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> - Reply message -
> From: "Dr Michael Daly" 
> Date: Sun, Oct 31, 2010 04:47
> Subject: [PHP] search is not case insensitive
> To: 
> 
> Hi
> Using a php search form produces a nil return on any information that is
> capitalised within a mysql database; retrieval is fine for non-capitalised
> data. Could someone tweak this please? The relevant code I think is as
> follows:
> 
> // Description is a BLOB in MySQL... we need to UPPER the blob //values to
> make the search case-insensitive.
> 
>   $query = "SELECT C.*, A.surname, A.name, A.surname_prefix, A.id
> AS user
> FROM pbcs_user A, pbcs_join_table_user_app B, pbcs_appointment C  ".
> 
>   "WHERE A.id = B.user_id AND
> B.appointment_id = C.id   ".
> 
>   "AND LOWER(C.description) LIKE
> '%".strtolower($search_for)."%' AND C.start_time > $start_time AND
> C.start_time < $end_time ORDER BY C.start_time";
>   $result = pbcs_db_query($query);
> 
> Thanks
> Michael
> Melb, Aust.
> 

You could also remove the strtolower().  Just to be sure that field 
C.description is set with case-insensitive collation, you could use phpMyAdmin 
to look at the table structure or run SQL 'show create table pbcs_appointment;' 
on your MySQL tool.  The description column should have *_ci (for 
case-insensitive whereas *_cs is case-sensitive).

Regards,
Tommy


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



Re: [PHP] include html

2010-11-01 Thread Nathan Nobbe
On Sunday, October 31, 2010, a...@ashleysheridan.co.uk
 wrote:
> This can only be done with javascript, as the iframe is client-side, which 
> php knows nothing about.

 sounds to me like OP is building the page which will have the iframe
in it which means this is totally doable server side.  in fact, id
almost prefer server side as that allows masking of the origin making
overriding css values easier afaict.

> I am building a website for a tshirt company that uses another
> company to get garments and promo items to print on.
> The client wants to just have those pages load on top of their
> website, but wants the layout to go with their look and feel. their css.
> We have the go ahead from the other companies to do so as well.

Karl,

this could be done server or client side, however the trouble is
altering the css for every page inside the iframe could be a real
pain.  basically what you could do is act as a proxy, each 'page' from
the original site should be 'made a page' on your site.  basically
youll have to change anchor tag href attributes so each request that
would go back to the original site goes through your site first.  that
way youll have the chance to change the result before handing it back
to the client.  also youll obviously need to change the url to css
file(s) per your primary requirement.  if you do as i suggested above
and make the remote site appear as being served from your domain, you
should be able to get away w/ using a css file served from your domain
as well.

as one of my college professors used to say however, the devil is in
the details, mwahaha.  i would recommend initially experimening to see
if you can use w/e look & feel customizations the remote site offers
to determine if embedding in the iframe w/o any proxy effort is
possible.

-nathan

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



Re: [PHP] OLE-DB to Pervasive

2010-11-01 Thread Daniel P. Brown
On Mon, Nov 1, 2010 at 14:49, Richard Sharp  wrote:
> I tried to look for the drive for pervasive but I couldn't find one for 64 
> bit.  If there is one out that please let me know.

That's beyond the scope of this list.  You should contact the
manufacturer for information on that.

> Sorry I am very new to PHP, but is there a way to pull data from a data 
> through the JDBC using PHP?

I'm sorry, I honestly have no idea why I typed JDBC.  I don't
believe I was even thinking of that at all when I typed it.  I meant
PDO.  I don't know if there's support for PSQL on there though.
Again, your best bet would probably be to contact the manufacturer
directly.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



[PHP] time zone ignored (both via ini or in code)

2010-11-01 Thread Dan Yost
Greetings,

I've looked through a number of different archived threads (some
rather heated) and samples as well, but clearly I'm just missing
something.

PHP 5.1.6
CentOS release 5.5 (Final)

My server is in Central Time (US). We do observe DST. I noticed
functions like strftime() display UTC time. So I undertook fixing
this.

I read several threads about setting date.timezone in php.ini, and
arguments for/against different timezone methods. But in my case I see
no reason why setting the timezone in php.ini would hurt us--we can
live with that. And yet:

[...@ez2 html 13:47:20]$ date
Mon Nov  1 13:50:05 CDT 2010

Good.

[...@ez2 html 13:50:05]$ grep -i timezone /etc/php.ini
date.timezone = "America/Chicago"

Good--and yes, Apache was restarted. So far, we're Central, life is good.

Let's hit PHP now:


';
}

if (ini_get('date.timezone')) {
echo 'date.timezone: ' . ini_get('date.timezone');
}

echo "";

$localtime = localtime();
$localtime_assoc = localtime(time(), true);
print_r($localtime);
print_r($localtime_assoc);


echo "" . strftime("%D %T %z %Z") . "";

?>



Which produces:


date_default_timezone_get: America/Chicago
date.timezone: America/Chicago
Array ( [0] => 14 [1] => 51 [2] => 18 [3] => 1 [4] => 10 [5] => 110
[6] => 1 [7] => 304 [8] => 0 ) Array ( [tm_sec] => 14 [tm_min] => 51
[tm_hour] => 18 [tm_mday] => 1 [tm_mon] => 10 [tm_year] => 110
[tm_wday] => 1 [tm_yday] => 304 [tm_isdst] => 0 )
11/01/10 18:51:14 + UTC


Timezone is America/Chicago, yet date functions completely ignore this
and continue to display UTC.

Please help me understand where I'm blind here.

Thanks,
Dan

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



RE: [PHP] OLE-DB to Pervasive

2010-11-01 Thread Richard Sharp
I tried to look for the drive for pervasive but I couldn't find one for 64 bit. 
 If there is one out that please let me know.  

Sorry I am very new to PHP, but is there a way to pull data from a data through 
the JDBC using PHP?

-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel P. 
Brown
Sent: Monday, November 01, 2010 1:46 PM
To: Richard Sharp
Cc: php-general@lists.php.net
Subject: Re: [PHP] OLE-DB to Pervasive

On Mon, Nov 1, 2010 at 14:38, Richard Sharp  wrote:
> Hello,
>
>                Does anyone have a way to connect to Pervasive DB.  I
> cannot use ODBC, because I am on a 64 bit OS.

That's the first I've heard of not being able to use ODBC on a
64-bit platform.  Looks like Pervasive is accessible via a variety of
APIs, though.  Have you considered JDBC?

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] OLE-DB to Pervasive

2010-11-01 Thread Daniel P. Brown
On Mon, Nov 1, 2010 at 14:38, Richard Sharp  wrote:
> Hello,
>
>                Does anyone have a way to connect to Pervasive DB.  I
> cannot use ODBC, because I am on a 64 bit OS.

That's the first I've heard of not being able to use ODBC on a
64-bit platform.  Looks like Pervasive is accessible via a variety of
APIs, though.  Have you considered JDBC?

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread David Harkness
On Mon, Nov 1, 2010 at 10:42 AM, Andrew Ballard  wrote:

> Right up to here, it sounded more like an interface than an abstract base
> class.
>

I think there's an interface in there *and* a basic (HTTP? RPC?)
implementation that receives and dispatches the messages. I would split
these responsibilities into two separate classes which would allow you to
wire up the services to different dispatchers over time.

But to your original question, Richard, I agree with Nathan. Go with the
solution that is both easy to code and and easy to read, especially given
that the API is quite static.

David


[PHP] OLE-DB to Pervasive

2010-11-01 Thread Richard Sharp
Hello,

Does anyone have a way to connect to Pervasive DB.  I
cannot use ODBC, because I am on a 64 bit OS. 

 

Thanks

 

Richard Sharp

Database Administrator

PH: 316-942-8604 ext 108

 



Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Nicholas Kell

On Nov 1, 2010, at 1:12 PM, Suyash R wrote:

> No, sockets.so in not included in any of the machines php.ini file. However, 
> I found that Linux machine's php.ini doesn't include sockets.so and sockets 
> work fine on it but don't work on the Solaris machine. 
> 
> Is it required to be included only in Solaris?
> 
> On Mon, Nov 1, 2010 at 1:41 PM, Nicholas Kell  wrote:
> 
> On Nov 1, 2010, at 12:08 PM, crrr errr wrote:
> 
> > Yes, the http ( Apache user) has rl ( read permission) on the php file with
> > sockets code in it. I think write access is unnecessary for Apache user.
> >
> > On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kell wrote:
> >
> >>
> >> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
> >>
> >>> Yes, the phpinfo() shows that sockets are enabled in both machines.
> >>> On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert 
> >> wrote:
> >>>
>  On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
>  wrote:
> > Hello,
> >
> > I was trying to create a socket connection from a Solaris machine to a
>  Red
> > Hat machine  to get the PATH in Red Hat machine remotely on Solaris
>  machine
> > and display it to the user.
> >
> > We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
>  5.2.6.
> > on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
>  compiled
> > with --enable sockets and phpinfo() displays that the sockets are
>  enabled.
> > In spite of this we get the following error when using this piece of
> >> code
> > from the Solaris machine.
> >
> >
> > The error:
> >
> > PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> > 5server.php<
>  http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> > on
> > line 21
> >
> > The code;
> >
> >  >
> > set_time_limit(0);
> >
> > //ip of the server
> > $addr = 'xxx.xxx.xxx.xxx';
> >
> > //port of the server
> > $port = 2xxx;
> >
> > //create a socket
> > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line
> >> no
>  21
> > in the code. i have ommitted a few header comments */
> >
> > //bind this socket with the above ip and port
> > $ret = socket_bind($sock, $addr, $port);
> >
> > do {
> >  $ret = socket_listen($sock, 10);
> >  $msgSock = socket_accept($sock);
> >  $buf = socket_read($msgSock, 1024);
> >
> >
> > Please let me know if you need any further details I might have missed.
> >
> > Thank you.
> >
> > Suyash Ramineni
> >
> 
> 
>  check phpinfo() to see if the sockets have been activated in the ini
> >> file.
>  --
> 
>  Bastien
> 
>  Cat, the other other white meat
> 
> >>
> >>
> >> I think that I messed up sending my last email, I apologize.
> >>
> >> Is the user that Apache is running under configured for the proper read
> >> write access to the socket file?
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> 
> Oops, included in php.ini, not the Apache config.
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


Since you complied with --enable-sockets, you shouldn't even need sockets.so to 
be dynamically loaded. But at this point, it is something that I would try 
anyway. 

Add:

extension=sockets.so 

in your php.ini file just to see if it brings the function to light.

Your Linux installs I am sure were compiled with it in it. Especially if it is 
a dist package.

The absence of the function is telling me that PHP is not compiled with 
--enable-sockets. If it was compiled in properly, you would be getting 
different errors. I am not saying that you didn't do it. Something may have 
happened in the process.

By adding the sockets.so, you are adding the extension dynamically, incase you 
were mistaken by the compile or incase there was some sort of anomaly that the 
rest of PHP compiled but the sockets section was botched. Solaris is (I guess) 
known to be lacking when it comes to C compilers (at least according to the 
Unix geeks that I sit next to at work). But it seems to me that it would all 
have failed or it would have all worked.

Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Suyash R
No, sockets.so in not included in any of the machines php.ini file. However,
I found that Linux machine's php.ini doesn't include sockets.so and sockets
work fine on it but don't work on the Solaris machine.

Is it required to be included only in Solaris?

On Mon, Nov 1, 2010 at 1:41 PM, Nicholas Kell  wrote:

>
> On Nov 1, 2010, at 12:08 PM, crrr errr wrote:
>
> > Yes, the http ( Apache user) has rl ( read permission) on the php file
> with
> > sockets code in it. I think write access is unnecessary for Apache user.
> >
> > On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kell  >wrote:
> >
> >>
> >> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
> >>
> >>> Yes, the phpinfo() shows that sockets are enabled in both machines.
> >>> On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert 
> >> wrote:
> >>>
>  On Mon, Nov 1, 2010 at 12:40 PM, crrr errr <
> r.suy...@gmail.com>
>  wrote:
> > Hello,
> >
> > I was trying to create a socket connection from a Solaris machine to
> a
>  Red
> > Hat machine  to get the PATH in Red Hat machine remotely on Solaris
>  machine
> > and display it to the user.
> >
> > We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
>  5.2.6.
> > on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
>  compiled
> > with --enable sockets and phpinfo() displays that the sockets are
>  enabled.
> > In spite of this we get the following error when using this piece of
> >> code
> > from the Solaris machine.
> >
> >
> > The error:
> >
> > PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> > 5server.php<
>  http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> > on
> > line 21
> >
> > The code;
> >
> >  >
> > set_time_limit(0);
> >
> > //ip of the server
> > $addr = 'xxx.xxx.xxx.xxx';
> >
> > //port of the server
> > $port = 2xxx;
> >
> > //create a socket
> > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is
> line
> >> no
>  21
> > in the code. i have ommitted a few header comments */
> >
> > //bind this socket with the above ip and port
> > $ret = socket_bind($sock, $addr, $port);
> >
> > do {
> >  $ret = socket_listen($sock, 10);
> >  $msgSock = socket_accept($sock);
> >  $buf = socket_read($msgSock, 1024);
> >
> >
> > Please let me know if you need any further details I might have
> missed.
> >
> > Thank you.
> >
> > Suyash Ramineni
> >
> 
> 
>  check phpinfo() to see if the sockets have been activated in the ini
> >> file.
>  --
> 
>  Bastien
> 
>  Cat, the other other white meat
> 
> >>
> >>
> >> I think that I messed up sending my last email, I apologize.
> >>
> >> Is the user that Apache is running under configured for the proper read
> >> write access to the socket file?
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
>
> Oops, included in php.ini, not the Apache config.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] PHP sockets enabled but socket_create() gives an error callto undefined function

2010-11-01 Thread Nicholas Kell

On Nov 1, 2010, at 12:36 PM, rek wrote:

> I don't think the unix permission will cause a function undefined error.
> 
> 於 2010年11月02日 01:08, crrr errr 提到:
>> Yes, the http ( Apache user) has rl ( read permission) on the php file with
>> sockets code in it. I think write access is unnecessary for Apache user.
>> 
>> On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kellwrote:
>> 
>>> 
>>> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
>>> 
 Yes, the phpinfo() shows that sockets are enabled in both machines.
 On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert
>>> wrote:
 
> On Mon, Nov 1, 2010 at 12:40 PM, crrr errr
> wrote:
>> Hello,
>> 
>> I was trying to create a socket connection from a Solaris machine to a
> Red
>> Hat machine  to get the PATH in Red Hat machine remotely on Solaris
> machine
>> and display it to the user.
>> 
>> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
> 5.2.6.
>> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
> compiled
>> with --enable sockets and phpinfo() displays that the sockets are
> enabled.
>> In spite of this we get the following error when using this piece of
>>> code
>> from the Solaris machine.
>> 
>> 
>> The error:
>> 
>> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
>> 5server.php<
> http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
>> on
>> line 21
>> 
>> The code;
>> 
>> > 
>> set_time_limit(0);
>> 
>> //ip of the server
>> $addr = 'xxx.xxx.xxx.xxx';
>> 
>> //port of the server
>> $port = 2xxx;
>> 
>> //create a socket
>> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line
>>> no
> 21
>> in the code. i have ommitted a few header comments */
>> 
>> //bind this socket with the above ip and port
>> $ret = socket_bind($sock, $addr, $port);
>> 
>> do {
>>   $ret = socket_listen($sock, 10);
>>   $msgSock = socket_accept($sock);
>>   $buf = socket_read($msgSock, 1024);
>> 
>> 
>> Please let me know if you need any further details I might have missed.
>> 
>> Thank you.
>> 
>> Suyash Ramineni
>> 
> 
> 
> check phpinfo() to see if the sockets have been activated in the ini
>>> file.
> --
> 
> Bastien
> 
> Cat, the other other white meat
> 
>>> 
>>> 
>>> I think that I messed up sending my last email, I apologize.
>>> 
>>> Is the user that Apache is running under configured for the proper read
>>> write access to the socket file?
>>> 
>>> 
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> 
>>> 
>> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

You're absolutely right. I was wrong. If the permissions weren't correct he 
would have gotten a "Operation not permitted" warning.



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



Re: [PHP] PHP sockets enabled but socket_create() gives an error callto undefined function

2010-11-01 Thread rek

I don't think the unix permission will cause a function undefined error.

於 2010年11月02日 01:08, crrr errr 提到:

Yes, the http ( Apache user) has rl ( read permission) on the php file with
sockets code in it. I think write access is unnecessary for Apache user.

On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kellwrote:



On Nov 1, 2010, at 11:44 AM, crrr errr wrote:


Yes, the phpinfo() shows that sockets are enabled in both machines.
On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert

wrote:



On Mon, Nov 1, 2010 at 12:40 PM, crrr errr
wrote:

Hello,

I was trying to create a socket connection from a Solaris machine to a

Red

Hat machine  to get the PATH in Red Hat machine remotely on Solaris

machine

and display it to the user.

We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP

5.2.6.

on a Unix(Solaris) server(Apache) . The PHP version on Solaris is

compiled

with --enable sockets and phpinfo() displays that the sockets are

enabled.

In spite of this we get the following error when using this piece of

code

from the Solaris machine.


The error:

PHP Fatal error:  Call to undefined function socket_create() in /XXX/
5server.php<

http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>

on
line 21

The code;


no

21

in the code. i have ommitted a few header comments */

//bind this socket with the above ip and port
$ret = socket_bind($sock, $addr, $port);

do {
   $ret = socket_listen($sock, 10);
   $msgSock = socket_accept($sock);
   $buf = socket_read($msgSock, 1024);


Please let me know if you need any further details I might have missed.

Thank you.

Suyash Ramineni




check phpinfo() to see if the sockets have been activated in the ini

file.

--

Bastien

Cat, the other other white meat




I think that I messed up sending my last email, I apologize.

Is the user that Apache is running under configured for the proper read
write access to the socket file?


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







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



Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Andrew Ballard
On Mon, Nov 1, 2010 at 11:13 AM, Richard Quadling  wrote:
> Hi.
>
> I have an abstract base class (call it genericServiceHandler).
>
> I have concrete classes (FaxService, EmailService).
>
> The genericServiceHandler is watching for commands from an external
> source. The commands will always be one of a fixed set, no matter what
> the concrete service is. They are Pause, Continue, Start, Stop,
> Shutdown, PreShutdown.
>
> The genericServiceHandler has no need to process the commands. It only
> receives them and maybe dispatches them to the concrete class.


Right up to here, it sounded more like an interface than an abstract base class.


> The concrete class doesn't have to implement handlers for all of the
> commands, though, at a minimum, onStart() would be pretty much
> essential.

[snip]

And then it didn't.  :-/


Andrew

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



Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Nicholas Kell

On Nov 1, 2010, at 12:08 PM, crrr errr wrote:

> Yes, the http ( Apache user) has rl ( read permission) on the php file with
> sockets code in it. I think write access is unnecessary for Apache user.
> 
> On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kell wrote:
> 
>> 
>> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
>> 
>>> Yes, the phpinfo() shows that sockets are enabled in both machines.
>>> On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert 
>> wrote:
>>> 
 On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
 wrote:
> Hello,
> 
> I was trying to create a socket connection from a Solaris machine to a
 Red
> Hat machine  to get the PATH in Red Hat machine remotely on Solaris
 machine
> and display it to the user.
> 
> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
 5.2.6.
> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
 compiled
> with --enable sockets and phpinfo() displays that the sockets are
 enabled.
> In spite of this we get the following error when using this piece of
>> code
> from the Solaris machine.
> 
> 
> The error:
> 
> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> 5server.php<
 http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> on
> line 21
> 
> The code;
> 
>  
> set_time_limit(0);
> 
> //ip of the server
> $addr = 'xxx.xxx.xxx.xxx';
> 
> //port of the server
> $port = 2xxx;
> 
> //create a socket
> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line
>> no
 21
> in the code. i have ommitted a few header comments */
> 
> //bind this socket with the above ip and port
> $ret = socket_bind($sock, $addr, $port);
> 
> do {
>  $ret = socket_listen($sock, 10);
>  $msgSock = socket_accept($sock);
>  $buf = socket_read($msgSock, 1024);
> 
> 
> Please let me know if you need any further details I might have missed.
> 
> Thank you.
> 
> Suyash Ramineni
> 
 
 
 check phpinfo() to see if the sockets have been activated in the ini
>> file.
 --
 
 Bastien
 
 Cat, the other other white meat
 
>> 
>> 
>> I think that I messed up sending my last email, I apologize.
>> 
>> Is the user that Apache is running under configured for the proper read
>> write access to the socket file?
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 

Oops, included in php.ini, not the Apache config. 


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



Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Nicholas Kell

On Nov 1, 2010, at 12:08 PM, crrr errr wrote:

> Yes, the http ( Apache user) has rl ( read permission) on the php file with 
> sockets code in it. I think write access is unnecessary for Apache user.
> 
> On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kell  wrote:
> 
> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
> 
> > Yes, the phpinfo() shows that sockets are enabled in both machines.
> > On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert  wrote:
> >
> >> On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
> >> wrote:
> >>> Hello,
> >>>
> >>> I was trying to create a socket connection from a Solaris machine to a
> >> Red
> >>> Hat machine  to get the PATH in Red Hat machine remotely on Solaris
> >> machine
> >>> and display it to the user.
> >>>
> >>> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
> >> 5.2.6.
> >>> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
> >> compiled
> >>> with --enable sockets and phpinfo() displays that the sockets are
> >> enabled.
> >>> In spite of this we get the following error when using this piece of code
> >>> from the Solaris machine.
> >>>
> >>>
> >>> The error:
> >>>
> >>> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> >>> 5server.php<
> >> http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> >>> on
> >>> line 21
> >>>
> >>> The code;
> >>>
> >>>  >>>
> >>> set_time_limit(0);
> >>>
> >>> //ip of the server
> >>> $addr = 'xxx.xxx.xxx.xxx';
> >>>
> >>> //port of the server
> >>> $port = 2xxx;
> >>>
> >>> //create a socket
> >>> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line no
> >> 21
> >>> in the code. i have ommitted a few header comments */
> >>>
> >>> //bind this socket with the above ip and port
> >>> $ret = socket_bind($sock, $addr, $port);
> >>>
> >>> do {
> >>>   $ret = socket_listen($sock, 10);
> >>>   $msgSock = socket_accept($sock);
> >>>   $buf = socket_read($msgSock, 1024);
> >>>
> >>>
> >>> Please let me know if you need any further details I might have missed.
> >>>
> >>> Thank you.
> >>>
> >>> Suyash Ramineni
> >>>
> >>
> >>
> >> check phpinfo() to see if the sockets have been activated in the ini file.
> >> --
> >>
> >> Bastien
> >>
> >> Cat, the other other white meat
> >>
> 
> 
> I think that I messed up sending my last email, I apologize.
> 
> Is the user that Apache is running under configured for the proper read write 
> access to the socket file?
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

Are you including sockets.so in Apache config?




Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread crrrrrrr errrrrrr
Yes, the http ( Apache user) has rl ( read permission) on the php file with
sockets code in it. I think write access is unnecessary for Apache user.

On Mon, Nov 1, 2010 at 12:50 PM, Nicholas Kell wrote:

>
> On Nov 1, 2010, at 11:44 AM, crrr errr wrote:
>
> > Yes, the phpinfo() shows that sockets are enabled in both machines.
> > On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert 
> wrote:
> >
> >> On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
> >> wrote:
> >>> Hello,
> >>>
> >>> I was trying to create a socket connection from a Solaris machine to a
> >> Red
> >>> Hat machine  to get the PATH in Red Hat machine remotely on Solaris
> >> machine
> >>> and display it to the user.
> >>>
> >>> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
> >> 5.2.6.
> >>> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
> >> compiled
> >>> with --enable sockets and phpinfo() displays that the sockets are
> >> enabled.
> >>> In spite of this we get the following error when using this piece of
> code
> >>> from the Solaris machine.
> >>>
> >>>
> >>> The error:
> >>>
> >>> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> >>> 5server.php<
> >> http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> >>> on
> >>> line 21
> >>>
> >>> The code;
> >>>
> >>>  >>>
> >>> set_time_limit(0);
> >>>
> >>> //ip of the server
> >>> $addr = 'xxx.xxx.xxx.xxx';
> >>>
> >>> //port of the server
> >>> $port = 2xxx;
> >>>
> >>> //create a socket
> >>> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line
> no
> >> 21
> >>> in the code. i have ommitted a few header comments */
> >>>
> >>> //bind this socket with the above ip and port
> >>> $ret = socket_bind($sock, $addr, $port);
> >>>
> >>> do {
> >>>   $ret = socket_listen($sock, 10);
> >>>   $msgSock = socket_accept($sock);
> >>>   $buf = socket_read($msgSock, 1024);
> >>>
> >>>
> >>> Please let me know if you need any further details I might have missed.
> >>>
> >>> Thank you.
> >>>
> >>> Suyash Ramineni
> >>>
> >>
> >>
> >> check phpinfo() to see if the sockets have been activated in the ini
> file.
> >> --
> >>
> >> Bastien
> >>
> >> Cat, the other other white meat
> >>
>
>
> I think that I messed up sending my last email, I apologize.
>
> Is the user that Apache is running under configured for the proper read
> write access to the socket file?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Nicholas Kell

On Nov 1, 2010, at 11:44 AM, crrr errr wrote:

> Yes, the phpinfo() shows that sockets are enabled in both machines.
> On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert  wrote:
> 
>> On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
>> wrote:
>>> Hello,
>>> 
>>> I was trying to create a socket connection from a Solaris machine to a
>> Red
>>> Hat machine  to get the PATH in Red Hat machine remotely on Solaris
>> machine
>>> and display it to the user.
>>> 
>>> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
>> 5.2.6.
>>> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
>> compiled
>>> with --enable sockets and phpinfo() displays that the sockets are
>> enabled.
>>> In spite of this we get the following error when using this piece of code
>>> from the Solaris machine.
>>> 
>>> 
>>> The error:
>>> 
>>> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
>>> 5server.php<
>> http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
>>> on
>>> line 21
>>> 
>>> The code;
>>> 
>>> >> 
>>> set_time_limit(0);
>>> 
>>> //ip of the server
>>> $addr = 'xxx.xxx.xxx.xxx';
>>> 
>>> //port of the server
>>> $port = 2xxx;
>>> 
>>> //create a socket
>>> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line no
>> 21
>>> in the code. i have ommitted a few header comments */
>>> 
>>> //bind this socket with the above ip and port
>>> $ret = socket_bind($sock, $addr, $port);
>>> 
>>> do {
>>>   $ret = socket_listen($sock, 10);
>>>   $msgSock = socket_accept($sock);
>>>   $buf = socket_read($msgSock, 1024);
>>> 
>>> 
>>> Please let me know if you need any further details I might have missed.
>>> 
>>> Thank you.
>>> 
>>> Suyash Ramineni
>>> 
>> 
>> 
>> check phpinfo() to see if the sockets have been activated in the ini file.
>> --
>> 
>> Bastien
>> 
>> Cat, the other other white meat
>> 


I think that I messed up sending my last email, I apologize.

Is the user that Apache is running under configured for the proper read write 
access to the socket file?


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



Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread crrrrrrr errrrrrr
Yes, the phpinfo() shows that sockets are enabled in both machines.
On Mon, Nov 1, 2010 at 12:43 PM, Bastien Koert  wrote:

> On Mon, Nov 1, 2010 at 12:40 PM, crrr errr 
> wrote:
> > Hello,
> >
> > I was trying to create a socket connection from a Solaris machine to a
> Red
> > Hat machine  to get the PATH in Red Hat machine remotely on Solaris
> machine
> > and display it to the user.
> >
> > We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP
> 5.2.6.
> > on a Unix(Solaris) server(Apache) . The PHP version on Solaris is
> compiled
> > with --enable sockets and phpinfo() displays that the sockets are
> enabled.
> > In spite of this we get the following error when using this piece of code
> > from the Solaris machine.
> >
> >
> > The error:
> >
> > PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> > 5server.php<
> http://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php>
> > on
> > line 21
> >
> > The code;
> >
> >  >
> > set_time_limit(0);
> >
> > //ip of the server
> > $addr = 'xxx.xxx.xxx.xxx';
> >
> > //port of the server
> > $port = 2xxx;
> >
> > //create a socket
> > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line no
> 21
> > in the code. i have ommitted a few header comments */
> >
> > //bind this socket with the above ip and port
> > $ret = socket_bind($sock, $addr, $port);
> >
> > do {
> >$ret = socket_listen($sock, 10);
> >$msgSock = socket_accept($sock);
> >$buf = socket_read($msgSock, 1024);
> >
> >
> > Please let me know if you need any further details I might have missed.
> >
> > Thank you.
> >
> > Suyash Ramineni
> >
>
>
> check phpinfo() to see if the sockets have been activated in the ini file.
> --
>
> Bastien
>
> Cat, the other other white meat
>


Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread Bastien Koert
On Mon, Nov 1, 2010 at 12:40 PM, crrr errr  wrote:
> Hello,
>
> I was trying to create a socket connection from a Solaris machine to a Red
> Hat machine  to get the PATH in Red Hat machine remotely on Solaris machine
> and display it to the user.
>
> We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP 5.2.6.
> on a Unix(Solaris) server(Apache) . The PHP version on Solaris is compiled
> with --enable sockets and phpinfo() displays that the sockets are enabled.
> In spite of this we get the following error when using this piece of code
> from the Solaris machine.
>
>
> The error:
>
> PHP Fatal error:  Call to undefined function socket_create() in /XXX/
> 5server.php
> on
> line 21
>
> The code;
>
> 
> set_time_limit(0);
>
> //ip of the server
> $addr = 'xxx.xxx.xxx.xxx';
>
> //port of the server
> $port = 2xxx;
>
> //create a socket
> $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);  /* This is line no 21
> in the code. i have ommitted a few header comments */
>
> //bind this socket with the above ip and port
> $ret = socket_bind($sock, $addr, $port);
>
> do {
>    $ret = socket_listen($sock, 10);
>    $msgSock = socket_accept($sock);
>    $buf = socket_read($msgSock, 1024);
>
>
> Please let me know if you need any further details I might have missed.
>
> Thank you.
>
> Suyash Ramineni
>


check phpinfo() to see if the sockets have been activated in the ini file.
-- 

Bastien

Cat, the other other white meat

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



[PHP] PHP sockets enabled but socket_create() gives an error call to undefined function

2010-11-01 Thread crrrrrrr errrrrrr
Hello,

I was trying to create a socket connection from a Solaris machine to a Red
Hat machine  to get the PATH in Red Hat machine remotely on Solaris machine
and display it to the user.

We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP 5.2.6.
on a Unix(Solaris) server(Apache) . The PHP version on Solaris is compiled
with --enable sockets and phpinfo() displays that the sockets are enabled.
In spite of this we get the following error when using this piece of code
from the Solaris machine.


The error:

PHP Fatal error:  Call to undefined function socket_create() in /XXX/
5server.php
on
line 21

The code;



Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Richard Quadling
On 1 November 2010 16:27, Nathan Nobbe  wrote:
> On Mon, Nov 1, 2010 at 9:13 AM, Richard Quadling 
> wrote:
>>
>> Hi.
>>
>> I have an abstract base class (call it genericServiceHandler).
>>
>> I have concrete classes (FaxService, EmailService).
>>
>> The genericServiceHandler is watching for commands from an external
>> source. The commands will always be one of a fixed set, no matter what
>> the concrete service is. They are Pause, Continue, Start, Stop,
>> Shutdown, PreShutdown.
>>
>> The genericServiceHandler has no need to process the commands. It only
>> receives them and maybe dispatches them to the concrete class.
>>
>> The concrete class doesn't have to implement handlers for all of the
>> commands, though, at a minimum, onStart() would be pretty much
>> essential.
>>
>>
>> My question relates to how should I code this.
>>
>> Should the base class have empty protected stubs to allowing the
>> concrete class to override them via inheritance?
>>
>> Should I use __call() to capture the non-existing methods and use LSB
>> to allow the concrete class to get the commands?
>>
>>
>> I need to document this (phpdoc) to allow those designing the actual
>> services know what to implement.
>>
>> The empty stubs certainly seems the easiest as I can block the scope
>> to protected and include a full reasoning on when the method will be
>> called (not all commands are applicable at all times).
>>
>> Using __call() can be documented using @method, but pretty much only a
>> single line of description.
>>
>>
>>
>> What would you all do?
>
> i would go w/ the stubbed out methods in the base class. if theres nothing
> to do for the default implementation just use the 'null' pattern,
> function pause() {}
>  __call is something of a last resort for me; i think it's best for proxies
> or similar and thats about the most its useful for.
> -nathan

That does seem to be the best fit for me.

I can protect and docblock the methods.

Thanks Nathan.

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



Re: [PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Nathan Nobbe
On Mon, Nov 1, 2010 at 9:13 AM, Richard Quadling wrote:

> Hi.
>
> I have an abstract base class (call it genericServiceHandler).
>
> I have concrete classes (FaxService, EmailService).
>
> The genericServiceHandler is watching for commands from an external
> source. The commands will always be one of a fixed set, no matter what
> the concrete service is. They are Pause, Continue, Start, Stop,
> Shutdown, PreShutdown.
>
> The genericServiceHandler has no need to process the commands. It only
> receives them and maybe dispatches them to the concrete class.
>
> The concrete class doesn't have to implement handlers for all of the
> commands, though, at a minimum, onStart() would be pretty much
> essential.
>
>
> My question relates to how should I code this.
>
> Should the base class have empty protected stubs to allowing the
> concrete class to override them via inheritance?
>
> Should I use __call() to capture the non-existing methods and use LSB
> to allow the concrete class to get the commands?
>
>
> I need to document this (phpdoc) to allow those designing the actual
> services know what to implement.
>
> The empty stubs certainly seems the easiest as I can block the scope
> to protected and include a full reasoning on when the method will be
> called (not all commands are applicable at all times).
>
> Using __call() can be documented using @method, but pretty much only a
> single line of description.
>
>
>
> What would you all do?
>

i would go w/ the stubbed out methods in the base class. if theres nothing
to do for the default implementation just use the 'null' pattern,

function pause() {}

 __call is something of a last resort for me; i think it's best for proxies
or similar and thats about the most its useful for.

-nathan


[PHP] Implementing optional methods in a concrete class, but calling them from an abstract class.

2010-11-01 Thread Richard Quadling
Hi.

I have an abstract base class (call it genericServiceHandler).

I have concrete classes (FaxService, EmailService).

The genericServiceHandler is watching for commands from an external
source. The commands will always be one of a fixed set, no matter what
the concrete service is. They are Pause, Continue, Start, Stop,
Shutdown, PreShutdown.

The genericServiceHandler has no need to process the commands. It only
receives them and maybe dispatches them to the concrete class.

The concrete class doesn't have to implement handlers for all of the
commands, though, at a minimum, onStart() would be pretty much
essential.


My question relates to how should I code this.

Should the base class have empty protected stubs to allowing the
concrete class to override them via inheritance?

Should I use __call() to capture the non-existing methods and use LSB
to allow the concrete class to get the commands?


I need to document this (phpdoc) to allow those designing the actual
services know what to implement.

The empty stubs certainly seems the easiest as I can block the scope
to protected and include a full reasoning on when the method will be
called (not all commands are applicable at all times).

Using __call() can be documented using @method, but pretty much only a
single line of description.



What would you all do?


Regards,

Richard Quadling.
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



[PHP] updating sub-request parameters

2010-11-01 Thread Daniela Floroiu
hi,

I need to make an apache sub-request like:

virtual('.../script.php?param1=val1¶m2=val2...');

where the parameters are different from the parameters of the original
request.
I tried to set param1 and param2 in $_GET, $_REQUEST,
$_SERVER['QUERY_STRING'] but without success: what script.php receives are
nothing less and nothing more than the original parameters with the original
values.

any ideea how one could touch the parameters being passed to a sub-request?

cheers,
--df


Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread Daniel P. Brown
On Mon, Nov 1, 2010 at 04:29, Ben Brentlinger  wrote:
>
> should be ok.  If you do, though, and you're not sure who to switch to, I'd
> recommend hostgator
> >.

You just shot any chance of credibility you could ever hope to
have in this community.  Give yourself a round of applause.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread Daniel P. Brown
On Sun, Oct 31, 2010 at 21:06, Tamara Temple  wrote:
> Is this something I need to worry about?? Is my mail sending some malware??

No, you're safe in this case.

>> 
>>   (reason: 550 This message contains malware
>> (winnow.malware.wa.webinjection.1450.UNOFFICIAL))

Sascha's server's scanner (say that three times fast) is having a
fit over this:

>> this. (See your code at http://pastie.org/1262989).

A version of ClamAV released during the spring of this year
erroneously catches all URLs from pastie.org as malware.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread David McGlone
On Mon, 2010-11-01 at 04:29 -0400, Ben Brentlinger wrote:
> it could be that the person whom you tried email has reached the quota 
> on their inbox.  It's also possible that the person you tried emailing 
> gave you a fake email address and it's also possible that your domain 
> might be hosted on a cheap hosting account with a company that has been 
> known for other people using their service to host websites that have a 
> bulk mailing script meant for sending spam.  The possibility to what 
> could be going on are endless, but out of all the possibilities I can 
> think of, I can't imagine a spammer hijacking your site to send malware 
> from it being one of the more likely possibilities especially if you 
> have a hosting account with cpanel, which is harder to gain unauthorized 
> access to a cpanel hosting account than it is to gain access to a web 
> server's FTP, especially if you allow public FTP uploads to the site, 
> that can be a breading ground for hackers to upload a password sniffing 
> script onto your site via FTP that would track back to their server, 
> which would allow them to hack into your website.  Cheap, no name 
> webhosting companies are more likely breading grounds for those kinds of 
> shady charachters.

You must be one of them, because using scare tactics and lies to sell
hosting plans is shady dude and thats exactly what your doing.



>   If you have an account with one of those no name 
> companies, I'd recommend changing webhosts immediately, otherwise, you 
> should be ok.  If you do, though, and you're not sure who to switch to, 
> I'd recommend hostgator 
> .
>  
> 
> 
> They're not as big as 1&1 or Godaddy, but there one of the biggest 
> webhosting companies that use cpanel.  I wouldn't recommend any 
> webhosting company that doesn't use cpanel because anything else is 
> either harder to use, not as secure or both.


-- 
Blessings
David M.


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



Re: [PHP] a question about user and permission on linux

2010-11-01 Thread Daniel P. Brown
On Sun, Oct 31, 2010 at 13:50, Ryan Sun  wrote:
> which user it is executed as when request a php script on browser?(suppose
> we are on a shared LAMP hosting)

Find out:



-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread TR Shaw
It looks like someone is using a very old copy of the winnow unofficial clamav 
files.  There was a pastie that contained a zeus injection some time ago but it 
has been removed and the former signature was removed from our database at that 
time.

Tom

Begin forwarded message:

> From: Tamara Temple 
> Date: October 31, 2010 9:06:01 PM EDT
> To: PHP General 
> Subject: [PHP] Fwd: Mail delivery failed: returning message to sender
> 
> Is this something I need to worry about?? Is my mail sending some malware??
> 
> Begin forwarded message:
> 
>> From: Mail Delivery Subsystem 
>> Date: October 31, 2010 7:37:54 PM CDT
>> To: Tamara Temple 
>> Subject: Mail delivery failed: returning message to sender
>> 
>> This message was created automatically by mail delivery software.
>> 
>> A message sent by
>> 
>> 
>> 
>> could not be delivered to all of its recipients.
>> The following address(es) failed:
>> 
>> 
>> 
>> The following text was generated during the delivery attempt(s):
>> 
>> 
>>   (reason: 550 This message contains malware 
>> (winnow.malware.wa.webinjection.1450.UNOFFICIAL))
>> 
>> -- This is a copy of the message, including all the headers.
>> 
>> Received: from [192.168.1.110] (helo=mailin01.ims-firmen.de)
>>  by mail01.ims-firmen.de with esmtp (Exim 4.69)
>>  (envelope-from 
>> )
>>  id 1PCiPJ-0001i7-R8
>>  for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:37:53 +0100
>> Received: from pb1.pair.com ([76.75.200.58] helo=lists.php.net)
>>  by mailin01.ims-firmen.de with esmtp (Exim 4.72)
>>  (envelope-from 
>> )
>>  id 1PCiPs-00047o-Sb
>>  for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:38:29 +0100
>> Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com; 
>> domainkeys=bad
>> DomainKey-Status: bad
>> X-DomainKeys: Ecelerity dk_validate implementing 
>> draft-delany-domainkeys-base-01
>> X-Host-Fingerprint: 76.75.200.58 pb1.pair.com
>> Received: from [76.75.200.58] ([76.75.200.58:2084] helo=lists.php.net)
>>  by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
>>  id EF/73-24094-FDB0ECC4 for ; Sun, 31 Oct 2010 
>> 19:37:51 -0500
>> Received: (qmail 51732 invoked by uid 1010); 1 Nov 2010 00:37:02 -
>> Mailing-List: contact php-general-h...@lists.php.net; run by ezmlm
>> Precedence: bulk
>> list-help: 
>> list-unsubscribe: 
>> list-post: 
>> List-Id: php-general.lists.php.net
>> Delivered-To: mailing list php-general@lists.php.net
>> Received: (qmail 51725 invoked from network); 1 Nov 2010 00:37:02 -
>> Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com; 
>> sender-id=pass; domainkeys=bad
>> Authentication-Results: pb1.pair.com smtp.mail=tamouse.li...@gmail.com; 
>> spf=pass; sender-id=pass
>> Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 
>> as permitted sender)
>> X-DomainKeys: Ecelerity dk_validate implementing 
>> draft-delany-domainkeys-base-01
>> X-PHP-List-Original-Sender: tamouse.li...@gmail.com
>> X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com
>> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
>>   d=gmail.com; s=gamma;
>>   h=domainkey-signature:received:received:message-id:from:to
>>:in-reply-to:content-type:content-transfer-encoding:mime-version
>>:subject:x-priority:date:references:x-mailer;
>>   bh=1SBvdJiJMqFW3oAPgBXlRPveD1uwTXHSzA8U6+E93g0=;
>>   b=XHIyqG6ZzyCKVSLzyPdNuLXtAIWM1ny0zKFupfTsZgMElSrlCA1aJ9FpDUGvgHMQof
>>0ygppTTq2fo3499HwTzbRYXQSJ4Z2NiEZfYHmwwoTmuenC9XjYbPk+ZUE3p+6S4Okbsm
>>sSzu18qFOWAGGhJ8dG8LfcDSfhKhRj3R57Yh4=
>> DomainKey-Signature: a=rsa-sha1; c=nofws;
>>   d=gmail.com; s=gamma;
>>   h=message-id:from:to:in-reply-to:content-type
>>:content-transfer-encoding:mime-version:subject:x-priority:date
>>:references:x-mailer;
>>   b=CnWjshGm9zyFaRv0eUKJml94xT5U1Lb+kEBb503a7VlYtSAWaZm4nK38otH7iJ+Bit
>>wr77nJ0SSxoXmaQ/ljQ16IoSGhhXJ9Ew6lOaBE7ntbjibfYnnz7Yzi+sfGt+8STXjHZx
>>LP7Z8lk+uMvIH4gNDGw6CcqWawTHJ3Ll7PX7o=
>> Message-Id: <30708a14-2818-4b28-87f9-11db56c40...@gmail.com>
>> From: Tamara Temple 
>> To: PHP General 
>> In-Reply-To: 
>> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>> Content-Transfer-Encoding: 7bit
>> Mime-Version: 1.0 (Apple Message framework v936)
>> X-Priority: 3
>> Date: Sun, 31 Oct 2010 19:36:53 -0500
>> References: <15.34.06635.e1b1b...@pb1.pair.com> 
>>   
>> <94df613c-6b40-4897-b101-21cf7d83a...@gmail.com> 
>> 
>> X-Mailer: Apple Mail (2.936)
>> Subject: Re: [PHP] Watermark with GD
>> X-Envelope-To: sascha.br...@immosky.ch
>> X-Envelope-From: 
>> php-general-return-309188-sascha.braun=immosky...@lists.php.net
>> X-IMS-IP: 76.75.200.58
>> X-AV-scan: yes
>> 
>> 
>> On Oct 31, 2010, at 7:29 AM, Gary wrote:
>>> Thanks for the reply, here is a link to the code of the page.
>>> 
>>> ht

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread Ben Brentlinger

her inbox is probably full than

On 11/1/2010 5:30, a...@ashleysheridan.co.uk wrote:
It's not to do with hosting, its an auto reply when you email 
sascha.braun which gave the same aware reply to me, and I'm on a Linux 
box at home!


Thanks,
Ash
http://www.ashleysheridan.co.uk

- Reply message -
From: "Ben Brentlinger" 
Date: Mon, Nov 1, 2010 08:29
Subject: [PHP] Fwd: Mail delivery failed: returning message to sender
To: 

it could be that the person whom you tried email has reached the quota
on their inbox.  It's also possible that the person you tried emailing
gave you a fake email address and it's also possible that your domain
might be hosted on a cheap hosting account with a company that has been
known for other people using their service to host websites that have a
bulk mailing script meant for sending spam.  The possibility to what
could be going on are endless, but out of all the possibilities I can
think of, I can't imagine a spammer hijacking your site to send malware
from it being one of the more likely possibilities especially if you
have a hosting account with cpanel, which is harder to gain unauthorized
access to a cpanel hosting account than it is to gain access to a web
server's FTP, especially if you allow public FTP uploads to the site,
that can be a breading ground for hackers to upload a password sniffing
script onto your site via FTP that would track back to their server,
which would allow them to hack into your website.  Cheap, no name
webhosting companies are more likely breading grounds for those kinds of
shady charachters.  If you have an account with one of those no name
companies, I'd recommend changing webhosts immediately, otherwise, you
should be ok.  If you do, though, and you're not sure who to switch to,
I'd recommend hostgator
. 




They're not as big as 1&1 or Godaddy, but there one of the biggest
webhosting companies that use cpanel.  I wouldn't recommend any
webhosting company that doesn't use cpanel because anything else is
either harder to use, not as secure or both.

On 11/1/2010 3:56, Ashley Sheridan wrote:
> On Sun, 2010-10-31 at 20:06 -0500, Tamara Temple wrote:
>
>> Is this something I need to worry about?? Is my mail sending some
>> malware??
>>
>> Begin forwarded message:
>>
>>> From: Mail Delivery Subsystem
>>> Date: October 31, 2010 7:37:54 PM CDT
>>> To: Tamara Temple
>>> Subject: Mail delivery failed: returning message to sender
>>>
>>> This message was created automatically by mail delivery software.
>>>
>>> A message sent by
>>>
>>> 
>>>
>>> could not be delivered to all of its recipients.
>>> The following address(es) failed:
>>>
>>> 
>>>
>>> The following text was generated during the delivery attempt(s):
>>>
>>> 
>>> (reason: 550 This message contains malware
>>> (winnow.malware.wa.webinjection.1450.UNOFFICIAL))
>>>
>>> -- This is a copy of the message, including all the headers.
>>>
>>> Received: from [192.168.1.110] (helo=mailin01.ims-firmen.de)
>>> by mail01.ims-firmen.de with esmtp (Exim 4.69)
>>> 
(envelope-from
 )
>>> id 1PCiPJ-0001i7-R8
>>> for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:37:53 +0100
>>> Received: from pb1.pair.com ([76.75.200.58] helo=lists.php.net)
>>> by mailin01.ims-firmen.de with esmtp (Exim 4.72)
>>> 
(envelope-from
 )
>>> id 1PCiPs-00047o-Sb
>>> for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:38:29 +0100
>>> Authentication-Results: pb1.pair.com 
header.from=tamouse.li...@gmail.com

>>> ; domainkeys=bad
>>> DomainKey-Status: bad
>>> X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
>>> domainkeys-base-01
>>> X-Host-Fingerprint: 76.75.200.58 pb1.pair.com
>>> Received: from [76.75.200.58] ([76.75.200.58:2084] helo=lists.php.net)
>>> by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
>>> id EF/73-24094-FDB0ECC4 for; Sun, 31 Oct
>>> 2010 19:37:51 -0500
>>> Received: (qmail 51732 invoked by uid 1010); 1 Nov 2010 00:37:02 -
>>> Mailing-List: contact php-general-h...@lists.php.net; run by ezmlm
>>> Precedence: bulk
>>> list-help:
>>> list-unsubscribe:
>>> list-post:
>>> List-Id: php-general.lists.php.net
>>> Delivered-To: mailing list php-general@lists.php.net
>>> Received: (qmail 51725 invoked from network); 1 Nov 2010 00:37:02
>>> -
>>> Authentication-Results: pb1.pair.com 
header.from=tamouse.li...@gmail.com

>>> ; sender-id=pass; domainkeys=bad
>>> Authentication-Results: pb1.pair.com
>>> smtp.mail=tamouse.li...@gmail.com; spf=pass; sender-id=pass
>>> Received-SPF: pass (pb1.pair.com: domain gmail.com designates
>>> 209.85.214.170 as permitted sender)
>>> X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
>>> domainkeys-base-01
>>> X-PHP-List-Original-Sender: tamouse.li...@gmail.com
>>> X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com
>>> DKIM

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread a...@ashleysheridan.co.uk
It's not to do with hosting, its an auto reply when you email sascha.braun 
which gave the same aware reply to me, and I'm on a Linux box at home!

Thanks,
Ash
http://www.ashleysheridan.co.uk

- Reply message -
From: "Ben Brentlinger" 
Date: Mon, Nov 1, 2010 08:29
Subject: [PHP] Fwd: Mail delivery failed: returning message to sender
To: 

it could be that the person whom you tried email has reached the quota 
on their inbox.  It's also possible that the person you tried emailing 
gave you a fake email address and it's also possible that your domain 
might be hosted on a cheap hosting account with a company that has been 
known for other people using their service to host websites that have a 
bulk mailing script meant for sending spam.  The possibility to what 
could be going on are endless, but out of all the possibilities I can 
think of, I can't imagine a spammer hijacking your site to send malware 
from it being one of the more likely possibilities especially if you 
have a hosting account with cpanel, which is harder to gain unauthorized 
access to a cpanel hosting account than it is to gain access to a web 
server's FTP, especially if you allow public FTP uploads to the site, 
that can be a breading ground for hackers to upload a password sniffing 
script onto your site via FTP that would track back to their server, 
which would allow them to hack into your website.  Cheap, no name 
webhosting companies are more likely breading grounds for those kinds of 
shady charachters.  If you have an account with one of those no name 
companies, I'd recommend changing webhosts immediately, otherwise, you 
should be ok.  If you do, though, and you're not sure who to switch to, 
I'd recommend hostgator 
.
 


They're not as big as 1&1 or Godaddy, but there one of the biggest 
webhosting companies that use cpanel.  I wouldn't recommend any 
webhosting company that doesn't use cpanel because anything else is 
either harder to use, not as secure or both.

On 11/1/2010 3:56, Ashley Sheridan wrote:
> On Sun, 2010-10-31 at 20:06 -0500, Tamara Temple wrote:
>
>> Is this something I need to worry about?? Is my mail sending some
>> malware??
>>
>> Begin forwarded message:
>>
>>> From: Mail Delivery Subsystem
>>> Date: October 31, 2010 7:37:54 PM CDT
>>> To: Tamara Temple
>>> Subject: Mail delivery failed: returning message to sender
>>>
>>> This message was created automatically by mail delivery software.
>>>
>>> A message sent by
>>>
>>>   
>>>
>>> could not be delivered to all of its recipients.
>>> The following address(es) failed:
>>>
>>>   
>>>
>>> The following text was generated during the delivery attempt(s):
>>>
>>> 
>>> (reason: 550 This message contains malware
>>> (winnow.malware.wa.webinjection.1450.UNOFFICIAL))
>>>
>>> -- This is a copy of the message, including all the headers.
>>>
>>> Received: from [192.168.1.110] (helo=mailin01.ims-firmen.de)
>>> by mail01.ims-firmen.de with esmtp (Exim 4.69)
>>> 
>>> (envelope-from>>> )
>>> id 1PCiPJ-0001i7-R8
>>> for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:37:53 +0100
>>> Received: from pb1.pair.com ([76.75.200.58] helo=lists.php.net)
>>> by mailin01.ims-firmen.de with esmtp (Exim 4.72)
>>> 
>>> (envelope-from>>> )
>>> id 1PCiPs-00047o-Sb
>>> for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:38:29 +0100
>>> Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com
>>> ; domainkeys=bad
>>> DomainKey-Status: bad
>>> X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
>>> domainkeys-base-01
>>> X-Host-Fingerprint: 76.75.200.58 pb1.pair.com
>>> Received: from [76.75.200.58] ([76.75.200.58:2084] helo=lists.php.net)
>>> by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
>>> id EF/73-24094-FDB0ECC4 for; Sun, 31 Oct
>>> 2010 19:37:51 -0500
>>> Received: (qmail 51732 invoked by uid 1010); 1 Nov 2010 00:37:02 -
>>> Mailing-List: contact php-general-h...@lists.php.net; run by ezmlm
>>> Precedence: bulk
>>> list-help:
>>> list-unsubscribe:
>>> list-post:
>>> List-Id: php-general.lists.php.net
>>> Delivered-To: mailing list php-general@lists.php.net
>>> Received: (qmail 51725 invoked from network); 1 Nov 2010 00:37:02
>>> -
>>> Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com
>>> ; sender-id=pass; domainkeys=bad
>>> Authentication-Results: pb1.pair.com
>>> smtp.mail=tamouse.li...@gmail.com; spf=pass; sender-id=pass
>>> Received-SPF: pass (pb1.pair.com: domain gmail.com designates
>>> 209.85.214.170 as permitted sender)
>>> X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
>>> domainkeys-base-01
>>> X-PHP-List-Original-Sender: tamouse.li...@gmail.com
>>> X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com
>>> DKIM-Signature: v=1; a=rsa

Re: [PHP] Fwd: Mail delivery failed: returning message to sender

2010-11-01 Thread Ben Brentlinger
it could be that the person whom you tried email has reached the quota 
on their inbox.  It's also possible that the person you tried emailing 
gave you a fake email address and it's also possible that your domain 
might be hosted on a cheap hosting account with a company that has been 
known for other people using their service to host websites that have a 
bulk mailing script meant for sending spam.  The possibility to what 
could be going on are endless, but out of all the possibilities I can 
think of, I can't imagine a spammer hijacking your site to send malware 
from it being one of the more likely possibilities especially if you 
have a hosting account with cpanel, which is harder to gain unauthorized 
access to a cpanel hosting account than it is to gain access to a web 
server's FTP, especially if you allow public FTP uploads to the site, 
that can be a breading ground for hackers to upload a password sniffing 
script onto your site via FTP that would track back to their server, 
which would allow them to hack into your website.  Cheap, no name 
webhosting companies are more likely breading grounds for those kinds of 
shady charachters.  If you have an account with one of those no name 
companies, I'd recommend changing webhosts immediately, otherwise, you 
should be ok.  If you do, though, and you're not sure who to switch to, 
I'd recommend hostgator 
. 



They're not as big as 1&1 or Godaddy, but there one of the biggest 
webhosting companies that use cpanel.  I wouldn't recommend any 
webhosting company that doesn't use cpanel because anything else is 
either harder to use, not as secure or both.


On 11/1/2010 3:56, Ashley Sheridan wrote:

On Sun, 2010-10-31 at 20:06 -0500, Tamara Temple wrote:


Is this something I need to worry about?? Is my mail sending some
malware??

Begin forwarded message:


From: Mail Delivery Subsystem
Date: October 31, 2010 7:37:54 PM CDT
To: Tamara Temple
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message sent by

  

could not be delivered to all of its recipients.
The following address(es) failed:

  

The following text was generated during the delivery attempt(s):


(reason: 550 This message contains malware
(winnow.malware.wa.webinjection.1450.UNOFFICIAL))

-- This is a copy of the message, including all the headers.

Received: from [192.168.1.110] (helo=mailin01.ims-firmen.de)
by mail01.ims-firmen.de with esmtp (Exim 4.69)

(envelope-from
)

id 1PCiPJ-0001i7-R8
for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:37:53 +0100
Received: from pb1.pair.com ([76.75.200.58] helo=lists.php.net)
by mailin01.ims-firmen.de with esmtp (Exim 4.72)

(envelope-from
)

id 1PCiPs-00047o-Sb
for sascha.br...@immosky.ch; Mon, 01 Nov 2010 01:38:29 +0100
Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com
; domainkeys=bad
DomainKey-Status: bad
X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
domainkeys-base-01
X-Host-Fingerprint: 76.75.200.58 pb1.pair.com
Received: from [76.75.200.58] ([76.75.200.58:2084] helo=lists.php.net)
by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
id EF/73-24094-FDB0ECC4 for; Sun, 31 Oct
2010 19:37:51 -0500
Received: (qmail 51732 invoked by uid 1010); 1 Nov 2010 00:37:02 -
Mailing-List: contact php-general-h...@lists.php.net; run by ezmlm
Precedence: bulk
list-help:
list-unsubscribe:
list-post:
List-Id: php-general.lists.php.net
Delivered-To: mailing list php-general@lists.php.net
Received: (qmail 51725 invoked from network); 1 Nov 2010 00:37:02
-
Authentication-Results: pb1.pair.com header.from=tamouse.li...@gmail.com
; sender-id=pass; domainkeys=bad
Authentication-Results: pb1.pair.com
smtp.mail=tamouse.li...@gmail.com; spf=pass; sender-id=pass
Received-SPF: pass (pb1.pair.com: domain gmail.com designates
209.85.214.170 as permitted sender)
X-DomainKeys: Ecelerity dk_validate implementing draft-delany-
domainkeys-base-01
X-PHP-List-Original-Sender: tamouse.li...@gmail.com
X-Host-Fingerprint: 209.85.214.170 mail-iw0-f170.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:from:to
 :in-reply-to:content-type:content-transfer-encoding:mime-
version
 :subject:x-priority:date:references:x-mailer;
bh=1SBvdJiJMqFW3oAPgBXlRPveD1uwTXHSzA8U6+E93g0=;

b=XHIyqG6ZzyCKVSLzyPdNuLXtAIWM1ny0zKFupfTsZgMElSrlCA1aJ9FpDUGvgHMQof
 0ygppTTq2fo3499HwTzbRYXQSJ4Z2NiEZfYHmwwoTmuenC9XjYbPk+ZUE3p
+6S4Okbsm
 sSzu18qFOWAGGhJ8dG8LfcDSfhKhRj3R57Yh4=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;