php-general Digest 26 Mar 2003 17:27:57 -0000 Issue 1961

Topics (messages 141052 through 141084):

imap_open Error
        141052 by: Brian Mitchell

Re: NewB Q on Arrays.
        141053 by: chris
        141057 by: Frappy John

Re: session id
        141054 by: Uttam

Re: ho to remove an empty space
        141055 by: chris

Re: connecting to mysql db
        141056 by: Uttam

help with preg_replace please
        141058 by: Justin French
        141059 by: Jason Wong
        141060 by: Jason Paschal
        141078 by: CPT John W. Holmes

Passing data between the web to an Intranet
        141061 by: Steve Jackson
        141062 by: Nikunj Virani
        141063 by: Jason Wong
        141065 by: Steve Jackson
        141073 by: Jason Wong
        141074 by: skate

Installation
        141064 by: Daniel Perry
        141066 by: Nikunj Virani
        141081 by: Joel Colombo

Re: can i ask?
        141067 by: Awlad Hussain

Re: Formatting code.
        141068 by: Awlad Hussain

Re: Object Aggregation - does anyone have experience with it?
        141069 by: Evan Nemerson

ldap_read() and 'No such object'
        141070 by: Turbo Fredriksson

Installation Problem
        141071 by: bob pilly

best way to throw erorrs within a class
        141072 by: Dan Rossi

mysql_fetch_* and stripslashes
        141075 by: Aaron Dalton
        141076 by: Tom Rogers
        141077 by: Aaron Dalton

Freetds + php 4.3.1
        141079 by: Damien Croarken

Re: PHP & grep
        141080 by: Chris Blake

Checkbox
        141082 by: shaun

Re: Zip Way of life.
        141083 by: Marek Kilimajer

Re: substr() on part an ereg() capture
        141084 by: Marek Kilimajer

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'm using the following code to try to open a stream to access my email: 
  
$user_id = "userid"; 
$password = "password"; 
$inbox = @imap_open("{mail.host.com:143}INBOX", $user_id, $password); 
  
I've verified the correct username, password, hostname combination by setting up an 
IMAP account through Outlook Express. 
  
However, whenever I try and open the page that this code sits on I get a "The Page 
Cannot Be Displayed" error.  Specifically, it says that it cannot find the server or 
DNS error.  I can comment out the imap_open line and the page will load fine.  Also, 
I've asked my host and verified that the imap functions are available as part of PHP.  
I can't figure out why this is happening.  Any help would be greatly appreciated. 
  
Thanks, 
Brian 

--- End Message ---
--- Begin Message --- On Tue, 25 Mar 2003 21:18:48 +1000, Inpho <[EMAIL PROTECTED]> wrote:

Hey All,

I'm still a newB in php and mysql so I'm asking for your patience up front.

i want to get a list of results from an array, which I can do with:

$result=mysql_query("select * from mvlogtbl",$db);
while ($row=mysql_fetch_array($result)){
echo "$row[uid] $row[mvid]";
}

basically what I have is a database of movies linked to .avi files that are
setup for streaming, the table mvlogtbl keeps a log of who has watched what.


What i want to be able to do is determine if a certain user has watched a
movie. But there are multiple entries for each user, a user may have watched
the movie more than once, I don't really care, I just want to be able to
tell if they have watched it or not...


any help?

Thanls

- paul -


// pseudo code starts here...
// use php to read the contents of the avi and set the header of the php doc
// to match headers necessary for an avi (check the fread/fwrite documentation)
// when it downloads, set the member_has_watched field for that member to
// true or 1 or whatever...


select count(*) from table where member_has_watched = TRUE and member_id = the_member's_id

if ($count > 0) {
        // the member has watched it
} else {
        // the member has not watched it
}

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--- End Message ---
--- Begin Message ---
> What i want to be able to do is determine if a certain
> user has watched a movie. 

If you want to check the log to see if a single user has 
viewed a particular movie, then include the user and movie 
in the select statement:

select uid, mvid from mvlogtbl where uid = $userID and mvid 
= $movieID

If mysql_num_rows > zero, then user has watched this movie.

Better still:

select count(uid) from mvlogtbl where uid = $userID and 
mvid = $movieID

Here one row will be returned containing the number of 
times the user has viewed the movie. 

--Frappy



