php-general Digest 28 Nov 2004 19:56:22 -0000 Issue 3139
Topics (messages 202991 through 203023):
not related but need pointers
202991 by: Brent Clements
203006 by: Marek Kilimajer
Re: Passing Parameters
202992 by: Burhan Khalid
Re: Read PDF files with Php
202993 by: Burhan Khalid
203008 by: Marek Kilimajer
Re: mysql query with exclude
202994 by: Reinhart Viane
202995 by: Reinhart Viane
Help with GET variables which do not work after upgrading
202996 by: Eamon Reyn
202998 by: Burhan Khalid
203001 by: Adrian Portsmouth
Re: identifying the country of the people who connect to web site / portal
202997 by: Skippy
203005 by: Greg Donald
Range: bytes=x-y
202999 by: Octavian Rasnita
203003 by: Marek Kilimajer
Weird sessions problem
203000 by: steve
203007 by: Greg Donald
203010 by: steve
Re: Comment Speed
203002 by: Marek Kilimajer
203009 by: Raditha Dissanayake
Grammar for PHP
203004 by: Dominic Fox
203013 by: Ryan King
Re: Overriding static members?
203011 by: Matthew Weier O'Phinney
Re: Problem with PHP Curl support and Apache
203012 by: Matthew Weier O'Phinney
automatic responder
203014 by: Alessandro Rosa
203018 by: Ryan King
203019 by: Alessandro Rosa
203022 by: John Nichel
Newbie question
203015 by: Pascal Platteeuw
203016 by: Mike
203017 by: John Nichel
203021 by: Brad Ciszewski
buffer
203020 by: Brad Ciszewski
Mass MySQL INSERT
203023 by: Travis Conway
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I was wondering, does anyone have a good source for web browser components that
are compatible with php?
There are a heck of alot of activex components available that allow you to
create some very nice web applications. Are there any similiar that a
cross-browser compatible that have a really nice professional look like the
thousands of activex components out there?
Thanks,
Brent
--- End Message ---
--- Begin Message ---
Brent Clements wrote:
I was wondering, does anyone have a good source for web browser components that
are compatible with php?
There are a heck of alot of activex components available that allow you to create some very nice web applications. Are there any similiar that a cross-browser compatible that have a really nice professional look like the thousands of activex components out there?
PHP is server side, ActiveX is client side. That is PHP runs on the
server, ActiveX on the client, they are completely different
technologies, same as ASP and ActiveX
--- End Message ---
--- Begin Message ---
David Blackburn wrote:
I used to pass parameters to my scripts like this
shell>php myscript.php "dog=max&cat=jess"
Since I have upgraded to PHP5 I dont seem to have this functionality
any more, has anyone else noticed this ? or know of a way to get this
working again ?
You can pass parameters in the "normal" way, ie,
php myscript.php -dog=max -cat=jess and read them in with argv, or you
can use the pear Console_Getargs and Console_Getopts classes to help you
with command line parsing.
They way you are doing it now is really not the right way, and I'm
suprised it worked, actually.
--- End Message ---
--- Begin Message ---
Jacob Friis wrote:
Do I need PDFlib in order to read PDF files?
Is there another way?
http://www.fpdf.org
http://www.fuckinggoogleit.com :)
--- End Message ---
--- Begin Message ---
Burhan Khalid wrote:
Jacob Friis wrote:
Do I need PDFlib in order to read PDF files?
Is there another way?
http://www.fpdf.org
http://www.fuckinggoogleit.com :)
Please be nice and learn to read ;)
OP asked how to *READ* pdf files. AFAIK there is no way with php.
pdf2html may be of some help thought.
--- End Message ---
--- Begin Message ---
Well
That was indeed what I was searching for but. If I read it out loud, I
think with this query I only check if the current user is still onlien
and not his conversation partner.
In the chat table is store the session_id's of both the chatters of the
conversation.
There is no way to tell if $thisuser is the user1_sessionid record or
user2_sessionid record. So I check them both.
After that I have all results where (user1_sessionid record = $thisuser
or user2_sessionid record = $thisuser) I need to get the other field.
In the first case the users of which the time needs to be checked is
user2_sessionid, in the second case user1_sessionid.
So something like:
select * from chat c1,
chat_online c2
where
UNIX_TIMESTAMP(c2.activity)>=$limit_time and
c2.session_id = (c2.user1_sessionid if (c1.user1_sessionid =
$thisuser)) or (c2.user1_sessionid if(c1.user2_sessionid = $thisuser));
Can I do something like this?
>>-----Original Message-----
>>From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
>>Sent: zondag 28 november 2004 2:25
>>To: [EMAIL PROTECTED]
>>Cc: [EMAIL PROTECTED]
>>Subject: Re: [PHP] mysql query with exclude
>>Sounds like you need a join. Maybe something like:
>>
>>select * from chat c1,
>> chat_online c2
>>where
>> UNIX_TIMESTAMP(c2.activity)=$limit_time and
>> c2.session_id = $thisuser and
>> ((c1.user1_sessionid = $thisuser) or
>> c1.user2_sessionid = $thisuser));
>>Respectfully,
>>Ligaya Turmelle
>>Reinhart Viane wrote:
> Hey all,
>
> Hope you all have fun this saturday evening :)
> I'm sure i'm having fun except i'm kinda stuck...
>
> Ok here goes...
>
> I have 2 tables, one with the people online (chat_online): session_id
> activity
>
>
> And a second one where i keep the conversations between people(chat):
> user1_sessionid user2_sessionid
> chat_conv
>
> To see what chatter are still online during the last 2 minutes i do a
> check like this on the chat_online table: $limit_time= time()-130;
> $sqlchatonline="select * from chat_online where
UNIX_TIMESTAMP(activity)
>
>>=$limit_time";
>
>
> ok, on my page i also do a query to see what conversations are going
> on with the user: $thisuser=session_id();
> $getchatlist="select * from chat where (user1_sessionid=$thisuser) or
> (user2_sessionid=$thisuser)";
>
> This selects all the conversations which this user has been/or is
> into. I list all the chatpartners of thisuser. Off course it is
> possible that other chatters who had a conversation with this user are
> not online anymore. So i need to combine those two queries in a way...
>
> this is what i think it should be:
> $getchatlist=select * from chat where (user1_sessionid=$thisuser) or
> (user2_sessionid=$thisuser);
> $resultchatlist=mysql_query($getchatlist);
> while ($row=mysql_fetch_array($resultchatlist)) {
> get the second chattersessionid in each conversation and check
> if this chatter was still online in the last two minutes.
> if he is not, exclude him from the array and do not show him
> in the list (optional delete the record in the database) }
>
> or maybe i can combine those two queries in one?
>
> Can someone help me out on this?
>
> Thx in advance,
> Reinhart
>
>
>
>
>
> _____
>
> Reinhart Viane
> <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> Domos || D-Studio
> Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01
--
> fax +32 15 43 25 26
>
>
> STRICTLY PERSONAL AND CONFIDENTIAL
> This message may contain confidential and proprietary material for the
> sole use of the intended
> recipient. Any review or distribution by others is strictly
prohibited.
> If you are not the intended
> recipient please contact the sender and delete all copies.
>
>
>
--- End Message ---
--- Begin Message ---
Little correction:
So something like:
select * from chat c1,
chat_online c2
where
UNIX_TIMESTAMP(c2.activity)>=$limit_time and
c2.session_id = (c2.user2_sessionid if (c1.user1_sessionid =
$thisuser)) or (c2.user1_sessionid if(c1.user2_sessionid = $thisuser));
I dunno if this is good sql, but I don't think it is.
>>Well
>>That was indeed what I was searching for but. If I read it out loud, I
think with this query I only check if the current user is still onlien
and not his conversation partner.
>>In the chat table is store the session_id's of both the chatters of
the conversation. There is no way to tell if $thisuser is the
user1_sessionid record or user2_sessionid record. So I check them both.
>>After that I have all results where (user1_sessionid record =
$thisuser or user2_sessionid record = $thisuser) I need to get the other
field. In the first case the users of which the time needs to be
>>>checked is user2_sessionid, in the second case user1_sessionid.
>>So something like:
>>select * from chat c1,
>> chat_online c2
>>where
>> UNIX_TIMESTAMP(c2.activity)>=$limit_time and
>> c2.session_id = (c2.user1_sessionid if (c1.user1_sessionid =
>>$thisuser)) or (c2.user1_sessionid if(c1.user2_sessionid =
$thisuser));
>>Can I do something like this?
>>-----Original Message-----
>>From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
>>Sent: zondag 28 november 2004 2:25
>>To: [EMAIL PROTECTED]
>>Cc: [EMAIL PROTECTED]
>>Subject: Re: [PHP] mysql query with exclude
>>Sounds like you need a join. Maybe something like:
>>
>>select * from chat c1,
>> chat_online c2
>>where
>> UNIX_TIMESTAMP(c2.activity)=$limit_time and
>> c2.session_id = $thisuser and
>> ((c1.user1_sessionid = $thisuser) or
>> c1.user2_sessionid = $thisuser));
>>Respectfully,
>>Ligaya Turmelle
>>Reinhart Viane wrote:
> Hey all,
>
> Hope you all have fun this saturday evening :)
> I'm sure i'm having fun except i'm kinda stuck...
>
> Ok here goes...
>
> I have 2 tables, one with the people online (chat_online): session_id
> activity
>
>
> And a second one where i keep the conversations between people(chat):
> user1_sessionid user2_sessionid
> chat_conv
>
> To see what chatter are still online during the last 2 minutes i do a
> check like this on the chat_online table: $limit_time= time()-130;
> $sqlchatonline="select * from chat_online where
UNIX_TIMESTAMP(activity)
>
>>=$limit_time";
>
>
> ok, on my page i also do a query to see what conversations are going
> on with the user: $thisuser=session_id();
> $getchatlist="select * from chat where (user1_sessionid=$thisuser) or
> (user2_sessionid=$thisuser)";
>
> This selects all the conversations which this user has been/or is
> into. I list all the chatpartners of thisuser. Off course it is
> possible that other chatters who had a conversation with this user are
> not online anymore. So i need to combine those two queries in a way...
>
> this is what i think it should be:
> $getchatlist=select * from chat where (user1_sessionid=$thisuser) or
> (user2_sessionid=$thisuser);
> $resultchatlist=mysql_query($getchatlist);
> while ($row=mysql_fetch_array($resultchatlist)) {
> get the second chattersessionid in each conversation and check
> if this chatter was still online in the last two minutes.
> if he is not, exclude him from the array and do not show him
> in the list (optional delete the record in the database) }
>
> or maybe i can combine those two queries in one?
>
> Can someone help me out on this?
>
> Thx in advance,
> Reinhart
>
>
>
>
>
> _____
>
> Reinhart Viane
> <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> Domos || D-Studio
> Graaf Van Egmontstraat 15/3 -- B 2800 Mechelen -- tel +32 15 44 89 01
--
> fax +32 15 43 25 26
>
>
> STRICTLY PERSONAL AND CONFIDENTIAL
> This message may contain confidential and proprietary material for the
> sole use of the intended
> recipient. Any review or distribution by others is strictly
prohibited.
> If you are not the intended
> recipient please contact the sender and delete all copies.
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hey,
I was happily using GET command line variables in my project under php 4.3.4
but when I upgrade to 4.3.9 they no longer work I can make them work by
changing back to my prior version of php but would rather use the newer one
can anyone explain why this may happen.
here is some sample code and the results of it -
This line creates the link with the GET var in it -
print '<blockquote><a
href="showaUnit.php?unitID='.$id.'">'.$theArray[$i]['title'].'Unit Id = '.
$id .'</a><blockquote><i>'.$theArray[$i]['desc'].'</i>
</blockquote></blockquote>';
This is the resultant URL which appears when I click the link above
http://127.0.0.1/ieee1484/IEEE1484/UnitofLearning/showaUnit.php?unitID=1
and when I use the following code in the form
print ("Unit ID = ");
print $unitID;
I get the result displayed as - Unit ID =
Which would hopefully display Unit ID = 1 for the case above.
This could be a settings file change or something more major but I would
appreciate any help.
Apologies if this is not the right place to post this but I am getting a bit
desperate if this is the wrong place please tell me the more appropriate
one.
Eamon
--- End Message ---
--- Begin Message ---
Eamon Reyn wrote:
Hey,
I was happily using GET command line variables in my project under php 4.3.4
but when I upgrade to 4.3.9 they no longer work I can make them work by
changing back to my prior version of php but would rather use the newer one
can anyone explain why this may happen.
Please read the release notes for 4.3.9. It will tell you there why they
are not working.
--- End Message ---
--- Begin Message ---
Hi Eamon,
It looks like you need to upgrade your code to use the superglobal arrays.
Change print $unitID; to print $_GET['unitID']; and see if that helps.
You can find more information regarding superglobals here:
http://uk.php.net/en/language.variables.predefined
HTH
============================================
Adrian Portsmouth
.htaccess Manager - SilkPHP
[e] [EMAIL PROTECTED]
[w] www.htaccessmanager.com
============================================
This email, its contents and attachments are confidential and may be covered
by legal privilege. This email contains information intended only for the
person(s) and/or entity named above. The views and opinions expressed are
those of the sender and not necessarily those of SilkPHP or its affiliates.
Any other distribution, copying, review, use or disclosure is strictly
prohibited. If you are not the intended recipient, please delete this
message and any attachments without making a copy and advise the sender by
return email - thank you.
This mail and any attachments have been scanned for viruses prior to leaving
the SilkPHP network. SilkPHP will not be liable for direct, special,
indirect or consequential damages arising from alteration of the contents of
this message by a third party or as a result of any virus being passed on.
-----Original Message-----
From: Eamon Reyn [mailto:[EMAIL PROTECTED]
Sent: 28 November 2004 10:37
To: [EMAIL PROTECTED]
Subject: [PHP] Help with GET variables which do not work after upgrading
Hey,
I was happily using GET command line variables in my project under php 4.3.4
but when I upgrade to 4.3.9 they no longer work I can make them work by
changing back to my prior version of php but would rather use the newer one
can anyone explain why this may happen.
here is some sample code and the results of it -
This line creates the link with the GET var in it -
print '<blockquote><a
href="showaUnit.php?unitID='.$id.'">'.$theArray[$i]['title'].'Unit Id = '.
$id .'</a><blockquote><i>'.$theArray[$i]['desc'].'</i>
</blockquote></blockquote>';
This is the resultant URL which appears when I click the link above
http://127.0.0.1/ieee1484/IEEE1484/UnitofLearning/showaUnit.php?unitID=1
and when I use the following code in the form
print ("Unit ID = ");
print $unitID;
I get the result displayed as - Unit ID =
Which would hopefully display Unit ID = 1 for the case above.
This could be a settings file change or something more major but I would
appreciate any help.
Apologies if this is not the right place to post this but I am getting a bit
desperate if this is the wrong place please tell me the more appropriate
one.
Eamon
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Sat, 27 Nov 2004 12:35:53 +0000 "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> We would like to identify the country of the people who connect to our
> website / portal using php. The idea is to provide them directly with the
> homepage in their language.
>
> Is that possible? Has anybody ever doen anything like that using php?
Just because my IP address says I'm somewhere it doesn't mean you should
slap me with a certain language which I may or may not understand. People
travel. There are also countries who use more than one language.
Surfers can set their language preferences in their browser. You should
look at the Accept-Language and Accept-Charset headers that the browser
sends and decide based on them. That's the sensible criterium IMO.
--
Skippy - Romanian Web Developers - http://ROWD.ORG
--- End Message ---
--- Begin Message ---
> On Sat, 27 Nov 2004 12:35:53 +0000 "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
> > We would like to identify the country of the people who connect to our
> > website / portal using php. The idea is to provide them directly with the
> > homepage in their language.
> >
> > Is that possible? Has anybody ever doen anything like that using php?
You can use geoip:
http://sourceforge.net/projects/geoip/
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
Hi all,
Does anyone know why some servers don't return a partial content when I use
the HTTP header:
Range: bytes=100-200
It should return the content of the page starting from byte 100 until the
byte 200, but it still returns the whole page.
Does this happen when the page is sent unbuffered?
Or what else could be?
And.... can I do something to force those servers to send just a part of the
page?
Thank you.
Teddy
--- End Message ---
--- Begin Message ---
Octavian Rasnita wrote:
Hi all,
Does anyone know why some servers don't return a partial content when I use
the HTTP header:
Range: bytes=100-200
It should return the content of the page starting from byte 100 until the
byte 200, but it still returns the whole page.
Does this happen when the page is sent unbuffered?
Or what else could be?
And.... can I do something to force those servers to send just a part of the
page?
Web servers are not required to do that. And if the content is generated
by cgi script, it is up to the script to send corrent range and
appropiate headers
--- End Message ---
--- Begin Message ---
I have a routine that uses sessions vars to hold the details of the previous
page, so I can bounce back to it if necessary. But I'm having some weird
problems with it. In the page I have the following (line numbers included
to get you an idea of where these things come):
17. require_once(INC_PATH."i_std_cfg.phtml");
(this include file includes the following:)
define('THIS_PAGE',$_SERVER['PHP_SELF']);
function get_ref_page() {
/* Retrieves the details of the last page which will have set
the session vars referred to */
$ref_page = array();
if(isset($_SESSION['ref_page'])) {
$ref_page['name'] = $_SESSION['ref_page'];
if(isset($_SESSION['ref_pagequery'])) {
$ref_page['query'] = $_SESSION['ref_pagequery'];
}
}
return $ref_page;
}
Now back in the main page:
53. $ref_page = get_ref_page(); // now reset session vars to current page
54. $_SESSION['ref_page'] = THIS_PAGE;
55. $_SESSION['ref_pagequery'] = $_SERVER['QUERY_STRING'];
Now, on my local system (PHP 4.3.4) this all works fine. On the live system
(PHP 4.1 - with PHP run, I believe, as CGI module) I hit a problem. At line
53, $ref_page is an array containing the values I expect. After line 54,
$ref_page is now a scalar containing the value of THIS_PAGE. It's almost as
though line 54 has been executed before line 53... Help!
--
@+
Steve
--- End Message ---
--- Begin Message ---
On Sun, 28 Nov 2004 13:14:54 +0100, steve <[EMAIL PROTECTED]> wrote:
> I have a routine that uses sessions vars to hold the details of the previous
> page, so I can bounce back to it if necessary. But I'm having some weird
> problems with it. In the page I have the following (line numbers included
> to get you an idea of where these things come):
>
> 17. require_once(INC_PATH."i_std_cfg.phtml");
>
> (this include file includes the following:)
>
> define('THIS_PAGE',$_SERVER['PHP_SELF']);
Why would you need to do this? I'd just use $_SERVER['PHP_SELF'] as is.
> function get_ref_page() {
> /* Retrieves the details of the last page which will have set
> the session vars referred to */
> $ref_page = array();
> if(isset($_SESSION['ref_page'])) {
> $ref_page['name'] = $_SESSION['ref_page'];
> if(isset($_SESSION['ref_pagequery'])) {
> $ref_page['query'] = $_SESSION['ref_pagequery'];
> }
> }
> return $ref_page;
> }
>
> Now back in the main page:
>
> 53. $ref_page = get_ref_page(); // now reset session vars to current page
I wouldn't use the same variable names like this. You have a local
$ref_page, and a $_SESSION variable called 'ref_page'. While if done
correctly it will work, you only encourage errrors this way.
> 54. $_SESSION['ref_page'] = THIS_PAGE;
> 55. $_SESSION['ref_pagequery'] = $_SERVER['QUERY_STRING'];
I don't follow the need to call a function just to figure out what
$_SESSION variables are already there and available for use. You seem
to be making this more complex that it needs to be. I would just use
the variable where they exists already.
> Now, on my local system (PHP 4.3.4) this all works fine. On the live system
> (PHP 4.1 - with PHP run, I believe, as CGI module)
PHP can be built as a 'cgi binary' or as a web server 'module', I've
never heard of a 'cgi module'. :)
> I hit a problem. At line
> 53, $ref_page is an array containing the values I expect. After line 54,
> $ref_page is now a scalar containing the value of THIS_PAGE. It's almost as
> though line 54 has been executed before line 53... Help!
Is the function returning what you think it is? print_r() before the return.
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/
--- End Message ---
--- Begin Message ---
Greg Donald wrote:
>> define('THIS_PAGE',$_SERVER['PHP_SELF']);
>
> Why would you need to do this? I'd just use $_SERVER['PHP_SELF'] as is.
I make frequent use of this value, so putting it in a constant saves typing
and makes the page a little clearer.
>> function get_ref_page() {
>> /* Retrieves the details of the last page which will have set
>> the session vars referred to */
>> $ref_page = array();
>> if(isset($_SESSION['ref_page'])) {
>> $ref_page['name'] = $_SESSION['ref_page'];
>> if(isset($_SESSION['ref_pagequery'])) {
>> $ref_page['query'] = $_SESSION['ref_pagequery'];
>> }
>> }
>> return $ref_page;
>> }
>>
>> Now back in the main page:
>>
>> 53. $ref_page = get_ref_page(); // now reset session vars to current page
>
> I wouldn't use the same variable names like this. You have a local
> $ref_page, and a $_SESSION variable called 'ref_page'. While if done
> correctly it will work, you only encourage errrors this way.
>
>> 54. $_SESSION['ref_page'] = THIS_PAGE;
>> 55. $_SESSION['ref_pagequery'] = $_SERVER['QUERY_STRING'];
>
> I don't follow the need to call a function just to figure out what
> $_SESSION variables are already there and available for use. You seem
> to be making this more complex that it needs to be. I would just use
> the variable where they exists already.
The values for the session vars are set by the previous page the user
visited. Each page sets these session vars, but first I transfer the values
to another array in case I need to use them on that page -- eg,
1. On the page 'community.php', $_SESSION['ref_page'] is set to
'/community.php'.
2. The user clicks a link to go to 'market.php'.
3. On arriving at 'market.php', $_SESSION['ref_page'] is still set to
'/community.php'. I transfer this value to the $ref_page array is case I
want to be able to easily refer back to the previous page. Then I reset the
session vars - ie, $_SESSION['ref_page'] becomes '/market.php'.
Where this is especially handy is that, if I go off to something like a
intermediate page - such as a login routine, or database saving, the
session vars retain the information about where the user has come from, and
therefore the user can be sent back there, because on those intermediate
pages I *don't* reset the session vars.
>> Now, on my local system (PHP 4.3.4) this all works fine. On the live
>> system (PHP 4.1 - with PHP run, I believe, as CGI module)
>
> PHP can be built as a 'cgi binary' or as a web server 'module', I've
> never heard of a 'cgi module'. :)
Well my hosting company says it's a CGI module, so I guess they probably
mean binary ;-)
>> I hit a problem. At line
>> 53, $ref_page is an array containing the values I expect. After line 54,
>> $ref_page is now a scalar containing the value of THIS_PAGE. It's almost
>> as though line 54 has been executed before line 53... Help!
>
> Is the function returning what you think it is? print_r() before the
> return.
I tried printing out the values before and after each of those lines. After
line 53, $ref_page is an array containing precisely the values I expect, so
the function is working. After line 54, the session var has been reset, as
expected, to match the current page - but $ref_page has also changed and is
now equal to $_SESSION['ref_page'], which is what I found very weird - ie,
resetting $_SESSION['ref_page'] simultaneously reset $ref_page.
I've found a workaround. Within the get_ref_page() function, I now unset the
session vars after transferring their values to $ref_page. This has
involved a little extra coding on those intermediate pages, because on
those pages I really needed the session vars to retain their values. So I'd
still like to know what's going wrong here...
--
@+
Steve
--- End Message ---
--- Begin Message ---
Raditha Dissanayake wrote:
Bruno B B Magalh�es wrote:
Does anyone has a solid benchmark about comments speed.. I mean, too
many comments will decrease speed of the PHP scripts...
I've tried without success using a class, and also a simple micro-time
operation... Well, cause the file is evaluated before it is executed,
I didn't had success.
Any idea?
Surely there are more important things for you to worry about.
the meaning of life, for example
--- End Message ---
--- Begin Message ---
Marek Kilimajer wrote:
Raditha Dissanayake wrote:
Bruno B B Magalh�es wrote:
Does anyone has a solid benchmark about comments speed.. I mean, too
many comments will decrease speed of the PHP scripts...
Surely there are more important things for you to worry about.
the meaning of life, for example
I wasn't thinking of such big worries and I was thinking more of PHP
related worries :-))
--
Raditha Dissanayake.
------------------------------------------------------------------
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/ | Drag and Drop Upload
--- End Message ---
--- Begin Message ---
Hi,
I would like to parse some PHP files to extract some information about
them. Is there a formal grammar (EBNF or other) anywhere that I could
use as a reference?
I'd like to write the parser myself (in Haskell), so existing PHP
parsers (in PHP itself, for instance) aren't quite what I'm looking
for.
thanks,
Dominic
--
// Dream in black and white -
// model cities, shooting up in the air
--- End Message ---
--- Begin Message ---
On Nov 28, 2004, at 7:28 AM, Dominic Fox wrote:
Hi,
I would like to parse some PHP files to extract some information about
them. Is there a formal grammar (EBNF or other) anywhere that I could
use as a reference?
I'd like to write the parser myself (in Haskell), so existing PHP
parsers (in PHP itself, for instance) aren't quite what I'm looking
for.
Have you tried poking around in cvs.php.net?
-ryan
--- End Message ---
--- Begin Message ---
* Francisco M. Marzoa Alonso <[EMAIL PROTECTED]>:
> Can I override static members in someway under PHP5? Is the answer is
> negative, Why not?
If they are marked public (or not marked at all as public, private, or
protected, in which case the default is public), then yes, you can
override them.
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
* Raditha Dissanayake <[EMAIL PROTECTED]>:
> Luis Lebron wrote:
> >I have a server running RH 8, Apache 1.3.27, PHP 4.3.9. I tried to
> >recompile PHP with Curl support.
>
> that's a very old version of red hat that is no longer supported you
> might want to upgrade at least to RH 9 if not to fedora
That's a naive answer if I've ever heard one. In production
environments, you often don't have the luxury of upgrading the OS.
Additionally, you *can* still find updates to RH8 via yum, and I believe
progeny has continued support for RH8 as well (past Red Hat's end of
life dates).
> > Everything seemed to compile correctly. However, when I restarted apache
> > I got the following error:
> >
> > "Cannot load /etc/httpd/modules/libssl.so into server:
> > /etc/httpd/modules/libssl.so: undefined symbol: dbm_firstkey"
>
> could be a problem with your openssl installation.
I concur. Additionally, this is an issue with your *Apache*
installation, not with PHP itself; you may have forgotten to pass the
--with-ssl switch to the apache configure script, or passed it to the
wrong path. If you don't need SSL support, you should be able to turn it
off in your httpd.conf.
--
Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association | http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
> Yes, but perhaps every 5 minutes. You have to solve this too, either
> cron job if you have it available or it can be trigered by user http
> requests (not very reliable).
Thanks again!
Yours e-mail fixed some procedural doubts I have been thinking about
such automatic responder.
Solution might be easy to achieve by implementing, on my own opinion,
a Javascript code with a nested 'SetTimeOut' function recursively calling
itself every 5 mins (for example) and re-direction to a php code performing
the POP3 mailbox checking.
(obviously the php code shall include ECHOes to the timing Javascript
code again...)
Alessandro Rosa
--- End Message ---
--- Begin Message ---
On Nov 28, 2004, at 10:38 AM, Alessandro Rosa wrote:
Yes, but perhaps every 5 minutes. You have to solve this too, either
cron job if you have it available or it can be trigered by user http
requests (not very reliable).
Thanks again!
Yours e-mail fixed some procedural doubts I have been thinking about
such automatic responder.
Solution might be easy to achieve by implementing, on my own opinion,
a Javascript code with a nested 'SetTimeOut' function recursively
calling
itself every 5 mins (for example) and re-direction to a php code
performing
the POP3 mailbox checking.
(obviously the php code shall include ECHOes to the timing Javascript
code again...)
This seems like a very weak re-implementation of cron. Seriously, this
problem has been solved.
-ryan
--- End Message ---
--- Begin Message ---
> This seems like a very weak re-implementation of cron. Seriously, this
> problem has been solved.
>
> -ryan
Then, what do you exactly mean for cron job?
Alessandro
--- End Message ---
--- Begin Message ---
Please set your mailer to *NOT* ask for reply reciepts when mailing to a
mailing list.
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Hello everyone,
Here is a newbie question for you guys who are much more advanced than me
:-)
I want ot do an automatic redirection in a php page... Is there something
equivalent to "response.redirect" used in ASP?
Thanks in advance,
Pascal Platteeuw
--- End Message ---
--- Begin Message ---
Look at header()
http://us2.php.net/manual/en/function.header.php
-M
> -----Original Message-----
> From: Pascal Platteeuw [mailto:[EMAIL PROTECTED]
> Sent: Sunday, November 28, 2004 11:34 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie question
>
> Hello everyone,
>
> Here is a newbie question for you guys who are much more
> advanced than me
> :-)
> I want ot do an automatic redirection in a php page... Is
> there something equivalent to "response.redirect" used in ASP?
>
> Thanks in advance,
>
> Pascal Platteeuw
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Pascal Platteeuw wrote:
Hello everyone,
Here is a newbie question for you guys who are much more advanced than me
:-)
I want ot do an automatic redirection in a php page... Is there something
equivalent to "response.redirect" used in ASP?
Thanks in advance,
Pascal Platteeuw
http://us4.php.net/header
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
try, <?PHP header("Location: Page_here"); ?>
www.BradTechnologies.com
99.9% Uptime
24/7 FREE Support
Plans starting at $3.50 per month
www.BradTechnologies.com
"Pascal Platteeuw" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello everyone,
>
> Here is a newbie question for you guys who are much more advanced than me
> :-)
> I want ot do an automatic redirection in a php page... Is there something
> equivalent to "response.redirect" used in ASP?
>
> Thanks in advance,
>
> Pascal Platteeuw
--- End Message ---
--- Begin Message ---
is there a code you can put at the top of the your php files so that the
imgs etc. load as the are put on to your computer, and it doesnt wait for
the whole site to be downloaded until it is loaded to the user? *turning off
the buffer basicly*
Brad Ciszewski
www.BradTechnologies.com
99.9% Uptime
24/7 FREE Support
Plans starting at $3.50 per month
www.BradTechnologies.com
--- End Message ---
--- Begin Message ---
I am fairly new to the concept of working wity mysql and php. I am looping
thru a text file full of county names and attempting to add these to a database.
Now the table exists and if I enter the SQL statement manually against the
database it works. The user also has read and write permissions to the table
and the columns in the table.
Here is my php code:
$lines = file("/tmp/new1.txt");
foreach ($lines as $line_num => $line) {
echo($line . '... ');
$link = mysql_connect('naabe', 'naabe', 'xxxxxxxxx')
or die('could not connect: ' . mysql_error());
// I use substr to remove the space at the end of every line.
$sql = "INSERT INTO countries (country) VALUES ('" .
substr($line,0,strlen($line)-1) . "')";
echo ($sql . ' ...<br>');
mysql_query($sql);
mysql_close();
flush();
}
This is how I configured php4.3.9
./configure --enable-so --with-mysql=/usr/local/mysql --enable-filepro
--with-apx2=/usr/local/apache2/bin/apxs --with-jpg --with-png --with-xml
It will print to the screen the line and the SQL statement correctly. The
password is correct. The database name is naabe, the user is naabe.
Anyone know what I could be doing wrong?
Trav
--- End Message ---