Re: [PHP] Change in 5.2.1 re. parsing of URL

2007-02-22 Thread Jan Reilink

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Lucas wrote:
| Lewis Kapell wrote:
| Jochem Maas wrote:

[snip]
| this is nothing to do with php - it's down to your webserver settings.
|
| If this has nothing to do with PHP, maybe you can explain why the
| behavior was broken when I upgraded from 5.2.0 to 5.2.1, and started
| working again the instant I reverted back to 5.2.0.  No other
| configuration changes were made on the web server.
|
| are you using the save php.ini file?  If different, maybe their is
| something that changed with the settings in that ini file.
|

I can confirm that PHP 5.2.1 breaks internal URL rewrites, as we
experience it with the blogs like Wordpress and ExpressionEngine;
permalinks stopped working, even using the _same_ php.ini file. So my
guess is something in PHP changed, probably a regular expression -like
function?

On the Wordpress support forum I posted the following, inclusing a test
environment:

/*
Last week we, the hosting company I work for, upgraded from PHP version
5.2.0 to 5.2.1. And suddenly customers started complaining about
permalinks stopped working and returning 404 errors. I am now trying to
find the cause (probably changes in some of PHPs regular expression-like
functions), but my guess is the Wordpress developers here know more
about the rewriting code of Wordpress than I do to pinpoint it :)

For my test purposes I have created two identical application folders
with one difference: One of them uses PHP 5.2.0 and the other 5.2.1.
They both use the same php.ini file. The phpinfo() information is
located here:
~  http://www.vevida.to/php/php520/phpinfo.php
~  http://www.vevida.to/php/php521/phpinfo.php

and both Wordpress installations can are located here:
~  http://www.vevida.to/php/php520/index.php
~  http://www.vevida.to/php/php521/index.php

As you can see, a permalink like
~  http://www.vevida.to/php/php520/index.php/2007/02/21/lorem-ipsum/
works, and
~  http://www.vevida.to/php/php521/index.php/2007/02/21/lorem-ipsum/
does not.

[...]

Is this a problem I (or better, the Wordpress developers ;)) can fix by
changing some code or functions? Or is this a problem with (some of) the
PHP core fuctions which needs to be fixed by the PHP developers?

[snipped something about mod_rewrite and ISAPI_Rewrite]
*/

(http://wordpress.org/support/topic/107133)

Looking at this in the test environment, my only conclusion is that
something within PHP, or in the pcre functions, has changed.

- --
Met vriendelijke groet / Best regards,
Jan Reilink

VEVIDA Services bv, [EMAIL PROTECTED]
Postbus 329, 9700 AH GRONINGEN, +31(0)50 - 5492234
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFF3VWVzmimqimD3mIRAnCYAKCmCgd/zw6d3qgoztsdYGKgvC5AuwCeJMWc
eE4HRDKz2lVZCZ2aS55xNxQ=
=VM5o
-END PGP SIGNATURE-

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



[PHP] remote file time -small issue

2007-02-22 Thread SJAMHO DBMS

Dear Sirs,


I have a problem with the attached file.
Run it or see it here: http://www.sjamho.com/update/remote.php

The issue is: the timestamps are shown for every file in a subdirectory, but
never for a file in the root of a domain.
Can anyone tell me why?


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

[PHP] Re: How to call image from mySql to php file

2007-02-22 Thread Colin Guthrie
Kevin Waterson wrote:
 This one time, at band camp, Haydar TUNA [EMAIL PROTECTED] wrote:
 
 Hello,
Firstly, your image table field should be BLOB field then you create 
 a image file (for example image.php). in this file, if your application is 
 more secure, you can control the session variables. You get key column of 
 your BLOB table (for example id, studentnumber and so on) with session 
 variables, GET variables or any way. I always get this column with SESSION 
 variables because it is more secure. After this, for get variables you can 
 call the image to your main application from image.php file with  like the 
 following HTML1 code. for session variables you can call the image to your 
 main application from image.php file with  like the following HTML2 code.
 
 Here is a little how to about storing images in mysql
 
 http://phpro.org/tutorials/Storing-Images-in-MySQL-with-PHP.html

While I appreciate this concept and indeed use it myself, it should be
noted that the OP was *not* talking about storing the images in the DB
itself. He was talking about storing a filename which he then used in
his html.

Col

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



[PHP] Re: How to call image from mySql to php file

2007-02-22 Thread Colin Guthrie
Hi,

Some points already given by others just reiterating:

Chris Carter wrote:

  $sno = $_REQUEST['sno'];

$_REQUEST is dodgy - you don't know what makes it up (cookies, post, get
etc.), only use it when it when you are sure.

 $query=SELECT logos FROM table WHERE sno = '$sno';

NEVER do this. VERY dangerous. Always use mysql_real_escape or similar
delimiting functions on input data.

 $result=mysql_query($query);
 $num=mysql_numrows($result);
 
 mysql_close();

You can't close it yet.

 $logos=mysql_result($result,$i,logos);

 as you need it here!!

Also $i is not initialised, I presume you mean to use $num? Even so, if
there is 1 row, you will be passing in 1 and this would not return any
results! If you want the last row returned you would have to pass in
($num - 1).

HOwever if $i is indicative of a for loop, you are better using the
fetch associative arrays functions alreayd mentioned and a while loop.

 echo 
 div
 p $logos /p
 /div;
 
 ?/div


You'd presumable by better with: echo img src=\$logos\ / or similar :)

HTH

Col

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



Re: [PHP] Session problems with 4.4.5?

2007-02-22 Thread alex handle

On 2/16/07, Jochem Maas [EMAIL PROTECTED] wrote:


Ken Williams wrote:
 Is anyone else having problems with session in 4.4.5?  I'm under apache
 1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon
as a
 page tries to register a session variable with session_register apache
will
 segfault.  Has worked perfectly fine for the past 2 years and like 10
 version of PHP 4.4.X.

segfault probably indicates  problem. goto bugs.php.net and file a bug
with
details about your machine and a small reproduce script.

side note: use of session_register() is not recommended - reading the
following
page may help you understand why, help you work around your current
problem and
hopefully get you on the path of using $_SESSION:

http://php.net/session_register


 [EMAIL PROTECTED]


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



Will there be a 4.4.6 release soon?
A lot of users run OsCommerce and i  don't like to run  a unpatched php
4.4.4.

Thanks

Alex


[PHP] Re: Embeding HTMl into a XML doc

2007-02-22 Thread Mikey

Dwain Crackel wrote:

The $dom-save(); command HTML encodes the text, as such I can't save
html inside a XML node.

Is there a way around this, as I would I like to do so?

Thank you
Dwain


http://www.w3schools.com/xml/xml_cdata.asp

![CDATA[ HTML in here ]] should do the trick for you

Mikey

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



Re: [PHP] DOM Element default ID attribute

2007-02-22 Thread Rob Richards

Eli wrote:

Let me try to be more clear..
Say you got the element elem key=peter , then I want the DOMDocument 
to automatically convert the 'key' attribute to an ID-Attribute, as done 
with DOMElement::setIdAttribute() function. The ID-Attribute is indexed 
and can be quickly gotten via DOMDocument::getElementById() function.


