php-general Digest 4 Aug 2003 01:23:49 -0000 Issue 2215

Topics (messages 158073 through 158100):

Re: connecting access (*.mdb) database with PHP
        158073 by: Simon Fredriksson

Help with "secure" virtual host setup
        158074 by: Robert Mena

loop and write array
        158075 by: Micah Montoy
        158077 by: Jason Wong

Re: .htaccess
        158076 by: Simone Levy

[Apache Newsletter Draft] News from PHP Project in July, 2003
        158078 by: Tetsuya Kitahata

Not sure of the best way to handle a problem
        158079 by: David Smith

Why does virtual behave like it does?
        158080 by: DvDmanDT

for the love of god, remove me
        158081 by: Joseph Bannon
        158082 by: David Smith
        158087 by: Curt Zirzow

how can I get errors to display in a browser?
        158083 by: jsWalter
        158084 by: Boaz Yahav
        158086 by: Comex
        158088 by: jsWalter

Idiot problem
        158085 by: Ryan A
        158089 by: Curt Zirzow
        158090 by: Comex

[secure PHP] Error handling (again)
        158091 by: thierry lhomme
        158092 by: Curt Zirzow

logging of mail() function?
        158093 by: RiGe
        158094 by: John W. Holmes

Forking PHP Processes on Unix (PHP4)
        158095 by: Damien G

payflow pro with php
        158096 by: Richard Baskett

mail funciton
        158097 by: aculott.attglobal.net
        158100 by: Igor Konforti

Tracking Users via Cookies?
        158098 by: Jason Bourque
        158099 by: Ryan A

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 --- Unless you can find some Access-Class I think ODBC is the way to go. No idea how you can solve it if you're using a *nix server though.

//Simon


Pehepe Php wrote:


how can I connect access database(*.mdb) with php? what is the code? I will be happy if you write php code.


Thank you!


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail




--- End Message ---
--- Begin Message ---
Hi all,

I host some virtual domains within my apache 1.3.x/php
4.3.x setup.

Those domains are mantained by the users via ftp and I
was wondering if I could secure the configuration a
little bit more.  I know that are limitations but the
requirements would be :

a) the user should not be able to access files outside
the DocumentRoot besides system libraries or temporary
files
b) I'd like to have a system wide repository where
common libraries, classes should be accessed without
having to copy and mantain individually
c) Since the user has some php thet perform a file
upload, those scripts must be able to move, rename,
delete files located under the document root

As a starting point the user has a ftp login and the
document root is owned by the login.apache so the user
and the apache can access and alter the contents.

Best regards.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--- End Message ---
--- Begin Message ---
I'm having difficulty in trying to figure out a way to loop through a query
and extract the info from a single column into an array.  Here is what I am
looking for.  In the table, I have a column called keywords that has a
string of information that are separated with a comma.  I am looking for a
way to extract each keyword from the one cell and make a conditional on it.
Otherwise its like this:

Column keywords has in a single cell - TV,television,HDTV,projection
I want to loop through each row cell in the column keywords and write out
each keyword to its own placement to be compared to what the user submits.
I was thinking of something like this but this is as far as I've gotten.

$search_string = $_POST["search"];
$search_string = strip_tags($search_string);
$search_string = strtolower($search_string);
$search_string = str_replace("\n", "", $search_string);
$search_string = strip_chars($search_string); //calls a formula which strips
specific chars
$search_string = str_replace(",", "", $search_string);
$search_string = explode(" ", $search_string);
$search_string = strip_words($search_string); //calls a formula which strips
specific words

$keywords = mssql_query("select keywords from category");

for ($i=0; i < mssql_num_rows($keywords); $i++) {

    $keywords = mssql_result($keywords,0,"keywords");  //this will assign
the full string to the variable keywords

    if ($keywords == $search_string){
        echo ("keyword $keywords found");
    }
}

I can't figure out how to separate each keyword by the comma and then write
that specific keyword to an array to be used.  Any and all help would be
appreciated.

thanks



