[PHP] Content Management System in php

2002-06-18 Thread Olav Bringedal


I have been looking into some of the CMS' that the php
community provides. Now I wonder what the common
thoughts about these are. Are they fit for deployment
into professtional organisations or simply still on a
"idealistic-website" level?

I made a trial installation of php-nuke and frankly
i'm very impressed on some matters, like its sceduled
posting and admin interface. However it lacs some
features in the ability to apply a own design, its
forum has something left to desire so on. It might
work for a site like /., but I doubt it would work
very well on a corporate nework. PostNuke might even
look a bit better and dynamic. Am I wrong about this?
Do anyone got any experiences with eZ publish?

What interests me in a CMS, are subjects like:

-Ability to use role/group-based access. 
-Forum options (access/theading/moderation s.o.)
-Ability to easily make a design/theme that fits a
strict and "ready-set" design.
-Ability to incorporate existing
web-modules/pages/sites



I would very much like to hear your thoughts of
this...

Olav Bringedal
jaggu.org

__
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

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




RE: [PHP] Content Management System in php

2002-06-18 Thread Brian McGarvie

Indeed PHP-Nuke is not meant for Co-orporate sites...

I have my own custom built 'bits' that I put together when doing site
for a client.

If you can't/don't have the luxury of being able to hire/contract a developer
to develop a custom-designed solution for your needs then you are unfortinaltley
limited to what the various CMS's out there can do. I've looked at most of them
and none offer a solution that to me is 'perfect' each of them have bits that are
greate, but it's the lack of the rest of the application that lets it down. As for
php-nukes admin facility, it's possibly one of the worst I've pseronally seen, but 
again
unless you are able to get something custom developed, you wont find/it'll be hard to 
find
a single pre-built CMS that will do what you want.

Going back to php-nuke, I'ts qyite limited in what you can do with it's layout from 
what i
can remember - I may be wrong - looking at a version of it from last month.

I also think for co-orporate sites, a CMS/CRM solution would be better, however this 
is an
even bigger undertaking.

Just my thoughts on CMS's ;)

To me all/most CMS's out there are aimed at 'pet sites', like, personal sites, gamers 
sites
and so on...

> -Original Message-
> From: Olav Bringedal [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2002 9:33 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Content Management System in php
> 
> 
> 
> I have been looking into some of the CMS' that the php
> community provides. Now I wonder what the common
> thoughts about these are. Are they fit for deployment
> into professtional organisations or simply still on a
> "idealistic-website" level?
> 
> I made a trial installation of php-nuke and frankly
> i'm very impressed on some matters, like its sceduled
> posting and admin interface. However it lacs some
> features in the ability to apply a own design, its
> forum has something left to desire so on. It might
> work for a site like /., but I doubt it would work
> very well on a corporate nework. PostNuke might even
> look a bit better and dynamic. Am I wrong about this?
> Do anyone got any experiences with eZ publish?
> 
> What interests me in a CMS, are subjects like:
> 
> -Ability to use role/group-based access. 
> -Forum options (access/theading/moderation s.o.)
> -Ability to easily make a design/theme that fits a
> strict and "ready-set" design.
> -Ability to incorporate existing
> web-modules/pages/sites
> 
> 
> 
> I would very much like to hear your thoughts of
> this...
> 
> Olav Bringedal
> jaggu.org
> 
> __
> 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
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




RE: [PHP] Editor

2002-06-18 Thread Brian McGarvie

I have been using this for a couple of years and personally consider it the best 
all-round editor next to UltraEdit for codeing not just web-pages but other 
languages...

It's extremely flexible plug-in modules are easy to develop if you need it to do 
something, and also has quite a few decent ones that people are contributing. I've 
been trying to develop a HTML-KIT plug-in that will allow me to execute a php script 
and list any errors/warnings, so that i can check it before uploadin/testing...

Things like that make it e very nice editor... the latest Beta is especially nice...

I am presently developing an Intranet for a multi-national and this is the editor I 
have used... even when they gave me a budget to aquire any software I needed.

> -Original Message-
> From: Adrian Greeman 
> [mailto:[EMAIL PROTECTED]]
> Sent: 16 June 2002 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Editor
> 
> 
> 
> 
> Sorry everyone - I clean forgot to add in aURL for the 
> editing programme I
> recommended a couple of days ago.
> 
> It was HTML_Kit and the appropriate web site is below.
> 
> 
> I would be interested in comments anyway on what people think.
> 
> http://www.chami.com/html-kit/
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




[PHP] Re: Content Management System in php

2002-06-18 Thread Ralf Gatzki

Try Typo3 (www.typo3.com)

"Olav Bringedal" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I have been looking into some of the CMS' that the php
> community provides. Now I wonder what the common
> thoughts about these are. Are they fit for deployment
> into professtional organisations or simply still on a
> "idealistic-website" level?
>
> I made a trial installation of php-nuke and frankly
> i'm very impressed on some matters, like its sceduled
> posting and admin interface. However it lacs some
> features in the ability to apply a own design, its
> forum has something left to desire so on. It might
> work for a site like /., but I doubt it would work
> very well on a corporate nework. PostNuke might even
> look a bit better and dynamic. Am I wrong about this?
> Do anyone got any experiences with eZ publish?
>
> What interests me in a CMS, are subjects like:
>
> -Ability to use role/group-based access.
> -Forum options (access/theading/moderation s.o.)
> -Ability to easily make a design/theme that fits a
> strict and "ready-set" design.
> -Ability to incorporate existing
> web-modules/pages/sites
>
>
>
> I would very much like to hear your thoughts of
> this...
>
> Olav Bringedal
> jaggu.org
>
> __
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>





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




[PHP] LDAP...

2002-06-18 Thread Brian McGarvie

I'm just experimenting with LDAP...

[ Windows 2000 Server/IIS/php 4.2.1]

I've uncommented the php_ldap.dll in my .ini... when I execute the following simple 
piece of code it gives me:

Fatal error: Call to undefined function: ldap_connect() in E:\wwwshell\test\index.php 
on line 5


What have I not done?

[ http://www.the-local-guide.com :: http://www.mcgarvie.net ]


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




[PHP] sessions and temporary tables

2002-06-18 Thread Wilbert Enserink

hi all,


i have this problem:

1) on the start of each script I call session_start()
2) on my search.php page I query an info-table, put the results in a temporary table 
called $SID(=session_id()), and display the results. As a check I also query the table 
$SID and voila: the results were indeed stored in this temporary table.
3) On my next page there is this checkbox which says: search within these results.
4) If this checkbox is checked I query the $SID table rather then the info table.
5) but now I get this error: Table 'dbname.ed61c337640e2b0ab8f3ffccb63f8597' doesn't 
exist

as a check I print $SID on each page. and always it is the same SID, which makes sense 
cause i'm still in the same session.

My Q: howcome mySQL is not able to find this temporary  table anymore It seems to 
have destroyed this table when leaving the search.php page, but that's a rather odd 
idea, cause I thought it maintained while the session was still active...

any input is largely appreciated!

thx and regards,
Wilbert



-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


[PHP] Date Comparsion

2002-06-18 Thread Jack

Dear all
I had a form which let user to input the leave_from and leave_to date into,
the format of the date that user input is "-mm-dd".
Now i want to compare the leave_from and leave_to date to find out the
number of days between!

What should i do or any function in php can provide this operation?


--
Thx a lot!
Jack
[EMAIL PROTECTED]



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




Re: [PHP] sessions and temporary tables

2002-06-18 Thread Jason Wong

On Tuesday 18 June 2002 17:21, Wilbert Enserink wrote:

> i have this problem:

> My Q: howcome mySQL is not able to find this temporary  table anymore
> It seems to have destroyed this table when leaving the search.php page, but
> that's a rather odd idea, cause I thought it maintained while the session
> was still active...

Well sessions have nothing to do with MySQL tables (temporary or otherwise). 
The reason why your table doesn't exist anymore is probably because temp 
tables are only there for the duration of a particular mysql connection. Once 
the connection is closed the table is automatically purged.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
If you refuse to accept anything but the best you very often get it.
*/


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




[PHP] Re: ORACLE!!!

2002-06-18 Thread Philippe Saladin

> Which are the environment variables? (i.e. ORACLE_SID, ORACLE_HOME, etc)
>I've using this kind of code, but it doesn't connect me to the server.
>putenv("ORACLE_HOME=C:\Program Files\Ora81"); <-- Is this the home
directory?
> putenv("ORACLE_SID=SID");

Look in the windows registry to find what to put here.
oracle_home is the path to the oracle home directory (your oracle client)
oracle_sid is something like ORCL for example.


> $connection = ora_logon ("user", "pass") or die("No Connection");
Ora_logon and other ora* functions com from the "oracle" extension
(php_oracle.dll). You would rather use ocilogon and friends, from the newer
php_oci.dll. Just uncomment php_oci.dll in your php.ini to use them. The
oci* functions can be used against a Oracle7 or an Oracle8 database. ora$
functions are limited to Oracle 7.
So you would rather use :
$connection = OCILogon($user, $pass, $tns) or die("No Connection");
About the third argument ($tns), it is what you find in the tnsnames.ora
file, located in [your_oracle_directory]/Network/Admin.
For example, if your tnsnames.ora looks like this :
sa_tcp32.world =
  (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
  (COMMUNITY = tcp.world)
  (PROTOCOL = TCP)
  (Host = 21.1.1.45)
  (Port = 1521)
)
(ADDRESS =
  (COMMUNITY = tcp.world)
  (PROTOCOL = TCP)
  (Host = 21.1.1.45)
  (Port = 1526)
)
)
(CONNECT_DATA = (SID = ORCL)
)
  )

... then your $tns argument will be "sa_tcp32".

If you don't set several variables with putenv, you may encounter some
problems with this third argument. Then you can replace its name by its
entire definition.

Hope it will help you !

Regards,
Philippe




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




Re: [PHP] sessions and temporary tables

2002-06-18 Thread W. Enserink

ok, that's clear, thx.
but  still, I'm not closing any connection AFAIK.
at least not explicitly. are there then other ways which cause the closing
of this connection?

thx Wilbert




- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:31 AM
Subject: Re: [PHP] sessions and temporary tables


> On Tuesday 18 June 2002 17:21, Wilbert Enserink wrote:
>
> > i have this problem:
>
> > My Q: howcome mySQL is not able to find this temporary  table
anymore
> > It seems to have destroyed this table when leaving the search.php page,
but
> > that's a rather odd idea, cause I thought it maintained while the
session
> > was still active...
>
> Well sessions have nothing to do with MySQL tables (temporary or
otherwise).
> The reason why your table doesn't exist anymore is probably because temp
> tables are only there for the duration of a particular mysql connection.
Once
> the connection is closed the table is automatically purged.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> If you refuse to accept anything but the best you very often get it.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

- 
Pas de Deux 
Van Mierisstraat 25 
2526 NM Den Haag 
tel 070 4450855 
fax 070 4450852 
http://www.pdd.nl 
[EMAIL PROTECTED] 
-

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor


- Original Message -
From: "Fargo Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...


> Hi, my customers go through a password authentication to access a link on
my
> site to download a file. I want to prevent the distribution of the
location
> of this file on my server by making it hidden. Is there any php
function(s)
> that could assist in doing this?
>
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
a
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
>
> If anyone has any ideas, examples or a way to improve on what I came up
with
> please respond. Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

I don't believe it is possible to hide the physical link but it is plausibly
easy enough to write a script that randomly changes the file name and
location. Here's some psuedo code to get you started:

//Step 1: Locate the file
$query = "select * from file_locations where file_name='secure.zip'";
$result = mysql_query($query);

//Step 2: Move the file
This code is up to you, I'd be curious to think what routine you think up if
any.  My suggestions include using a routine to not only change the file
name but copy it to a different directory, which also has a non specific
name.

//Step 3: Update Location (don't want to lose the location)
$query = "update file_locations set location=$newlocation where
file_name='secure.zip'";
mysql_query($query)

Best of Luck to you,
Nathan Taylor
ModDev.net



- Original Message -
From: "Fargo Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...


> Hi, my customers go through a password authentication to access a link on
my
> site to download a file. I want to prevent the distribution of the
location
> of this file on my server by making it hidden. Is there any php
function(s)
> that could assist in doing this?
>
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
a
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
>
> If anyone has any ideas, examples or a way to improve on what I came up
with
> please respond. Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




[PHP] session and temporary tables 2

2002-06-18 Thread Wilbert Enserink

Jason,

this is a piece of code i include in every file.
I thinbk this is the piece of code which kills my connection.
do you have any tips for me how to maintain the connectoin open?

 thx Wilbert

session_start();

$global_dbh = mysql_connect($hostname, $username, $password);
if (!$global_dbh)
 {
 mail([EMAIL PROTECTED]","dbconnect", no connection posiible from  $REMOTE_ADDR");
 die("No database connection could be established") ;
 }
mysql_select_db($db, $global_dbh);
--


-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


RE: [PHP] sessions and temporary tables

2002-06-18 Thread Brian McGarvie

unless you open a persistent connection, connections are closed automatically at the 
end of execution of a script.

> -Original Message-
> From: W. Enserink [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2002 10:41 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] sessions and temporary tables
> 
> 
> ok, that's clear, thx.
> but  still, I'm not closing any connection AFAIK.
> at least not explicitly. are there then other ways which 
> cause the closing
> of this connection?
> 
> thx Wilbert
> 
> 
> 
> 
> - Original Message -
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 11:31 AM
> Subject: Re: [PHP] sessions and temporary tables
> 
> 
> > On Tuesday 18 June 2002 17:21, Wilbert Enserink wrote:
> >
> > > i have this problem:
> >
> > > My Q: howcome mySQL is not able to find this temporary  table
> anymore
> > > It seems to have destroyed this table when leaving the 
> search.php page,
> but
> > > that's a rather odd idea, cause I thought it maintained while the
> session
> > > was still active...
> >
> > Well sessions have nothing to do with MySQL tables (temporary or
> otherwise).
> > The reason why your table doesn't exist anymore is probably 
> because temp
> > tables are only there for the duration of a particular 
> mysql connection.
> Once
> > the connection is closed the table is automatically purged.
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> >
> > /*
> > If you refuse to accept anything but the best you very often get it.
> > */
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> - 
> Pas de Deux 
> Van Mierisstraat 25 
> 2526 NM Den Haag 
> tel 070 4450855 
> fax 070 4450852 
> http://www.pdd.nl 
> [EMAIL PROTECTED] 
> -
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