I'm trying to avoid looping on all nodes overriding the importNode() and 
__construct() methods of DOMDocument.


Add a DTD to the document defining your attribute as an ID.

$xml = EOXML
?xml version=1.0?
!DOCTYPE note [
  !ATTLIST elem key ID  #IMPLIED
]
doc
elem key=peterThis is Peter/elem
elem key=samThis is Sam/elem
elem key=mikeThis is Mike/elem
/doc
EOXML;

$dom = new DOMDocument();
$dom-loadXML($xml);

if ($elem = $dom-getElementByID(sam)) {
print $elem-textContent;
} else {
print Element not found;
}

Rob

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



Re: [PHP] remote file time -small issue

2007-02-22 Thread Jochem Maas
SJAMHO DBMS wrote:
 Dear Sirs,
 
 
 I have a problem with the attached file.
 Run it or see it here: http://www.sjamho.com/update/remote.php
 
 The issue is: the timestamps are shown for every file in a subdirectory,
 but never for a file in the root of a domain.
 Can anyone tell me why?

not unless you show us source code.

 
 
 Kind regards, Jos
 
 
 

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



[PHP] Re: remote file time -small issue

2007-02-22 Thread David Robley
SJAMHO DBMS wrote:

 Dear Sirs,
 
 
 I have a problem with the attached file.
 Run it or see it here: http://www.sjamho.com/update/remote.php
 
 The issue is: the timestamps are shown for every file in a subdirectory,
 but never for a file in the root of a domain.
 Can anyone tell me why?
 
 
 Kind regards, Jos

It would really help to know what your code is.



Cheers
-- 
David Robley

MEOW... WOOF... It's a two-litter engine!
Today is Pungenday, the 53rd day of Chaos in the YOLD 3173. 

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



Re: [PHP] Re: remote file time -small issue

2007-02-22 Thread Shafiq Rehman

Hi,

Alternatively you can use CURL to get last modification time.

study the CURLOPT_HEADERFUNCTION constant for more details.

--
Shafiq Rehman (ZCE)
http://www.phpgurru.com, http://shafiq.pk

On 2/22/07, David Robley [EMAIL PROTECTED] wrote:


SJAMHO DBMS wrote:

 Dear Sirs,


 I have a problem with the attached file.
 Run it or see it here: http://www.sjamho.com/update/remote.php

 The issue is: the timestamps are shown for every file in a subdirectory,
 but never for a file in the root of a domain.
 Can anyone tell me why?


 Kind regards, Jos

It would really help to know what your code is.



Cheers
--
David Robley

MEOW... WOOF... It's a two-litter engine!
Today is Pungenday, the 53rd day of Chaos in the YOLD 3173.

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




[PHP] Installing Apache + PHP on Windows

2007-02-22 Thread Eli

Hi,

I installed apache v2.2.4 and PHP v5.2.1 on Windows XP.
I try to use URLs like /info.php/virtual/path but I get error 404 all 
the time. I've also tried to set AcceptPathInfo for the vhosts directory.


Directory /my_vhosts_dir
Options Indexes FollowSymLinks
AcceptPathInfo On
Order Deny,Allow
Allow from all
/Directory

but this keeps failing.
What's wrong? How can I fix it?

-thanks!

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



Re: [PHP] New Menu Bar - Can people test it for me?

2007-02-22 Thread Ryan A
Win2000pro and FF works fine... IE6.0 does not work...

Hope that helps.

Cheers!
R

Chris Ditty [EMAIL PROTECTED] wrote: Works fine on FF/XP

Looks nice btw.

(sorry for the dup post Nemeth)

On 2/21/07, Németh Zoltán  wrote:
 works on linux/firefox and xp/ie7

 greets
 Zoltán Németh

 2007. 02. 21, szerda keltezéssel 12.12-kor Scott Gunn ezt írta:
  All,
 
  http://www.thebigspider.co.uk/test/menu.html
 
  I'm going to write some php code which will build this menu from an XML
  file.
 
  Before I do, I want to know what sort of browser compatibility it has? could
  you guys test it and let me know if it worked ok and looked like the preview
  picture?
 
  If your on IE7 or Firefox2 and it works please don't email back as I know
  these work fine.
 
  Best Regards
  Scott.
 

 --
 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




--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
-
Looking for earth-friendly autos? 
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.  

[PHP] Re: Installing Apache + PHP on Windows

2007-02-22 Thread Eli

Eli wrote:

Hi,

I installed apache v2.2.4 and PHP v5.2.1 on Windows XP.
I try to use URLs like /info.php/virtual/path but I get error 404 all 
the time. I've also tried to set AcceptPathInfo for the vhosts directory.


Directory /my_vhosts_dir
Options Indexes FollowSymLinks
AcceptPathInfo On
Order Deny,Allow
Allow from all
/Directory

but this keeps failing.
What's wrong? How can I fix it?


Forgot to mention..
Installing in CGI mode... PHP scripts work fine but without PATH_INFO..
e.g:
/article.php?p=abc   --- works
/article.php/abc --- doesn't work

-thanks

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



[PHP] registered globals on localhost (apache)

2007-02-22 Thread Ross
I have my RG's switched off in my local .ini but I am tinkering about with 
oscommerce.

php_value register_globals on

I tried to change add this line to the .htaccess file in the catalog folder 
but still gives the error


Server Requirement Error: register_globals is disabled in your PHP 
configuration. This can be enabled in your php.ini configuration file or in 
the .htaccess file in your catalog directory.


Can I change the RG settings in tis way on my localhost?


R. 

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



[PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread afan
after we (company I work for) mmoved to new hosting company (dedicated
server), I requested from them to instal php5 with GDlib to be able play
with images.
they did.
and then yesterday (2 months after we moved) I wasn't able to use
ImageCreateFromJpeg() function:
Fatal error: Call to undefined function ImageCreateFromJpeg() in
/srv/www/mydomain.com/image_resize.php on line 11

Then, I was searching a little bit and found this from gd_info()
Array
(
[GD Version] = bundled (2.0.28 compatible)
[FreeType Support] =
[T1Lib Support] =
[GIF Read Support] = 1
[GIF Create Support] = 1
[JPG Support] =
[PNG Support] = 1
[WBMP Support] = 1
[XPM Support] =
[XBM Support] = 1
[JIS-mapped Japanese Font Support] =
)

Looks like they didn't do correctly because JPG is not supported?

In phpinfo() found this:
Configure Command  './configure' '--with-apxs2=/etc/apache2/bin/apxs'
'--with-mysql' '--with-gd' '--with-zlib-dir=/usr/local/lib'

and this:
gd
GD Support  enabled
GD Version  bundled (2.0.28 compatible)
GIF Read Support  enabled
GIF Create Support  enabled
PNG Support  enabled
WBMP Support  enabled
XBM Support  enabled

Now, when I talk to them they said we have to pay $250 to be fixed?!?

I have root access and have some php/mysql/apache installation experience
and want to fix myself - can somebody point me to the right direction?

Thanks.

-afan

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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Brad Bonkoski

Check out...
http://www.php.net/gd
-B
[EMAIL PROTECTED] wrote:

after we (company I work for) mmoved to new hosting company (dedicated
server), I requested from them to instal php5 with GDlib to be able play
with images.
they did.
and then yesterday (2 months after we moved) I wasn't able to use
ImageCreateFromJpeg() function:
Fatal error: Call to undefined function ImageCreateFromJpeg() in
/srv/www/mydomain.com/image_resize.php on line 11

Then, I was searching a little bit and found this from gd_info()
Array
(
[GD Version] = bundled (2.0.28 compatible)
[FreeType Support] =
[T1Lib Support] =
[GIF Read Support] = 1
[GIF Create Support] = 1
[JPG Support] =
[PNG Support] = 1
[WBMP Support] = 1
[XPM Support] =
[XBM Support] = 1
[JIS-mapped Japanese Font Support] =
)

Looks like they didn't do correctly because JPG is not supported?

In phpinfo() found this:
Configure Command  './configure' '--with-apxs2=/etc/apache2/bin/apxs'
'--with-mysql' '--with-gd' '--with-zlib-dir=/usr/local/lib'

and this:
gd
GD Support  enabled
GD Version  bundled (2.0.28 compatible)
GIF Read Support  enabled
GIF Create Support  enabled
PNG Support  enabled
WBMP Support  enabled
XBM Support  enabled

Now, when I talk to them they said we have to pay $250 to be fixed?!?

I have root access and have some php/mysql/apache installation experience
and want to fix myself - can somebody point me to the right direction?

Thanks.

-afan

  


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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread clive

can somebody point me to the right direction?

google?

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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread afan
 Check out...
 http://www.php.net/gd
 -B
Already did, but didn't find there any answer...
:(



 [EMAIL PROTECTED] wrote:
 after we (company I work for) mmoved to new hosting company (dedicated
 server), I requested from them to instal php5 with GDlib to be able play
 with images.
 they did.
 and then yesterday (2 months after we moved) I wasn't able to use
 ImageCreateFromJpeg() function:
 Fatal error: Call to undefined function ImageCreateFromJpeg() in
 /srv/www/mydomain.com/image_resize.php on line 11

 Then, I was searching a little bit and found this from gd_info()
 Array
 (
 [GD Version] = bundled (2.0.28 compatible)
 [FreeType Support] =
 [T1Lib Support] =
 [GIF Read Support] = 1
 [GIF Create Support] = 1
 [JPG Support] =
 [PNG Support] = 1
 [WBMP Support] = 1
 [XPM Support] =
 [XBM Support] = 1
 [JIS-mapped Japanese Font Support] =
 )

 Looks like they didn't do correctly because JPG is not supported?

 In phpinfo() found this:
 Configure Command  './configure' '--with-apxs2=/etc/apache2/bin/apxs'
 '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/local/lib'

 and this:
 gd
 GD Support  enabled
 GD Version  bundled (2.0.28 compatible)
 GIF Read Support  enabled
 GIF Create Support  enabled
 PNG Support  enabled
 WBMP Support  enabled
 XBM Support  enabled

 Now, when I talk to them they said we have to pay $250 to be fixed?!?

 I have root access and have some php/mysql/apache installation
 experience
 and want to fix myself - can somebody point me to the right direction?

 Thanks.

 -afan



 --
 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] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Brad Bonkoski

[EMAIL PROTECTED] wrote:

Check out...
http://www.php.net/gd
-B


Already did, but didn't find there any answer...
:(

  

In the Installation section...
To enable support for jpeg-6b add --with-jpeg-dir=DIR.
And read above on that page, for what may/may not be needed to install 
this library on the machine, although it is *probably* already there.




  

[EMAIL PROTECTED] wrote:


after we (company I work for) mmoved to new hosting company (dedicated
server), I requested from them to instal php5 with GDlib to be able play
with images.
they did.
and then yesterday (2 months after we moved) I wasn't able to use
ImageCreateFromJpeg() function:
Fatal error: Call to undefined function ImageCreateFromJpeg() in
/srv/www/mydomain.com/image_resize.php on line 11

Then, I was searching a little bit and found this from gd_info()
Array
(
[GD Version] = bundled (2.0.28 compatible)
[FreeType Support] =
[T1Lib Support] =
[GIF Read Support] = 1
[GIF Create Support] = 1
[JPG Support] =
[PNG Support] = 1
[WBMP Support] = 1
[XPM Support] =
[XBM Support] = 1
[JIS-mapped Japanese Font Support] =
)

Looks like they didn't do correctly because JPG is not supported?

In phpinfo() found this:
Configure Command  './configure' '--with-apxs2=/etc/apache2/bin/apxs'
'--with-mysql' '--with-gd' '--with-zlib-dir=/usr/local/lib'

and this:
gd
GD Support  enabled
GD Version  bundled (2.0.28 compatible)
GIF Read Support  enabled
GIF Create Support  enabled
PNG Support  enabled
WBMP Support  enabled
XBM Support  enabled

Now, when I talk to them they said we have to pay $250 to be fixed?!?

I have root access and have some php/mysql/apache installation
experience
and want to fix myself - can somebody point me to the right direction?

Thanks.

-afan


  

--
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] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread afan
 can somebody point me to the right direction?

 google?
very funny...
already was searching google but didn't find anything.

yes, I can spend enxt 12 hours searching on google, but isn't easier to
ask here after SOME research?



 --
 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] remote file time -small issue

2007-02-22 Thread Jochem Maas
I'm not your personal help desk - please keep your replies on the list.

SJAMHO DBMS wrote:
 Dear Jochem,
 
 
 I am not able to crack the headers into giving the date.

wtf does that mean? the 'root' pages [in question] DONT SEND 'Last-Modified' 
headers.
ergo there is no way to determine when the page was last modified as far as 
parsing
the request headers goes.

 If you could help to finish the code, that would be great - if not, then
 thanks for the reference anyway.

I just did the research you should have done ... go an install firefox with the
firebug and web-developer extensions and you too will have no problem in 
examining
request headers.

I have no idea what 'finish the code' means - is that a MortalKombat reference
or something?