On Tuesday 25 March 2003 06:18 am, inpho wrote:
> Hey All,
>
> I'm still a newB in php and mysql so I'm asking for your
> patience up front.
>
> i want to get a list of results from an array, which I
> can do with:
>
> $result=mysql_query("select * from mvlogtbl",$db);
> while ($row=mysql_fetch_array($result)){
> echo "$row[uid] $row[mvid]";
> }
>
> basically what I have is a database of movies linked to
> .avi files that are setup for streaming, the table
> mvlogtbl keeps a log of who has watched what.
>
> What i want to be able to do is determine if a certain
> user has watched a movie. But there are multiple entries
> for each user, a user may have watched the movie more
> than once, I don't really care, I just want to be able to
> tell if they have watched it or not...
>
> any help?
>
> Thanls
>
> - paul -

--- End Message ---
--- Begin Message ---
session_start();
should be on the first line in the script.

regds,

-----Original Message-----
From: Iggy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 20:08
To: [EMAIL PROTECTED]
Subject: session id


can somebody tell me why I am getting this:
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on
line 21

Warning: session_start() [function.session-start]: Cannot send session
cache
limiter - headers already sent (output started at
c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on
line 21


when I use this code:

session_start();
if (!isset($_SESSION['count'])) {
    $_SESSION['count'] = 0;
}


PHP is version 4.3.1

thanx




--- End Message ---
--- Begin Message --- On Mon, 24 Mar 2003 22:10:28 -0800, Webdev <[EMAIL PROTECTED]> wrote:

somehow when I have try to develop an application where I read five or six
values into an individual arrays the array who carries the emails has the
email and an additional empty field after the email somehow complex well
they way the information has been stored is that the email was the last
value in the line of arrays and somehow carries always an empty field or the
tab field I can see when I upload the data in binary mode however I tried
around for some time



how do remove an empty space in an erray I tried arround with


$E2= str_replace(" ", "", $Email);

and I tried as well
$E2= str_replace("&nbsp;", "", $Email); with no success it totally ignored
the empty space in the email what is stored in this
way:|data1|data2|[EMAIL PROTECTED] |data3|etc...|||||||. when I phrased
the data file
any help and advice would be appreciated...




Are you certain it is a space and not something like a linebreak? If it's at the end of the line, you might consider ltrim or rtrim, which would eliminate most whitespace characters from the beginning or ending of the string.


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--- End Message ---
--- Begin Message ---
Yes, It is necessary because script executes & ends for every request.

Variables can be made persistent by using cookie/sessions but mysql
connection is a resource which can not be saved & restored as session
variable.

For efficient use of resources, you may use mysql_pconnect() (only when php
is used as module), but still you have to use it in every script.  The only
difference is that mysql_pconnect() will
*use any previously open mysql connection & use it instead of making fresh
connection to mysql
*if a fresh connection is made, it will not be closed when script ends.

regds,
-----Original Message-----
From: Iggy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 19:20
To: [EMAIL PROTECTED]
Subject: connecting to mysql db


hi,
I am trying to play and learn php along with mysql and I have a question
about connecting to a db.
Is the following code necessary on every php page where I am retrieving
some
data from a db or is there any way to connect once (something like
index.php) and have that connection open through subsequent pages?
the code
<?php
$link = mysql_connect("localhost", "", "")
        or die("Could not connect: " . mysql_error());
    print ("Connected successfully");

mysql_select_db("test")
        or die("Could not select database: " . mysql_error());
?>

thanx
iggy


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

Total newbie on reg exps, and even worse with preg!!!

I get the following error:

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
/usr/local/apache/htdocs/lib/lib_string.inc on line 218

Using this code:
$str = 
preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", "<a
href=\"{$1}://{$2}{$3}\">{$2}{$3}</a>", $str);


Can anyone point to the problem?


The aim is to perform functions on $2 & $3.

TIA
Justin French


--- End Message ---
--- Begin Message ---
On Wednesday 26 March 2003 13:59, Justin French wrote:

> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /usr/local/apache/htdocs/lib/lib_string.inc on line 218
>
> Using this code:
> $str =
> preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", "<a
> href=\"{$1}://{$2}{$3}\">{$2}{$3}</a>", $str);

You seem to be using ereg syntax in a PCRE function! Replace them with their 
proper PCRE counterparts.