[PHP] Don't send the reciept

2002-06-18 Thread Nathan Taylor

Please do not click yes when it asks you to send the reciept on the email
about hiding a download link, I hadn't realized the reciept function was on
and it's really getting annoying.

Cheers,
Lakario

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Bret L Conard

Start a session on the sign in page, and check for the session before
displaying the page with the link. The it does not matter if the link page
URL is distributed. In my situation;
1. Sign in page goes to a validation script.
2. Check for form fields. (1st of Nested loops)
if (isset($formField)){//check for form.
3. If form, validate user and start session
$result = mysql_query("SELECT * FROM ok_users WHERE password =
$password AND user_ID = $user_ID");
if (mysql_num_rows($result) < 1){// No user so exit
if (mysql_num_rows($result) > 1){// Too many users (bad data) so
exit
else{   //valid user
session_start();
   // register the variables you need or want
session_register("SESSION");.
4. redirect to page with download
   header ("Location: download.php");
 must be in the session start snippet or get too many headers errors
/
}//end start session code
  }//end check for multiple match
 }//end check for form (and other actions)
 else{//if no form.
print ("You must login to access this page");
}
5. On download page check for session.
");
 print ("Click here to Log In");
}
else{
body of page
}

Now if you access the download page directly, you only get a link to sign
in...

Does this help?
Bret


- Original Message -
From: "Fargo Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...


> Hi, my customers go through a password authentication to access a link on
my
> site to download a file. I want to prevent the distribution of the
location
> of this file on my server by making it hidden. Is there any php
function(s)
> that could assist in doing this?
>
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
a
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
>
> If anyone has any ideas, examples or a way to improve on what I came up
with
> please respond. Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

> if (!session_is_registered("SESSION")){
>  print ("You must Log-In to access this page\n");
>  print ("");
>  print ("Click here to Log In");
> }

print ("");

should be:

print("Sign-in");   // or something like that


But anyways, I don't think that's quite what he wanted.  I think the idea is
to protect the link to a file so only special users can see it.  Sure this
code with protect the page from being viewed, but, download.php or whatever,
if it is protected it still points to a physical file.   If a user for some
reason desires to leak the actual link then there could be a problem.  This
is why he probably should change the physical file data.

- Original Message -
From: "Bret L Conard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:22 AM
Subject: Re: [PHP] How do I hide download link ...


> Start a session on the sign in page, and check for the session before
> displaying the page with the link. The it does not matter if the link page
> URL is distributed. In my situation;
> 1. Sign in page goes to a validation script.
> 2. Check for form fields. (1st of Nested loops)
> if (isset($formField)){//check for form.
> 3. If form, validate user and start session
> $result = mysql_query("SELECT * FROM ok_users WHERE password =
> $password AND user_ID = $user_ID");
> if (mysql_num_rows($result) < 1){// No user so exit
> if (mysql_num_rows($result) > 1){// Too many users (bad data) so
> exit
> else{   //valid user
> session_start();
>// register the variables you need or want
> session_register("SESSION");.
> 4. redirect to page with download
>header ("Location: download.php");
>  must be in the session start snippet or get too many headers errors
> /
> }//end start session code
>   }//end check for multiple match
>  }//end check for form (and other actions)
>  else{//if no form.
> print ("You must login to access this page");
> }
> 5. On download page check for session.
>  session_start();
> // ***   session check*/
> if (!session_is_registered("SESSION")){
>  print ("You must Log-In to access this page\n");
>  print ("");
>  print ("Click here to Log In");
> }
> else{
> body of page
> }
>
> Now if you access the download page directly, you only get a link to sign
> in...
>
> Does this help?
> Bret
>
>
> - Original Message -
> From: "Fargo Lee" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 12, 2002 4:14 PM
> Subject: [PHP] How do I hide download link ...
>
>
> > Hi, my customers go through a password authentication to access a link
on
> my
> > site to download a file. I want to prevent the distribution of the
> location
> > of this file on my server by making it hidden. Is there any php
> function(s)
> > that could assist in doing this?
> >
> > All I can think of so far is storing the original file in a hard to
guess
> > directory, when a authenticated customer goes to download it, send them
to
> a
> > script that copys the original file to a temp directory, they download
the
> > file in the temp directory and then run a cron every so many minutes to
> > clear out the files in the temp directory.
> >
> > If anyone has any ideas, examples or a way to improve on what I came up
> with
> > please respond. Thanks!
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




[PHP] shtml problem

2002-06-18 Thread savaidis


I use a  search.shtml  script to pass  with a form some vars (user's IP)  to
a PHP script to keep it in a MySQL record.

When I run the search.shtml directrly , I have no problem all vars  pass and
are  keept OK.

But when I run it from a frame then the IP var is undefuned (null).
--code for main.php ---
echo ('');
echo ('');
--end code -

What happens and what I can do? The dir is the same.

Thanks


Makis




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


Re: [PHP] session and temporary tables 2

2002-06-18 Thread Marek Kilimajer

Use

mysql_pconnect($hostname, $username, $password);



Wilbert Enserink wrote:

>Jason,
>
>this is a piece of code i include in every file.
>I thinbk this is the piece of code which kills my connection.
>do you have any tips for me how to maintain the connectoin open?
>
> thx Wilbert
>
>session_start();
>
>$global_dbh = mysql_connect($hostname, $username, $password);
>if (!$global_dbh)
> {
> mail([EMAIL PROTECTED]","dbconnect", no connection posiible from  $REMOTE_ADDR");
> die("No database connection could be established") ;
> }
>mysql_select_db($db, $global_dbh);
>--
>
>
>-
>Pas de Deux
>Van Mierisstraat 25
>2526 NM Den Haag
>tel 070 4450855
>fax 070 4450852
>http://www.pdd.nl
>[EMAIL PROTECTED]
>-
>  
>



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




RE: [PHP] How do I hide download link ...

2002-06-18 Thread Brian McGarvie

if you want to hide it fromthe browser you cound do:

click here

or you could over write the status text:

click 
here

or a combination...

Also note... this has/had nowt to do with _PHP_ :)

> -Original Message-
> From: Nathan Taylor [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2002 11:33 AM
> To: Bret L Conard; [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I hide download link ...
> 
> 
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
> 
> print ("");
> 
> should be:
> 
> print("Sign-in");   // or something 
> like that
> 
> 
> But anyways, I don't think that's quite what he wanted.  I 
> think the idea is
> to protect the link to a file so only special users can see 
> it.  Sure this
> code with protect the page from being viewed, but, 
> download.php or whatever,
> if it is protected it still points to a physical file.   If a 
> user for some
> reason desires to leak the actual link then there could be a 
> problem.  This
> is why he probably should change the physical file data.
> 
> - Original Message -
> From: "Bret L Conard" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 6:22 AM
> Subject: Re: [PHP] How do I hide download link ...
> 
> 
> > Start a session on the sign in page, and check for the 
> session before
> > displaying the page with the link. The it does not matter 
> if the link page
> > URL is distributed. In my situation;
> > 1. Sign in page goes to a validation script.
> > 2. Check for form fields. (1st of Nested loops)
> > if (isset($formField)){//check for form.
> > 3. If form, validate user and start session
> > $result = mysql_query("SELECT * FROM ok_users WHERE 
> password =
> > $password AND user_ID = $user_ID");
> > if (mysql_num_rows($result) < 1){// No user so exit
> > if (mysql_num_rows($result) > 1){// Too many users 
> (bad data) so
> > exit
> > else{   //valid user
> > session_start();
> >// register the variables you need or want
> > session_register("SESSION");.
> > 4. redirect to page with download
> >header ("Location: download.php");
> >  must be in the session start snippet or get too many 
> headers errors
> > /
> > }//end start session code
> >   }//end check for multiple match
> >  }//end check for form (and other actions)
> >  else{//if no form.
> > print ("You must login to access this page");
> > }
> > 5. On download page check for session.
> >  > session_start();
> > // ***   session check*/
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
> > else{
> > body of page
> > }
> >
> > Now if you access the download page directly, you only get 
> a link to sign
> > in...
> >
> > Does this help?
> > Bret
> >
> >
> > - Original Message -
> > From: "Fargo Lee" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 12, 2002 4:14 PM
> > Subject: [PHP] How do I hide download link ...
> >
> >
> > > Hi, my customers go through a password authentication to 
> access a link
> on
> > my
> > > site to download a file. I want to prevent the distribution of the
> > location
> > > of this file on my server by making it hidden. Is there any php
> > function(s)
> > > that could assist in doing this?
> > >
> > > All I can think of so far is storing the original file in 
> a hard to
> guess
> > > directory, when a authenticated customer goes to download 
> it, send them
> to
> > a
> > > script that copys the original file to a temp directory, 
> they download
> the
> > > file in the temp directory and then run a cron every so 
> many minutes to
> > > clear out the files in the temp directory.
> > >
> > > If anyone has any ideas, examples or a way to improve on 
> what I came up
> > with
> > > please respond. Thanks!
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

Open your browser, right click and hit properties on any page.

- Original Message -
From: "Brian McGarvie" <[EMAIL PROTECTED]>
To: "Nathan Taylor" <[EMAIL PROTECTED]>; "Bret L Conard" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:46 AM
Subject: RE: [PHP] How do I hide download link ...


if you want to hide it fromthe browser you cound do:

click
here

or you could over write the status text:

click here

or a combination...

Also note... this has/had nowt to do with _PHP_ :)

> -Original Message-
> From: Nathan Taylor [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2002 11:33 AM
> To: Bret L Conard; [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I hide download link ...
>
>
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
>
> print ("");
>
> should be:
>
> print("Sign-in");   // or something
> like that
>
>
> But anyways, I don't think that's quite what he wanted.  I
> think the idea is
> to protect the link to a file so only special users can see
> it.  Sure this
> code with protect the page from being viewed, but,
> download.php or whatever,
> if it is protected it still points to a physical file.   If a
> user for some
> reason desires to leak the actual link then there could be a
> problem.  This
> is why he probably should change the physical file data.
>
> - Original Message -
> From: "Bret L Conard" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 6:22 AM
> Subject: Re: [PHP] How do I hide download link ...
>
>
> > Start a session on the sign in page, and check for the
> session before
> > displaying the page with the link. The it does not matter
> if the link page
> > URL is distributed. In my situation;
> > 1. Sign in page goes to a validation script.
> > 2. Check for form fields. (1st of Nested loops)
> > if (isset($formField)){//check for form.
> > 3. If form, validate user and start session
> > $result = mysql_query("SELECT * FROM ok_users WHERE
> password =
> > $password AND user_ID = $user_ID");
> > if (mysql_num_rows($result) < 1){// No user so exit
> > if (mysql_num_rows($result) > 1){// Too many users
> (bad data) so
> > exit
> > else{   //valid user
> > session_start();
> >// register the variables you need or want
> > session_register("SESSION");.
> > 4. redirect to page with download
> >header ("Location: download.php");
> >  must be in the session start snippet or get too many
> headers errors
> > /
> > }//end start session code
> >   }//end check for multiple match
> >  }//end check for form (and other actions)
> >  else{//if no form.
> > print ("You must login to access this page");
> > }
> > 5. On download page check for session.
> >  > session_start();
> > // ***   session check*/
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
> > else{
> > body of page
> > }
> >
> > Now if you access the download page directly, you only get
> a link to sign
> > in...
> >
> > Does this help?
> > Bret
> >
> >
> > - Original Message -
> > From: "Fargo Lee" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 12, 2002 4:14 PM
> > Subject: [PHP] How do I hide download link ...
> >
> >
> > > Hi, my customers go through a password authentication to
> access a link
> on
> > my
> > > site to download a file. I want to prevent the distribution of the
> > location
> > > of this file on my server by making it hidden. Is there any php
> > function(s)
> > > that could assist in doing this?
> > >
> > > All I can think of so far is storing the original file in
> a hard to
> guess
> > > directory, when a authenticated customer goes to download
> it, send them
> to
> > a
> > > script that copys the original file to a temp directory,
> they download
> the
> > > file in the temp directory and then run a cron every so
> many minutes to
> > > clear out the files in the temp directory.
> > >
> > > If anyone has any ideas, examples or a way to improve on
> what I came up
> > with
> > > please respond. Thanks!
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



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

[PHP] Tracking file downloads

2002-06-18 Thread PHPCoder

Hi
I would like to know any ideas on tackling the following:

I would like to have people give me their details via a form and then 
allow them to download files from the server, and I would also like to 
keep track/record of the files that are downloaded. The record doesn't 
need to be kept, just e-mailed to the admin as soon as it is done and 
the user exits the site.
I guess this would be the perfect example for using sessions? 
Unfortunately I am not too hot on sessions, so any advise/help will be 
appreciated.

Thanks



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




[PHP] Can php-files have DOS-format?

2002-06-18 Thread Knut Olsen-Solberg

We have the php-processor running on an Unix-machine with Apache
webserver. Many html-files contains php-code, and are written in
MSWindows environment. Is it important to convert these textfiles to
Unix format (line breaks with only ascii 10 instead of 13/10) when they
are published?

Regards Knut

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




[PHP] Small CGI Serve

2002-06-18 Thread BB

I am trying to write a small CGI webserver.

Having finally found out how to pass the Environment vars onto PHP, I am
stumpted to find that PHP wasn't reading them and putting them in their
place (GET vars).

I tried changing the exe from the php-cli to just php.  This now brings up a
security error and I cannot find a solution

Can anyone help?




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




[PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Mark Colvin

The function below works when I pass in a valid username and password and
returns '1'. When I pass a username and password that is not in the database
it still returns '1'. I have put some echo statements in for debugging and
the value of $numresult is always '1'. Does mysql_num_rows retain results in
memory or something like that or am I completely going down the wrong road?

  function VerifyLogin($user, $pass)
  {

 $conn = $this->DB_Connect();

 $query = "select count(*) from users where "
   ."username = '$user' and "
   ."password = '$pass'";

 $result = mysql_query($query);

 if(!$result)
 {
 echo 'Cannot run query.';
 echo 'user = ' .$user;
 echo 'pass = ' .$pass;
 echo 'query = ' .$query;
 echo 'result = ' .$result;
 $numresult = mysql_num_rows($result);
 echo 'numresult = ' .$numresult;
 exit;
 }
 else
 {
 $numresult = mysql_num_rows($result);
 echo 'numresult = ' .$numresult;
 }

 //if a row exists we have a correct username/password
 if (mysql_num_rows($result) == 1)
 {
return 1;
 }
 // else username and/or password is wrong
 {
return 0;
 }
  }

Thanks in advance


Mark



This e-mail is intended for the recipient only and
may contain confidential information. If you are
not the intended recipient then you should reply
to the sender and take no further ation based
upon the content of the message.
Internet e-mails are not necessarily secure and
CCM Limited does not accept any responsibility
for changes made to this message. 
Although checks have been made to ensure this
message and any attchments are free from viruses
the recipient should ensure that this is the case.


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




[PHP] Sessions : see also "Tracking file downloads"

2002-06-18 Thread PHPCoder

HI
While waiting for responses on my first question, I've done some reading 
on sessions, and came up with the following questions:
First, I have been coding with PHP for a while without knowing about 
sessions, and have completed a couple of rather large projects without 
using sessions as such, yet, much of what I have read on sessions, I 
have done "manually" already by creating my own unique "id's" and 
passing them on via url to the subsequent pages.
So, here is my question.
Is sessions basically just that, made "easier" , or are there 
fundamental differences/advantages. I know (now after reading a bit) 
about the use of cookies etc if availale when using sessions, and that 
you cannot "overwrite" a session variable by passing it via url, but are 
those the only differences? So, basically, do you really HAVE to use 
sessions, or is it like most other things in life; "there are more than 
one way to skin a cat". Are there set "rules" or guidelines to when one 
would definately absolutely have to use sessions?

Thanks
Hope I make sense...
 



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




RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Niklas Lampén

Try

$query = "select count(*) as Lines from users where "
  
and then check the value of Lines. Or then do something like

$query = "select ID from users where "
and now your mysql_num_rows($result) should return right kinda value.


Niklas

-Original Message-
From: Mark Colvin [mailto:[EMAIL PROTECTED]] 
Sent: 18. kesäkuuta 2002 15:00
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_num_rows always returns 1?


The function below works when I pass in a valid username and password
and returns '1'. When I pass a username and password that is not in the
database it still returns '1'. I have put some echo statements in for
debugging and the value of $numresult is always '1'. Does mysql_num_rows
retain results in memory or something like that or am I completely going
down the wrong road?

  function VerifyLogin($user, $pass)
  {

 $conn = $this->DB_Connect();

 $query = "select count(*) from users where "
   ."username = '$user' and "
   ."password = '$pass'";

 $result = mysql_query($query);

 if(!$result)
 {
 echo 'Cannot run query.';
 echo 'user = ' .$user;
 echo 'pass = ' .$pass;
 echo 'query = ' .$query;
 echo 'result = ' .$result;
 $numresult = mysql_num_rows($result);
 echo 'numresult = ' .$numresult;
 exit;
 }
 else
 {
 $numresult = mysql_num_rows($result);
 echo 'numresult = ' .$numresult;
 }

 //if a row exists we have a correct username/password
 if (mysql_num_rows($result) == 1)
 {
return 1;
 }
 // else username and/or password is wrong
 {
return 0;
 }
  }

Thanks in advance


Mark



This e-mail is intended for the recipient only and
may contain confidential information. If you are
not the intended recipient then you should reply
to the sender and take no further ation based
upon the content of the message.
Internet e-mails are not necessarily secure and
CCM Limited does not accept any responsibility
for changes made to this message. 
Although checks have been made to ensure this
message and any attchments are free from viruses
the recipient should ensure that this is the case.


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

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

###
This message has been scanned by F-Secure Anti-Virus for Internet Mail.
For more information, connect to http://www.F-Secure.com/

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




[PHP] Re: Sessions : see also "Tracking file downloads"

2002-06-18 Thread BB

This really is like life, PHP Sessions aren't particularly secure, just make
a form to post PHPSESSID of a true session to one of ya pages and you can
"steal" a session!

Its possible to check IPs and so on,

PHP's sessions use text files (by default), and pre-populate
$_SESSION/$HTTP_SESSION_VARS.  They use cookies, if no cookies are allowed,
they append to forms and a hrefs.  This makes them very easy to integrate
into a website because they do it seemlessly.

"Phpcoder" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> HI
> While waiting for responses on my first question, I've done some reading
> on sessions, and came up with the following questions:
> First, I have been coding with PHP for a while without knowing about
> sessions, and have completed a couple of rather large projects without
> using sessions as such, yet, much of what I have read on sessions, I
> have done "manually" already by creating my own unique "id's" and
> passing them on via url to the subsequent pages.
> So, here is my question.
> Is sessions basically just that, made "easier" , or are there
> fundamental differences/advantages. I know (now after reading a bit)
> about the use of cookies etc if availale when using sessions, and that
> you cannot "overwrite" a session variable by passing it via url, but are
> those the only differences? So, basically, do you really HAVE to use
> sessions, or is it like most other things in life; "there are more than
> one way to skin a cat". Are there set "rules" or guidelines to when one
> would definately absolutely have to use sessions?
>
> Thanks
> Hope I make sense...
>
>
>



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




Re: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Eugene Mah

At 13:00 18-06-02 +0100, Mark Colvin wrote:
>The function below works when I pass in a valid username and password and
>returns '1'. When I pass a username and password that is not in the database
>it still returns '1'. I have put some echo statements in for debugging and
>the value of $numresult is always '1'. Does mysql_num_rows retain results in
>memory or something like that or am I completely going down the wrong road?

that's because when 'select count(*)' = 0 when it finds no results.
So you get a record returned to $result with a single line that tells
you count(*) was 0.

what you should probably do is instead of counting, check for a valid
username/password returned by your query.  if they're blank, then
$user/$pass are either incorrect or not in your users table.

or, as someone else suggested, check the value of count(*)
rather than the number of lines returned by the query.

Eugene

--
-
Eugene Mah, M.Sc., DABR   [EMAIL PROTECTED]
Medical Physicist/Misplaced Canuck[EMAIL PROTECTED]
Department of Radiology   "For I am a Bear of Very Little
Medical University of South Carolina   Brain, and long words Bother
Charleston, South Carolina me."   Winnie the Pooh
http://home.netcom.com/~eugenem/
PGP KeyID = 0x1F9779FD, 0x319393F4
PGP keys available on request ICQ 3113529 O-
-


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




Re: [PHP] sessions and temporary tables

2002-06-18 Thread 1LT John W. Holmes

Temporary tables only exist for the duration of your script, with or without
using mysql_pconnect(). If you want a MySQL table to remain, then don't make
it temporary. Make it a regular table and then create a cron script that
goes through and deletes tables that are more than X minutes/hours old.

---John Holmes...

- Original Message -
From: "Wilbert Enserink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 5:21 AM
Subject: [PHP] sessions and temporary tables


hi all,


i have this problem:

1) on the start of each script I call session_start()
2) on my search.php page I query an info-table, put the results in a
temporary table called $SID(=session_id()), and display the results. As a
check I also query the table $SID and voila: the results were indeed stored
in this temporary table.
3) On my next page there is this checkbox which says: search within these
results.
4) If this checkbox is checked I query the $SID table rather then the info
table.
5) but now I get this error: Table 'dbname.ed61c337640e2b0ab8f3ffccb63f8597'
doesn't exist

as a check I print $SID on each page. and always it is the same SID, which
makes sense cause i'm still in the same session.

My Q: howcome mySQL is not able to find this temporary  table anymore It
seems to have destroyed this table when leaving the search.php page, but
that's a rather odd idea, cause I thought it maintained while the session
was still active...

any input is largely appreciated!

thx and regards,
Wilbert



-
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-


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




[PHP] find replace quotes with single quotes

2002-06-18 Thread Dan McCullough

I need to strip out the double quotes and replace it with single quotes.
Any help would be appreciated.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP] find replace quotes with single quotes

2002-06-18 Thread Adam Voigt

Hope this helps ya:

str_replace("\"","'",$data);

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-06-18 at 09:54, Dan McCullough wrote:
> I need to strip out the double quotes and replace it with single quotes.
> Any help would be appreciated.
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




Re: [PHP] find replace quotes with single quotes

2002-06-18 Thread Stuart Dallas

On Tuesday, June 18, 2002, 2:54:31 PM, Dan McCullough wrote:
> I need to strip out the double quotes and replace it with single quotes.
> Any help would be appreciated.

$dest = str_replace("\"", "'", $source);

-- 
Stuart


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




Re: [PHP] find replace quotes with single quotes

2002-06-18 Thread Dan McCullough

Here is the snippet of code I'm working with.
htmlMsg = displayMsg.replace(/"\""/gi,newHTML);
--- Adam Voigt <[EMAIL PROTECTED]> wrote:
> Hope this helps ya:
> 
> str_replace("\"","'",$data);
> 
> Adam Voigt
> [EMAIL PROTECTED]
> 
> On Tue, 2002-06-18 at 09:54, Dan McCullough wrote:
> > I need to strip out the double quotes and replace it with single quotes.
> > Any help would be appreciated.
> > 
> > __
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 


=

"Theres no such thing as a problem unless the servers are on fire!"


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread 1LT John W. Holmes

I thought we answered this question already!

It's simple. On your login page or whatever, you start a session and set a
variable saying that the user is logged in.



Now, the most secure way to protect your files is to place them above your
web root. Then no one can ever get to them through a browser (directly to
the file). If you can't do that, then place them in a folder with a long
name that's going to be hard to guess.

Then, you have a download.php file that you direct all requests for
downloads to. You'll also have to pass it a code to identify which file the
user means to download. This can be an ID from a database, or an actual
filename.

download.php?ID=4
download.php?Filename=music
etc...

In download.php you check for an active session. If it's good, then you send
the appropriate header() for the file the user wants to download and then
use passthru() to send them the file. Make sure you are only sending them a
file from your download directory, wherever that is. Make sure they don't
pass you a path to a file they shouldn't be looking at.

Please log in";
}
?>

I don't remember the exact header() format, and it's dependent on the types
of files your offering, but you should get the idea.

Adapt to your needs, but this is the basics of it. Check for a valid
session, if it exists, send appropriate headers and use passthru() to send
the file. (you can use file(), fopen(), whatever, as long as you send the
content of the file after the headers...). If session doesn't match up, send
an HTML page.

Hopefully this thread will die now...

---John Holmes...


- Original Message -
From: "Nathan Taylor" <[EMAIL PROTECTED]>
To: "Fargo Lee" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 5:42 AM
Subject: Re: [PHP] How do I hide download link ...


>
> - Original Message -
> From: "Fargo Lee" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 12, 2002 4:14 PM
> Subject: [PHP] How do I hide download link ...
>
>
> > Hi, my customers go through a password authentication to access a link
on
> my
> > site to download a file. I want to prevent the distribution of the
> location
> > of this file on my server by making it hidden. Is there any php
> function(s)
> > that could assist in doing this?
> >
> > All I can think of so far is storing the original file in a hard to
guess
> > directory, when a authenticated customer goes to download it, send them
to
> a
> > script that copys the original file to a temp directory, they download
the
> > file in the temp directory and then run a cron every so many minutes to
> > clear out the files in the temp directory.
> >
> > If anyone has any ideas, examples or a way to improve on what I came up
> with
> > please respond. Thanks!
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Sessions : see also "Tracking file downloads"

2002-06-18 Thread 1LT John W. Holmes

You can do whatever you want, of course.

Sessions just make your code easier and portable and more people will be
able to understand what you're talking about.

Sessions are just a way to pass a variable between pages. You assign a
variable to the session, and you retrieve it on any other page that has a
session. that's it. You can use regular variables or arrays...

---John Holmes...
- Original Message -
From: "PHPCoder" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 8:12 AM
Subject: [PHP] Sessions : see also "Tracking file downloads"


> HI
> While waiting for responses on my first question, I've done some reading
> on sessions, and came up with the following questions:
> First, I have been coding with PHP for a while without knowing about
> sessions, and have completed a couple of rather large projects without
> using sessions as such, yet, much of what I have read on sessions, I
> have done "manually" already by creating my own unique "id's" and
> passing them on via url to the subsequent pages.
> So, here is my question.
> Is sessions basically just that, made "easier" , or are there
> fundamental differences/advantages. I know (now after reading a bit)
> about the use of cookies etc if availale when using sessions, and that
> you cannot "overwrite" a session variable by passing it via url, but are
> those the only differences? So, basically, do you really HAVE to use
> sessions, or is it like most other things in life; "there are more than
> one way to skin a cat". Are there set "rules" or guidelines to when one
> would definately absolutely have to use sessions?
>
> Thanks
> Hope I make sense...
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Tracking file downloads

2002-06-18 Thread 1LT John W. Holmes

See my posting I just made about "How do I hide the download link ..."

You'll want to use a similar method with the download.php. You may not have
to check for a session, but you can use the scirpt to keep track of what
file was downloaded, increment it's counter in a database, or send an email,
whatever. then send the header() and file content.

---John Holmes...

- Original Message -
From: "PHPCoder" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 7:18 AM
Subject: [PHP] Tracking file downloads


> Hi
> I would like to know any ideas on tackling the following:
>
> I would like to have people give me their details via a form and then
> allow them to download files from the server, and I would also like to
> keep track/record of the files that are downloaded. The record doesn't
> need to be kept, just e-mailed to the admin as soon as it is done and
> the user exits the site.
> I guess this would be the perfect example for using sessions?
> Unfortunately I am not too hot on sessions, so any advise/help will be
> appreciated.
>
> Thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Justin French

on 19/06/02 12:27 AM, 1LT John W. Holmes ([EMAIL PROTECTED]) wrote:

> I thought we answered this question already!

Hehe yup -- a different thread that I started :)

Justin French


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




[PHP] Need help

2002-06-18 Thread Barbara

I want to know how I have to install cURL on my apache server. My apache server is 
running on Windows ME.
Thanks for all.
Barbara Guillen.
Spain



[PHP] Error Reporing Questions with Mac

2002-06-18 Thread Kevin Ruiz

I'm running php 4 on a unix server and am experiencing a problem with error
reporting I'm getting on my mac.

When I get a parse error it won't tell me what line the error is on...it
simply says "parse error on line 1".  When I test the page on a pc I get an
error message that I can use... "parse error on line 143".

Does anyone have any ideas?  I get the same error when using IE for both OS
X and 9.

Thanks in advance,
Kevin


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




Re: [PHP] Need help

2002-06-18 Thread Tyler Longren

If you don't have cURL Installed yet, you can get it for Win32 here:
http://curl.haxx.se/download.html

On Tue, 2002-06-18 at 09:30, Barbara wrote:
> I want to know how I have to install cURL on my apache server. My apache server is 
>running on Windows ME.
> Thanks for all.
> Barbara Guillen.
> Spain




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




Re: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Tyler Longren

Perhaps it was a typo, but "parse error on line 1" does state the line
number.

tyler

On Tue, 2002-06-18 at 09:57, Kevin Ruiz wrote:
> I'm running php 4 on a unix server and am experiencing a problem with error
> reporting I'm getting on my mac.
> 
> When I get a parse error it won't tell me what line the error is on...it
> simply says "parse error on line 1".  When I test the page on a pc I get an
> error message that I can use... "parse error on line 143".
> 
> Does anyone have any ideas?  I get the same error when using IE for both OS
> X and 9.
> 
> Thanks in advance,
> Kevin
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 




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




[PHP] PHP to Excel?

2002-06-18 Thread Chad Day

I'm trying to get data from my MySQL database into Excel using PHP.  I know
and I am doing it right now by generating a CSV file, but is there any way I
can do formatting, like make certain cells bold, etc etc?  Is there a list
of codes somewhere I can use to put before my field output to make a field
bold, stuff like that?

Thanks,
Chad


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




RE: [PHP] RE: ODBC for Informix

2002-06-18 Thread Andrew Hill

Hi Kevin,

You can also obtain ODBC Drivers for Informix from OpenLink -
http://www.openlinksw.com


Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server

-Original Message-
From: Juraj Hasko [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 23, 2002 2:45 AM
To: 'Kevin Meredith'
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: ODBC for Informix

Hi,

ODBC drivers should be installed on server, you can download latest
Informix SDK w/ ODBC drivers from IBM:
http://www6.software.ibm.com/devcon/devcon/docs/clnt27wx.htm

Juraj

>-Original Message-
>From: Kevin Meredith [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 22, 2002 3:22 PM
>To: PHP
>Subject: ODBC for Informix
>
>
>Hi there.
>
>Could someone please tell me where I could get hold of the 
>ODBC drivers to
>connect to Informix with PHP.  Is there anything else I should know.
>
>Thanks
>Kevin
>
>



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




Re: [PHP] PHP to Excel?

2002-06-18 Thread Adam Voigt

I may be completely off-base here, but I think thats more of an Excel
compatible XML document thing, then a CSV which (I believe) is just
data.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-06-18 at 10:52, Chad Day wrote:
> I'm trying to get data from my MySQL database into Excel using PHP.  I know
> and I am doing it right now by generating a CSV file, but is there any way I
> can do formatting, like make certain cells bold, etc etc?  Is there a list
> of codes somewhere I can use to put before my field output to make a field
> bold, stuff like that?
> 
> Thanks,
> Chad
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




RE: [PHP] PHP to Excel?

2002-06-18 Thread Jay Blanchard

[snip]
I'm trying to get data from my MySQL database into Excel using PHP.
[/snip]
[shameless plug]
http://www.evolt.org/article/Using_MySQL_and_PHP_to_Present_Excel_Spreadshee
ts/20/26896/index.html

(watch wrap)
[/shameless plug]

HTH!

Jay



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




RE: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Andrew Hill

Kevin,

This can either be set dynamically by the error_reporting() function, or
changed in the php.ini file.

http://www.php.net/manual/en/function.error-reporting.php
http://www.php.net/manual/en/features.error-handling.php

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server


-Original Message-
From: Kevin Ruiz [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 18, 2002 9:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Error Reporing Questions with Mac

I'm running php 4 on a unix server and am experiencing a problem with
error
reporting I'm getting on my mac.

When I get a parse error it won't tell me what line the error is on...it
simply says "parse error on line 1".  When I test the page on a pc I get
an
error message that I can use... "parse error on line 143".

Does anyone have any ideas?  I get the same error when using IE for both
OS
X and 9.

Thanks in advance,
Kevin


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





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




[PHP] server problems

2002-06-18 Thread Kris Vose

I just uploaded a php driven web site that use text files to archive data to a unix 
server.  When I went to try and add another archive the script fails without a 
warning.  It does not store the data in the text file and it does not add another 
archive.  I wrote this application about 4 months ago when I was just learning php and 
I have found since then that mysql is the best way to store data! duh...  Anyway I was 
wondering if my permissions are screwed up on the unix server, or if there is 
something that I am overlooking here!  I do not really want to rewrite the code!  I 
spoke with the administrator of the server and he has no idea.  They are using PHP 
4.0.2B and we are using PHP 4.1.2  Anyway...thanks in advance.

Kris 

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




Re: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Kevin Ruiz

I'm sorry...I think I was unclear.

Even if my script has an error on say line 42 it still tells me that the
error is on line 1.  I've done some debugging and now that there's only one
error on the page but it always tells me that the error is on line 1.

Thanks.


in article 1024412641.2218.2.camel@nightengale, Tyler Longren at
[EMAIL PROTECTED] wrote on 6/18/02 11:03 AM:

> Perhaps it was a typo, but "parse error on line 1" does state the line
> number.
> 
> tyler
> 
> On Tue, 2002-06-18 at 09:57, Kevin Ruiz wrote:
>> I'm running php 4 on a unix server and am experiencing a problem with error
>> reporting I'm getting on my mac.
>> 
>> When I get a parse error it won't tell me what line the error is on...it
>> simply says "parse error on line 1".  When I test the page on a pc I get an
>> error message that I can use... "parse error on line 143".
>> 
>> Does anyone have any ideas?  I get the same error when using IE for both OS
>> X and 9.
>> 
>> Thanks in advance,
>> Kevin
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
> 
> 
> 


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




RE: [PHP] PHP to Excel?

2002-06-18 Thread J. Anderson Scarbrough

I often build simple reports using HTML tables and then add an Excel MIME 
header to the page which launches Excel.  Since newer verions of Excell 
suport HTML natively, Excel can read the HTML tables and render them 
appropriately with all your formatting.  I find this works well for simple 
reports and it requires very little effort.  Just an idea

-Original Message-
From: Chad Day [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 10:52 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP to Excel?


I'm trying to get data from my MySQL database into Excel using PHP.  I know 
and I am doing it right now by generating a CSV file, but is there any way I 
can do formatting, like make certain cells bold, etc etc?  Is there a list 
of codes somewhere I can use to put before my field output to make a field 
bold, stuff like that?

Thanks,
Chad


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


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] phpmyadmin - moving data from one database to another

2002-06-18 Thread Phil Schwarzmann

The lazy and worthless a-holes at www.infinitehost.com (my host server)
are forcing me to move all my MySQL data from one server to another
because they are too dumb to fix it.
 
I need to use phpmyadmin to move the data but i'm not %100 sure how to
do it.  There are some "view dump" commands.  It looks like I can
somehow download all the data and structure to my local computer, then
upload it to the new server.
 
Anyone have any info on this?
 
THanks!



[PHP] exec() , shell_exec() , system() ???

2002-06-18 Thread prg

Hola/Hi ,

I'm having a problem when I tried to get a result from
my script. I don't know how to fix it, I already read the on-line manual
in php.net but still I have the same problem..   :(

The "$result" (array) variable is empty. lenght = 0
I tried with: $result = shell_exec($cmdline);
but it's empty too...

however, when I put the cmdline in the prompt:
  /web/cgi-bin/check.cgi /web/cgi-bin/temp/12345AA.txt
it's works fine..
I'm testing in a Solaris 2.6 with apache 1.3.24 and php 4.1.2
and the user that I test in the prompt was nobody


script
---
$filename = "/web/cgi-bin/temp/$ID_VAR.txt";
$fp=fopen($filename,"w");
reset($HTTP_POST_VARS);
while (list($key,$val) = each($HTTP_POST_VARS))
{
  fwrite($fp,"$key=$val&");
}
fclose($fp);
unset($result);unset($retint);
$cmdline = "/web/cgi-bin/check.cgi $filename";
exec($cmdline,$result,$retint);  //  <-this line!
if ($result[0]=="GOOD") { echo "OK";}
else { echo "KO";}
---

values when I print out variables:
$result =  Array
sizeof($result) =  0
$result[0] =
$result[1] =
$retint = 248


I apology because my english isn't good enough..
if someone speak spanish I could give more details about my problem.

Thanks.


-- 
prg


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




Re: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Justin French

Your problem is undoubtably to do with the difference in line endings on
mac/pc/unix.

Basically, when PHP parses your file, it see's it all as one line, and is
finding the error on LINE 1, which is correct.

When the same file is saved on a unix or pc system, the line endings are
different, and PHP recognises them.

I'm using BBEdit Lite as a text editor on my Mac, and it has the option of
saving the file in Mac, PC or Unix format, to combat this problem.

Look for a simular feature in your text editor (try search for "file
format", or "line endings" in your help files, or grab BBEdit ($) or BBEdit
lite (!$) from bare bones software.


Justin French



on 19/06/02 1:12 AM, Kevin Ruiz ([EMAIL PROTECTED]) wrote:

> I'm sorry...I think I was unclear.
> 
> Even if my script has an error on say line 42 it still tells me that the
> error is on line 1.  I've done some debugging and now that there's only one
> error on the page but it always tells me that the error is on line 1.
> 
> Thanks.
> 
> 
> in article 1024412641.2218.2.camel@nightengale, Tyler Longren at
> [EMAIL PROTECTED] wrote on 6/18/02 11:03 AM:
> 
>> Perhaps it was a typo, but "parse error on line 1" does state the line
>> number.
>> 
>> tyler
>> 
>> On Tue, 2002-06-18 at 09:57, Kevin Ruiz wrote:
>>> I'm running php 4 on a unix server and am experiencing a problem with error
>>> reporting I'm getting on my mac.
>>> 
>>> When I get a parse error it won't tell me what line the error is on...it
>>> simply says "parse error on line 1".  When I test the page on a pc I get an
>>> error message that I can use... "parse error on line 143".
>>> 
>>> Does anyone have any ideas?  I get the same error when using IE for both OS
>>> X and 9.
>>> 
>>> Thanks in advance,
>>> Kevin
>>> 
>>> 
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> 
>> 
>> 
>> 
> 


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




AW: [PHP] PHP to Excel?

2002-06-18 Thread Martin Lucas

hi chad,

on http://www.cnovak.com/ you'll find a php-class that generates native
excel-files, even with cell formatings and other more or less useful things.


greetings

martin

> -Ursprüngliche Nachricht-
> Von: Chad Day [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 18. Juni 2002 16:52
> An: [EMAIL PROTECTED]
> Betreff: [PHP] PHP to Excel?
> 
> 
> I'm trying to get data from my MySQL database into Excel 
> using PHP.  I know
> and I am doing it right now by generating a CSV file, but is 
> there any way I
> can do formatting, like make certain cells bold, etc etc?  Is 
> there a list
> of codes somewhere I can use to put before my field output to 
> make a field
> bold, stuff like that?
> 
> Thanks,
> Chad
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP] Re: phpmyadmin - moving data from one database to another

2002-06-18 Thread BB

dump all the data to csv and read it in the other end!

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The lazy and worthless a-holes at www.infinitehost.com (my host server)
> are forcing me to move all my MySQL data from one server to another
> because they are too dumb to fix it.
>
> I need to use phpmyadmin to move the data but i'm not %100 sure how to
> do it.  There are some "view dump" commands.  It looks like I can
> somehow download all the data and structure to my local computer, then
> upload it to the new server.
>
> Anyone have any info on this?
>
> THanks!
>



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




Re: [PHP] Re: phpmyadmin - moving data from one database to another

2002-06-18 Thread Scott

Can't he just dump the db to a file and then load it on the new server?  I 
do that all of the time between my laptop and work.

Dump the db into a sql file (choosing data and structure for the dump)
Create a new db on the server
then run:  mysql -u xxx -p xxx -D (database name) < name_of_dump_file





On Tue, 18 Jun 2002, BB wrote:

> dump all the data to csv and read it in the other end!
> 
> "Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > The lazy and worthless a-holes at www.infinitehost.com (my host server)
> > are forcing me to move all my MySQL data from one server to another
> > because they are too dumb to fix it.
> >
> > I need to use phpmyadmin to move the data but i'm not %100 sure how to
> > do it.  There are some "view dump" commands.  It looks like I can
> > somehow download all the data and structure to my local computer, then
> > upload it to the new server.
> >
> > Anyone have any info on this?
> >
> > THanks!
> >
> 
> 
> 
> 

-- 
-
Now Playing:  Simple Minds - All The Things She Said
  Server Uptime:  189 days

www.scottah.com



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




Re: [PHP] PHP to Excel?

2002-06-18 Thread 1LT John W. Holmes

The layout on that site is so annoying. Yeah, it looks pretty, but it's
annoying. It's PHP2Excel BiffWriter that your looking for on that site.
Should be one of the topics when you expand the central "dot" (after you
close the "news' popup). annoying...

Like someone else said, I just use HTML and send an Excel header(). Works
great and it's perfect for simple stuff. I'll probably move to PHP2Excel
BiffWriter eventually, though.

---John Holmes...
- Original Message -
From: "Martin Lucas" <[EMAIL PROTECTED]>
To: "'Chad Day'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:24 AM
Subject: AW: [PHP] PHP to Excel?


hi chad,

on http://www.cnovak.com/ you'll find a php-class that generates native
excel-files, even with cell formatings and other more or less useful things.


greetings

martin

> -Ursprüngliche Nachricht-
> Von: Chad Day [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 18. Juni 2002 16:52
> An: [EMAIL PROTECTED]
> Betreff: [PHP] PHP to Excel?
>
>
> I'm trying to get data from my MySQL database into Excel
> using PHP.  I know
> and I am doing it right now by generating a CSV file, but is
> there any way I
> can do formatting, like make certain cells bold, etc etc?  Is
> there a list
> of codes somewhere I can use to put before my field output to
> make a field
> bold, stuff like that?
>
> Thanks,
> Chad
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



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




Re: [PHP] include statement errors -- something missing

2002-06-18 Thread Doug DeVries

I've tried a hundred different things -- YOURS WORKED! Thank you very much!

-Doug

- Original Message -
From: "Niklas Lampén" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, June 17, 2002 10:45 PM
Subject: RE: [PHP] include statement errors -- something missing


So far so good. $myfile is now a pointer to this file, so you can't
print it like that. Use fgets() or something else to read your file.


Niklas


-Original Message-
From: Doug DeVries [mailto:[EMAIL PROTECTED]]
Sent: 18. kesäkuuta 2002 8:34
To: Chris Knipe; Doug DeVries; Php-General (E-mail)
Subject: Re: [PHP] include statement errors -- something missing


here is what I tried:

http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li
=yes
&limit=4", "r");
?>


-- but basically it returns me "Resource ID#1" which makes me feel like
I am close.

Thanks again for your time and input. I've been learning a lot as I've
been researching for this issue.

-Doug

- Original Message -
From: "Chris Knipe" <[EMAIL PROTECTED]>
To: "Doug DeVries" <[EMAIL PROTECTED]>; "Php-General (E-mail)"
<[EMAIL PROTECTED]>
Sent: Monday, June 17, 2002 3:49 PM
Subject: Re: [PHP] include statement errors -- something missing


> Yes, you will.
>
> You've only opened the file, you need to read it, and process it and
extract
> the data that you want.
>
> i.e.. $blah = fopen(http://a/a.html, "r");
>
> while ($blah) {
>   do something with it
> }
>
> and so forth Try php.net / google.com there's lost of examples of
sites
> and pages using fopen to include data from other web sites...
>
>
> Kind Regards,
>
> Chris Knipe
> MegaLAN Corporate Networking Services
> Tel: +27 21 854 7064
> Cell: +27 72 434 7582
>
> - Original Message -
> From: "Doug DeVries" <[EMAIL PROTECTED]>
> To: "Chris Knipe" <[EMAIL PROTECTED]>; "Doug DeVries"
> <[EMAIL PROTECTED]>; "Php-General (E-mail)"
> <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 12:32 AM
> Subject: Re: [PHP] include statement errors -- something missing
>
>
> > Thank you, but it is not quite working yet. I get no errors, but
> > rather blank.
> >
> > http://www.solomonsporch.org/test.php
> >
> > - Original Message -
> > From: "Chris Knipe" <[EMAIL PROTECTED]>
> > To: "Doug DeVries" <[EMAIL PROTECTED]>; "Php-General (E-mail)"
> > <[EMAIL PROTECTED]>
> > Sent: Monday, June 17, 2002 12:55 PM
> > Subject: Re: [PHP] include statement errors -- something missing
> >
> >
> > > RTFM
> > >
> > > http://www.php.net/manual/en/function.fopen.php
> > >
> > >
> >
>
fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&lim
it=4
> > > ", "r");
> > >
> > > Would give read-only access to the file, which is what you want.
> > >
> > >
> > > - Original Message -
> > > From: "Doug DeVries" <[EMAIL PROTECTED]>
> > > To: "Chris Knipe" <[EMAIL PROTECTED]>; "Doug DeVries"
> > > <[EMAIL PROTECTED]>; "Php-General (E-mail)"
> <[EMAIL PROTECTED]>
> > > Sent: Monday, June 17, 2002 9:36 PM
> > > Subject: Re: [PHP] include statement errors -- something missing
> > >
> > >
> > > > I tried fopen in the following way, but with no success.
> > > >
> > > >  > > >
> > >
> >
>
fopen("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&lim
it=4
> > > > ");
> > > > ?>
> > > >
> > > >
> > > > - Original Message -
> > > > From: "Chris Knipe" <[EMAIL PROTECTED]>
> > > > To: "Doug DeVries" <[EMAIL PROTECTED]>; "Php-General
> > > > (E-mail)" <[EMAIL PROTECTED]>
> > > > Sent: Monday, June 17, 2002 12:33 PM
> > > > Subject: Re: [PHP] include statement errors -- something missing
> > > >
> > > >
> > > > > I don't think you can use include like that
> > > > >
> > > > > Have a look at fopen though, I'm not 100% sure that is going
> > > > > to
> help,
> > > but
> > > > I
> > > > > know fopen opens files on remote sites, include only does
> > > > > local.
> > > > >
> > > > >
> > > > > - Original Message -
> > > > > From: "Doug DeVries" <[EMAIL PROTECTED]>
> > > > > To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
> > > > > Sent: Monday, June 17, 2002 9:27 PM
> > > > > Subject: [PHP] include statement errors -- something missing
> > > > >
> > > > >
> > > > > > Help ... please. ...
> > > > > >
> > > > > > From the page www.solomonsporch.org/test.php I get the
> > > > > > following
> > > error.
> > > > > >
> > > > > > Warning: Failed opening
> > > > > >
> 'http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit
> > > =4'
> > > > > for
> > > > > > inclusion (include_path='c:\php4\pear') in
> > > e:\solomonsporch.org\test.php
> > > > > on
> > > > > > line 10
> > > > > >
> > > > > > The page HTML is as follows:
> > > > > >
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > test area should show 4 lines of news
> > > > > >
> > > > > >
> > > > > >  > > > > >
> > > > >
> > > >
> > >
> >
>
include("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&l
imit
> > > > > > =4");
> > > > > > ?>
> > > > > >
> > > > > >
> > > > > > 
> > > > > >
> 

[PHP] setting up a php/mysql server on linux

2002-06-18 Thread Phil Schwarzmann

I'm a Linux newbie.  I just installed Linux Red Hat 7.2 successfully.  I
have some instructions to install php/mysql/apache and have a couple
questions...
 
Which is better, GNOME or KDE?  I seem to like the feel of KDE better.
 
Does Apache or php or mysql already come preloaded on Linux Red Hat?
 
Any tips you want to give me when installing all this stuff.  I had a
hard ass time getting this to work on Windows, so now I gave up and went
to Linux.
 
Your thoughts?
 
Thanks!!



Re: [PHP] server problems

2002-06-18 Thread 1LT John W. Holmes

Are you sure display_errors is turned ON in php.ini on the new server? Do
the two servers have different settings for register_globals in php.ini?

---John Holmes...

- Original Message -
From: "Kris Vose" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:12 AM
Subject: [PHP] server problems


I just uploaded a php driven web site that use text files to archive data to
a unix server.  When I went to try and add another archive the script fails
without a warning.  It does not store the data in the text file and it does
not add another archive.  I wrote this application about 4 months ago when I
was just learning php and I have found since then that mysql is the best way
to store data! duh...  Anyway I was wondering if my permissions are screwed
up on the unix server, or if there is something that I am overlooking here!
I do not really want to rewrite the code!  I spoke with the administrator of
the server and he has no idea.  They are using PHP 4.0.2B and we are using
PHP 4.1.2  Anyway...thanks in advance.

Kris

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



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




RE: [PHP] PHP to Excel?

2002-06-18 Thread Chad Day

Annoying doesn't begin to describe it.

I'm going with the HTML/Excel Header bit, since Biffwriter costs way too
much for a for-profit business to use.  Thanks anyway.. looks pretty neat,
and I'll probably use it for some other projects I do.

Thanks,
Chad

-Original Message-
From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 11:47 AM
To: Martin Lucas; 'Chad Day'; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP to Excel?


The layout on that site is so annoying. Yeah, it looks pretty, but it's
annoying. It's PHP2Excel BiffWriter that your looking for on that site.
Should be one of the topics when you expand the central "dot" (after you
close the "news' popup). annoying...

Like someone else said, I just use HTML and send an Excel header(). Works
great and it's perfect for simple stuff. I'll probably move to PHP2Excel
BiffWriter eventually, though.

---John Holmes...
- Original Message -
From: "Martin Lucas" <[EMAIL PROTECTED]>
To: "'Chad Day'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:24 AM
Subject: AW: [PHP] PHP to Excel?


hi chad,

on http://www.cnovak.com/ you'll find a php-class that generates native
excel-files, even with cell formatings and other more or less useful things.


greetings

martin

> -Ursprüngliche Nachricht-
> Von: Chad Day [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 18. Juni 2002 16:52
> An: [EMAIL PROTECTED]
> Betreff: [PHP] PHP to Excel?
>
>
> I'm trying to get data from my MySQL database into Excel
> using PHP.  I know
> and I am doing it right now by generating a CSV file, but is
> there any way I
> can do formatting, like make certain cells bold, etc etc?  Is
> there a list
> of codes somewhere I can use to put before my field output to
> make a field
> bold, stuff like that?
>
> Thanks,
> Chad
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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




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




[PHP] phpDocumentor 1.1.0rc2 RELEASE ANNOUNCEMENT

2002-06-18 Thread Greg Beaver

June 18, 2002
RELEASE ANNOUNCEMENT
phpDocumentor version 1.1.0rc2
http://www.phpdoc.org
Download: http://phpdocu.sourceforge.net/downloads.php

The phpDocumentor Development team would like to announce the release of
phpDocumentor version 1.1.0rc2.  This is a release candidate for 1.1.0 to
ensure that all bugs have been fixed before release

phpDocumentor is the most advanced auto-documentation system available for
PHP.  Similar to the auto-documentor included with PEAR, phpDocumentor
parses documentation comments in the PHP source to create hyperlinked API
references for projects.

With 1.1.0rc2 the pre-alpha PDF Converter is greatly improved.  In addition,
a new HTML converter that uses the Smarty template engine
(http://smarty.php.net)
and has no frames is available.  A pre-alpha CHM converter is also included,
which
requires MS HTML Help Workshop, but works.  Through the use of
"Converters" similar to JavaDoc's doclets, phpDocumentor can interface
parsing
output to any template with minimal coding.  In addition, 6 HTML templates
come
with the standard HTML Converter

Other features include:
  --all known bugs in 1.1.0rc1 have been fixed
  --fully 25% faster than version 1.0.0
  --able to directly parse a CVS repository
  --parses any php file, with multiple classes and functions in the same
file
  --fully compliant with even the most esoteric php syntax
   ($string = <<< EOF, for example)
  --greatly improved ease of Converter programming
  --parsing of global and static variables
  --documentation of name conflicts between packages
  --auto-linking to elements in any package
  --error/warnings by line number and file to allow for debugging of
 documentation tags
  --extensive documentation of the package, including a detailed
specification
 for tags and templates
  --open source, GPL

phpDocumentor is fast becoming the standard auto-documentor, and is
used by several PHP projects including PostNuke
Content Management (http://www.postnuke.com), phpRPC
(http://phprpc.sourceforge.net/), and XMap
(http://opensource.under.com.br/xmap/docs/)

To Download, go to http://phpdocu.sourceforge.net/downloads.php

The phpDocumentor development team
Joshua Eichorn
Gregory Beaver




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




[PHP] linux redhat rpm packages

2002-06-18 Thread Phil Schwarzmann

What exactly are these linux redhat rpm packages?  Is this an 'easier'
way to install mysql/php ??



[PHP] Sessions and variables dum question

2002-06-18 Thread webmaster mbtradingco

Hi, maybe I'm doing something wrong but I can't figure out what. I have a little 
script that is supposed to handle two variables from a session, so when a user logs in:

Session start()
$user = "user"
$pass = "pass"... redirects to another page.

Now on the index page it reads 

Session start()
Global $user, $password;
If (empty($user))
   Die("You need to be registered to see this page")
Else ...

This works fine... the first time you use it, if someone tries to log in, from 
outside, it gives them an error message, the problem is that if I log in correctly, 
and lets say go to another restricted page, while I use the exact same header, it 
always takes $user as empty in the second page, and then if I try to go back to the 
first page, now $user is also empty...

I thought once you registered a variable in a session, it was supposed to be available 
through the global instruction for the whole section, but in this case it seems to 
disappear after the first page... funny, cause I don't pass the variable the first 
time through a post, or get, but rather by registering the variable before going to 
index.

Any ideas, of what I'm doing wrong?


__
Elliot Balanza
ICQ#: 146854957
Current ICQ status:  


  More ways to contact me 
  See more about me: 
__




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




[PHP] Re: Date Comparsion

2002-06-18 Thread Lee Doolan

> "Jack" == Jack  <[EMAIL PROTECTED]> writes:

Jack> Dear all I had a form which let user to input the leave_from
Jack> and leave_to date into, the format of the date that user
Jack> input is "-mm-dd".  Now i want to compare the leave_from
Jack> and leave_to date to find out the number of days between!

well, here's one way:

$interval_days= (strtotime($to_date) - strtotime($from_date)) / 3600 * 24

adjust to taste.


-- 
When the birdcage is open,   | donate to causes I care about: 
the selfish bird flies away, |http://svcs.affero.net/rm.php?r=leed_25
but the virtuous one stays.  |

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




[PHP] Re: [PEAR-DEV] phpDocumentor 1.1.0rc2 RELEASE ANNOUNCEMENT

2002-06-18 Thread Markus Fischer

Hey,

you should really teach your webmaser to fix the site. First
I thought "okay, he doesn't like opera" but then .. It's even
a mess in IE5.5. Only NS4.7 which I just had by chance
renders it readable (yet it looks completely different
layout-wise) ...  um. Plain text would have done it too :-)

- Markus

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc

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




Re: [PHP] Sessions and variables dum question

2002-06-18 Thread Justin French

When you're dealing with session variables, it's a good idea to refer to
them using the new global variables.



";
echo $_SESSION['pass'] . "";
}
else
{
echo "not logged in";
}
?>

Of course this is no where near production/secure code :D


Justin





on 19/06/02 1:54 AM, webmaster mbtradingco ([EMAIL PROTECTED])
wrote:

> Hi, maybe I'm doing something wrong but I can't figure out what. I have a
> little script that is supposed to handle two variables from a session, so when
> a user logs in:
> 
> Session start()
> $user = "user"
> $pass = "pass"... redirects to another page.
> 
> Now on the index page it reads
> 
> Session start()
> Global $user, $password;
> If (empty($user))
> Die("You need to be registered to see this page")
> Else ...
> 
> This works fine... the first time you use it, if someone tries to log in, from
> outside, it gives them an error message, the problem is that if I log in
> correctly, and lets say go to another restricted page, while I use the exact
> same header, it always takes $user as empty in the second page, and then if I
> try to go back to the first page, now $user is also empty...
> 
> I thought once you registered a variable in a session, it was supposed to be
> available through the global instruction for the whole section, but in this
> case it seems to disappear after the first page... funny, cause I don't pass
> the variable the first time through a post, or get, but rather by registering
> the variable before going to index.
> 
> Any ideas, of what I'm doing wrong?
> 
> 
> __
> Elliot Balanza
> ICQ#: 146854957
> Current ICQ status:
> 
> 
> More ways to contact me
> ?  See more about me:
> __
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] getting variables the hard way?

2002-06-18 Thread Renaldo De Silva

how can i get variables posted from a form without  calling then distinctly.

i want to get the names of all the variables the form has poster
automatically.
can that be done and if it can how?

Thanks Renaldo



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




Re: [PHP] PHP to Excel?

2002-06-18 Thread 1LT John W. Holmes

In that case, here's a function I use to set an Excel header.

##
#
# Creates headers to send MS Excel file
#
##
function COM_ExcelHeader($filename = "download")
{
//MS Excel Headers
header("Content-Type: application/vnd.ms-excel; name='excel'");
header("Content-Disposition: attachment; filename=" . $filename .
".xls");
}

---John Holmes...

- Original Message -
From: "Chad Day" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:40 AM
Subject: RE: [PHP] PHP to Excel?


> Annoying doesn't begin to describe it.
>
> I'm going with the HTML/Excel Header bit, since Biffwriter costs way too
> much for a for-profit business to use.  Thanks anyway.. looks pretty neat,
> and I'll probably use it for some other projects I do.
>
> Thanks,
> Chad
>
> -Original Message-
> From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:47 AM
> To: Martin Lucas; 'Chad Day'; [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP to Excel?
>
>
> The layout on that site is so annoying. Yeah, it looks pretty, but it's
> annoying. It's PHP2Excel BiffWriter that your looking for on that site.
> Should be one of the topics when you expand the central "dot" (after you
> close the "news' popup). annoying...
>
> Like someone else said, I just use HTML and send an Excel header(). Works
> great and it's perfect for simple stuff. I'll probably move to PHP2Excel
> BiffWriter eventually, though.
>
> ---John Holmes...
> - Original Message -
> From: "Martin Lucas" <[EMAIL PROTECTED]>
> To: "'Chad Day'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 11:24 AM
> Subject: AW: [PHP] PHP to Excel?
>
>
> hi chad,
>
> on http://www.cnovak.com/ you'll find a php-class that generates native
> excel-files, even with cell formatings and other more or less useful
things.
>
>
> greetings
>
> martin
>
> > -Ursprüngliche Nachricht-
> > Von: Chad Day [mailto:[EMAIL PROTECTED]]
> > Gesendet: Dienstag, 18. Juni 2002 16:52
> > An: [EMAIL PROTECTED]
> > Betreff: [PHP] PHP to Excel?
> >
> >
> > I'm trying to get data from my MySQL database into Excel
> > using PHP.  I know
> > and I am doing it right now by generating a CSV file, but is
> > there any way I
> > can do formatting, like make certain cells bold, etc etc?  Is
> > there a list
> > of codes somewhere I can use to put before my field output to
> > make a field
> > bold, stuff like that?
> >
> > Thanks,
> > Chad
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Error Reporing Questions with Mac

2002-06-18 Thread Christian Rellstab

i've seen this quite often and in my case, it always happens when you 
have en error in an "if" or similar sentence. then it always tells me 
theres an error on line 1 (ie 5.2 on mac os x).

chris


Am Dienstag den, 18. Juni 2002, um 17:12, schrieb Kevin Ruiz:

> I'm sorry...I think I was unclear.
>
> Even if my script has an error on say line 42 it still tells me that the
> error is on line 1.  I've done some debugging and now that there's only 
> one
> error on the page but it always tells me that the error is on line 1.
>
> Thanks.
>
>
> in article 1024412641.2218.2.camel@nightengale, Tyler Longren at
> [EMAIL PROTECTED] wrote on 6/18/02 11:03 AM:
>
>> Perhaps it was a typo, but "parse error on line 1" does state the line
>> number.
>>
>> tyler
>>
>> On Tue, 2002-06-18 at 09:57, Kevin Ruiz wrote:
>>> I'm running php 4 on a unix server and am experiencing a problem with 
>>> error
>>> reporting I'm getting on my mac.
>>>
>>> When I get a parse error it won't tell me what line the error is 
>>> on...it
>>> simply says "parse error on line 1".  When I test the page on a pc I 
>>> get an
>>> error message that I can use... "parse error on line 143".
>>>
>>> Does anyone have any ideas?  I get the same error when using IE for 
>>> both OS
>>> X and 9.
>>>
>>> Thanks in advance,
>>> Kevin
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>

 |/
@ @
--oOO-(_)-OOo---
christian rellstab
rotbuchstrasse 52
8037 zürich

tel (p): 043 255 04 69
tel (g): 01 633 40 15
fax (g): 01 633 12 61

[EMAIL PROTECTED]
http://www.rellstab.ch/christian
---






Re: [PHP] setting up a php/mysql server on linux

2002-06-18 Thread Chris Hewitt

Phil Schwarzmann wrote:

>I'm a Linux newbie.  I just installed Linux Red Hat 7.2 successfully.  I
>have some instructions to install php/mysql/apache and have a couple
>questions...
> 
>
Fire away.

>
>Which is better, GNOME or KDE?  I seem to like the feel of KDE better.
>
This is just for a user logged in. It does not affect apache/php/mysql 
as those are simply server processes over a network. By default both 
Gnome and KDE are installed (well, I choose the "custom" then "install 
everything" option). You can switch from one to another.

>
>Does Apache or php or mysql already come preloaded on Linux Red Hat?
>
Yes, all of them

>
>Any tips you want to give me when installing all this stuff.  I had a
>hard ass time getting this to work on Windows, so now I gave up and went
>to Linux.
>
As I use linux, I've never tried installing these under windows. I 
gather there are several installers around, some are reputed to work 
very well.

>
>Your thoughts?
>
What I am thinking is not for this list :-)

>
>Thanks!!
>
You are welcome. Hope it helps.

Chris


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




[PHP] Re: [PEAR-DEV] phpDocumentor 1.1.0rc2 RELEASE ANNOUNCEMENT

2002-06-18 Thread Greg Beaver

This comment is inappropriate, unless you'd like to take on the website
maintenance?

He DID test it in 5.5, and it looked fine.  What exact version and OS are
you using?  There are reported problems with Mac IE 5.0.

There's a plan to fix the site at the end of this week.  To test a website
with IE is very difficult because one must have multiple computers with
different versions of the browser installed.  Our priority has been
phpDocumentor, and it's only been a week and a half with the new site.  We
do not get paid to do this work, and are not intending any harm.  To assume
so is not intelligent.

If you used IE 5.5 or IE 6.0, or Netscape 6.2, Netscape 4.7- or Mozilla 1.0
the website looks quite nice, as these are the browsers he had a chance to
test it in.

http://www.phpdoc.org - works in most browsers
http://phpdocu.sourceforge.net/downloads.php - works probably in all
browsers

Both urls were in the release announcement.

Take care,
Greg

- Original Message -
From: "Markus Fischer" <[EMAIL PROTECTED]>
To: "Greg Beaver" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:16 AM
Subject: Re: [PEAR-DEV] phpDocumentor 1.1.0rc2 RELEASE ANNOUNCEMENT


> Hey,
>
> you should really teach your webmaser to fix the site. First
> I thought "okay, he doesn't like opera" but then .. It's even
> a mess in IE5.5. Only NS4.7 which I just had by chance
> renders it readable (yet it looks completely different
> layout-wise) ...  um. Plain text would have done it too :-)
>
> - Markus
>
> --
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
>
>


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




Re: [PHP] linux redhat rpm packages

2002-06-18 Thread Chris Hewitt

Phil,

The rpm stands for "RedHat Package Manager" and was written by them. 
They have allowed others to use it so the rpm is now meant to stand for 
something else.

The rpm format allows for all dependencies, so it is likely to be less 
problematical than the tar.gzip versions (though it depends on how well 
the rpm installation part was written). The rpm format is intended for 
the unix layouts that use it, tar.gz is more general, though that does 
not mean that tar.gz is any worse.

If you have a full installation of RedHat, you will already have apache, 
php, mysql and postgresql, so the only reason for wanting to change them 
is if you need to upgrade.

HTH
Chris

Phil Schwarzmann wrote:

>What exactly are these linux redhat rpm packages?  Is this an 'easier'
>way to install mysql/php ??
>



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




[PHP] Re: [PEAR-DEV] phpDocumentor 1.1.0rc2 RELEASE ANNOUNCEMENT

2002-06-18 Thread Tim Gallagher

hey hey hey
looks great to me.

"can't we all just get along?"  :)

-timmyg


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




RE: [PHP] getting variables the hard way?

2002-06-18 Thread Rick Emery

$_POST[]
$HTTP_POST_VARS[]

- Original Message - 
From: "Renaldo De Silva" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 3:21 PM
Subject: [PHP] getting variables the hard way?


how can i get variables posted from a form without  calling then distinctly.

i want to get the names of all the variables the form has poster
automatically.
can that be done and if it can how?

Thanks Renaldo



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





Re: [PHP] server problems

2002-06-18 Thread Tom Ray

And what are the directory/file permissions where you are writing the
archive files?


- Original Message -
From: "1LT John W. Holmes" <[EMAIL PROTECTED]>
To: "Kris Vose" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 11:54 AM
Subject: Re: [PHP] server problems


> Are you sure display_errors is turned ON in php.ini on the new server? Do
> the two servers have different settings for register_globals in php.ini?
>
> ---John Holmes...
>
> - Original Message -
> From: "Kris Vose" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 11:12 AM
> Subject: [PHP] server problems
>
>
> I just uploaded a php driven web site that use text files to archive data
to
> a unix server.  When I went to try and add another archive the script
fails
> without a warning.  It does not store the data in the text file and it
does
> not add another archive.  I wrote this application about 4 months ago when
I
> was just learning php and I have found since then that mysql is the best
way
> to store data! duh...  Anyway I was wondering if my permissions are
screwed
> up on the unix server, or if there is something that I am overlooking
here!
> I do not really want to rewrite the code!  I spoke with the administrator
of
> the server and he has no idea.  They are using PHP 4.0.2B and we are using
> PHP 4.1.2  Anyway...thanks in advance.
>
> Kris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




[PHP] synchronize functions

2002-06-18 Thread w . w . w

Hi!

Any idea, how to synchronize functions in php???
I also have access to perl - so if it isn't possible with php, perhaps with
perl???

thanks for any hint, any idea or simple any mail!!!

regards
michael

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


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




[PHP] sql commnad in a for loop !

2002-06-18 Thread Septic Flesh

I wanna make the following sql query which looks a bit complicated., and put
it in a for loop too for all days from 1 to 31.

==


for $day=1 until $day=31
{
count how many records (rows) there are in the tracker table,
without counting rows that contain the same "user_id" value,
when the day=$day.
}


==

how do i CALL then each result to display them in a web page ?

Can something like that happen, or shall I repeate the same query 31 times ?
:(

Thanks in advance..


--


Sapilas@/dev/pinkeye





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




[PHP] cannot find mysql_connect; _pconnect

2002-06-18 Thread Anthony 'Crash' Ciarochi

I am having trouble connecting to my MySQL database:  The error message I receive 
in my browser is:

Fatal error: Call to undefined function: mysql_connect() in ../results.php on line 21

The line in question is a simple db connection:

$db = mysql_connect("localhost", "test", "test123");

Similar errors are receieved with mysql_pconnect, and others.  This sounds like a 
configuration problem, but ???

System info:
OS: Linux (Redhat 7.3)
MySQL: version 3.23.49, working normally
PHP: version 4.1.2-7, working normally, except for the database connection utilities

related rpms installed:
php-4.1.2-7.i386.rpm
php-devel-4.1.2-7.i386.rpm
php-mysql-4.1.2-7.i386.rpm
php-dbg-4.1.2-7.i386.rpm
Msql-Mysql-modules-11.2216.tar.gz
mysql-31.23.49a-pc-linux-gnu-i686.tar.gz

Any ideas??

 - AFC



Re: [PHP] cannot find mysql_connect; _pconnect

2002-06-18 Thread Rasmus Lerdorf

You need to enable the mysql extension in your php.ini file:

extension=mysql.so

and then restart your server.

-Rasmus

On Tue, 18 Jun 2002, Anthony 'Crash' Ciarochi wrote:

> I am having trouble connecting to my MySQL database:  The error message I receive
> in my browser is:
>
> Fatal error: Call to undefined function: mysql_connect() in ../results.php on line 21
>
> The line in question is a simple db connection:
>
> $db = mysql_connect("localhost", "test", "test123");
>
> Similar errors are receieved with mysql_pconnect, and others.  This sounds like a 
>configuration problem, but ???
>
> System info:
> OS: Linux (Redhat 7.3)
> MySQL: version 3.23.49, working normally
> PHP: version 4.1.2-7, working normally, except for the database connection utilities
>
> related rpms installed:
> php-4.1.2-7.i386.rpm
> php-devel-4.1.2-7.i386.rpm
> php-mysql-4.1.2-7.i386.rpm
> php-dbg-4.1.2-7.i386.rpm
> Msql-Mysql-modules-11.2216.tar.gz
> mysql-31.23.49a-pc-linux-gnu-i686.tar.gz
>
> Any ideas??
>
>  - AFC
>


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




[PHP] variable declaration in class

2002-06-18 Thread Jens Lehmann

Can anyone explain me why the following code causes
the parse error "... unexpected * ... " ?

class test
{
var $a = 2*10;
}

Of course I know why there's a parse error, but I don't
know the reason why PHP doesn't allow this multiplication,
although it allows a statement like e.g. var $a = 20.
I'd be thankful if anyone could enlighten me. I'm using
PHP 4.2. on Win2k.

Jens



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




Re: [PHP] error log apache over 250 mb after 2 weeks! undefinedvariable?

2002-06-18 Thread Michael Sweeney

It's nothing you have to worry about, but you need to edit your php.ini
file and change the error reporting settings. Find the error_reporting
directives (there will be several, all but one commented out) and
uncomment the one that looks like:

  error_reporting  =  E_ALL & ~E_NOTICE & ~E_WARNING

For production use, you want to use logging (which you're doing) and
only report the parsing and fatal errors. But you might also want to go
through the logs you have now and find the warnings and fix them, just
for good coding practice. You might also want to set the logging to go
to a file that is not your server log file. It'll make it easier to
manage.

..michael..

On Mon, 2002-06-17 at 06:46, andy wrote:
> Hi there,
> 
> my site is online now for only two weeks and I do have a 250 MB apache error
> log file!
> 
> The main entries look like this:
> [Mon Jun 17 15:36:25 2002] [error] PHP Notice:  Use of undefined constant
> level - assumed 'level' in /xx on line 77
> [Mon Jun 17 15:36:25 2002] [error] PHP Notice:  Undefined variable:  default
> in /xx on line 80
> 
> Is this something I have to worry about? I hope that I do not have to change
> all my lines, maybe it would be enough to change the php.ini error level. If
> so, can anybody please give me a hint on what to change there.
> 
> Thanx for any help,
> 
> Andy
> 



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




[PHP] sessions trouble

2002-06-18 Thread Leston Drake

Hello,

I am unable to retrieve session variables on my local server.
I'm using some code like this to test it (thanks to Ed):
--
session_start();
echo ":" . $_SESSION["node"] . "";
$_SESSION["node"] = "10.2";
echo ":" . $_SESSION["node"] . "";
--

Then there is an href link to the same document, to test whether or not it 
can see $_SESSION["node"] the next time.
It can't.
The output for both requests looks like this:
--
Warning: Undefined index: node in c:\program files\apache 
group\apache\htdocs\test5.php on line 3
:
:10.2

test
--

On another server (http://www.lpsoftware.com/phptest/test5.php) it works as 
expected. But I can't figure out why it doesn't work here.
I'm running WinME, Apache 1.3.2, Php 4.1.2

I have cookies enabled (actually prompted so I can 'see' it) for my browser.
Is there some setting in php.ini that I need to change?

BTW, being a php newbie I really appreciate the helpful people on this 
list! You're a great resource.

TIA,
Leston


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




Re: [PHP] Advanced User Authentication

2002-06-18 Thread George Whiffen

César aracena wrote:

> I like very much the idea of using a "short" way. Actually, I did and
> here's how:
>
> // After I queried the DB for a username & password match:
> if (mysql_num_rows($result) > 0)
> {
> $row = mysql_fetch_array($result);
> if ($row[authlevel] == '1')
> {
> $valid_user = $username;
> session_register("valid_admin");
> }
> else if ($row[authlevel] == '0')
> {
> $valid_user = $username;
> session_register("valid_user");
> }
> }
>
> but still doesn't work. I'm still getting the "posted" values back (when
> pointed to phpinfo.php) including the sessionID variable, but the
> Session doesn't show like registered. That is, when I called the
> following Script, nothing happens:
>

Cesar,

For the admin users, you set $valid_user but then register valid_admin.
It's a typo.
$valid_user = $username;
session_register("valid_admin");
should be
$valid_admin = $username;
session_register("valid_admin");

Another time, I would have made auth_level in the database a character
field set to
'user', 'admin', 'readonly' or whatever and then just pass it straight
through i.e.

if (mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
 $user_type = $row[auth_level];
  session_register('auth_level');
 }
or even, just let auth_level default to '' if no match found i.e.
$row = mysql_fetch_array($result);
$user_type = $row[auth_level];
session_register('auth_level');


For the record, I don't like using sessions to pass around access
control information, I would force http authentication on every page i.e.

.. check user/password as per above  but using
$PHP_AUTH_USER and $PHP_AUTH_PW

... and then add the following to force an authentication if they
haven't authenticated themselves:

if ($auth_level == '')
{
$REALM = 'My Application';
header("WWW-Authenticate: Basic Realm=\"$REALM\"");
header("HTTP/1.0 401 Unauthorised");
include("authenticate_failure_message.html");
exit;
}


Of course, you can wrap this all up in a function and do extra useful
things
like having a central user database and passing through
application/section/page
information to a single get_access function etc.,etc...

But it sounds like you're too far done your current track to be interested
in that sort
of approach.  And, in any case,  it might not match your style if you like
sessions.
Personally, I don't  like using sessions for anything on the grounds that
they're trying
to retrofit "state" onto intrinsically state-less protocols and therefore
bound to be
clumsy/buggy/limiting.

Good Luck,

George

>
> [snip]
> if (session_is_registered("valid_admin"))
> {
> // do admin stuff
> }
> else if (session_is_registered("valid_user"))
> {
> // do users stuff
> }
> else
> {
> // prompt for login
> // this is still what's showing!!!???
> }
> [snip]
>
> César Aracena
> IS / MCSE+I
> Neuquén, NQN
> (0299) 156-356688
> (0299) 446-6621
> > -Mensaje original-
> > De: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> > Enviado el: Viernes, 14 de Junio de 2002 03:11 a.m.
> > Para: César Aracena
> > CC: PHP General List
> > Asunto: Re: [PHP] Advanced User Authentication
> >
> > I think you're making it needlessly complicated. Why don't you just
> >
> >   select * from * FROM auth WHERE authname = '$username' AND
> >   authpass = password('$password')
> >
> > and not worry about "WHERE authlevel = 1"?
> >
> > Then, if that query is successful, you can just fetch the result row
> > and see what 'authlevel' is for that user, and act accordingly.
> >
> > miguel
> >
> > On Fri, 14 Jun 2002, César Aracena wrote:
> > > I?m trying to make a somehow ?advanced? user authentication system
> fro
> > > my own web site. What I?m using as a model example, is the
> > > authentication system explained by Luke Welling & Laura Thomson in
> their
> > > book ?PHP and MySQL Web Development?. In the book, they explain how
> to
> > > make apparently a perfect user authentication system, but only for
> one
> > > level users. I would like to change that somehow in order to make my
> > > scripts recognize whether the user is an Administrator or a Common
> User,
> > > identified by a ?authlevel? field in my DB (1 for Admin - 2 for
> Users).
> > >
> > > I?m making all my web sites, by using an ?include? schema, so the
> user
> > > is authenticated only in the Header (included in all the pages).
> > >
> > > What I have so far is:
> > >
> > >  > >
> > > // this is where the original script begin
> > >
> > > session_start();
> > >
> > > if ($userid && $password)
> > > {
> > > $db_conn = mysql_connect("localh

[PHP] php server - ive installed linux red hat 7.2 — now what?!?

2002-06-18 Thread Phil Schwarzmann

okay, so I've installed linux red hat 7.2 and it's working well!
 
ive heard that php/apache/mysql comes preinstalled with red hat.
 
what do i need to do to get php/mysql up and running?
 
also, how do i figure out my linux box's IP address?  ipconfig doesn't
work hehe.
 
Thanks for your time!!!



Re: [PHP] cannot find mysql_connect; _pconnect

2002-06-18 Thread Anthony 'Crash' Ciarochi

Nope, that's not it.  'extension=mysql.so' was already uncommented in
/etc/php.ini

Where is this library supposed to live?  I only see the client libraries in
/usr/lib/mysql/  (mysqlclient.so, etc.).

 - AFC

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Anthony 'Crash' Ciarochi" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 10:01 AM
Subject: Re: [PHP] cannot find mysql_connect; _pconnect


> You need to enable the mysql extension in your php.ini file:
>
> extension=mysql.so
>
> and then restart your server.
>
> -Rasmus
>
> On Tue, 18 Jun 2002, Anthony 'Crash' Ciarochi wrote:
>
> > I am having trouble connecting to my MySQL database:  The error message
I receive
> > in my browser is:
> >
> > Fatal error: Call to undefined function: mysql_connect() in
../results.php on line 21
> >
> > The line in question is a simple db connection:
> >
> > $db = mysql_connect("localhost", "test", "test123");
> >
> > Similar errors are receieved with mysql_pconnect, and others.  This
sounds like a configuration problem, but ???
> >
> > System info:
> > OS: Linux (Redhat 7.3)
> > MySQL: version 3.23.49, working normally
> > PHP: version 4.1.2-7, working normally, except for the database
connection utilities
> >
> > related rpms installed:
> > php-4.1.2-7.i386.rpm
> > php-devel-4.1.2-7.i386.rpm
> > php-mysql-4.1.2-7.i386.rpm
> > php-dbg-4.1.2-7.i386.rpm
> > Msql-Mysql-modules-11.2216.tar.gz
> > mysql-31.23.49a-pc-linux-gnu-i686.tar.gz
> >
> > Any ideas??
> >
> >  - AFC
> >


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




Re: [PHP] cannot find mysql_connect; _pconnect

2002-06-18 Thread Rasmus Lerdorf

Well, check.  rpm -ql php-mysql

On Tue, 18 Jun 2002, Anthony 'Crash' Ciarochi wrote:

> Nope, that's not it.  'extension=mysql.so' was already uncommented in
> /etc/php.ini
>
> Where is this library supposed to live?  I only see the client libraries in
> /usr/lib/mysql/  (mysqlclient.so, etc.).
>
>  - AFC
>
> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "Anthony 'Crash' Ciarochi" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 10:01 AM
> Subject: Re: [PHP] cannot find mysql_connect; _pconnect
>
>
> > You need to enable the mysql extension in your php.ini file:
> >
> > extension=mysql.so
> >
> > and then restart your server.
> >
> > -Rasmus
> >
> > On Tue, 18 Jun 2002, Anthony 'Crash' Ciarochi wrote:
> >
> > > I am having trouble connecting to my MySQL database:  The error message
> I receive
> > > in my browser is:
> > >
> > > Fatal error: Call to undefined function: mysql_connect() in
> ../results.php on line 21
> > >
> > > The line in question is a simple db connection:
> > >
> > > $db = mysql_connect("localhost", "test", "test123");
> > >
> > > Similar errors are receieved with mysql_pconnect, and others.  This
> sounds like a configuration problem, but ???
> > >
> > > System info:
> > > OS: Linux (Redhat 7.3)
> > > MySQL: version 3.23.49, working normally
> > > PHP: version 4.1.2-7, working normally, except for the database
> connection utilities
> > >
> > > related rpms installed:
> > > php-4.1.2-7.i386.rpm
> > > php-devel-4.1.2-7.i386.rpm
> > > php-mysql-4.1.2-7.i386.rpm
> > > php-dbg-4.1.2-7.i386.rpm
> > > Msql-Mysql-modules-11.2216.tar.gz
> > > mysql-31.23.49a-pc-linux-gnu-i686.tar.gz
> > >
> > > Any ideas??
> > >
> > >  - AFC
> > >
>


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




[PHP] static not working as expected

2002-06-18 Thread Purushotham Komaravolu

counter;
print "\n";
}
}


class SingletonCounter {
static $m_instance = NULL;  // throwing error here

function Instance()
{
if (self::$m_instance == NULL) {
self::$m_instance = new Counter();
}
return self::$m_instance;
}
}

SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();
SingletonCounter::Instance()->increment_and_print();

?>


is throwing the following error
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or 
`'}'' in /singleton.php on line 15






[PHP] Re: [PHP-DEV] static not working as expected

2002-06-18 Thread Markus Fischer

'statis' is ONLY used inside functions. You need the 'var'
keyword to define class property. This is true for ZE1, I
can't tell if ZE2 has static class properties, anyone else?

- Markus

On Tue, Jun 18, 2002 at 10:42:43AM -0700, Purushotham Komaravolu wrote : 
>  
> class Counter {
> var $counter = 0;
> 
> function increment_and_print()
> {
> print ++$this->counter;
> print "\n";
> }
> }
> 
> 
> class SingletonCounter {
> static $m_instance = NULL;  // throwing error here
> 
> function Instance()
> {
> if (self::$m_instance == NULL) {
> self::$m_instance = new Counter();
> }
> return self::$m_instance;
> }
> }
> 
> SingletonCounter::Instance()->increment_and_print();
> SingletonCounter::Instance()->increment_and_print();
> SingletonCounter::Instance()->increment_and_print();
> 
> ?>
> 
> 
> is throwing the following error
> Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or 
>`'}'' in /singleton.php on line 15

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




[PHP] Re: [PHP-DEV] static not working as expected

2002-06-18 Thread Purushotham Komaravolu

Thanks for your prompt answer.If that's the case then, how do I define a
singleton class?
Regards,
Puru

- Original Message -
From: "Markus Fischer" <[EMAIL PROTECTED]>
To: "Purushotham Komaravolu" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 10:58 AM
Subject: Re: [PHP-DEV] static not working as expected


> 'statis' is ONLY used inside functions. You need the 'var'
> keyword to define class property. This is true for ZE1, I
> can't tell if ZE2 has static class properties, anyone else?
>
> - Markus
>
> On Tue, Jun 18, 2002 at 10:42:43AM -0700, Purushotham Komaravolu wrote :
> >  >
> > class Counter {
> > var $counter = 0;
> >
> > function increment_and_print()
> > {
> > print ++$this->counter;
> > print "\n";
> > }
> > }
> >
> >
> > class SingletonCounter {
> > static $m_instance = NULL;  // throwing error here
> >
> > function Instance()
> > {
> > if (self::$m_instance == NULL) {
> > self::$m_instance = new Counter();
> > }
> > return self::$m_instance;
> > }
> > }
> >
> > SingletonCounter::Instance()->increment_and_print();
> > SingletonCounter::Instance()->increment_and_print();
> > SingletonCounter::Instance()->increment_and_print();
> >
> > ?>
> >
> >
> > is throwing the following error
> > Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or
`T_VAR' or `'}'' in /singleton.php on line 15
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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




RE: [PHP] sessions trouble

2002-06-18 Thread Johnson, Kirk

Check the register_globals setting in php.ini. It looks like it is "on" on
the problem server. If so, then you have two choices:
1. Turn it "off"
2. Change your code to this style:

session_start();
$node = 10.2;
session_register('node');
echo $node;

Kirk

> -Original Message-
> From: Leston Drake [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] sessions trouble
> 
> 
> Hello,
> 
> I am unable to retrieve session variables on my local server.
> I'm using some code like this to test it (thanks to Ed):
> --
> session_start();
> echo ":" . $_SESSION["node"] . "";
> $_SESSION["node"] = "10.2";
> echo ":" . $_SESSION["node"] . "";
> --
> 
> Then there is an href link to the same document, to test 
> whether or not it 
> can see $_SESSION["node"] the next time.
> It can't.
> The output for both requests looks like this:
> --
> Warning: Undefined index: node in c:\program files\apache 
> group\apache\htdocs\test5.php on line 3
> :
> :10.2
> 
> test
> --
> 
> On another server 
(http://www.lpsoftware.com/phptest/test5.php) it works as 
expected. But I can't figure out why it doesn't work here.
I'm running WinME, Apache 1.3.2, Php 4.1.2

I have cookies enabled (actually prompted so I can 'see' it) for my browser.
Is there some setting in php.ini that I need to change?

BTW, being a php newbie I really appreciate the helpful people on this 
list! You're a great resource.

TIA,
Leston


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

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




RE: [PHP] sessions trouble

2002-06-18 Thread Leston Drake


Actually, I've tried it both ways (register_globals=On and 
register_globals=Off).
Same result with either setting.

At 12:19 PM 6/18/2002, you wrote:
>Check the register_globals setting in php.ini. It looks like it is "on" on
>the problem server. If so, then you have two choices:
>1. Turn it "off"
>2. Change your code to this style:
>
>session_start();
>$node = 10.2;
>session_register('node');
>echo $node;
>
>Kirk
>
> > -Original Message-
> > From: Leston Drake [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 11:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] sessions trouble
> >
> >
> > Hello,
> >
> > I am unable to retrieve session variables on my local server.
> > I'm using some code like this to test it (thanks to Ed):
> > --
> > session_start();
> > echo ":" . $_SESSION["node"] . "";
> > $_SESSION["node"] = "10.2";
> > echo ":" . $_SESSION["node"] . "";
> > --
> >
> > Then there is an href link to the same document, to test
> > whether or not it
> > can see $_SESSION["node"] the next time.
> > It can't.
> > The output for both requests looks like this:
> > --
> > Warning: Undefined index: node in c:\program files\apache
> > group\apache\htdocs\test5.php on line 3
> > :
> > :10.2
> >
> > test
> > --
> >
> > On another server
>(http://www.lpsoftware.com/phptest/test5.php) it works as
>expected. But I can't figure out why it doesn't work here.
>I'm running WinME, Apache 1.3.2, Php 4.1.2
>
>I have cookies enabled (actually prompted so I can 'see' it) for my browser.
>Is there some setting in php.ini that I need to change?
>
>BTW, being a php newbie I really appreciate the helpful people on this
>list! You're a great resource.
>
>TIA,
>Leston
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Re: phpmyadmin - moving data from one database to another

2002-06-18 Thread Taylor York

Just dump the data and structure to an SQL file, choose save as file, then
run all the code in the file on the next server.


Taylor York

"Phil Schwarzmann" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> The lazy and worthless a-holes at www.infinitehost.com (my host server)
> are forcing me to move all my MySQL data from one server to another
> because they are too dumb to fix it.
>
> I need to use phpmyadmin to move the data but i'm not %100 sure how to
> do it.  There are some "view dump" commands.  It looks like I can
> somehow download all the data and structure to my local computer, then
> upload it to the new server.
>
> Anyone have any info on this?
>
> THanks!
>



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




RE: [PHP] sessions trouble

2002-06-18 Thread Leston Drake


I have register_globals=Off (which is what I prefer to program for).
But if I change register_globals to On, and use the session_register() 
function, it works.
With register_globals Off, using $_SESSION doesn't work.
I thought that $_SESSION would work regardless of whether register_globals 
was On or Off.

At 12:19 PM 6/18/2002, you wrote:
>Check the register_globals setting in php.ini. It looks like it is "on" on
>the problem server. If so, then you have two choices:
>1. Turn it "off"
>2. Change your code to this style:
>
>session_start();
>$node = 10.2;
>session_register('node');
>echo $node;
>
>Kirk
>
> > -Original Message-
> > From: Leston Drake [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 18, 2002 11:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] sessions trouble
> >
> >
> > Hello,
> >
> > I am unable to retrieve session variables on my local server.
> > I'm using some code like this to test it (thanks to Ed):
> > --
> > session_start();
> > echo ":" . $_SESSION["node"] . "";
> > $_SESSION["node"] = "10.2";
> > echo ":" . $_SESSION["node"] . "";
> > --
> >
> > Then there is an href link to the same document, to test
> > whether or not it
> > can see $_SESSION["node"] the next time.
> > It can't.
> > The output for both requests looks like this:
> > --
> > Warning: Undefined index: node in c:\program files\apache
> > group\apache\htdocs\test5.php on line 3
> > :
> > :10.2
> >
> > test
> > --
> >
> > On another server
>(http://www.lpsoftware.com/phptest/test5.php) it works as
>expected. But I can't figure out why it doesn't work here.
>I'm running WinME, Apache 1.3.2, Php 4.1.2
>
>I have cookies enabled (actually prompted so I can 'see' it) for my browser.
>Is there some setting in php.ini that I need to change?
>
>BTW, being a php newbie I really appreciate the helpful people on this
>list! You're a great resource.
>
>TIA,
>Leston
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] using a variable stored in a variable.

2002-06-18 Thread Renaldo De Silva

how can i use a variable stored in a vaiable in a if statement?




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




Re: [PHP] sessions trouble

2002-06-18 Thread Rick Kukiela

Try using the fuction session_write_close() after your done setting the
session vars.

dunno but it might work :)

Rick
- Original Message -
From: "Leston Drake" <[EMAIL PROTECTED]>
To: "Johnson, Kirk" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 1:28 PM
Subject: RE: [PHP] sessions trouble


>
> I have register_globals=Off (which is what I prefer to program for).
> But if I change register_globals to On, and use the session_register()
> function, it works.
> With register_globals Off, using $_SESSION doesn't work.
> I thought that $_SESSION would work regardless of whether register_globals
> was On or Off.
>
> At 12:19 PM 6/18/2002, you wrote:
> >Check the register_globals setting in php.ini. It looks like it is "on"
on
> >the problem server. If so, then you have two choices:
> >1. Turn it "off"
> >2. Change your code to this style:
> >
> >session_start();
> >$node = 10.2;
> >session_register('node');
> >echo $node;
> >
> >Kirk
> >
> > > -Original Message-
> > > From: Leston Drake [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 18, 2002 11:48 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] sessions trouble
> > >
> > >
> > > Hello,
> > >
> > > I am unable to retrieve session variables on my local server.
> > > I'm using some code like this to test it (thanks to Ed):
> > > --
> > > session_start();
> > > echo ":" . $_SESSION["node"] . "";
> > > $_SESSION["node"] = "10.2";
> > > echo ":" . $_SESSION["node"] . "";
> > > --
> > >
> > > Then there is an href link to the same document, to test
> > > whether or not it
> > > can see $_SESSION["node"] the next time.
> > > It can't.
> > > The output for both requests looks like this:
> > > --
> > > Warning: Undefined index: node in c:\program files\apache
> > > group\apache\htdocs\test5.php on line 3
> > > :
> > > :10.2
> > >
> > > test
> > > --
> > >
> > > On another server
> >(http://www.lpsoftware.com/phptest/test5.php) it works as
> >expected. But I can't figure out why it doesn't work here.
> >I'm running WinME, Apache 1.3.2, Php 4.1.2
> >
> >I have cookies enabled (actually prompted so I can 'see' it) for my
browser.
> >Is there some setting in php.ini that I need to change?
> >
> >BTW, being a php newbie I really appreciate the helpful people on this
> >list! You're a great resource.
> >
> >TIA,
> >Leston
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] Ascii Value

2002-06-18 Thread James Drabb

Hey *,

In C I can cast a char 'j' to an int and get it's ascii value.  Is there a funciton in 
PHP
to do this with a string containing a single char (i.e. "j")?  I could write a big
switch for all the chars of the alphabet, however I was hoping for a better approach?

Jim Drabb

-- 
-
Never ask a geek why, just nod your head and slowly back away
-
James Drabb JR
Programmer Analyst
Darden Restaurants
Business Systems
[EMAIL PROTECTED]
[EMAIL PROTECTED]

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




Re: [PHP] using a variable stored in a variable.

2002-06-18 Thread Lowell Allen

> From: "Renaldo De Silva" <[EMAIL PROTECTED]>
> 
> how can i use a variable stored in a vaiable in a if statement?
> 
Check the manual info on variable variables:



--
Lowell Allen


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




Re: [PHP] sessions trouble

2002-06-18 Thread Leston Drake


Ok, tried that. No difference.

At 12:49 PM 6/18/2002, you wrote:
>Try using the fuction session_write_close() after your done setting the
>session vars.
>
>dunno but it might work :)
>
>Rick
>- Original Message -
>From: "Leston Drake" <[EMAIL PROTECTED]>
>To: "Johnson, Kirk" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Tuesday, June 18, 2002 1:28 PM
>Subject: RE: [PHP] sessions trouble
>
>
> >
> > I have register_globals=Off (which is what I prefer to program for).
> > But if I change register_globals to On, and use the session_register()
> > function, it works.
> > With register_globals Off, using $_SESSION doesn't work.
> > I thought that $_SESSION would work regardless of whether register_globals
> > was On or Off.
> >
> > At 12:19 PM 6/18/2002, you wrote:
> > >Check the register_globals setting in php.ini. It looks like it is "on"
>on
> > >the problem server. If so, then you have two choices:
> > >1. Turn it "off"
> > >2. Change your code to this style:
> > >
> > >session_start();
> > >$node = 10.2;
> > >session_register('node');
> > >echo $node;
> > >
> > >Kirk
> > >
> > > > -Original Message-
> > > > From: Leston Drake [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, June 18, 2002 11:48 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] sessions trouble
> > > >
> > > >
> > > > Hello,
> > > >
> > > > I am unable to retrieve session variables on my local server.
> > > > I'm using some code like this to test it (thanks to Ed):
> > > > --
> > > > session_start();
> > > > echo ":" . $_SESSION["node"] . "";
> > > > $_SESSION["node"] = "10.2";
> > > > echo ":" . $_SESSION["node"] . "";
> > > > --
> > > >
> > > > Then there is an href link to the same document, to test
> > > > whether or not it
> > > > can see $_SESSION["node"] the next time.
> > > > It can't.
> > > > The output for both requests looks like this:
> > > > --
> > > > Warning: Undefined index: node in c:\program files\apache
> > > > group\apache\htdocs\test5.php on line 3
> > > > :
> > > > :10.2
> > > >
> > > > test
> > > > --
> > > >
> > > > On another server
> > >(http://www.lpsoftware.com/phptest/test5.php) it works as
> > >expected. But I can't figure out why it doesn't work here.
> > >I'm running WinME, Apache 1.3.2, Php 4.1.2
> > >
> > >I have cookies enabled (actually prompted so I can 'see' it) for my
>browser.
> > >Is there some setting in php.ini that I need to change?
> > >
> > >BTW, being a php newbie I really appreciate the helpful people on this
> > >list! You're a great resource.
> > >
> > >TIA,
> > >Leston
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] sql help ?

2002-06-18 Thread Septic Flesh

select * from tracker where day='1' and month=' ".$month." '   XXX";

XXX = but donot return values with the same value in the "sess_id" field

what should XXX be ?

thanks in advance...


--


Sapilas@/dev/pinkeye





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




  1   2   3   >