you are trying to determine the last-modified date of a non-cacheable 
generated-on-fly
webpage [that doesn't return a 'Last-Modified' header] - it is safe to say that 
the
last modified time of said page is 0.5 seconds ago (give or take a few 
microseconds)

 
 
 Regards, Jos
 
 On 2/22/07, *Jochem Maas*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:
 
 SJAMHO DBMS wrote:
  Hi Jochem,
 
 
  See the code now here:
  http://www.sjamho.com/update/remote.php
 
 the 'root' pages are not sending a last-modified header.
 which may have something to do with the fact that, unlike the manual
 pages,
 they output cache control headers as follows:
 
 Cache-Control: private
 Pragma: no-cache
 
 have a look into the manual about the effects cache control on last
 modified
 headers and check the php website source code with regard to how
 they do things,
 e.g. here:
 
 http://sg.php.net/source.php?url=/include/shared-manual.inc
 http://sg.php.net/source.php?url=/include/shared-manual.inc
 
 specifically the function manual_header(), notice the header() calls??
 
 this is not a php issue, what you are seeing is a result of specific
 headers that are present (or not) in the response created by the
 php.net http://php.net
 website's php code.
 
 
 
  Thanks, Jos
 
  On 2/22/07, *Jochem Maas* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
  mailto: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
 
  SJAMHO DBMS wrote:
   Dear Sirs,
 
 no 'sirs' here btw - it's all false gods, war-mongerers and a bunch of
 outsourcers who expect the rest to do their job for them. :-P
 
  
  
   I have a problem with the attached file.
   Run it or see it here: http://www.sjamho.com/update/remote.php
  
   The issue is: the timestamps are shown for every file in a
  subdirectory,
   but never for a file in the root of a domain.
   Can anyone tell me why?
 
  not unless you show us source code.
 
  
  
   Kind regards, Jos
  
  
  
 
 
 
 
 
 
 
 

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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Robert Cummings
On Thu, 2007-02-22 at 15:02 +0100, [EMAIL PROTECTED] wrote:
  Check out...
  http://www.php.net/gd
  -B
 Already did, but didn't find there any answer...
 :(
 
 
 
  [EMAIL PROTECTED] wrote:
  after we (company I work for) mmoved to new hosting company (dedicated
  server), I requested from them to instal php5 with GDlib to be able play
  with images.
  they did.
  and then yesterday (2 months after we moved) I wasn't able to use
  ImageCreateFromJpeg() function:
  Fatal error: Call to undefined function ImageCreateFromJpeg() in
  /srv/www/mydomain.com/image_resize.php on line 11
 
  Then, I was searching a little bit and found this from gd_info()
  Array
  (
  [GD Version] = bundled (2.0.28 compatible)
  [FreeType Support] =
  [T1Lib Support] =
  [GIF Read Support] = 1
  [GIF Create Support] = 1
  [JPG Support] =

It says right above... [JPG Support] = . In other words, there is
none. Whoever compiled PHP (or the gd extension) didn't compile in
support for JPG. You need to complain to your hosting company.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Enable login prompt with main page of phpmyadmin

2007-02-22 Thread edwardspl

Dear All,

I just install the phpMyAdmin 2.9.2 on the Web...
So, how to enable the login prompt with the main page ?

Edward.

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



[PHP] Re: [BULK] [PHP] Enable login prompt with main page of phpmyadmin

2007-02-22 Thread clive

[EMAIL PROTECTED] wrote:


I just install the phpMyAdmin 2.9.2 on the Web...
So, how to enable the login prompt with the main page ?


Well done, now read there help files!


-

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



Re: [PHP] registered globals on localhost (apache)

2007-02-22 Thread Steffen Ebermann

On Thu, Feb 22, 2007 at 01:40:53PM -, Ross wrote:
 I have my RG's switched off in my local .ini but I am tinkering about with 
 oscommerce.
 
 php_value register_globals on
 
 I tried to change add this line to the .htaccess file in the catalog folder 
 but still gives the error
 
 
 Server Requirement Error: register_globals is disabled in your PHP 
 configuration. This can be enabled in your php.ini configuration file or in 
 the .htaccess file in your catalog directory.
 
 
 Can I change the RG settings in tis way on my localhost?


http://php.net/manual/en/ini.php#ini.list
Below you can find a table explaining the PHP_INI_*-values.

Also you should use php_flag to set a boolean configuration directive.
http://php.net/manual/en/configuration.changes.php#configuration.changes.apache

-- 
Steffen

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



[PHP] multiple sockets seems problematic

2007-02-22 Thread Bob Dusek
Hello all,

I've got a program (program X) that does the following:

* opens a socket (socket A)
* binds socket A to an address/port (x.x.x.x/1099)

* then opens another socket (socket B), 
* binds socket B to an address/port (x.x.x.x/1100)
* calls listen on socket B
* launches a second program (program Y) with proc_open 
* accepts a connection on socket B (presumably from program Y)
* sends a packet on socket B
* reads a packet from socket B

* listens on socket A== PROBLEM
* accepts a connection on socket A (from whomever is trying to connect)

To be clear, the socket B stuff was just added.  socket A has always
existed and worked just fine.  Each socket resource is stored in a
distinct variable.

Where things go wrong, now that I've added socket B, is when I call
socket_accept() on socket A...

For some reason, the socket_accept($sock) call will not block, even
after I've added an explicit socket_set_block($sock) call immediately
preceding the socket_accept($sock) call.

I don't think there are actually any connections waiting when I call
socket_accept($sock), as the socket_accept call returns false.
Although, the socket_strerror(socket_last_error($sock)) returns
Success.  This seems like the behavior I would expect if my socket was
set to non-blocking.  

Here are the options, from socket_get_options, for socket A before I
call accept:

Resource id #17 [DEBUG] 0
Resource id #17 [ACCEPTCON]
Resource id #17 [BROADCAST] 0
Resource id #17 [REUSEADDR] 0
Resource id #17 [KEEPALIVE] 0
Resource id #17 [LINGER] l_onoff = 0
Resource id #17 [LINGER] l_linger = 0
Resource id #17 [OOBINLINE] 0
Resource id #17 [SNDBUF] 16384
Resource id #17 [RCVBUF] 87380
Resource id #17 [ERROR] 0
Resource id #17 [TYPE] 1
Resource id #17 [DONTROUTE] 0
Resource id #17 [RCVLOWAT] 1
Resource id #17 [RCVTIMEO] sec = 0
Resource id #17 [RCVTIMEO] usec = 0
Resource id #17 [SNDLOWAT] 1
Resource id #17 [SNDTIMEO] sec = 0
Resource id #17 [SNDTIMEO] usec = 0

It seems to me that the actions I'm taking on socket B are somehow
dirying socket A.  

Anyone know of any problems reported with this?  I'm using PHP 4.3.11.
But, I don't see anything in the changelogs that would indicate
something like this has been fixed since 4.3.11.

Also, when my socket_accept call fails for socket A, I try to close the
socket and re-open it, but (even after calling socket_close) when I try
to bind to the same address/port as I did the first time around,
socket_bind fails and tells me Address already in use... (and I try it
repeatedly, sleeping 5 seconds between attempts, and it never becomes
available). 

Any help or pointers would be appreciated.

Thanks,

Bob

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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Jochem Maas
[EMAIL PROTECTED] wrote:
 can somebody point me to the right direction?

 google?
 very funny...
 already was searching google but didn't find anything.
 
 yes, I can spend enxt 12 hours searching on google, but isn't easier to
 ask here after SOME research?

run configure with the help option, it give you lots of info:

./configure --help

the specific option you need is:

--with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix

you may need to actually install libjpeg - if so you'll have to find out how to
install stuff in your distro, I prefer debian where the command would be (off 
the top of my head)

apt-get install libjpeg

btw stop moaning - the GD manual page clearly contains info about how to 
configure
GD with jpeg support:

http://php.net/gd

 
 
 --
 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



[PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
I have a script that connects to a networked device via PHP's socket 
functions.  This device accepts proprietary commands (e.g.: KPRINT, as 
seen below), and returns data.  However, this device does not have any 
sort of EXIT command to end the processing of events.  So it 
essentially loops forever.


I do know that if this device does not return anything after 5 seconds, 
it will never return anything.


So, my question is:  how can I force this script to stop after 5 seconds 
has elapsed?


Here's the script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);

if (!$fp) {
echo 'Error...';
} else {
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
$buffer = fgets($fp, 1024);
}

fclose($fp);
}


Thanks!

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



Re: [PHP] Enable login prompt with main page of phpmyadmin

2007-02-22 Thread Jochem Maas
[EMAIL PROTECTED] wrote:
 Dear All,
 
 I just install the phpMyAdmin 2.9.2 on the Web...
 So, how to enable the login prompt with the main page ?

phpmyadmin is not affliated with the php project (php is merely the
language phpmyadmin is written in).

this list is is not here to provide software support for whatever application
you installed today, rather this list is to discuss/help with *general* php
questions/idea/problems.

most likely phpmyadmin has their own mailing list for this sort of thing.

 
 Edward.
 

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



Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski

I think something like this will work for you..

$start_time = time();
...loop..
   if( time() - $start_time  5 ) exit;

-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket 
functions.  This device accepts proprietary commands (e.g.: KPRINT, 
as seen below), and returns data.  However, this device does not have 
any sort of EXIT command to end the processing of events.  So it 
essentially loops forever.


I do know that if this device does not return anything after 5 
seconds, it will never return anything.


So, my question is:  how can I force this script to stop after 5 
seconds has elapsed?


Here's the script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);

if (!$fp) {
echo 'Error...';
} else {
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
$buffer = fgets($fp, 1024);
}

fclose($fp);
}


Thanks!



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



Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
I tried this earlier, but it does not seem to work...  It appears to 
just hang when no data is returned from the networked device.  It seems 
as if the loop stops, and is waiting for something.



Brad Bonkoski wrote:

I think something like this will work for you..

$start_time = time();
...loop..
   if( time() - $start_time  5 ) exit;

-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket 
functions.  This device accepts proprietary commands (e.g.: KPRINT, 
as seen below), and returns data.  However, this device does not have 
any sort of EXIT command to end the processing of events.  So it 
essentially loops forever.


I do know that if this device does not return anything after 5 
seconds, it will never return anything.


So, my question is:  how can I force this script to stop after 5 
seconds has elapsed?


Here's the script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);

if (!$fp) {
echo 'Error...';
} else {
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
$buffer = fgets($fp, 1024);
}

fclose($fp);
}



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



[PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System

2007-02-22 Thread edwardspl

Dear All,

Which version of phpmyadmin is suitable for php 5.1.6 ?

Edward.

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



Re: [PHP] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread afan
There is something I didn't know from begining (sorry for maybe leading
you to wrong direction): I though to enable peg/gif/png is part of the
php.ini. Actually, this is what has to be done while compiling GDlib?

Does GDlib has to be re-compiled to enable jpeg support? Or there is other
way?

-afan


 [EMAIL PROTECTED] wrote:
 can somebody point me to the right direction?

 google?
 very funny...
 already was searching google but didn't find anything.

 yes, I can spend enxt 12 hours searching on google, but isn't easier to
 ask here after SOME research?

 run configure with the help option, it give you lots of info:

   ./configure --help

 the specific option you need is:

   --with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix

 you may need to actually install libjpeg - if so you'll have to find out
 how to
 install stuff in your distro, I prefer debian where the command would be
 (off the top of my head)

   apt-get install libjpeg

 btw stop moaning - the GD manual page clearly contains info about how to
 configure
 GD with jpeg support:

   http://php.net/gd



 --
 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



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



Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Brad Bonkoski

Aaron Gould wrote:
I tried this earlier, but it does not seem to work...  It appears to 
just hang when no data is returned from the networked device.  It 
seems as if the loop stops, and is waiting for something.




probably blocking on the socket
have you tried:
www.php.net/stream_set_timeout


Brad Bonkoski wrote:

I think something like this will work for you..

$start_time = time();
...loop..
   if( time() - $start_time  5 ) exit;

-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket 
functions.  This device accepts proprietary commands (e.g.: 
KPRINT, as seen below), and returns data.  However, this device 
does not have any sort of EXIT command to end the processing of 
events.  So it essentially loops forever.


I do know that if this device does not return anything after 5 
seconds, it will never return anything.


So, my question is:  how can I force this script to stop after 5 
seconds has elapsed?


Here's the script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);

if (!$fp) {
echo 'Error...';
} else {
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
$buffer = fgets($fp, 1024);
}

fclose($fp);
}





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