--- End Message ---
--- Begin Message ---
On Sunday 03 August 2003 21:50, Micah Montoy wrote:

> I can't figure out how to separate each keyword by the comma and then write
> that specific keyword to an array to be used.  Any and all help would be
> appreciated.

explode()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Your car horn will always get stuck when your're behind a group of "Hell's 
Angels"
                -- Murphy's Driving Laws n19
*/


--- End Message ---
--- Begin Message ---
> Just one question, is there any way that when a person logs in via the
> htaccess popup that i can know via my php script...and can i also get
> his
> username?
 
Protect the directory you want with .htaccess
If authentication was successful, your code in index.php is executed:
if($REMOTE_USER=="bill") {echo "welcome Bill!";}
if($REMOTE_USER=="hillary") {echo "welcome Hillary!";}
 
 
> John Holmes, you really think you are being of any help writin':
> <<
> Have you read the chapter on HTTP Authentication? No. Read the very
> first paragraph:
> 
> "The HTTP Authentication hooks in PHP are only available when it is
> running as an Apache module and is hence not available in the CGI
> version. In an Apache module PHP script, it is possible to use the
> header() function to send an "Authentication Required" message to the
> client browser causing it to pop up a Username/Password input window.
> Once the user has filled in a username and a password, the URL
> containing the PHP script will be called again with the predefined
> variables PHP_AUTH_USER, PHP_AUTH_PW, and AUTH_TYPE set to the user
> name, password and authentication type respectively. These predefined
> variables are found in the $_SERVER and $HTTP_SERVER_VARS arrays. Only
> "Basic" authentication is supported. See the header() function for more
> information."
> 
> You're welcome.
> 
> ---John Holmes...
> >>