Eg to match alphanumeric:

 [0-9|a-z|A-Z]  // off the top of my head, untested

etc.

-- 
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
------------------------------------------
/*
Real Users never know what they want, but they always know when your program
doesn't deliver it.
*/


--- End Message ---
--- Begin Message ---
what that guy said, or use ereg_replace instead of preg_...






From: Jason Wong <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] help with preg_replace please
Date: Wed, 26 Mar 2003 14:08:44 +0800

On Wednesday 26 March 2003 13:59, Justin French wrote:

> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /usr/local/apache/htdocs/lib/lib_string.inc on line 218
>
> Using this code:
> $str =
> preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", "<a
> href=\"{$1}://{$2}{$3}\">{$2}{$3}</a>", $str);


You seem to be using ereg syntax in a PCRE function! Replace them with their
proper PCRE counterparts.


Eg to match alphanumeric:

[0-9|a-z|A-Z] // off the top of my head, untested

etc.

--
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
------------------------------------------
/*
Real Users never know what they want, but they always know when your program
doesn't deliver it.
*/



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



_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



--- End Message ---
--- Begin Message ---
> I get the following error:
>
> Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
> /usr/local/apache/htdocs/lib/lib_string.inc on line 218
>
> Using this code:
> $str =
> preg_replace("!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])!ei", "<a
> href=\"{$1}://{$2}{$3}\">{$2}{$3}</a>", $str);

Since you're using the 'e' modifier, the "replacement" string needs to be
valid PHP code. So, it should start with a variable or a function. A
replacement such as:

'print("<a href="{$1} .. ")'

should work.

I didn't get a chance to answer you original question. I couldn't even get
that regular expression to match links in any tests that I did, but if it's
working for you, that's good. Couldn't you modify the expression to look for
0-60 characters that are not a space, followed by any amount of characters
that are not a space, and only actually match the first 0-60 to use in your
replacement string? Something like:

([^[:space:]]{0,60})[^[:space:]]*

Which will match up to 60 characters in $2 for example, and also allow form
more characters than that, but just not match them. This is assuming what
everyone else said is right and you fix the entire regex to match the preg
syntax...

---John Holmes...


--- End Message ---
--- Begin Message ---
Has anyone ever simply tried to pass information direct from the web
into a secure Intranet mysql DB rather than to a web DB? 

I am thinking down one of three lines.
1) I use PHP to send an email with the data in it and update our
internal DB manually (the worst case)
2) I use PHP which takes data, sends it as an email, puts it into a form
which then automatically updates our internal network (interesting idea
but I have no clue if it can be done ;o)
3) I use some sort of synchronisation so every time the web DB is
updated our internal one is also updated (ideal).

I would welcome any other ideas or solutions. Does mysql have any
replication or synchronisation functions? I am told Oracle has but
haven't seen this or heard of this with mysql.

Cheers,

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159


--- End Message ---
--- Begin Message ---
> 3) I use some sort of synchronisation so every time the web DB is
> updated our internal one is also updated (ideal).

Check out!
http://www.mysql.com/doc/en/Replication.html

Regards,
Nikunj Virani
----- Original Message ----- 
From: "Steve Jackson" <[EMAIL PROTECTED]>
To: "MySQL General Mailing list" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 12:58 PM
Subject: [PHP] Passing data between the web to an Intranet


> Has anyone ever simply tried to pass information direct from the web
> into a secure Intranet mysql DB rather than to a web DB? 
> 
> I am thinking down one of three lines.
> 1) I use PHP to send an email with the data in it and update our
> internal DB manually (the worst case)
> 2) I use PHP which takes data, sends it as an email, puts it into a form
> which then automatically updates our internal network (interesting idea
> but I have no clue if it can be done ;o)
> 3) I use some sort of synchronisation so every time the web DB is
> updated our internal one is also updated (ideal).
> 
> I would welcome any other ideas or solutions. Does mysql have any
> replication or synchronisation functions? I am told Oracle has but
> haven't seen this or heard of this with mysql.
> 
> Cheers,
> 
> Steve Jackson
> Web Developer
> Viola Systems Ltd.
> http://www.violasystems.com
> [EMAIL PROTECTED]
> Mobile +358 50 343 5159
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 