Re: [PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System

2007-02-22 Thread cajbecu
[EMAIL PROTECTED] wrote:
 Dear All,
 
 Which version of phpmyadmin is suitable for php 5.1.6 ?
 
 Edward.
 

the latest :)

cajb.

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



Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Robin Vickery

On 22/02/07, Aaron Gould [EMAIL PROTECTED] wrote:

I tried this earlier, but it does not seem to work...  It appears to
just hang when no data is returned from the networked device.  It seems
as if the loop stops, and is waiting for something.




http://www.php.net/manual/en/function.pcntl-alarm.php

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



Re: [PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System

2007-02-22 Thread edwardspl
cajbecu wrote:

[EMAIL PROTECTED] wrote:
  

Dear All,

Which version of phpmyadmin is suitable for php 5.1.6 ?

Edward.




the latest :)

cajb.
  

So, Which version no. ?


[PHP] PHP 4.4.6 RC1 Released

2007-02-22 Thread Derick Rethans
Hello!

I packed PHP 4.4.6RC1 today, which you can find here:
http://downloads.php.net/derick/

This release candidate addresses an issues that unfortunately crept 
into PHP 4.4.5:

- Fixed segfault in ext/session when register_globals=On. (Tony)

And some other issues:

- Fixed bug #40578 (imagettftext() multithreading issue). (Tony)
- Fixed bug #40502 (ext/interbase compile failure). (Tony)
- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill 
  children when parent is killed). (Dmitry)

It also updates the PCRE library to version 7.0.

Please test it carefully, and report any bugs in the bug system. 

If everything goes well, we can release it somewhere at the end of next 
week.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

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



Re: [PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System

2007-02-22 Thread Stut

[EMAIL PROTECTED] wrote:

Which version of phpmyadmin is suitable for php 5.1.6 ?


Not really listening are you?

As you have previously been told, this list is for *general* PHP 
questions. That's why it's called php-general. Questions relating to 
phpMyAdmin should be directed towards mailing lists specifically for 
phpMyAdmin questions. Try the link below, which was found incidentally 
by typing phpmyadmin mailing list into Google.


http://sourceforge.net/mail/?group_id=23067

-Stut

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



RE: [PHP] PHP 4.4.6 RC1 Released

2007-02-22 Thread bruce
hi...

just out of curiousity. are these changes also automatically rolled into the
php 5.x stream?

thanks



-Original Message-
From: Derick Rethans [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 22, 2007 7:41 AM
To: PHP Developers Mailing List; php-general@lists.php.net
Subject: [PHP] PHP 4.4.6 RC1 Released


Hello!

I packed PHP 4.4.6RC1 today, which you can find here:
http://downloads.php.net/derick/

This release candidate addresses an issues that unfortunately crept
into PHP 4.4.5:

- Fixed segfault in ext/session when register_globals=On. (Tony)

And some other issues:

- Fixed bug #40578 (imagettftext() multithreading issue). (Tony)
- Fixed bug #40502 (ext/interbase compile failure). (Tony)
- Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill
  children when parent is killed). (Dmitry)

It also updates the PCRE library to version 7.0.

Please test it carefully, and report any bugs in the bug system.

If everything goes well, we can release it somewhere at the end of next
week.

regards,
Derick

--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

--
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] JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Jochem Maas
[EMAIL PROTECTED] wrote:
 There is something I didn't know from begining (sorry for maybe leading
 you to wrong direction): I though to enable peg/gif/png is part of the
 php.ini. 

