|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Tue Mar 06 2001 - 03:50:23 CST
php-general Digest 6 Mar 2001 09:50:23 -0000 Issue 550
Topics (messages 42677 through 42729):
Get text between <a href=""> </a>
42677 by: Keith Mayo
42679 by: Henrik Hansen
speeding a site with lots of includes
42678 by: Eduardo Dominguez
42698 by: Chris Lee
Re: mail problem
42680 by: Peter Houchin
PHP and MySQL ....dynamic query?
42681 by: Blueriver Networking Services
function --> global variables
42682 by: Augusto Cesar Castoldi
42685 by: Hardy Merrill
Sites Using PHP - For a presentation
42683 by: Brad Landis
To the PHP developpers / DOMXML (Update and delete??)
42684 by: Dominique Paquin
php, mysql and htaccess
42686 by: george
Re: comparing values
42687 by: David Robley
mail ....any idea's?
42688 by: Peter Houchin
42689 by: Peter Houchin
Translation using FastTemplates
42690 by: ADnoctum
mysql_connect() with timeout
42691 by: php.winux.com
42724 by: php3.developersdesk.com
PHP Conference In San Diego?
42692 by: Jonathan Sharp
config question
42693 by: PeterOblivion.aol.com
42694 by: Kelly Corkill
42695 by: David Robley
42697 by: Philip Olson
42704 by: php3.developersdesk.com
Re: what does $$ mean?
42696 by: Stephan Ahonen
compile error
42699 by: Doug Kite
Quick Regex Question
42700 by: Jeff Oien
42701 by: CC Zona
is_uploaded_file false if file too big
42702 by: Tyson Lloyd Thwaites
42710 by: Rick St Jean
Re: HREFs that can't be
42703 by: php3.developersdesk.com
removing characters
42705 by: rpruitt.mid-tn.com
42707 by: David Robley
42709 by: Rick St Jean
42728 by: php3.developersdesk.com
Session not destroying properly
42706 by: Mike Yuen
42718 by: Yasuo Ohgaki
42720 by: trogers
Shopping Baskets
42708 by: Sean Weissensee
Calling Perl from PHP -- Help --
42711 by: Matt Friedman
OT Perl help
42712 by: Matt Friedman
Almost working Regex
42713 by: Murray Shields
42714 by: Rick St Jean
42715 by: Yasuo Ohgaki
42717 by: Murray Shields
Newbie: Can't find function error.
42716 by: Darren Ward
42719 by: Pavel Jartsev
42726 by: php3.developersdesk.com
42727 by: Darren Ward
PHP LDAP & SSL
42721 by: Matthieu Le Corre
42725 by: Stig Venaas
42729 by: Matthieu Le Corre
:: usability
42722 by: Milan Mlynarcik
Not Allowing REload or REfresh with this script?
42723 by: Dhaval Desai
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I need some help with a program, I need to get every
instance of text between <a href =””> GET TEXT HERE
</a> and save the results in a variable. Does anyone
have some example code of how to do it along with how
to put the results into just one variable?
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
attached mail follows:
> I need some help with a program, I need to get every
> instance of text between <a href =""> GET TEXT HERE
> </a> and save the results in a variable. Does anyone
> have some example code of how to do it along with how
> to put the results into just one variable?
Try with:
$string = "<a href =\"\">GET TEXT HERE</a>";
$string = strip_tags($string);
-- Henrik Hansen
attached mail follows:
An app I am currently developing has grown a lot. It currently handles aproximately 12 includes, more or less 13 thousand lines of code.
By doing some benchmarks, i realized that the bottleneck is the include() payload.
How can I optimize a program like this one ? thanks in advance
attached mail follows:
I found 0.002 for the first include, and 0.0001 second for a refresh not to bad.
PIII-500 512mb ram
PHP-4.0.4pl1
no zend-optimizer, no zend-cache
the refresh is less because linux caches the file in it internal buffer. I wouldnt consider 0.002sec that bad of a hit. you could have 50hit/sec with 10 includes each on ALL difernet files. you could have 1000hit/sec on the same files.
--
Chris Lee
Mediawaveonline.com
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
lee
mediawaveonline.com
""Eduardo Dominguez"" <lalo_dominguez
yahoo.com> wrote in message news:981385$21k$1
toye.p.sourceforge.net...
An app I am currently developing has grown a lot. It currently
handles aproximately 12 includes, more or less 13 thousand lines
of code.
By doing some benchmarks, i realized that the bottleneck is the include()
payload.
How can I optimize a program like this one ?
thanks in advance
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Now if i include
$headers .= "Cc: peterh
vfsa.com.au " . " , ";
$headers .= "peterh
vfsa-erentals.com.au\n";
My page won't load at all apart from the first include i have on my page..
does any one have any idea's?
------------------------------------------------------------------------ Hiya, am near completeion of a site only i can't get any mail to send to multiple recipients at all .. either in the "To:" section or having on email in "To" and one email address in "CC" section.. and i need to be able to do this ... can any one offer any suggestions ...( I'd prefer to have one in the "To" section and one in the "CC" section I'm am using sendmail on solaris 2.6 to send the actual emails
<-- Start of snip--->
$address .= $email ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: peterh
vfsa.com.au ";
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" );
<--- end of snip--->
any help would be greatful :)
Peter Houchin
Sun Rentals
peterh
sunrentals.com.au
attached mail follows:
Hello everyone. :)
I am attempting to construct a query with PHP and MySQL based on user input from a referring form page. Here is an example of what I need this to do:
This will involve multiple variables, but I will just use 2 here:
if ($dig== "1") {
$qual1 = "WHERE (track >= 0)"; }
if ($dig== "2") {
$qual1 = "WHERE (track >= 0) AND (track <=100)"; }
if ($lot == "1") {
$qual2 = "AND (acres >= 100)"; }
if ($lot == "2") {
$qual2 = "AND (acres >= 500) AND (acres <= 650)"; }
// create SQL statement $sql = "SELECT * FROM myTable $qual1 $qual2";
// execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Could not execute the query");
.....
You can see my problem here. I want to be able to write parts of my sql statement based upon user input, and then execute it all at once. How do I tie all of my $qual variables in so that this will read/execute it properly?
Thanks :)
attached mail follows:
I have a html form and his "action" is a php file.
this is the php file: ________________________________ function checasenha($ID) { $as="\""; global $ID, $limite, $cdusuario, $usuario, $senha; . . . }
checasenha($ID); --------------------------------------
Warning: Variable used in global statement already exists in the function in /home/httpd/html/fiesc_sessao/checa_senha.php3 on line 13
The "line 13" is "global $ID, $limite....."
What's could be the problem?
regards,
Augusto Cesar Castoldi
attached mail follows:
Augusto Cesar Castoldi [castoldi
inf.ufsc.br] wrote:
> I have a html form and his "action" is a php file.
>
> this is the php file:
> ________________________________
> function checasenha($ID) {
^^^
> $as="\"";
> global $ID, $limite, $cdusuario, $usuario, $senha;
^^^
> .
> .
> .
> }
>
> checasenha($ID);
> --------------------------------------
>
> Warning: Variable used in global statement already exists in the function in
> /home/httpd/html/fiesc_sessao/checa_senha.php3 on line 13
>
> The "line 13" is "global $ID, $limite....."
>
> What's could be the problem?
Notice my ^'s above - you are already defining $ID in your function declaration. You can't do that *and* declare $ID as a global.
-- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com> > regards, > > Augusto Cesar Castoldi > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi all,
I am looking for some big name sites using PHP. I will be doing a presentation next month and would like to show a list of sites that are using PHP.
Thanks for your Help
_______________________________________________________ Send a cool gift with your E-Card http://www.bluemountain.com/giftcenter/
attached mail follows:
Greetings PHP Developpers.
I am presently making a web based application that will be able to add nodes as well as update and remove them from XML documents. I saw in my researches, up to now, That XMLDOM does not support update and delete of nodes. I just wanted to know if someone is presently working on that and when I should expect the release of these functions. Thanks
Regards, Dominique Paquin
Galea Secured Networks Inc.
dpaquin
galeasec.com
FAX: 450 979-9027
attached mail follows:
I am trying to protect a folder with an htaccess file which pulls the username and passwords out of a db but I cant get it to work Can someone have a look at the code below from the htaccess file. TIA george AuthName "Admins Only"
AuthType Basic
require valid-user
Auth_MySQL_Host
Auth_MySQL_DB
Auth_MySQL_Password_Table users
Auth_MySQL_Username_Field user
Auth_MySQL_Password_Field password
Auth_MySQL_Empty_Passwords off
Auth_MySQL_Encryption_Types MySQ
attached mail follows:
On Mon, 5 Mar 2001 18:27, Paul wrote:
> below is the code I am using, $sourcefile is a url var
> for example http://url/?sourcefile=/this/path/to/whatever.php
>
> $filelist = array("",
> "db_auth.conf",
> "config.php",
> "master.functions.inc"
> ); /* these are the files I want to protect from
> this script */
>
> function check_hackers($sourcefile, $filelist) {
> $checkfile = explode("/", $sourcefile); /* seperate the
> sourcefile var */
> $disallowed = $checkfile[count($checkfile) -1]; /* use only
> the last part (filename.ext) */
> $filecount = count($filelist); /* count how many files in
> array */
> while ($tempcount < $filecount) {
> $tempfile = $filelist[$tempcount];
> if ($tempfile == $disallowed) {
> $sourcefile = "source.inc"; /* this is not
> returned to the global space .... why not ??? */
> echo $disallowed; /* this will echo
> the correct thing (config.php) */
> echo $tempfile; /* this will
> echo the correct thing (config.php) */
> return $sourcefile; /* this doesn't work
> either ???? what the ??? */
> }
> $tempcount++;
> }
> }
>
> check_hackers($sourcefile, $filelist);
>
> Can somebody tell me why this is not return $sourcefile = "source.inc"
> .... what am I doing wrong.
> Can you please reply to paul
wapdomainz.com PLEASE PLEASE PLEASE
Um, you aren't assigning the result of the function to anything?
$what_you_want_to_see = check_hackers($sourcefile, $filelist); echo $what_you_want_to_see;
Cheers
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
Hiya,
am near completeion of a site only i can't get any mail to send to multiple
recipients at all .. either in the "To:" section or having on email in "To"
and one email address in "CC" section.. and i need to be able to do this ...
can any one offer any suggestions ...( I'd prefer to have one in the "To"
section and one in the "CC" section
I'm am using sendmail on solaris 2.6 to send the actual emails
<-- Start of snip--->
$address .= $email ;
$subject = "VFSA-eRentals Calculation Results";
$body="blah blah\n";
$headers .= "CC: peterh
vfsa.com.au ";
mail("$address", "$subject", "$body", "$headers \nContent-Type: text/plain;
charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" );
<--- end of snip--->
Now if i include
$headers .= "Cc: peterh
vfsa.com.au";
My page won't load at all apart from the first include i have on my page.. does any one have any idea's? any help would be greatful :)
Peter Houchin
Sun Rentals
peterh
sunrentals.com.au
attached mail follows:
That wasn't it :< & if i use any other headers .. ie
$mailheaders .= "X-Priority: 1\n";
they work .. its just with the CC that wont work :<
-----Original Message-----
From: Jason Murray [mailto:Jason.Murray
melbourneit.com.au]
Sent: Tuesday, March 06, 2001 10:45 AM
To: 'Peter Houchin'
Subject: RE: [PHP] mail ....any idea's?
> Now if i include
> $headers .= "Cc: peterh
vfsa.com.au";
>
> My page won't load at all apart from the first include i have
> on my page.. does any one have any idea's?
> any help would be greatful :)
It looks a little like you're perhaps using $headers in your first include to do something? Try a different variable name like $mailheaders?
Jason
-- Jason Murray jasonmmelbourneit.com.au Web Design Team, Melbourne IT Fetch the comfy chair!
attached mail follows:
Hi.
I'm using FastTemplates for a little project of mine and I want to include several translations for that. Have any of you made translations with templates? I don't know were to start. HELP!
attached mail follows:
A few months ago I modified PHP 3.0.16 to add an optional fourth parameter to the mysql_connect() functions. The parameter specifies a timeout (in seconds) on the connect(). The patch simply uses the existing mysql_options() function in the MySQL library so it's quite stable code.
I'm in the process of upgrading to PHP 4.0.4pl1 and so I've made a comparable change to that code base.
Here are the patches for each version:
http://www.winux.com/php/connection_timeout_php-3.0.16.txt http://www.winux.com/php/connection_timeout_php-4.0.4pl1.txt
Since the timeout parameter is optional, the change is completely upward compatible with the existing languages. It's a wonderful thing.
Is there any chance either of these might make it into the official release?
Larry
attached mail follows:
Addressed to: <php
winux.com>
php-general
lists.php.net
** Reply to note from <php
winux.com> Tue, 6 Mar 2001 01:29:52 -0500
>
> Frankly, I don't know how people would otherwise handle connections
> to MySQL since the attempts could, potentially, block forever.
I guess because the entire system is so reliable for most people. I've been doing dynamic sites for over a year now, and I've never had a problem. The only downtime MySQL has is when I shut it down for a few minutes once a week to back up the database files.
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
I've submitted a proposal for a tutorial for the PHP conference and it says that you'll be notified on the 1st of March...but I haven't heard anything...has anyone else that submitted something heard anything?
Thanks, -Jonathan
attached mail follows:
My server admin is being stupid... magic_quotes_gpc have been turned off unexpectadly so phpMyAdmin aint working, as well as half my scripts. He says nothing has been changed so it must be my fault, is there a command in php to displays the PHP config options so i can show this mofo that they are off
- Peter
attached mail follows:
<? phpinfo() ?>
On Mon, 5 Mar 2001 PeterOblivion
aol.com wrote:
> Date: Mon, 5 Mar 2001 20:00:47 EST
> From: PeterOblivion
aol.com
> To: php-general
lists.php.net
> Subject: [PHP] config question
>
> My server admin is being stupid... magic_quotes_gpc have been turned off
> unexpectadly so phpMyAdmin aint working, as well as half my scripts. He says
> nothing has been changed so it must be my fault, is there a command in php to
> displays the PHP config options so i can show this mofo that they are off
>
> - Peter
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
Kelly
303-444-1671 Boulder, Colorado
attached mail follows:
On Tue, 6 Mar 2001 11:30, PeterOblivion
aol.com wrote:
> My server admin is being stupid... magic_quotes_gpc have been turned
> off unexpectadly so phpMyAdmin aint working, as well as half my
> scripts. He says nothing has been changed so it must be my fault, is
> there a command in php to displays the PHP config options so i can show
> this mofo that they are off
>
> - Peter
phpinfo()
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
phpinfo() and if you want it to work now, you'll want to create a .htaccess and put this in it :
php_flag magic_quotes_gpc on
and kindly ask them why it's been turned off and plan accordingly.
regards,
Philip Olson http://www.cornado.com/
On Mon, 5 Mar 2001 PeterOblivion
aol.com wrote:
> My server admin is being stupid... magic_quotes_gpc have been turned off
> unexpectadly so phpMyAdmin aint working, as well as half my scripts. He says
> nothing has been changed so it must be my fault, is there a command in php to
> displays the PHP config options so i can show this mofo that they are off
>
> - Peter
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Addressed to: PeterOblivion
aol.com
php-general
lists.php.net
** Reply to note from PeterOblivion
aol.com Mon, 5 Mar 2001 20:00:47 EST
>
> My server admin is being stupid... magic_quotes_gpc have been turned off
> unexpectadly so phpMyAdmin aint working, as well as half my scripts. He says
> nothing has been changed so it must be my fault, is there a command in php to
> displays the PHP config options so i can show this mofo that they are off
<? phpinfo() ?>
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
An example of $$variables:
<?php $smelly = "ditto"; $ditto = "wimpymeat"; $wimpymeat = "smelly"; $foo = "smelly"; for ($i=1;$i<6;$i++) { $foo = $$foo; echo $$foo . "\n"; } ?>
Returns: wimpymeat smelly ditto wimpymeat smelly
Now, why anyone would want to write a script that returns words like "wimpymeat" is beyond me.
Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email
attached mail follows:
I am having trouble installing php4.
When I try to compile, it stops with the following error:
In file included from /usr/src/php4/ext/standard/fsock.h:43, from /usr/src/php4/ext/standard/php_standard.h:43, from main.c:52: /usr/include/sys/socket.h:48: conflicting types for `socklen_t' php.h:115: previous declaration of `socklen_t' *** Error code 1
Stop.
This is on a machine that has been recently upgraded to FreeBSD 3.0-stable.
Can anyone advise how to fix this error?
Thank you, Doug
attached mail follows:
if (preg_match("/[a-Z],[a-Z]/",$text)) {
Can you tell me where I'm failing here. I want to do something if the string has commas in between words with no spaces. Like:
blah,blah,blah
Jeff Oien
attached mail follows:
In article <NDBBJKNCILKDCEGAJBAOEENIDFAA.jeff
webdesigns1.com>,
jeff
webdesigns1.com ("Jeff Oien") wrote:
> if (preg_match("/[a-Z],[a-Z]/",$text)) { > > Can you tell me where I'm failing here. I want to do something > if the string has commas in between words with no spaces. > Like: > > blah,blah,blah
"Does it have *any instance where a string of letters is separated only by a comma?" preg_match("/[a-z]+,[a-z]+/i",$text)
"Does it consist *entirely of strings of letters separated only by comma?" preg_match("/^[a-z]+,[a-z]+$/i",$text)
-- CC
attached mail follows:
Hi,
I am having a problem with is_uploaded file returning false if the file uploaded is over a certain size.
I have used ini_set("upload_max_filesize", "8M"), as well as setting MAX_FILE_SIZE like this: <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="21000000000000"> (ie real big :)
Still, if I try to upload a file over about 2mb, is_uploaded_file returns false and the $userfile var is empty. Shouldn't it report an uploaded file even if it is too large?
This is quite annoying as my script uses is_uploaded_file to check if a file has been uploaded, and if not it shows an upload form. If I try to upload a +2Mb file, after a short wait I get the upload form again.
Any help in fixing this would be appreciated. Here is my setup:
PHP-4.0.5-dev CGI IIS4/NT4 SP4
Regards,
Tyson Lloyd Thwaites IT&e Limited e-Commerce Division Adelaide (08) 8346 3888
attached mail follows:
ok ... I have been doing some more reading... the file uploads are limited by a directive in php.ini, upload_max_filesize.. and it defaults to 2 meg. If it is large it will act like nothing was uploaded.
At 03:46 PM 3/6/01 +1030, Tyson Lloyd Thwaites wrote:
>Funny, because I can upload stuff that is close to 2mb (ie 1.99) but
>not over.
>
>I think it must be something to do with the default file limit, even
>though I have explicitly set itlarger, and also set the max size
>field
>in the form larger.
>
>My main gripe is that is_uploaded_file doesn't recognise it as an
>upload.
>
>Cheers
>
>
> > -----Original Message-----
> > From: Rick St Jean [mailto:rstjean
internet.look.ca]
> > Sent: Tuesday, March 06, 2001 3:43 PM
> > To: Tyson Lloyd Thwaites
> > Subject: Re: [PHP] is_uploaded_file false if file too big
> >
> >
> > In some recent development that we had done at work, we
> > found that IIS has a
> > heap limitation of 1MB. You would have to hack IIS to
> > allow the heap to
> > grow greater than that.
> >
> > Rick.
> >
> >
> > At 03:26 PM 3/6/01 +1030, you wrote:
> > >Hi,
> > >
> > >I am having a problem with is_uploaded file returning false if the
> > >file
> > >uploaded is over a certain size.
> > >
> > >I have used ini_set("upload_max_filesize", "8M"), as well
> > as setting
> > >MAX_FILE_SIZE like this:
> > ><INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="21000000000000">
> > >(ie real big :)
> > >
> > >Still, if I try to upload a file over about 2mb, is_uploaded_file
> > >returns false and the $userfile var is empty. Shouldn't
> > it report an
> > >uploaded file even if it is too large?
> > >
> > >This is quite annoying as my script uses is_uploaded_file
> > to check if
> > >a
> > >file has been uploaded, and if not it shows an upload
> > form. If I try
> > >to upload a +2Mb file, after a short wait I get the upload form
> > >again.
> > >
> > >Any help in fixing this would be appreciated. Here is my setup:
> > >
> > >PHP-4.0.5-dev CGI
> > >IIS4/NT4 SP4
> > >
> > >
> > >Regards,
> > >
> > >Tyson Lloyd Thwaites
> > >IT&e Limited
> > >e-Commerce Division
> > >Adelaide
> > >(08) 8346 3888
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > >For additional commands, e-mail: php-general-help
lists.php.net
> > >To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
> > ##########################################################
> > # Rick St Jean,
> > # rstjean
internet.look.ca
> > # President of Design Shark,
> > # http://www.designshark.com/
> > # Quick Contact: http://www.designshark.com/messaging.ihtml
> > # Tel: 905-684-2952
> > ##########################################################
> >
> >
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
Addressed to: "Boget, Chris" <Chris.Boget
wild.net>
php-general
lists.php.net
** Reply to note from "Boget, Chris" <Chris.Boget
wild.net> Mon, 5 Mar 2001 08:25:25 -0600
> > This is pretty much acceptable to search engines. Even better add: > > <Location /program> > > ForceType application/x-httpd-php > > </Location> > > to httpd.conf. Then the following url will work: > > http://www.somedomain.com/program/value1/value2/command.php > > program _is_ the program. $PATH_INFO containls: > > '/value1/value2/command.php' > > I've tried setting this up, but for the life of me, I could not get it to > work.
I've never had a problem with it. I place it inside the <VirtualHost> block for the host I want to affect. I've got some domains with over half a dozen different programs that use this trick. It needs to match the AddType value you use to enable .php, .php3, .phtml, etc to run php. It may only work for Apache modules. Of course, you also have to reload the web server config files after you add it. apachectrl graceful, or apachectl restart at least.
> I've just settled with including the ".php" after the program name and that > works just as well... > > http://www.somedomain.com/program.php/value1/value2/command.php > ----------------------------------^^^^^^^^^^
That works, but doesn't look as cool.
> > > > Why do you want to eliminate all get params and cookies? > > > > That might > > > > have a lot of control as to what the best approach will be. > > > GET because they can be modified and > > So can these URL based param passing schemes. Even POST > > params are not all that secure from a determined hacker. All it > > takes is a little work with a program to fake POST values. The > > only advantage they have is taking a little more work. > > Yes, I know. But that little extra work is enough. Plus, we are > going to try a few things (including encrypting; not one way) > the hidden variables. That and trying to make sure that the form > submission request originated from our server.
To make sure hidden fields stay unchanged, contat all the values together into a long string, pass the string to md5, and store the result as a checksum. When you get data back from the browser concat it again, not including the md5 string, and compare it with the checksum from the hidden values. If they are different someone has changed the data.
You should to add something somewhat random, that only the server knows, into the md5 input, so even an ex-employee who knows the algorithm can not fake a checksum. The md5 checksum with a local secret is a good way to make sure that the original md5 checksum was computed by one of your machines. A hacker would need to know that to create a valid checksum for modified data.
> I'm still trying to > find the answer as to when HTTP_REFERER is available and > when it isn't... still haven't heard anything back on that one... >
It depends on the browser. Some never send it. The ones that do usually only send it when a link is clicked on a page. URLS entered by clicking on a link in an email, selected from bookmarks or typed in by hand never have a referer. > > > Cookies because not all users will have them turned on. > > Good reason. > > If you don't care about serach engines, you can just use PHP4 sessions, > > and append the session ID, or compile with --enable-trans-sid and let > > php use cookies when available or place the session ID in the URN if > > they are not. > > As I've mentioned in another post, this is *not* working. We have that > directive turned on/compiled in and it still does not append the session ID > to URLs if the user's browser does not accept cookies. I submitted a few > code samples last week that I set up to demonstrated this. Everything > looks ok in the php.ini and everything that needed to be was turned on > when PHP4 (we are using 4.0.3pl1) was compiled, but still the session ID > is not being appended to the URL. > I wish I knew what was wrong. >
If you are creating the links dynamicly how about adding this near the end of the process:
if( empty( $HTTP_COOKIE_VARS[ 'phpsessid' ] )) echo '?phpsessid=', session_id();
Crude, but it should be effective.
There was a php bug that messed up enable-trans-sid when I first started using sessions, so I wrote a function to create a link:
function anchor( $Title, $Href, $Params='', Anchor='', Target='' ) {
}
It kind of outputs something like:
<A href="$Href?$Params#$Anchor" target="$Target">$Title</A>
except that it only includes the target= part if $Target is not empty, and only includes $Params if it is not empty. If( session_id() > 0 AND empty( $HTTP_COOKIE_VARS[ 'phpsessid' ] ) it adds 'phpsessid=' . session_id() to $Params, with ? in front of it if $Parms was empty or & if it had a value.
I still use it in most of my php pages. Most of my links look like:
<? anchor( 'Home', "http://$SERVER_NAME/" ) ?>
That might be the quickest thing to do.
> Chris
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
A problem of inexperience...
I am trying to store an array in mysql. I obtain the array like so--
$partcount = count($Area); reset($Area); for ($i = 0; $i < $partcount; $i++){ $key = key($Area); $val = $Area[$key]; $string1 .= $val . "\') or (Area=\'"; next($Area); }
This results, with a bit of coaxing, in an array like this one --
+-----------------------------------------------------+ | Area | +-----------------------------------------------------+ | (Area='1') or (Area='2') or (Area='3') or (Area='') | +-----------------------------------------------------+
Everything is falling into place, *except* these last thirteen characters --
or (Area='')
And that's what I'd like to eradicate.
Tips, suggestions, especially outright code greatly appreciate.
Thanks, Robert p.s.-- I have ordered the Friedl book on Regular Expressions. Hoping it will enlighten me for the future
attached mail follows:
On Tue, 6 Mar 2001 15:50, rpruitt
mid-tn.com wrote:
> A problem of inexperience...
>
> I am trying to store an array in mysql. I obtain the array like so--
>
> $partcount = count($Area);
> reset($Area);
> for ($i = 0; $i < $partcount; $i++){
> $key = key($Area);
> $val = $Area[$key];
> $string1 .= $val . "\') or (Area=\'";
> next($Area);
> }
>
> This results, with a bit of coaxing, in an array like this one --
>
> +-----------------------------------------------------+
>
> | Area |
>
> +-----------------------------------------------------+
>
> | (Area='1') or (Area='2') or (Area='3') or (Area='') |
>
> +-----------------------------------------------------+
>
> Everything is falling into place, *except* these last thirteen
> characters --
>
> or (Area='')
>
> And that's what I'd like to eradicate.
>
> Tips, suggestions, especially outright code greatly appreciate.
>
> Thanks,
> Robert
> p.s.-- I have ordered the Friedl book on Regular Expressions. Hoping it
> will enlighten me for the future
My suggestion would be to not create the empty reference in the firast place :-)
Before starting your loop (but after checking there is something to work with) use the first element of the arra to create the (Area='1') then you can loop through the rest of the array, starting with $i = 1 and create
or (Area='$val')
-- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA
attached mail follows:
I have just started with php a few days ago but in the book that I am reading it uses a foreach loop that is specifically for arrays.
foreach($Area as $key=>$value) { your concatination string here }
Rick
At 04:45 PM 3/6/01 +1030, you wrote:
>On Tue, 6 Mar 2001 15:50, rpruitt
mid-tn.com wrote:
> > A problem of inexperience...
> >
> > I am trying to store an array in mysql. I obtain the array like so--
> >
> > $partcount = count($Area);
> > reset($Area);
> > for ($i = 0; $i < $partcount; $i++){
> > $key = key($Area);
> > $val = $Area[$key];
> > $string1 .= $val . "\') or (Area=\'";
> > next($Area);
> > }
> >
> > This results, with a bit of coaxing, in an array like this one --
> >
> > +-----------------------------------------------------+
> >
> > | Area |
> >
> > +-----------------------------------------------------+
> >
> > | (Area='1') or (Area='2') or (Area='3') or (Area='') |
> >
> > +-----------------------------------------------------+
> >
> > Everything is falling into place, *except* these last thirteen
> > characters --
> >
> > or (Area='')
> >
> > And that's what I'd like to eradicate.
> >
> > Tips, suggestions, especially outright code greatly appreciate.
> >
> > Thanks,
> > Robert
> > p.s.-- I have ordered the Friedl book on Regular Expressions. Hoping it
> > will enlighten me for the future
>
>My suggestion would be to not create the empty reference in the firast
>place :-)
>
>Before starting your loop (but after checking there is something to work
>with) use the first element of the arra to create the (Area='1') then you
>can loop through the rest of the array, starting with $i = 1 and create
>
> or (Area='$val')
>
>--
>David Robley | WEBMASTER & Mail List Admin
>RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
>AusEinet | http://auseinet.flinders.edu.au/
> Flinders University, ADELAIDE, SOUTH AUSTRALIA
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
Addressed to: Rick St Jean <rstjean
internet.look.ca>
php-general
lists.php.net
** Reply to note from Rick St Jean <rstjean
internet.look.ca> Tue, 06 Mar 2001 01:47:05 -0500
A good way to do what you are asking is a combination of the last two suggestions...
if( count( $Area )) { # Don't do anything if there are no entries reset( $Area );
# Handle the first one, with no 'or' list( , $Value ) = each( $Area ); $String = "(Area='$Value')";
# Handle the rest with a leading 'or' while( list( , $Value ) = each( $Area )) { $String .= " or (Area='$Value')"; } }
>
> I have just started with php a few days ago but in the book that I am
> reading it
> uses a foreach loop that is specifically for arrays.
>
>
> foreach($Area as $key=>$value)
> {
> your concatination string here
> }
>
> Rick
>
> At 04:45 PM 3/6/01 +1030, you wrote:
> >On Tue, 6 Mar 2001 15:50, rpruitt
mid-tn.com wrote:
> > > A problem of inexperience...
> > >
> > > I am trying to store an array in mysql. I obtain the array like so--
> > >
> > > $partcount = count($Area);
> > > reset($Area);
> > > for ($i = 0; $i < $partcount; $i++){
> > > $key = key($Area);
> > > $val = $Area[$key];
> > > $string1 .= $val . "\') or (Area=\'";
> > > next($Area);
> > > }
> > >
> > > This results, with a bit of coaxing, in an array like this one --
> > >
> > > +-----------------------------------------------------+
> > >
> > > | Area |
> > >
> > > +-----------------------------------------------------+
> > >
> > > | (Area='1') or (Area='2') or (Area='3') or (Area='') |
> > >
> > > +-----------------------------------------------------+
> > >
> > > Everything is falling into place, *except* these last thirteen
> > > characters --
> > >
> > > or (Area='')
> > >
> > > And that's what I'd like to eradicate.
> > >
> > > Tips, suggestions, especially outright code greatly appreciate.
> > >
> > > Thanks,
> > > Robert
> > > p.s.-- I have ordered the Friedl book on Regular Expressions. Hoping it
> > > will enlighten me for the future
> >
> >My suggestion would be to not create the empty reference in the firast
> >place :-)
> >
> >Before starting your loop (but after checking there is something to work
> >with) use the first element of the arra to create the (Area='1') then you
> >can loop through the rest of the array, starting with $i = 1 and create
> >
> > or (Area='$val')
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
Got a problem with sessions.
On my index page, there's a place for people to login. Well, when I test with two different user names (ie: mike and jlo) it reverts to the first one when login fails. For example: I enter in the username "myuen" and a wrong password. I get my "Password/Username invalid" message which is what I want.
The page refreshes, the username slot already has myuen in it from the last entry, I erase it, enter in a new username "jlo" and the correct password and it will not log me in.
I know once you attempt to login, it saves the username as a session variable. On my index.php page, I have a script that checks if a session exists (particularly the Username), if it exists, destroy it otherwise, continue on. Obviously it's not destroying it once we enter in a wrong username and try to login again.
Any ideas on how to fix this?
Here's my coding: <?PHP if(session_is_registered("CUserName")) session_destroy();
session_register("CUserName"); $CUserNameSession="CUserName";
//SNIP ?>
Thanks, Mike
attached mail follows:
Do you use custom session handlers? Try session_unset() also. It may help.
Regards, Yasuo Ohgaki
> Got a problem with sessions. > > On my index page, there's a place for people to login. Well, when I test > with two different user names (ie: mike and jlo) it reverts to the first > one when login fails. For example: > I enter in the username "myuen" and a wrong password. I get my > "Password/Username invalid" message which is what I want. > > The page refreshes, the username slot already has myuen in it from the > last entry, I erase it, enter in a new username "jlo" and the correct > password and it will not log me in. > > I know once you attempt to login, it saves the username as a session > variable. On my index.php page, I have a script that checks if a session > exists (particularly the Username), if it exists, destroy it otherwise, > continue on. Obviously it's not destroying it once we enter in a wrong > username and try to login again. > > Any ideas on how to fix this? > > Here's my coding: > <?PHP > if(session_is_registered("CUserName")) > session_destroy(); > > session_register("CUserName"); > $CUserNameSession="CUserName"; > > //SNIP > ?>
attached mail follows:
Hi You will need to kill the session data on the exit of your failed login not on entry to the login page as the data will already be overwritten by the previous session value. I use unset($name); unset($password); ...
Tom
At 04:24 PM 6/03/01 +0900, Yasuo Ohgaki wrote:
>Do you use custom session handlers?
>Try session_unset() also. It may help.
>
>Regards,
>Yasuo Ohgaki
>
>
> > Got a problem with sessions.
> >
> > On my index page, there's a place for people to login. Well, when I test
> > with two different user names (ie: mike and jlo) it reverts to the first
> > one when login fails. For example:
> > I enter in the username "myuen" and a wrong password. I get my
> > "Password/Username invalid" message which is what I want.
> >
> > The page refreshes, the username slot already has myuen in it from the
> > last entry, I erase it, enter in a new username "jlo" and the correct
> > password and it will not log me in.
> >
> > I know once you attempt to login, it saves the username as a session
> > variable. On my index.php page, I have a script that checks if a session
> > exists (particularly the Username), if it exists, destroy it otherwise,
> > continue on. Obviously it's not destroying it once we enter in a wrong
> > username and try to login again.
> >
> > Any ideas on how to fix this?
> >
> > Here's my coding:
> > <?PHP
> > if(session_is_registered("CUserName"))
> > session_destroy();
> >
> > session_register("CUserName");
> > $CUserNameSession="CUserName";
> >
> > //SNIP
> > ?>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Does anyone have a sample shopping basket class they could show me, I tried to use one of the phpbuilder site but could not get it working ?
Sean Weissensee
ION Solutions
attached mail follows:
I'm stumped. I've searched all over and can't figure this one out.
I have a perl script that waits for input on the command line. You type in a string and it returns a string.
I'd like to be able to this via php, since I can't rewrite the script in php, since it's a little over my head.
So, how do I open the perl script in php, send it some input and read the output?
Thanks, Matt.
attached mail follows:
Any easy way to make this script take it's input from the command line like so: ./porter_stemming.pl string
where string is the argument?
#!/usr/bin/perl -w
# Porter stemmer in Perl. Few comments, but it's easy to follow against the rules in the original # paper, in # # Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, # no. 3, pp 130-137, # # see also http://www.omsee.com/~martin/stem.html
# Release 1
local %step2list; local %step3list; local ($c, $v, $C, $V, $mgr0, $meq1, $mgr1, $_v);
sub stem { my ($stem, $suffix, $firstch); my $w = shift; if (length($w) < 3) { return $w; } # length at least 3 # now map initial y to Y so that the patterns never treat it as vowel: $w =~ /^./; $firstch = $&; if ($firstch =~ /^y/) { $w = ucfirst $w; }
# Step 1a if ($w =~ /(ss|i)es$/) { $w=$`.$1; } elsif ($w =~ /([^s])s$/) { $w=$`.$1; } # Step 1b if ($w =~ /eed$/) { if ($` =~ /$mgr0/o) { chop($w); } } elsif ($w =~ /(ed|ing)$/) { $stem = $`; if ($stem =~ /$_v/o) { $w = $stem; if ($w =~ /(at|bl|iz)$/) { $w .= "e"; } elsif ($w =~ /([^aeiouylsz])\1$/) { chop($w); } elsif ($w =~ /^${C}${v}[^aeiouwxy]$/o) { $w .= "e"; } } } # Step 1c if ($w =~ /y$/) { $stem = $`; if ($stem =~ /$_v/o) { $w = $stem."i"; } }
# Step 2 if ($w =~ /(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator| alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/) { $stem = $`; $suffix = $1; if ($stem =~ /$mgr0/o) { $w = $stem . $step2list{$suffix}; } }
# Step 3
if ($w =~ /(icate|ative|alize|iciti|ical|ful|ness)$/) { $stem = $`; $suffix = $1; if ($stem =~ /$mgr0/o) { $w = $stem . $step3list{$suffix}; } }
# Step 4
if ($w =~ /(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize )$/) { $stem = $`; if ($stem =~ /$mgr1/o) { $w = $stem; } } elsif ($w =~ /(s|t)(ion)$/) { $stem = $` . $1; if ($stem =~ /$mgr1/o) { $w = $stem; } }
# Step 5
if ($w =~ /e$/) { $stem = $`; if ($stem =~ /$mgr1/o or ($stem =~ /$meq1/o and not $stem =~ /^${C}${v}[^aeiouwxy]$/o)) { $w = $stem; } } if ($w =~ /ll$/ and $w =~ /$mgr1/o) { chop($w); }
# and turn initial Y back to y if ($firstch =~ /^y/) { $w = lcfirst $w; } return $w; }
sub initialise {
%step2list = ( 'ational'=>'ate', 'tional'=>'tion', 'enci'=>'ence', 'anci'=>'ance', 'izer'=>'ize', 'bli'=>'ble', 'alli'=>'al', 'entli'=>'ent', 'eli'=>'e', 'ousli'=>'ous', 'ization'=>'ize', 'ation'=>'ate', 'ator'=>'ate', 'alism'=>'al', 'iveness'=>'ive', 'fulness'=>'ful', 'ousness'=>'ous', 'aliti'=>'al', 'iviti'=>'ive', 'biliti'=>'ble', 'logi'=>'log');
%step3list = ('icate'=>'ic', 'ative'=>'', 'alize'=>'al', 'iciti'=>'ic', 'ical'=>'ic', 'ful'=>'', 'ness'=>'');
$c = "[^aeiou]"; # consonant $v = "[aeiouy]"; # vowel $C = "${c}[^aeiouy]*"; # consonant sequence $V = "${v}[aeiou]*"; # vowel sequence
$mgr0 = "^(${C})?${V}${C}"; # [C]VC... is m>0 $meq1 = "^(${C})?${V}${C}(${V})?" . '$'; # [C]VC[V] is m=1 $mgr1 = "^(${C})?${V}${C}${V}${C}"; # [C]VCVC... is m>1 $_v = "^(${C})?${v}"; # vowel in stem
}
# that's the definition. Run initialise() to set things up, then stem($word) to stem $word, as here:
initialise();
while (<>) { { /^([^a-zA-Z]*)(.*)/ ; print $1; $_ = $2; unless ( /^([a-zA-Z]+)(.*)/ ) { last; } $word = lc $1; # turn to lower case before calling: $_ = $2; $word = stem($word); print $word; redo; } print "\n"; }
# inputs taken from the files on the arg list, output to stdout.
# As an easy speed-up, one might create a hash of word=>stemmed form, and look up each new # word in the hash, only calling stem() if the word was not found there.
attached mail follows:
For data validation, I am using the following regex:
$Status = (ereg("^(^[A-Za-z0-9` !
#$%&()=:;\"\'.?/^|{}-]*)(.*)$", $String,
$List));
This works perfectly for the moment. However, I need to add both square brackets [] to the list of allowed characters above.
But when I add the closinjg bracket ], the regex stops working. There are no errors, but it accepts any and all characters as valid.
How can I add these additional characters to the regex and avoid this problem?
Thanks.
======================================================================
Murray Shields Email: murray
globalcat.com.au
MU Systems Pty Ltd Phone: +61 7 3351 6677
Global Catalogs Pty Ltd Phone: +61 7 3351 4777
attached mail follows:
Did you try escaping it with the \?
At 04:51 PM 3/6/01 +1000, Murray Shields wrote:
>For data validation, I am using the following regex:
>
>$Status = (ereg("^(^[A-Za-z0-9` !
#$%&()=:;\"\'.?/^|{}-]*)(.*)$", $String,
>$List));
>
>This works perfectly for the moment. However, I need to add both square
>brackets [] to the list of allowed characters above.
>
>But when I add the closinjg bracket ], the regex stops working. There are no
>errors, but it accepts any and all characters as valid.
>
>How can I add these additional characters to the regex and avoid this
>problem?
>
>Thanks.
>
>======================================================================
>Murray Shields Email: murray
globalcat.com.au
>MU Systems Pty Ltd Phone: +61 7 3351 6677
>Global Catalogs Pty Ltd Phone: +61 7 3351 4777
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
##########################################################
# Rick St Jean,
# rstjean
internet.look.ca
# President of Design Shark,
# http://www.designshark.com/
# Quick Contact: http://www.designshark.com/messaging.ihtml
# Tel: 905-684-2952
##########################################################
attached mail follows:
> For data validation, I am using the following regex:
>
> $Status = (ereg("^(^[A-Za-z0-9` !
#$%&()=:;\"\'.?/^|{}-]*)(.*)$", $String,
> $List));
>
> This works perfectly for the moment. However, I need to add both square
> brackets [] to the list of allowed characters above.
This is JavaScripts RegEx reference page, http://developer.netscape.com/docs/manuals/communicator/jsref/corea3.htm#115 8210 Any regular expression references will be probably helpful. How about look for some? ([] are meta chars, you need to escape meta chars.)
Regards, Yasuo Ohgaki
>
> But when I add the closinjg bracket ], the regex stops working. There are
no
> errors, but it accepts any and all characters as valid.
>
> How can I add these additional characters to the regex and avoid this
> problem?
>
> Thanks.
>
> ======================================================================
> Murray Shields Email: murray
globalcat.com.au
> MU Systems Pty Ltd Phone: +61 7 3351 6677
> Global Catalogs Pty Ltd Phone: +61 7 3351 4777
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Yes.
> Did you try escaping it with the \?
>
>
> At 04:51 PM 3/6/01 +1000, Murray Shields wrote:
> >For data validation, I am using the following regex:
> >
> >$Status = (ereg("^(^[A-Za-z0-9` !
#$%&()=:;\"\'.?/^|{}-]*)(.*)$",
$String,
> >$List));
> >
> >This works perfectly for the moment. However, I need to add both square
> >brackets [] to the list of allowed characters above.
> >
> >But when I add the closinjg bracket ], the regex stops working. There are
no
> >errors, but it accepts any and all characters as valid.
> >
> >How can I add these additional characters to the regex and avoid this
> >problem?
> >
> >Thanks.
> >
> >======================================================================
> >Murray Shields Email: murray
globalcat.com.au
> >MU Systems Pty Ltd Phone: +61 7 3351 6677
> >Global Catalogs Pty Ltd Phone: +61 7 3351 4777
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> >For additional commands, e-mail: php-general-help
lists.php.net
> >To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> ##########################################################
> # Rick St Jean,
> # rstjean
internet.look.ca
> # President of Design Shark,
> # http://www.designshark.com/
> # Quick Contact: http://www.designshark.com/messaging.ihtml
> # Tel: 905-684-2952
> ##########################################################
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi Guys,
Newbie to the list and the world of PHP.
I'm having a LOT of trouble getting PHP to work.
The PHP and Apache installs have gone well as evidenced by:
# ./httpd -l Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_info.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_so.c mod_setenvif.c mod_ssl.c mod_php4.c mod_perl.c
And httpd.conf has the handlers for php3 and php but whenever I browse to a test php3 file it says:
Fatal error: Call to undefined function: php_info() in test.php3 on line 1
The file looks like:
<?php php_info() ?>
Any ideas on what i should be looking at or for?
Darren
attached mail follows:
Darren Ward wrote: > > ... > > The file looks like: > > <?php php_info() ?> > > Any ideas on what i should be looking at or for? >
Try phpinfo(). :)
-- Pavel a.k.a. Papi
attached mail follows:
Addressed to: Darren Ward <darren.ward
davnet.com.au>
php-general
lists.php.net
** Reply to note from Darren Ward <darren.ward
davnet.com.au> Tue, 6 Mar 2001 18:17:11 +1100
>
> Hi Guys,
>
> Newbie to the list and the world of PHP.
>
> I'm having a LOT of trouble getting PHP to work.
>
> The PHP and Apache installs have gone well as evidenced by:
>
> # ./httpd -l
> Compiled-in modules:
> http_core.c
> mod_env.c
> mod_log_config.c
> mod_mime.c
> mod_negotiation.c
> mod_status.c
> mod_info.c
> mod_include.c
> mod_autoindex.c
> mod_dir.c
> mod_cgi.c
> mod_asis.c
> mod_imap.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_access.c
> mod_auth.c
> mod_so.c
> mod_setenvif.c
> mod_ssl.c
> mod_php4.c
> mod_perl.c
>
> And httpd.conf has the handlers for php3 and php but whenever I browse to a
> test php3 file it says:
>
> Fatal error: Call to undefined function: php_info() in test.php3 on line 1
>
> The file looks like:
>
> <?php php_info() ?>
Try:
<?php phpinfo() ?>
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
Thanks to all who replied, that works fine although only as extenmsion php and not php3 but I'll sort that out.
A second follow up question is where I should place the ini file to change environment variables?
What I've read doesn't work :(
Darren
-----Original Message-----
From: php3
developersdesk.com [mailto:php3
developersdesk.com]
Sent: Tuesday, March 06, 2001 7:57 PM
To: Darren Ward; php-general
lists.php.net
Subject: Re: [PHP] Newbie: Can't find function error.
Addressed to: Darren Ward <darren.ward
davnet.com.au>
php-general
lists.php.net
** Reply to note from Darren Ward <darren.ward
davnet.com.au> Tue, 6 Mar
2001 18:17:11 +1100
>
> Hi Guys,
>
> Newbie to the list and the world of PHP.
>
> I'm having a LOT of trouble getting PHP to work.
>
> The PHP and Apache installs have gone well as evidenced by:
>
> # ./httpd -l
> Compiled-in modules:
> http_core.c
> mod_env.c
> mod_log_config.c
> mod_mime.c
> mod_negotiation.c
> mod_status.c
> mod_info.c
> mod_include.c
> mod_autoindex.c
> mod_dir.c
> mod_cgi.c
> mod_asis.c
> mod_imap.c
> mod_actions.c
> mod_userdir.c
> mod_alias.c
> mod_access.c
> mod_auth.c
> mod_so.c
> mod_setenvif.c
> mod_ssl.c
> mod_php4.c
> mod_perl.c
>
> And httpd.conf has the handlers for php3 and php but whenever I browse to
a
> test php3 file it says:
>
> Fatal error: Call to undefined function: php_info() in test.php3 on line
1
>
> The file looks like:
>
> <?php php_info() ?>
Try:
<?php phpinfo() ?>
Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
attached mail follows:
I try to have the php ldap functions working with SSL , but when the code is executed the apache child die !!! is there anyone with that working
regards
-- __________________________________________________Matthieu LE CORRE SERVICE INFORMATIQUE Ecole Polytechnique de l'Université de Nantes (EPUN) Site de la Chantrerie Rue Christian Pauc BP 50609 44306 Nantes Cedex 3 02 40 68 32 23 __________________________________________________
attached mail follows:
On Tue, Mar 06, 2001 at 09:27:55AM +0100, Matthieu Le Corre wrote: > I try to have the php ldap functions working with SSL , > but when the code is executed the apache child die !!! > is there anyone with that working
Works fine for me. I know one other person with the same problem as you. He also tried with ldapsearch from OpenLDAP 2.0.7 and it crashed, so it seems to be an OpenLDAP problem. Perhaps you should try that as well, just use ldapsearch as usual, but use -H "ldaps://host" rather than -hhost. It then does the same as PHP does, and the result seems to be the same.
In his case, the bug seems to be SASL related. I'm not using SASL and it works. So I advise you to try to compile 2.0.7 without SASL libraries, and try ldapsearch then. I don't know what platform you have, but ldd might show you which libraries your current ldapsearch uses. See also the thread "can't connect to secure LDAP server" on the openldap-software list.
If it crashes, it would be good if you reported the bug at http://www.OpenLDAP.org/its/. Please try to give as much debug info as possible. gdb might help you. In case you don't know how to use gdb, here's some info.
First execute "gdb ldapsearch". You should use the unstripped ldapsearch (openldap-2.0.7/clients/tools/ldapsearch in the source tree). Then on the gdb prompt "(gdb)" type "set args -H ldaps://nwserver.mydomain.com ..." (same arguments as on the command line), and then type run. You should then get some info about where it crashes. When it crashes, type the gdb command "bt". The output will help people know where it crashed. That should be in your bug report.
I've assumed a few things here. If your not using OpenLDAP or ldapsearch doesn't crash, the problem is something else.
Stig
attached mail follows:
Hum the ldapsearch work fine !!! with the command : ldapsearch -x -H "ldaps://xxxxx.xxxx.xx:636" I have got a possitive response from server ! and I don't use SASL ... really don't know why is don't work with php !!!
my box : RH7 KDE2 Apache 1.3.17 php 4.04 pl1 mod_ssl-2.8.0-1.3.17 openssl-devel-0.9.6-1 openssl-0.9.6-1 openldap-devel-2.0.7-11 openldap-2.0.7-2 openldap-clients-2.0.7-12
Le Mardi 6 Mars 2001 09:53, vous avez écrit : > On Tue, Mar 06, 2001 at 09:27:55AM +0100, Matthieu Le Corre wrote: > > I try to have the php ldap functions working with SSL , > > but when the code is executed the apache child die !!! > > is there anyone with that working > > Works fine for me. I know one other person with the same problem as you. > He also tried with ldapsearch from OpenLDAP 2.0.7 and it crashed, so it > seems to be an OpenLDAP problem. Perhaps you should try that as well, > just use ldapsearch as usual, but use -H "ldaps://host" rather than > -hhost. It then does the same as PHP does, and the result seems to be > the same. >
-- __________________________________________________Matthieu LE CORRE SERVICE INFORMATIQUE Ecole Polytechnique de l'Université de Nantes (EPUN) Site de la Chantrerie Rue Christian Pauc BP 50609 44306 Nantes Cedex 3 02 40 68 32 23 __________________________________________________
attached mail follows:
Is "::" used only when referencing on parent class or it has some other funcionality ??? Whaere can I find more documentattion on this topic ???
-------------------------------------------------------------
Milan Mlynarcik
Web Programmer
Charmed Technology Slovakia
Nam. sv. Egidia 16/37
058 01 Poprad, Slovakia
E-mail: mmlynarcik
charmed.sk
Office: 00421 92 7881 874
Mobile: 00421 905 964 535
Web page: http://www.charmed.com/
-------------------------------------------------------------
attached mail follows:
Hi!
Well I need help with something. I have a form which has a ction to a file called actio.php Now When I hit the submit button. It goes to the file and it performs a certain action as seen below:
action.php: is as follows:
<?php
if(isset($userfile)) { echo "$userfile is set"; global $userfile; unset ($userfile); } else { echo "Sorry buddy , Userfile is not set"; }
?>
My main intentyion is to unset the variable so that When the page is REFRESHED or RELOADED. It should execute the else code block.
I am trying to implement it on one of my websites where users can not refresh a particular a page.
Thank You Dhaval Desai
__________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]