[PHP] Socket connect crashes web server

2003-07-11 Thread Chris Morrow
Hi Guys,

I wonder if any of you can help with this

I'm using sockets in php to connect my script to an outside system. More
often than not this works fine, but every so often, say twice a day, it
brings down my whole web server.

When this has happened all the sites im serving can take up to 5 minutes to
be displayed in your browser, if I look in the web logs their have been no
accesses for a couple of minutes which is not usual and if I look in
performance monitor in Win2k there is a flat line for Web Server bytes sent,
NIC bytes sent and File Read Bytes/sec.

Can anyone explain why this connect to sockets can bring down the whole
server? Is it not possible to have the function work in isolation rather
than having a knock on effect on everything else?

Also in the Win2k system event viewer I get the error:

The script started from the URL '/myscript/index.php' with parameters ''
has not responded within the configured timeout period. The HTTP server is
terminating the script.

Any help anyone please? I'm going mad here!

Thanks,
Chris



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



Re: [PHP] Socket connect crashes web server

2003-07-11 Thread Chris Morrow
I'm pretty sure its not in an endless loop and php is 4.3, im still nowhere
closer to fixing this.

I'm sure its not hardware and I thought I was sure its not networkl related
but I think im going to have to rethirnk my ideas.

Cheers.
Chris


Fejes Jozsef [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
  The script started from the URL '/myscript/index.php' with parameters
''
  has not responded within the configured timeout period. The HTTP server
is
  terminating the script.

 maybe the problem is not with the sockets but you have an endless loop
bug?
 do you have an up-to-date version of php? i can't imagine a single connect
 slowing down an entire server






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



[PHP] Unknown Syntax

2003-07-11 Thread Chris Morrow
Does anybody recognize this:

!==

with 2 '='

Ive known != to mean not equal to but i'm just looking at someone elses
script and they use this instead. Does anyone know if this works or any
problems with it?

Cheers



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



[PHP] Re: Unknown Syntax

2003-07-11 Thread Chris Morrow
I Found this on the PHP.net site, maybe it will clear things up. Thanks for
your help everyone.

  Example Name Result
  $a == $b Equal TRUE if $a is equal to $b.
  $a === $b Identical TRUE if $a is equal to $b, and they are of the
same type. (PHP 4 only)
  $a != $b Not equal TRUE if $a is not equal to $b.
  $a  $b Not equal TRUE if $a is not equal to $b.
  $a !== $b Not identical TRUE if $a is not equal to $b, or they are not
of the same type. (PHP 4 only)
  $a  $b Less than TRUE if $a is strictly less than $b.
  $a  $b Greater than TRUE if $a is strictly greater than $b.
  $a = $b Less than or equal to  TRUE if $a is less than or equal to
$b.
  $a = $b Greater than or equal to  TRUE if $a is greater than or equal
to $b.


Cheers,
Chris


Erythros [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 two equal signs means 'equal to'
 so '!==' means 'not equal to'
 one equal sign sets a value.
 ie...
 x = 2; // x is set to the value of 2

 if(x!==3) // checks if the value of x is not equal to 3

 as for != i've never seen it with just one equal sign...


 Chris Morrow [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Does anybody recognize this:
 
  !==
 
  with 2 '='
 
  Ive known != to mean not equal to but i'm just looking at someone elses
  script and they use this instead. Does anyone know if this works or any
  problems with it?
 
  Cheers
 
 





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



[PHP] PHP with FTP support on a Raq4 Server

2002-10-25 Thread Chris Morrow
Hi People,

I am running PHP 4.1.2 on a Cobalt Raq4 server. I'm pretty new to Linux and
can't understand why the server has come preinstalled with 2 diffrent
versions of PHP. When I run phpinfo() from scripts on the site through my
browser it says PHP is installed as an Apache module, but when I run it from
the command line it still has the same version number but says its a CGI
install.

I'm trying to use the ftp_connect() function in a script that is run from
the command line, ie. the CGI version and everytime I run it it says 'Call
to undefined function ftp_connect()' yet when I run it through the browser
on my site which is running the same version of PHP just the Apache module
it works fine.

Does anyone know what causes this strange behaviour or what I can do to get
my ftp_connect() function working from the command line on a Raq4 server?

Thanks for any help.

Chris Morrow



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




[PHP] Accessing cookies in required files

2002-06-27 Thread Chris Morrow

Hi,

Can anyone help with this problem?

I have a file called settings.inc which I include in all files on my site
like this:

require(settings.inc);

Up until now this has worked fine. But now I have a function in the
settings.inc file that tries to read the value of a cookie called
testcookie. My problem is that the settings.inc file doesn't seem to be
able to access the cookie at all. But if I try to access it direct from a
page rather than the required file it works fine.

Does anybody know why I can't access my cookie in my required file? They are
all on the same directory level etc.

Thanks for any help.



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




Re: [PHP] Accessing cookies in required files

2002-06-27 Thread Chris Morrow

Thanks, globalising it has sortd it out.
John Holmes [EMAIL PROTECTED] wrote in message
000401c21db7$47aee4a0$b402a8c0@mango">news:000401c21db7$47aee4a0$b402a8c0@mango...
 Function whatever()
 {
   global $testcookie;

 or

   global $HTTP_COOKIE_VARS;

 or

 upgrade your PHP and jus use $_COOKIE['testcookie'] and it's always
 available, regardless of scope.

 ---John Holmes...

  -Original Message-
  From: Chris Morrow [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, June 27, 2002 4:30 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Accessing cookies in required files
 
  Hi,
 
  Can anyone help with this problem?
 
  I have a file called settings.inc which I include in all files on my
  site
  like this:
 
  require(settings.inc);
 
  Up until now this has worked fine. But now I have a function in the
  settings.inc file that tries to read the value of a cookie called
  testcookie. My problem is that the settings.inc file doesn't seem to
 be
  able to access the cookie at all. But if I try to access it direct
 from a
  page rather than the required file it works fine.
 
  Does anybody know why I can't access my cookie in my required file?
 They
  are
  all on the same directory level etc.
 
  Thanks for any help.
 
 
 
  --
  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