--- End Message ---
--- Begin Message ---
On Wednesday 26 March 2003 15:28, Steve Jackson wrote:
> Has anyone ever simply tried to pass information direct from the web
> into a secure Intranet mysql DB rather than to a web DB?

Haven't the faintest idea what you mean by "direct from the web" and "a secure 
Intranet mysql db" and "web DB". 

> I am thinking down one of three lines.
> 1) I use PHP to send an email with the data in it and update our
> internal DB manually (the worst case)

Can be done pretty easily.

> 2) I use PHP which takes data, sends it as an email, puts it into a form
> which then automatically updates our internal network (interesting idea
> but I have no clue if it can be done ;o)

Not sure what you mean here. How is it different from the above?

> 3) I use some sort of synchronisation so every time the web DB is
> updated our internal one is also updated (ideal).

See mysql replication.

> I would welcome any other ideas or solutions. Does mysql have any
> replication or synchronisation functions? I am told Oracle has but
> haven't seen this or heard of this with mysql.

Did you actually do any research? I'm sure if you google for "mysql 
replication" or "mysql synchronisation" you would get thousands of hits.

--- End Message ---
--- Begin Message ---
> Haven't the faintest idea what you mean by "direct from the 
> web" and "a secure 
> Intranet mysql db" and "web DB". 
> 

Sorry. What I mean is that we have an externally hosted website.
Currently all the forms etc update tables in the web hosted mysql DB. I
am in the process of building a small CRM system and want the data to
drop into our non public domain Intranet server. Is this possible?

> > I am thinking down one of three lines.
> > 1) I use PHP to send an email with the data in it and update our 
> > internal DB manually (the worst case)
> 
> Can be done pretty easily.
> 

I know but I don't want to have to manually update data from emails to
our Intranet server.

> > 2) I use PHP which takes data, sends it as an email, puts it into a 
> > form which then automatically updates our internal network 
> > (interesting idea but I have no clue if it can be done ;o)
> 
> Not sure what you mean here. How is it different from the above?
> 

I was thinking that I may be able to *automatically* take the data from
emails and put them through a form (hosted internally) which would then
update our DB here. I just don't know whether it's possible to do or
where to start.

> > 3) I use some sort of synchronisation so every time the web DB is 
> > updated our internal one is also updated (ideal).
> 
> See mysql replication.
> > I would welcome any other ideas or solutions. Does mysql have any 
> > replication or synchronisation functions? I am told Oracle has but 
> > haven't seen this or heard of this with mysql.
> 
> Did you actually do any research? I'm sure if you google for "mysql 
> replication" or "mysql synchronisation" you would get 
> thousands of hits.

Yes I did but am not really understanding it which is why I asked here.
Sorry if that offends you.


--- End Message ---
--- Begin Message ---
On Wednesday 26 March 2003 16:40, Steve Jackson wrote:

> Sorry. What I mean is that we have an externally hosted website.
> Currently all the forms etc update tables in the web hosted mysql DB. I
> am in the process of building a small CRM system and want the data to
> drop into our non public domain Intranet server. Is this possible?

OK. Yes, some of the possible solutions are as below:

> > > I am thinking down one of three lines.
> > > 1) I use PHP to send an email with the data in it and update our
> > > internal DB manually (the worst case)
> >
> > Can be done pretty easily.
>
> I know but I don't want to have to manually update data from emails to
> our Intranet server.

Manually? What I meant was that it's pretty easy to send an email to a server 
and have a script process the email. Thus the script will parse the contents 
of the mail and update the db accordingly. Search the archives for "process 
mail", I have some old posts which outline how this can be done.

> > > 2) I use PHP which takes data, sends it as an email, puts it into a
> > > form which then automatically updates our internal network
> > > (interesting idea but I have no clue if it can be done ;o)
> >
> > Not sure what you mean here. How is it different from the above?
>
> I was thinking that I may be able to *automatically* take the data from
> emails and put them through a form (hosted internally) which would then
> update our DB here. I just don't know whether it's possible to do or
> where to start.

See above.