I can't imagine why you though that - if you look through the ini files that 
come
with php as standard you'll see no reference to enabling jpeg or anything like 
that.

to confuse matter, I believe, you mentioned that you had some experience in
compiling php.

 Actually, this is what has to be done while compiling GDlib?
 
 Does GDlib has to be re-compiled to enable jpeg support? Or there is other
 way?

you have to recompile php. something like:

./configure '--with-apxs2=/etc/apache2/bin/apxs' '--with-mysql' '--with-gd' 
'--with-zlib-dir=/usr/local/lib'
'--with-jpeg-dir'

and if that fails (errors out because it can't find libjpeg) then try this:


'./configure' '--with-apxs2=/etc/apache2/bin/apxs' '--with-mysql' '--with-gd' 
'--with-zlib-dir=/usr/local/lib'
'--with-jpeg-dir=/usr/local/lib'

and if that doesn't work then you'll have to figure out where libjpeg lives on 
your system
if it does work you have run the following commands:

make
make install

but before you do any of that *READ* the help output of the configure command
(as I mentioned in a previous mail)

if you know what your doing (including configuring where php will be installed 
on your system)
this should take no longer than five minutes - I guess I should be in the 
hosting game because
250 dollars for 5 minutes work sounds like good money :-P

 
 -afan
 
 
 [EMAIL PROTECTED] wrote:
 can somebody point me to the right direction?

 google?
 very funny...
 already was searching google but didn't find anything.

 yes, I can spend enxt 12 hours searching on google, but isn't easier to
 ask here after SOME research?
 run configure with the help option, it give you lots of info:

  ./configure --help

 the specific option you need is:

  --with-jpeg-dir[=DIR] GD: Set the path to libjpeg install prefix

 you may need to actually install libjpeg - if so you'll have to find out
 how to
 install stuff in your distro, I prefer debian where the command would be
 (off the top of my head)

  apt-get install libjpeg

 btw stop moaning - the GD manual page clearly contains info about how to
 configure
 GD with jpeg support:

  http://php.net/gd


 --
 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


 

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



RE: [PHP] PHP 4.4.6 RC1 Released

2007-02-22 Thread Derick Rethans
On Thu, 22 Feb 2007, bruce wrote:

 just out of curiousity. are these changes also automatically rolled into the
 php 5.x stream?

Yes, they will be there as well. However, the session issue is not a 
problem in that branch.

regards,
Derick

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



[PHP] Safari 2.0.4 / PHP 4.3.7 / Apache 2.0.44 Isuue with HTTP Headers

2007-02-22 Thread Ron Stiemer
Hi everyone,

got a really strange thing going on on a client website, the website outputs 
the whole
http headers after every 2nd reload in safari, also in FF on Windows, but only 
after much
much more relaods...here is a scrrenshot:

http://www.waldhaeusl.com/downloads/bug/http_header.png

any ideas what the problem could be, i checked if there are any used socket
connections, but nothing there...maybe an apache issue ?

any help is appreciated...

thank you,
-Ron

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



Re: [PHP] How do I force my script to exit after 5 seconds?

2007-02-22 Thread Aaron Gould
Thanks very much, I've added stream_set_timeout functionality, and it 
seems to work very well!


For reference, here's the modified script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);
if (!$fp) {
echo 'Error...';
} else {
/** Set socket timeout period */
stream_set_timeout($fp, 5);

/** KPRINT outputs scale values */
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
/** Check for timeout */
$info = stream_get_meta_data($fp);
if ($info['timed_out']) {
echo 'Timeout...';
break;
}

$buffer = fgets($fp, 1024);
}

fclose($fp);
}



Brad Bonkoski wrote:

Aaron Gould wrote:
I tried this earlier, but it does not seem to work...  It appears to 
just hang when no data is returned from the networked device.  It 
seems as if the loop stops, and is waiting for something.




probably blocking on the socket
have you tried:
www.php.net/stream_set_timeout


Brad Bonkoski wrote:

I think something like this will work for you..

$start_time = time();
...loop..
   if( time() - $start_time  5 ) exit;

-B
Aaron Gould wrote:
I have a script that connects to a networked device via PHP's socket 
functions.  This device accepts proprietary commands (e.g.: 
KPRINT, as seen below), and returns data.  However, this device 
does not have any sort of EXIT command to end the processing of 
events.  So it essentially loops forever.


I do know that if this device does not return anything after 5 
seconds, it will never return anything.


So, my question is:  how can I force this script to stop after 5 
seconds has elapsed?


Here's the script:


$fp = fsockopen('192.168.3.25', 10001, $errno, $errstr, 5);

if (!$fp) {
echo 'Error...';
} else {
$command = KPRINT\r\n;

fwrite($fp, $command);

while (!feof($fp)) {
$buffer = fgets($fp, 1024);
}

fclose($fp);
}



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



RE: [PHP] Safari 2.0.4 / PHP 4.3.7 / Apache 2.0.44 Isuue with HTTP Headers

2007-02-22 Thread Edward Kay

 got a really strange thing going on on a client website, the
 website outputs the whole
 http headers after every 2nd reload in safari, also in FF on
 Windows, but only after much
 much more relaods...here is a scrrenshot:

 http://www.waldhaeusl.com/downloads/bug/http_header.png

 any ideas what the problem could be, i checked if there are any
 used socket
 connections, but nothing there...maybe an apache issue ?

 any help is appreciated...


Try looking at the raw HTTP traffic. I don't know of any for Mac, but
Fiddler Tool for Windows is excellent (www.fiddlertool.com).

Edward


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



Re: [PHP] Safari 2.0.4 / PHP 4.3.7 / Apache 2.0.44 Isuue with HTTP Headers

2007-02-22 Thread Chris Shiflett
Ron Stiemer wrote:
 the website outputs the whole http headers after every 2nd reload in
 safari, also in FF on Windows, but only after much much more
 relaods...here is a scrrenshot:
 
 http://www.waldhaeusl.com/downloads/bug/http_header.png

You can use something like LiveHTTPHeaders or Firebug to observe the raw
HTTP. Based on your screen shot, it looks like a 0 is being mistaken for
the start of the content.

Because a 0 is the last byte in a chunked response, this makes me wonder
whether where's some miscommunication in the initial transaction that
causes the problem. Try to see if there's an erroneous Content-Length
header or something that might cause the client to think it has read all
of the response when it hasn't.

Hope that helps.

Chris

-- 
Chris Shiflett
http://shiflett.org/

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



Re: [PHP] New Menu Bar - Can people test it for me?

2007-02-22 Thread tedd

At 12:12 PM + 2/21/07, Scott Gunn wrote:

All,

http://www.thebigspider.co.uk/test/menu.html


It doubles up (i.e., two menus appear stacked on one another), but 
other than that, it works.