--- End Message ---
--- Begin Message ---
Dear PHP General List Subscribers, 
(http://www.php.net/)


Hello,

I am now in the process of preparing the first all-Apache-wide newsletter.
http://www.apache.org/newsletter/
'The Apache Newsletter Issue 1' ... ASF-wide-newsletter of July 2003,
 which will be published in the middle of August 2003.

Please feel free to write statement/comment/article etc. to
the Apache Newsletter (Issue 1) using ApacheWiki
or in this mailing list. Hope to hear from you.
http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/Issue1

This 'The Apache Newsletter' will be published as a result of the outgrowth
of the previous 'Jakarta Newsletter' and 'Apache Newsletter' can now
cover all the projects under apache.org including infrastructure,
incubator, xml, webservice, PHP, et cetra.

== WHAT WAS JAKARTA NEWSLETTER?? - http://jakarta.apache.org/site/news/

'The Apache Newsletter Issue 1' will be appeared at
http://www.apache.org/newsletter/200307.html
and the editorial deadline will be 00:00 GMT, 9th August.

ApacheWiki (http://nagoya.apache.org/wiki/apachewiki.cgi) had
been already set up.
If you have anything to be added to the ApacheWiki, please go to
http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/Issue1
and fill up what you want to append in.
If there's nothing news-worthy on your project, then please write
something you *hope* (e.g. XX project will release FINAL version of
XX product in the middle of August, etc etc).

If you have been voted in warmly as a new committer in ASF the
last month (July) please add your name to the list on ApacheWiki.

If your project really want some 'ADVERTISEMENT' (to recruit
new comers, etc etc), please write nice and catchy blurb at the
'advertisement' section so that it will attract the readers'
attentions.

Probably, the former newsletter final draft and newsletter itself
(Jakarta Newsletter Issue 9)
will give you some hints in writing the articles.
cf.
http://nagoya.apache.org/wiki/apachewiki.cgi?JakartaNewsletterDrafts/Issue9
http://jakarta.apache.org/site/news/200305.html

If you have any questions about this, please send your messages to
[EMAIL PROTECTED] or this mailing list.

This Newsletter will be published as webpage and be announced
at [EMAIL PROTECTED] (the ASF-wide announcement list)
To subscribe to [EMAIL PROTECTED],
please follow this instruction:
http://www.apache.org/foundation/mailinglists.html#foundation-announce


Hope to hear from PHP Project!!
(If you feel hesitation in writing articles on ApacheWiki, please
write your memo in this mailing list or give me a note).
http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheNewsletterDrafts/Issue1

<<Note>>: PHP Project's Wikipage is here:
http://nagoya.apache.org/wiki/apachewiki.cgi?PHPProjectPages

Sincerely,

-- Tetsuya Kitahata ([EMAIL PROTECTED])

P.S. Contributions from anyone are cordially invited!!


-----------------------------------------------------
Tetsuya Kitahata --  Terra-International, Inc.
E-mail: [EMAIL PROTECTED]
http://www.terra-intl.com/
(Apache Jakarta Translation, Japanese)
http://jakarta.terra-intl.com/


--- End Message ---
--- Begin Message ---
Hi:
I have a slight problem that I'm not sure where to begin. I have
multiple files on another server other then my linux box that needs to
be renamed. These files are used under a particular software package and
I am trying to switch them to another software package which would
require them to be renamed. Now here is the catch. I really can't
install apache, php, or perl on the system (windows) or it will bog down
the software (which automates a radio station). What I need is to find
out if any of you have ever accessed a remote system (perhaps from the
command-line interface) and changed file names. I need to be able to
remove numbers a pluses. The numbers can be replaced with essentially
nothing. The pluses need to be replaced with spaces. Any ideas. I'm a
little new to PHP so I'm not sure if the best method would be to use the
command-line option or if I should find another solution altogether.
(I'm just more familar with php then perl and hate vb.)
David


--- End Message ---
--- Begin Message ---
Here's what I tried:

function buf($cmd)
{
ob_start();
preg_replace("#e#e",$cmd,"e");
$ret=ob_get_contents();
ob_end_clean();
return $ret;
}
ob_start();
$contents=buf('virtual("/test/")');

I tried the buf() function with print() and it worked as expected... Now,
why does virtual teminate ob? I think it would be better with the
possibility to parse the output some... Why? Cause I access my Tomcat from
Apache and Tomcat must generate a XML page that would basicly need to be
parsed...

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]



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


This page is useless, you can't remove yourself.

J. 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

--- End Message ---
--- Begin Message ---
It's not usless if you read the page. 
[EMAIL PROTECTED]
On Sun, 2003-08-03 at 13:45, Joseph Bannon wrote:
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> This page is useless, you can't remove yourself.
> 
> J. 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com


--- End Message ---
--- Begin Message ---
* Thus wrote Joseph Bannon ([EMAIL PROTECTED]):
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> This page is useless, you can't remove yourself.

Internet technology hasn't gotten far enough to read the minds of
users.

If maybe you actually read the page you might have figured out that
it tells how to unsubscribe to the list, several different ways if
i might add.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
I have a test script, with deliberate errors.

The broswer shows nothing, blank, empty.

It used to show errors, now it does not.

No idea what I did to turn it off.

Can someone tell me hoew to turn it back on?

In my php.ini file, it says...

     error_reporting  =  E_ALL

I thought that was what it needed.

I guess not.

Thanks

walter




--- End Message ---
--- Begin Message ---
Try adding : 

error_reporting(2039); as the 1st line in your file.


Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


-----Original Message-----
From: jsWalter [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 03, 2003 9:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how can I get errors to display in a browser?


I have a test script, with deliberate errors.

The broswer shows nothing, blank, empty.

It used to show errors, now it does not.

No idea what I did to turn it off.

Can someone tell me hoew to turn it back on?

In my php.ini file, it says...

     error_reporting  =  E_ALL

I thought that was what it needed.

I guess not.

Thanks

walter




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

 


--- End Message ---
--- Begin Message ---
display_errors

"Jswalter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a test script, with deliberate errors.
>
> The broswer shows nothing, blank, empty.
>
> It used to show errors, now it does not.
>
> No idea what I did to turn it off.
>
> Can someone tell me hoew to turn it back on?
>
> In my php.ini file, it says...
>
>      error_reporting  =  E_ALL
>
> I thought that was what it needed.
>
> I guess not.
>
> Thanks
>
> walter
>
>
>



--- End Message ---
--- Begin Message ---
"Comex" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

> display_errors

Bingo!

thanks

walter




--- End Message ---
--- Begin Message ---
Hi,
Will someone please remove this jackass from the list? everytime I write to
the list if its with a question or with an answer I get this message:

Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])



According to what was said on the list a few days back he has been kicked
out from two other lists for spamming...will someone in charge please see to
this? its frustrating and irritating.

-Ryan


We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



--- End Message ---
--- Begin Message ---
* Thus wrote Ryan A ([EMAIL PROTECTED]):
> Hi,
> Will someone please remove this jackass from the list? everytime I write to
> the list if its with a question or with an answer I get this message:
> 
> Transmit Report:
> 
>  To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
Heh.. this is still happening?  I've got him to be filtered to
/dev/null.

> 
> 
> 
> According to what was said on the list a few days back he has been kicked
> out from two other lists for spamming...will someone in charge please see to
> this? its frustrating and irritating.

If I recall the lists have a spam filtering system applied to the
system. Unfortantly this address seems to have slipped through the
cracks.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
<[EMAIL PROTECTED]>
Ryan A:
> everytime I
> write to the list if its with a question or with an answer I get this
> message: 

Can't you just set a message rule?

--- End Message ---
--- Begin Message ---
Hi !

I still have found no satisfying solution to my problem yet...

At home, when an error occurs in an script I got something like this :

Warning: unlink() failed (No such file or directory) in c:\program
files\easyphp\www\php_scripts\index.php on line 356

but my provider in the same case delivers this :

Warning: unlink() failed (No such file or directory) in index.php on line
347

... and that's much better, don't you think ?!

The question is : How do they do that ??

The answer is apparently NOT in the php.ini file...


My provider runs PHP 4.2.2
... and Apache/1.3.26 (Unix) Debian GNU/Linux mod_fastcgi/2.2.12
mod_perl/1.26


Thanx a lot for your ideas !!



--- End Message ---
--- Begin Message ---
* Thus wrote thierry lhomme ([EMAIL PROTECTED]):
> Hi !
> 
> I still have found no satisfying solution to my problem yet...
> 
> At home, when an error occurs in an script I got something like this :
> 
> Warning: unlink() failed (No such file or directory) in c:\program
> files\easyphp\www\php_scripts\index.php on line 356
> 
> but my provider in the same case delivers this :
> 
> Warning: unlink() failed (No such file or directory) in index.php on line
> 347
> 
> ... and that's much better, don't you think ?!
> 
> The question is : How do they do that ??

I don't think they are doing anything special, it might just be
system dependent.

You could create your custom error with:

http://php.net/set-error-handler


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

--- End Message ---
--- Begin Message ---
Is there possible to log outgoing mails sent via mail() function? I need to
know, when, which script (can be path to php file on server) and receipt of
mail that was sent.

Is there possible?

Thanx.

RiGe



--- End Message ---
--- Begin Message --- RiGe wrote:
Is there possible to log outgoing mails sent via mail() function? I need to
know, when, which script (can be path to php file on server) and receipt of
mail that was sent.

Is there possible?

Not directly, unless your SMTP server is keeping a log.


Write your own wrapper function my_mail() that does the logging and also sends the mail.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





--- End Message ---
--- Begin Message ---
Hi Readers,

Heres what i'm trying to achieve:

A script, that uses multiple fsockopen()'s and simltaniously get feedback
from each socket from fget()s. Now, since using a single fget() needs to be
in a loop then it's not possible to have more than one loop going at the
same time.

I was thinking of using a break command, then getting feedback from the
other loops, and breaking each of them inside a encapsulating loop -
however, this is VERY ineffective.

What I thought about doing was just using the same script launched multiple
times, so it has diffrent proccesses running and therefore would be able to
complete the task of having multiple loops running at the same time on the
same system.

The problem I've found out is that on Unix (the desired OS breed), PHP can't
be forked - so using a start.php script to execute multiple system() calls
wouldn't work becuase PHP waits till the system() function has finished
before carrying on with the rest of start.php.

i.e. The following won't work:


PHP:------------------------------------------------------------------------
------
for ($i = 0; $i < 5; $i++) {
  system ("/path/to/php /path/to/script.php &");
}

----------------------------------------------------------------------------
--

Basically, i'm asking if anyone has a work around, or alternativley a answer
to my problem?

I'd much appritiate it, or any help you can contribute.

Thanks in advance, or for atleast reading to this point

-Damien


begin 666 smile.gif
M1TE&.#EA#P`/`+,.`+R[N\;%Q?+R\L' P/S\_.SL[,S+R]+1T??W]]_?W^;F
MYMG8V/___P```*2DI ```"'Y! $```X`+ `````/``\```16T$G9:IW85<;Y
MQ0TACF,S-4BJKHBI"4(%QPUL-D5>Y<6N-XJ@<"BL)([()+*R:#J?SLKAT)A:
BIU6JQF!H<+_>+B5 ME3(`9=FP&ZWU90&8#[_9#3F3 0`.P``
`
end


--- End Message ---
--- Begin Message ---
Ok I am having some serious problems with payflow pro..  Has anybody else
had the problem that when you execute the test.sh script it works fine, but
when you do the exact same thing in php it gives you a failed to connect
response message?  If so what in the world did you do to get it to work?

Thanks!

Rick

A sense of humor can help you over look the unattractive, tolerate the
unpleasant, cope with the unexpected, and smile through the unbearable. -
Moshe Waldoks


--- End Message ---
--- Begin Message ---
hope i am sending my problem to the right place
recently installed PHP with Apache , on Windows 2000 paltform,,all is well, but cnat 
seem to get the mail() fucntion working

i made the chagnes in php.ini
SMTP set to my outgoing email server, that i have with myu ISP
and
sendmail_from with my emai address
what else do i need?
andy

--- End Message ---
--- Begin Message --- Try weed


On Sun, 3 Aug 2003 13:06:33 -0700, <[EMAIL PROTECTED]> wrote:


hope i am sending my problem to the right place
recently installed PHP with Apache , on Windows 2000 paltform,,all is well, but cnat seem to get the mail() fucntion working


i made the chagnes in php.ini
SMTP set to my outgoing email server, that i have with myu ISP
and
sendmail_from with my emai address
what else do i need?
andy




-- Igor Konforti

--- End Message ---
--- Begin Message ---
Hello,

I hope someone can answer this. I have a client that would like to track
their visitors if they go to other competitors websites after visiting their
own.

Is this possible? I think it is possible to track where they go in the site
visited. . .

I know that tracking isn't a good idea but I want to give my client an
informed answer on what is possible, then let them know the implications of
privacy invasion.

Thanks for any responses.

Jason Bourque


--- End Message ---
--- Begin Message ---
Hey,
As far as i know you cant do that, you can see from where they have come
(ie. where they have visited before coming to you) but not after they leave
your site unless they return.

/*
>I want to give my client an
> informed answer on what is possible, then let them know the implications
of
> privacy invasion.
*/
Yeah right, we belive you. :-D

Cheers,
-Ryan

We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com


----- Original Message -----
From: "Jason Bourque" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 04, 2003 1:58 AM
Subject: [PHP] Tracking Users via Cookies?


> Hello,
>
> I hope someone can answer this. I have a client that would like to track
> their visitors if they go to other competitors websites after visiting
their
> own.
>
> Is this possible? I think it is possible to track where they go in the
site
> visited. . .
>
> I know that tracking isn't a good idea but I want to give my client an
> informed answer on what is possible, then let them know the implications
of
> privacy invasion.
>
> Thanks for any responses.
>
> Jason Bourque
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---

Reply via email to