> > > 3) I use some sort of synchronisation so every time the web DB is
> > > updated our internal one is also updated (ideal).
> >
> > See mysql replication.
> >
> > > I would welcome any other ideas or solutions. Does mysql have any
> > > replication or synchronisation functions? I am told Oracle has but
> > > haven't seen this or heard of this with mysql.
> >
> > Did you actually do any research? I'm sure if you google for "mysql
> > replication" or "mysql synchronisation" you would get
> > thousands of hits.
>
> Yes I did but am not really understanding it which is why I asked here.
> Sorry if that offends you.

With all due respect that is not what you asked. In any case for help on 
mysql's replication feature you should ask on the mysql list.

-- 
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
------------------------------------------
/*
does your DRESSING ROOM have enough ASPARAGUS?
*/


--- End Message ---
--- Begin Message ---
as another solution (and not knowing mysql replication myself, so can't
comment on this) you could connect remotely to your MySQL database that is
on your intranet, and dump the data straight into it. it really depends how
open to the world that system is, or can be, and how security concious you
are.

or you could have some kinda XML output or DB dump from the online website
available, and have your local CRM machine access that every 5 minutes or
less...

just 2 other solutions, maybe not the best, but they'd do the job...


----- Original Message -----
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 10:53 AM
Subject: Re: [PHP] Passing data between the web to an Intranet