Mac OS-X 10.4.8 -- Safari 2.0.4

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] can this be fone with PHP?

2007-02-22 Thread Bruce Gilbert

I have created forms with PHP where the information in the fields is
sent via sendmail to an email, but is there a way to have the
information extracted and a pdf form created when the user hits the
submit button?

--
::Bruce::

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



Re: [PHP] can this be fone with PHP?

2007-02-22 Thread Jon Anderson
Bruce Gilbert wrote:
 I have created forms with PHP where the information in the fields is
 sent via sendmail to an email, but is there a way to have the
 information extracted and a pdf form created when the user hits the
 submit button?

Yep, probably. See http://www.php.net/manual/en/ref.pdf.php

jon

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



Re: [PHP] Session problems with 4.4.5?

2007-02-22 Thread steve

Yes... I think the test version of it goes out today.

On 2/22/07, alex handle [EMAIL PROTECTED] wrote:

On 2/16/07, Jochem Maas [EMAIL PROTECTED] wrote:

 Ken Williams wrote:
  Is anyone else having problems with session in 4.4.5?  I'm under apache
  1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5.  As soon
 as a
  page tries to register a session variable with session_register apache
 will
  segfault.  Has worked perfectly fine for the past 2 years and like 10
  version of PHP 4.4.X.

 segfault probably indicates  problem. goto bugs.php.net and file a bug
 with
 details about your machine and a small reproduce script.

 side note: use of session_register() is not recommended - reading the
 following
 page may help you understand why, help you work around your current
 problem and
 hopefully get you on the path of using $_SESSION:

 http://php.net/session_register

 
  [EMAIL PROTECTED]
 

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


Will there be a 4.4.6 release soon?
A lot of users run OsCommerce and i  don't like to run  a unpatched php
4.4.4.

Thanks

Alex



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



Re: [PHP] Safari 2.0.4 / PHP 4.3.7 / Apache 2.0.44 Isuue with HTTP Headers

2007-02-22 Thread steve

I've see that before. Update the PHP (and Apache while you are at it).
Also disable the server from showing the Apache and PHP versions. Why
are they broadcasting to the world that they are easy prey to remote
exploits? Also check if the server has been compromised.

On 2/22/07, Ron Stiemer [EMAIL PROTECTED] wrote:

Hi everyone,

got a really strange thing going on on a client website, the website outputs 
the whole
http headers after every 2nd reload in safari, also in FF on Windows, but only 
after much
much more relaods...here is a scrrenshot:

http://www.waldhaeusl.com/downloads/bug/http_header.png

any ideas what the problem could be, i checked if there are any used socket
connections, but nothing there...maybe an apache issue ?

any help is appreciated...

thank you,
-Ron

--
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



[PHP] Re: [PHP-DEV] PHP 4.4.6 RC1 Released

2007-02-22 Thread Edin Kadribasic
Hi,

Windows build is available at:

http://downloads.php.net/edink/php-4.4.6RC1-Win32.zip

Edin


Derick Rethans wrote:
 Hello!
 
 I packed PHP 4.4.6RC1 today, which you can find here:
 http://downloads.php.net/derick/
 
 This release candidate addresses an issues that unfortunately crept 
 into PHP 4.4.5:
 
 - Fixed segfault in ext/session when register_globals=On. (Tony)
 
 And some other issues:
 
 - Fixed bug #40578 (imagettftext() multithreading issue). (Tony)
 - Fixed bug #40502 (ext/interbase compile failure). (Tony)
 - Fixed bug #40286 (PHP fastcgi with PHP_FCGI_CHILDREN don't kill 
   children when parent is killed). (Dmitry)
 
 It also updates the PCRE library to version 7.0.
 
 Please test it carefully, and report any bugs in the bug system. 
 
 If everything goes well, we can release it somewhere at the end of next 
 week.
 
 regards,
 Derick
 

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



Re: [PHP] Which version of phpmyadmin is stable for php 5.1.6 and FC6 System

2007-02-22 Thread Jürgen Wind



edwardspl wrote:
 
 cajbecu wrote:
 
[EMAIL PROTECTED] wrote:
  

Dear All,

Which version of phpmyadmin is suitable for php 5.1.6 ?

Edward.




the latest :)

cajb.
  

 So, Which version no. ?
 
 
next version will come in the next days(hours?) : pma 2.10.0
(not sure if it will work with php 5.1.6, there were serious issues with
that php version)
-- 
View this message in context: 
http://www.nabble.com/Which-version-of-phpmyadmin-is-stable-for-php-5.1.6-and-FC6-System-tf3273403.html#a9108655
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] Capture the whole URL

2007-02-22 Thread Ken Kixmoeller -- reply to [EMAIL PROTECTED]

Hey - -

I must be missing something, but in a URL such as:

  diddly.com?id=fredtotal=goof

$_SERVER['PHP-SELF'] gives me the diddley.com part.

I want to capture the whole URL. The documentation makes it seem like  
$_SERVER['REQUEST_URI'] is supposed to do that, but I get an  
Undefined Index error.


Do I have to enable this somehow? I realize that I could recreate the  
rest of the URL from $_GET's, but I'd rather not if I don't have to.


PHP 5.1

Ken

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



Re: [PHP] Capture the whole URL

2007-02-22 Thread Jochem Maas
Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote:
 Hey - -
 
 I must be missing something, but in a URL such as:
 
   diddly.com?id=fredtotal=goof
 
 $_SERVER['PHP-SELF'] gives me the diddley.com part.
 
 I want to capture the whole URL. The documentation makes it seem like
 $_SERVER['REQUEST_URI'] is supposed to do that, but I get an Undefined
 Index error.

do a var_dump($_SERVER); or phpinfo(); to see what you do have available.
page

 
 Do I have to enable this somehow? I realize that I could recreate the
 rest of the URL from $_GET's, but I'd rather not if I don't have to.
 
 PHP 5.1
 
 Ken
 
 --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



[PHP] Is php_manual_prefs.exe broken?

2007-02-22 Thread Daevid Vincent
I downloaded this full package...
http://us2.php.net/get/php_manual_chm.zip/from/a/mirror
And replaced the core .chm file from here:
http://us2.php.net/get/php_manual_en.chm/from/a/mirror

No matter what setting I select for the skin in php_manual_prefs.exe, it
doesn't seem to change when I click on php_manual_en.chm. Am I doing
something wrong?

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



[PHP] PHP + SQL..

2007-02-22 Thread Liz Kim

I am storing a lot of text into my mssql database.
Are there any special characters I should watch out for?
I think so far I've got ' covered.

Also, when I retrieved the string later on...
The ' is printed out with a \ in the front. How do I get rid of the \?
When I try to get a really long string and print it out on a website, it
tends to stop in the middle of the string.
Is this some sort of a limitation that I can change?

Thank you!


Re: [PHP] PHP + SQL..

2007-02-22 Thread Robert Cummings
On Thu, 2007-02-22 at 17:53 -0800, Liz Kim wrote:
 I am storing a lot of text into my mssql database.
 Are there any special characters I should watch out for?
 I think so far I've got ' covered.

Skip the guesswork and use an appropriate quoting mechanism for your
database -- that said I'm not aware of an mssql specific quoting
mechanism (and I don't care to find out :) -- so maybe just use
addSlashes().

 Also, when I retrieved the string later on...
 The ' is printed out with a \ in the front. How do I get rid of the \?

Turn off magic quotes.

 When I try to get a really long string and print it out on a website, it
 tends to stop in the middle of the string.
 Is this some sort of a limitation that I can change?

Sounds like your storing the data into a table column that is too short
for the data and so it gets truncated when stored. Then when you
retrieve it you get the truncated text. Increase the column width.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] can this be fone with PHP?

2007-02-22 Thread tedd

At 2:59 PM -0500 2/22/07, Bruce Gilbert wrote:

I have created forms with PHP where the information in the fields is
sent via sendmail to an email, but is there a way to have the
information extracted and a pdf form created when the user hits the
submit button?

--
::Bruce::



Sure -- see:

http://xn--nvg.com/pdf

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Capture the whole URL

2007-02-22 Thread tedd

At 4:26 PM -0600 2/22/07, Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote:

Hey - -

I must be missing something, but in a URL such as:

  diddly.com?id=fredtotal=goof

$_SERVER['PHP-SELF'] gives me the diddley.com part.

I want to capture the whole URL. The documentation makes it seem 
like $_SERVER['REQUEST_URI'] is supposed to do that, but I get an 
Undefined Index error.


Do I have to enable this somehow? I realize that I could recreate 
the rest of the URL from $_GET's, but I'd rather not if I don't have 
to.


PHP 5.1

Ken



Ken:

Print out these three and you'll see your problem.

$_SERVER['SERVER_NAME']
$_SERVER['QUERY_STRING']
$_SERVER['REQUEST_URI']

hth's

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Capture the whole URL

2007-02-22 Thread Jim Lucas

Ken Kixmoeller -- reply to [EMAIL PROTECTED] wrote:

Hey - -

I must be missing something, but in a URL such as:

  diddly.com?id=fredtotal=goof

First of forgoing the http:// missing, this still isn't a qualified URL
you are missing the / after the .com.

echo $_SERVER['REQUEST_URI'];
and see what it returns

if for some odd reason that doesn't work try

echo $_SERVER['QUERY_STRING'];

and if you are possibly making a typo, try

var_dump($_SERVER);



$_SERVER['PHP-SELF'] gives me the diddley.com part.

this should be $_SERVER['PHP_SELF']  underscore, not a hyphen


I want to capture the whole URL. The documentation makes it seem like 
$_SERVER['REQUEST_URI'] is supposed to do that, but I get an Undefined 
Index error.


show us an example of the script that generates the error

source and output of given source please



Do I have to enable this somehow? I realize that I could recreate the 
rest of the URL from $_GET's, but I'd rather not if I don't have to.

I have never heard of this not being disabled.

Looks like you either typed this pretty fast or maybe you had a few 
typo's.  Review your code and check that you are using underscores and 
not hyphens.


Jim



PHP 5.1

Ken

--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



[PHP] Re: Capture the whole URL

2007-02-22 Thread Haydar Tuna
Hello,
   URL consist of two part HOST and URI respectivetely. HOST part likes 
example www.domain.com . URI part likes main.php?id=5 and so on. You can get 
the HOST part of URL with $HTTP_HOST and URI part of URL with 
$REQUEST_URI.:)


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


Ken Kixmoeller -- reply to [EMAIL PROTECTED] [EMAIL PROTECTED] 
wrote in message news:[EMAIL PROTECTED]
 Hey - -

 I must be missing something, but in a URL such as:

   diddly.com?id=fredtotal=goof

 $_SERVER['PHP-SELF'] gives me the diddley.com part.

 I want to capture the whole URL. The documentation makes it seem like 
 $_SERVER['REQUEST_URI'] is supposed to do that, but I get an  Undefined 
 Index error.

 Do I have to enable this somehow? I realize that I could recreate the 
 rest of the URL from $_GET's, but I'd rather not if I don't have to.

 PHP 5.1

 Ken 

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



[PHP] Re: can this be fone with PHP?

2007-02-22 Thread Haydar Tuna
Hello,
You can use the fpdf free package. I have used this PDF package in my 
many project. It's very easy to use and free:)
www.fpdf.org



-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net

Bruce Gilbert [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I have created forms with PHP where the information in the fields is
 sent via sendmail to an email, but is there a way to have the
 information extracted and a pdf form created when the user hits the
 submit button?

 -- 
 ::Bruce:: 

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



[PHP] Re: Enable login prompt with main page of phpmyadmin

2007-02-22 Thread Haydar Tuna
Hello,
   Firstly, you should create a configuration file for your phpMyAdmin 
administration web site. If you extract phpMyAdmin in your htdocs folder, 
you will create easily configuration file to enter the phpMyAdmin web site 
on your localhost. (for example http://localhost/phpmyadmin/)  After this 
step, you can choose http in authentication and choose localhost in host:)



-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net

[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Dear All,

 I just install the phpMyAdmin 2.9.2 on the Web...
 So, how to enable the login prompt with the main page ?

 Edward. 

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



[PHP] Re: JPG Not supported on my server, but GDlib enabled?

2007-02-22 Thread Haydar Tuna
Hello,
Firstly, you should download latest GD library and Jpeg library and 
then you should compile your GD with jpeg enabled option and  then compile 
jpeg. After this step, you can compile Apache and PHP. In PHP installation, 
you should use such as --with-gd=/usr/local option for gd library and such 
as --with-jpeg-dir option for jpeg library. If you use --with-gd option 
without not write any folder name , PHP will use default GD folder ( 
extension directory).
http://www.libgd.org/Downloads
ftp://ftp.uu.net/graphics/jpeg/


-- 
Haydar TUNA
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net


[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 after we (company I work for) mmoved to new hosting company (dedicated
 server), I requested from them to instal php5 with GDlib to be able play
 with images.
 they did.
 and then yesterday (2 months after we moved) I wasn't able to use
 ImageCreateFromJpeg() function:
 Fatal error: Call to undefined function ImageCreateFromJpeg() in
 /srv/www/mydomain.com/image_resize.php on line 11

 Then, I was searching a little bit and found this from gd_info()
 Array
 (
[GD Version] = bundled (2.0.28 compatible)
[FreeType Support] =
[T1Lib Support] =
[GIF Read Support] = 1
[GIF Create Support] = 1
[JPG Support] =
[PNG Support] = 1
[WBMP Support] = 1
[XPM Support] =
[XBM Support] = 1
[JIS-mapped Japanese Font Support] =
 )

 Looks like they didn't do correctly because JPG is not supported?

 In phpinfo() found this:
 Configure Command  './configure' '--with-apxs2=/etc/apache2/bin/apxs'
 '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/local/lib'

 and this:
 gd
 GD Support  enabled
 GD Version  bundled (2.0.28 compatible)
 GIF Read Support  enabled
 GIF Create Support  enabled
 PNG Support  enabled
 WBMP Support  enabled
 XBM Support  enabled

 Now, when I talk to them they said we have to pay $250 to be fixed?!?

 I have root access and have some php/mysql/apache installation experience
 and want to fix myself - can somebody point me to the right direction?

 Thanks.

 -afan 

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