> On Wednesday 26 March 2003 16:40, Steve Jackson wrote:
>
> > Sorry. What I mean is that we have an externally hosted website.
> > Currently all the forms etc update tables in the web hosted mysql DB. I
> > am in the process of building a small CRM system and want the data to
> > drop into our non public domain Intranet server. Is this possible?
>
> OK. Yes, some of the possible solutions are as below:
>
> > > > I am thinking down one of three lines.
> > > > 1) I use PHP to send an email with the data in it and update our
> > > > internal DB manually (the worst case)
> > >
> > > Can be done pretty easily.
> >
> > I know but I don't want to have to manually update data from emails to
> > our Intranet server.
>
> Manually? What I meant was that it's pretty easy to send an email to a
server
> and have a script process the email. Thus the script will parse the
contents
> of the mail and update the db accordingly. Search the archives for
"process
> mail", I have some old posts which outline how this can be done.
>
> > > > 2) I use PHP which takes data, sends it as an email, puts it into a
> > > > form which then automatically updates our internal network
> > > > (interesting idea but I have no clue if it can be done ;o)
> > >
> > > Not sure what you mean here. How is it different from the above?
> >
> > I was thinking that I may be able to *automatically* take the data from
> > emails and put them through a form (hosted internally) which would then
> > update our DB here. I just don't know whether it's possible to do or
> > where to start.
>
> See above.
>
> > > > 3) I use some sort of synchronisation so every time the web DB is
> > > > updated our internal one is also updated (ideal).
> > >
> > > See mysql replication.
> > >
> > > > I would welcome any other ideas or solutions. Does mysql have any
> > > > replication or synchronisation functions? I am told Oracle has but
> > > > haven't seen this or heard of this with mysql.
> > >
> > > Did you actually do any research? I'm sure if you google for "mysql
> > > replication" or "mysql synchronisation" you would get
> > > thousands of hits.
> >
> > Yes I did but am not really understanding it which is why I asked here.
> > Sorry if that offends you.
>
> With all due respect that is not what you asked. In any case for help on
> mysql's replication feature you should ask on the mysql list.
>
> --
> 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
> ------------------------------------------
> /*
> does your DRESSING ROOM have enough ASPARAGUS?
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



--- End Message ---
--- Begin Message ---
Dear Sir
 
I require a complete installation package if possible.  I am operating
XP Pro, but unfortunately not IIS.  The problems that I have experienced
trying to obtain IIS has made me decide to use Apache as my web server
along with PHP and MySQL.  
 
Please would you provide a direct link that will allow a complete
installation of the three so that I can begin working on my Website?  I
have visited the website and installation page, although a good
advertisement for a complete packageis present there is no way to
download the files.
 
A second question I have; I have Studio MX (Dreamweaver MX, Flash MX,
Fireworks etc), within a menu there is an option to select PHP pages
(build a PHP page etc)  does this mean that I can design my page in
Dreamweaver then as I would have the installation (as above) I could
then view my pages?
 
Please advise.  Thankyou for your time.
 
Kind regards
Daniel Perry
 
Innovative Design
[EMAIL PROTECTED]
Tel: 0210 387 852
 

--- End Message ---
--- Begin Message ---
> I require a complete installation package if possible.  I am operating
> XP Pro, but unfortunately not IIS.  The problems that I have experienced
> trying to obtain IIS has made me decide to use Apache as my web server
> along with PHP and MySQL.

> Please would you provide a direct link that will allow a complete
> installation of the three so that I can begin working on my Website?  I
> have visited the website and installation page, although a good
> advertisement for a complete packageis present there is no way to
> download the files.

Foxserv is good one:
http://www.foxserv.net/portal.php
http://twtelecom.dl.sourceforge.net/sourceforge/foxserv/FoxServ-3.0.exe

> A second question I have; I have Studio MX (Dreamweaver MX, Flash MX,
> Fireworks etc), within a menu there is an option to select PHP pages
> (build a PHP page etc)  does this mean that I can design my page in
> Dreamweaver then as I would have the installation (as above) I could
> then view my pages?
>
Yes. You must put the php files inside your DocumentRoot of your apache
installation. Dreamweaver can be used to design PHP Pages.

Regards,
NIkunj Virani



--- End Message ---
--- Begin Message ---
Here is the whole setup simple step-by-step even for PERL if you want !

http://www.ricocheting.com/server/apache.html

Joel


"Daniel Perry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dear Sir
>
> I require a complete installation package if possible.  I am operating
> XP Pro, but unfortunately not IIS.  The problems that I have experienced
> trying to obtain IIS has made me decide to use Apache as my web server
> along with PHP and MySQL.
>
> Please would you provide a direct link that will allow a complete
> installation of the three so that I can begin working on my Website?  I
> have visited the website and installation page, although a good
> advertisement for a complete packageis present there is no way to
> download the files.
>
> A second question I have; I have Studio MX (Dreamweaver MX, Flash MX,
> Fireworks etc), within a menu there is an option to select PHP pages
> (build a PHP page etc)  does this mean that I can design my page in
> Dreamweaver then as I would have the installation (as above) I could
> then view my pages?
>
> Please advise.  Thankyou for your time.
>
> Kind regards
> Daniel Perry
>
> Innovative Design
> [EMAIL PROTECTED]
> Tel: 0210 387 852
>
>



--- End Message ---
--- Begin Message ---
These lines already exist in httpd.conf file, you may need to change the
path or uncomment them.

----- Original Message -----
From: "M.N. Ikhwan S." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 12:49 AM
Subject: [PHP] can i ask?


>
>  ScriptAlias /php/ "c:/php/"
>  AddType application/x-httpd-php .php
>  Action application/x-httpd-php "/php/php.exe"
>
>  i'm using apache 2.0 as my web server. and i'm about to ask these
question, where am i going to put these three lines? under what line in
httpd.conf?
>
>  ikhwan
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!


--- End Message ---
--- Begin Message ---
Good article on coding standard at www.phpfreaks.net




> Is there any documents on how code should be layed out?
> 
> 
> ------
> Philip J. Newman.
> Head Developer
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

my _guess_ would be you compiled w/ default (v1) zend engine. v2 has lots of 
improvements for oop- perhaps this is one of them. Try compiling with v2 of 
the engine and see what happens.




On Tuesday 25 March 2003 02:44 pm, Christopher E. Welton wrote:
> I am using php 4.2.2 with Apache 2.0 on Red Hat 8.0
>
> When I attempt to dynamically aggregate two objects using the
> aggregate() call, I get the following message:
>
> Fatal error: Call to undefined function: aggregate()
>
> the man page for aggregate() lists  the following info:
> aggregate
> (PHP 4 >= 4.2.0)
> void aggregate ( object object, string class_name)
>
> Though I realize this module is experimental, I'm curious if it has been
> pulled out from PHP, moved to a different name/section or if there is
> just something weird going on here with my installation.
>
> Any help would be appreciated

- -- 
Whenever I think of how religion started, I picture some frustrated old man 
making out a list of all the ways he could gain power, until he finally came 
up with the great solution of constant fear and guilt, then he leaped up and 
started planning a new wardrobe.

- -Steve Blake
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+gXTT/rncFku1MdIRAo6KAKCawqDo7zo6nt/IZl3ySqVVicLnsgCfUODU
3BAoXnYmZFA/Dc+a9jxtAFc=
=t3Sb
-----END PGP SIGNATURE-----


--- End Message ---
--- Begin Message ---
I'm using ldap_read() to get the namingContexts from the LDAP
server.

----- s n i p -----
$sr = ldap_read($this->ldap_linkid, '', '(objectClass=*)', array('namingContexts'));
if(! $sr) die("Can't find base dn - ".ldap_error($this->ldap_linkid));
$entry = ldap_get_entries($this->ldap_linkid, $sr);
----- s n i p -----

Unfortunatly, I get:
----- s n i p -----
   Warning: LDAP: Unable to perform the search: No such object in
   /afs/bayour.com/public/web/ldap/phpQLAdmin-CVS.latest/include/pql.inc on line 45
   Can't find base dn - No such object
----- s n i p -----

This only shows up if the namingContexts have a space in it (ie, base DN contains
a space):
----- s n i p -----
[papadoc.pts/9]$ /usr/bin/ldapsearch -x -LLL -h localhost -s base -b '' 
'(objectclass=*)' namingContexts
dn:
namingContexts: o=Turbo Fredriksson
----- s n i p -----

On my live server, I have 'namingContexts: dc=com', and the PHP page(s) work
on that...

Any ideas?
-- 
FSF assassination Ft. Bragg Mossad counter-intelligence arrangements
Qaddafi PLO 747 supercomputer Marxist BATF South Africa kibo Serbian
[See http://www.aclu.org/echelonwatch/index.html for more about this]

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

Im trying to install php-4.3.1 as a dynamic module in
apache-2.0.44 but are having problems.  I install and
compile both with no problems using the
--with-apxs=pathto in the ./configure command for php.
I can see that it has created the libphp4.so in
pathtoapache/modules/ and i have added

AddType application/x-httpd-php .php
LoadModule php4_module modules/libphp4.so

Into the httpd.conf file 

and copies php.ini-dist to /usr/local/lib/php.ini as
well.
I have done a apachectl configtest and restart and now
when i try and load a php page i get a pop up box on
my browser saying:
'The URL HTTP://pathtoserver/test.php has mime type
application/x-httpd-php
What do you want to do with it?'

and i can either save or run it from that location.

Does anyone know what i may be missing or where i have
gone wrong?


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--- End Message ---
--- Begin Message ---
hi guys i have been trying to work out the best way to trigger exception
style error handling within a class and return it ,i am currently storing
the error code into a session variable, exiting, and doing a header location
to the previous page where i was submitting from and output the error code
with the message in an array is this the best way to do this , or is trigger
error with a set_error_handler on a function within the lass the best way to
do it ?


--- End Message ---
--- Begin Message ---
Why is it that PHP does not automatically unescape data retrieved from a
mySQL query?  It seems to me that this should be the default behaviour as
the bulk of what PHP web scripts do is display said data.  I'm just
wondering if I'm missing some command or optional argument to make this
happen.  As it is, I had to write an array_stripslashes routine and run
every single db query I do through it.  Just seems odd to me.

Cheers!

-- 
Aaron Dalton
[EMAIL PROTECTED]
PGPKeyID# 0x65AB5571



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

Wednesday, March 26, 2003, 9:10:26 PM, you wrote:
AD> Why is it that PHP does not automatically unescape data retrieved from a
AD> mySQL query?  It seems to me that this should be the default behaviour as
AD> the bulk of what PHP web scripts do is display said data.  I'm just
AD> wondering if I'm missing some command or optional argument to make this
AD> happen.  As it is, I had to write an array_stripslashes routine and run
AD> every single db query I do through it.  Just seems odd to me.

AD> Cheers!

AD> -- 
AD> Aaron Dalton
AD> [EMAIL PROTECTED]
AD> PGPKeyID# 0x65AB5571


Sounds like your doing addslashes twice before storing the data.
or magic_quotes_runtime is set on in your php.ini

-- 
regards,
Tom


--- End Message ---
--- Begin Message ---
*blushes deeply*

It turns out my old php3.ini was still being loaded which had magic_quotes
turned ON!  Turning magic_quotes off of course fixed the problem.  My
thanks for your patience.

Cheers!

On Wed, 26 Mar 2003, Tom Rogers wrote:

> Hi,
>
> Wednesday, March 26, 2003, 9:10:26 PM, you wrote:
> AD> Why is it that PHP does not automatically unescape data retrieved from a
> AD> mySQL query?  It seems to me that this should be the default behaviour as
> AD> the bulk of what PHP web scripts do is display said data.  I'm just
> AD> wondering if I'm missing some command or optional argument to make this
> AD> happen.  As it is, I had to write an array_stripslashes routine and run
> AD> every single db query I do through it.  Just seems odd to me.
>
> AD> Cheers!
>
> AD> --
> AD> Aaron Dalton
> AD> [EMAIL PROTECTED]
> AD> PGPKeyID# 0x65AB5571
>
>
> Sounds like your doing addslashes twice before storing the data.
> or magic_quotes_runtime is set on in your php.ini
>
>

-- 
Aaron Dalton
[EMAIL PROTECTED]
PGPKeyID# 0x65AB5571




--- End Message ---
--- Begin Message ---
Can someone please give me an idea as to why php returns dates in m-d-y
format when using freetds under 4.3.1, when tsql (freetds client) returns
them in unix datestamp format?

Damien


--- End Message ---
--- Begin Message ---
Ok...I checked php.ini and I`m not running safe mode......

I`ll take your advice and use fopen....

Thanks for the help.....

On Wed, 2003-03-26 at 14:31, David T-G wrote:
> Chris --
> 
> Don't reply just to me; you're much more likely to get useful answers, or
> even answers at all, if you keep it on the mailing list!
> 
> ...and then Chris Blake said...
> % 
> % Howdy David,
> 
> Hiya!
> 
> 
> % 
> % Thanks for the reply....
> 
> Sure thing :-)
> 
> 
> % 
> % I`m totally new to this PHP stuff....define "running in safe mode".
> 
> I don't know much about it, since my server runs without it.  It's not a
> bad idea, though.  It just tells php to be more cautious, which in turns
> sometimes prevents you from doing what you think you want to do.
> 
> Check the manual; it's where I saw the comment that safe mode disables
> backticks (and, therefore, shell_exec).  You can still make a system()
> call, though.
> 
> Meanwhile, why bother to use a call to grep at all?  Just fopen the file
> and match on its contents...
> 
> 
> % 
> % The only safe mode I knew of was under Windows....I`ve since converted
> 
> Heh :-)
> 
> 
> % to Linux....is this a setting I need to change in php.ini ?
> 
> Yep.  Look for
> 
>   safe_mode = ...
> 
> to see how you're set.
> 
> 
> % 
> % Thanks for the help...
> 
> Sure thing!
> 
> 
> HTH & HAND
> 
> :-D
> -- 
> David T-G                      * There is too much animal courage in 
> (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
> (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
> http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
> 
-- 
Chris Blake
Office : (011) 782-0840
Cell : 083 985 0379
A chicken is the eggs way of producing more eggs.


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

is it possible to have a checkbox that if it is specified to be checked when
the page is being formulated then it cannot be unchecked?



--- End Message ---
--- Begin Message --- So use PclZip class, it is pure php without the need to have nay special extension installed

Vincent M. wrote:

Daevid Vincent wrote:

You could use the exec() or shell_exec() and just do it via command line
method...


Yes but gunzip does not work when there are more than one file in the zip file and unzip is not installed by default on Unix servers. :-(








--- End Message ---
--- Begin Message ---
Forgot to mention this is to be run after
eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "<a
href=\"\\1://\\2\\3\" {$t}\">\\1://\\2\\3</a>", $str);
as it only replaces long strings within <a> tags


Marek Kilimajer wrote:


$str = preg_replace('|(<a[^>]*>[^<]{55})[^<]+(</a>)|','$1...$2', $str);

Justin French wrote:

Hi, I have this ereg to turn URLs into links:

eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "<a
href=\"\\1://\\2\\3\" {$t}\">\\1://\\2\\3</a>", $str);

... found it in the manual i think, or maybe on weberdev.com examples


Anyhoo, it places the whole link in between the <a...> and </a>, which is
fine for short links, but on longer links (in my case, around 60+ chars), it
messes with my table or CSS layout.


So, I'd like to subtr() the 2nd capture part down to 55 chars or something
IF it's longer than 60, and append a ... to it.


ANY ideas on how this is done? Or is this beyond regexp??


TIA


Justin








--- End Message ---

Reply via email to