php-general Digest 23 Mar 2001 04:46:34 -0000 Issue 583

Topics (messages 45137 through 45244):

Directory rights: Create and delete is possible but not ccggrp, why?
        45137 by: Dominique Paquin
        45139 by: Keith Vance
        45146 by: Dominique Paquin

Freshmeat Ad?
        45138 by: Michael Geier

Probs with PHP4 and MySQL File Upload...
        45140 by: Kilian
        45228 by: David Robley

Re: Oracle ODBC sql [ORA-00972: identifier is too long]
        45141 by: Brian S. Dunworth
        45143 by: Brian S. Dunworth
        45235 by: Nold, Mark

A problem under Solaris
        45142 by: Emiliano Marmonti
        45147 by: Sebastien Roy
        45148 by: Emiliano Marmonti
        45153 by: Joe Rice
        45162 by: Sebastien Roy
        45223 by: Dunaway, Brian

Web Based PHP Content Manager Problems
        45144 by: Phil
        45151 by: CC Zona

ODBC only working for 82 rows
        45145 by: Brooks, Ken
        45156 by: Brooks, Ken

Date subtraction
        45149 by: BlackLord
        45168 by: almir

Re: LDAP problem
        45150 by: Brett Bandy

.htaccess question
        45152 by: Jimmy Bäckström
        45155 by: Brian S. Dunworth

mail(), how can one specify <from> ?
        45154 by: Richard
        45165 by: David Smith

Problems uploading Files
        45157 by: Renzi, Sebastian
        45158 by: John Almberg
        45159 by: Kilian
        45161 by: Kilian
        45164 by: Julian Wood

Make Script login to password protected web sites
        45160 by: Brandon Orther

sessions.. again...
        45163 by: Miguel Loureiro
        45185 by: Chris Lee

Re: PAM authentification
        45166 by: Matt McClanahan

imagepstext
        45167 by: J.R. Carlson

need help with cookies
        45169 by: kris.grinz.com
        45170 by: Brian V Bonini
        45172 by: kris.grinz.com
        45183 by: Chris Lee
        45239 by: Jack Sasportas

Re: Form help
        45171 by: darion mapp

Array confusion.
        45173 by: Sterling
        45174 by: CC Zona
        45175 by: Altunergil, Oktay
        45177 by: Sterling

extract images from pdfs
        45176 by: James

Register session in function without global?
        45178 by: Tobias Talltorp
        45179 by: CC Zona
        45180 by: Chris Lee
        45181 by: Tobias Talltorp

Re: mysql backup
        45182 by: Henrik Hansen

ODBC & Oracle
        45184 by: Brooks, Ken
        45189 by: Brooks, Ken
        45194 by: Brooks, Ken
        45198 by: Joe Brown

libclntsh.so.8.0 : oracle+php under linux rh 6.2
        45186 by: Robert Mena
        45240 by: Adi Wibowo

Environment Variables
        45187 by: Joe Rice
        45192 by: Joe Rice

Printing MySQL into HTML Tables
        45188 by: Jeff Oien
        45199 by: darion mapp
        45202 by: ..s.c.o.t.t.. [gts]

php 4.04pl 1-3 for red hat 7
        45190 by: Larry Hotchkiss
        45205 by: ..s.c.o.t.t.. [gts]

Crypt problem
        45191 by: Randy Johnson
        45204 by: ..s.c.o.t.t.. [gts]

I need an authentication method that is good... any Ideas? - please help
        45193 by: Romulo Roberto Pereira
        45196 by: ..s.c.o.t.t.. [gts]

Fopen help
        45195 by: Kenneth R Zink II

Encryption Problem
        45197 by: darion mapp
        45201 by: ..s.c.o.t.t.. [gts]

PHP/CGI Help
        45200 by: Maroufski
        45203 by: ..s.c.o.t.t.. [gts]
        45206 by: Peter Houchin
        45227 by: Maroufski

Move data from one MySql table to another?
        45207 by: YoBro
        45208 by: Cal Evans
        45209 by: James Atkinson
        45210 by: YoBro
        45211 by: Cal Evans

Oracle + apache + php + linux Red Hat 6.2(update)
        45212 by: Robert Mena

Silly sessions problem.
        45213 by: Lic. Rodolfo Gonzalez Gonzalez
        45217 by: Chris Lee
        45238 by: Lic. Rodolfo Gonzalez Gonzalez

Hello $variable, whats your name?
        45214 by: JCampbell
        45215 by: Cal Evans
        45216 by: Jerry Lake
        45222 by: Data Driven Design
        45226 by: Noah Spitzer-Williams

Re: carriage return required??
        45218 by: Eelco de Vries
        45221 by: CC Zona
        45225 by: Eelco de Vries

Re: Help!
        45219 by: Fred
        45220 by: Keith Vance

HELP? HTTP HEADER GURUS etc?
        45224 by: brunatex

Re: reading microsoft word document text in php?
        45229 by: David Robley

Sessions to password protect directory?
        45230 by: Kyutums

Re: executables (.exe)
        45231 by: Christian Dechery

how do I find out how many pixels wide / tall a string will be with gd ?
        45232 by: Chris Lee
        45233 by: Peter Houchin

writing to a file
        45234 by: adam
        45237 by: David Robley

Anyone have the wording for a license for clients?
        45236 by: Cameron Just

security
        45241 by: Randy Johnson
        45242 by: Cal Evans
        45243 by: David Robley

libt1 returned error 11
        45244 by: J.R. Carlson

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


I posted a message last week on this subject, and I have searched for an
answer meanwhile.

So i decided to re ask my question a little bit differently since i did not
find the answer to my problem:

I use a web based application I am making and through this application I
create directories. I can create the directories with no problem using PHP
with full rights (777). The directories, then, needs to have their group
changed to something else and here is my problem,

I tried a chgrp (the php function) from php to change it as well as
exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...)
and system('chown'...). All this to no success. Someone told me, here on the
list, that apache was runing as nobody:nobody, so it had no rights to change
rights. We changed the user:group of apache and called it apache:apache.
then we re-tried all our experiences, to no avail. I am sure I am having all
the rights necessary because I can delete the directories I create with no
trouble.

Note: If I connect in console mode with the user apache, i can chown the
directory as I wish.

Any suggestion on how to change rights on directories would be appreciated.
(With PHP or any other solution)

Thanks in advance

Dominique Paquin
Galea secured networks







I have run into a problem similar to this. Basically what I have found is
that there is no way to do this sort of thing using php through apache.
I fixed my problem by writting a perl script that creates the directories
and sets the permissions/groups correctly. I have php write out a text
file and dump it into a directory, the perl script runs from cron and
checks the directory every few minutes and creates the appropriate
directories based on the data in the files. It a hackish way of doing it,
but it actually works quite well. If you didn't want to use cron, you
could just have a process running that monitors the directory constantly.
There are a number of ways to do this, including using cgi php or C or
whatever.
There are very good reasons why you can't do what you want to do, you
just have to get creative.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 22 Mar 2001, Dominique Paquin wrote:

> I posted a message last week on this subject, and I have searched for an
> answer meanwhile.
>
> So i decided to re ask my question a little bit differently since i did not
> find the answer to my problem:
>
> I use a web based application I am making and through this application I
> create directories. I can create the directories with no problem using PHP
> with full rights (777). The directories, then, needs to have their group
> changed to something else and here is my problem,
>
> I tried a chgrp (the php function) from php to change it as well as
> exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...)
> and system('chown'...). All this to no success. Someone told me, here on the
> list, that apache was runing as nobody:nobody, so it had no rights to change
> rights. We changed the user:group of apache and called it apache:apache.
> then we re-tried all our experiences, to no avail. I am sure I am having all
> the rights necessary because I can delete the directories I create with no
> trouble.
>
> Note: If I connect in console mode with the user apache, i can chown the
> directory as I wish.
>
> Any suggestion on how to change rights on directories would be appreciated.
> (With PHP or any other solution)
>
> Thanks in advance
>
> Dominique Paquin
> Galea secured networks
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Thanks a lot for the answer, it's the first constructive response i have for
my problem.
I was banging my head on the walls with this one.

I might just use C/Cron to correct this. If you implemented this could you
guide me a little
bit in the steps to follow to complete this?

Thanks again.

Dominique Paquin.

"Keith Vance" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have run into a problem similar to this. Basically what I have found is
> that there is no way to do this sort of thing using php through apache.
> I fixed my problem by writting a perl script that creates the directories
> and sets the permissions/groups correctly. I have php write out a text
> file and dump it into a directory, the perl script runs from cron and
> checks the directory every few minutes and creates the appropriate
> directories based on the data in the files. It a hackish way of doing it,
> but it actually works quite well. If you didn't want to use cron, you
> could just have a process running that monitors the directory constantly.
> There are a number of ways to do this, including using cgi php or C or
> whatever.
> There are very good reasons why you can't do what you want to do, you
> just have to get creative.
>
> K E I T H  V A N C E
> Software Engineer
> n-Link Corporation
>
> On Thu, 22 Mar 2001, Dominique Paquin wrote:
>
> > I posted a message last week on this subject, and I have searched for an
> > answer meanwhile.
> >
> > So i decided to re ask my question a little bit differently since i did
not
> > find the answer to my problem:
> >
> > I use a web based application I am making and through this application I
> > create directories. I can create the directories with no problem using
PHP
> > with full rights (777). The directories, then, needs to have their group
> > changed to something else and here is my problem,
> >
> > I tried a chgrp (the php function) from php to change it as well as
> > exec('chgrp'...) or exec('chown' ...) and then I tried a
system('chgrp'...)
> > and system('chown'...). All this to no success. Someone told me, here on
the
> > list, that apache was runing as nobody:nobody, so it had no rights to
change
> > rights. We changed the user:group of apache and called it apache:apache.
> > then we re-tried all our experiences, to no avail. I am sure I am having
all
> > the rights necessary because I can delete the directories I create with
no
> > trouble.
> >
> > Note: If I connect in console mode with the user apache, i can chown the
> > directory as I wish.
> >
> > Any suggestion on how to change rights on directories would be
appreciated.
> > (With PHP or any other solution)
> >
> > Thanks in advance
> >
> > Dominique Paquin
> > Galea secured networks
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Is there a reason Freshmeat is showing a banner stating "PHP 4.01pl2 is
out"?  Especially since the binary is up to 4.04pl1.

Michael Geier
CDMSports Systems Administration
 EMail: [EMAIL PROTECTED]
 Phone: 314.991.1511 x 6505





Hello All!

Since I upgraded to PHP4, file upload into MySQL tables seems not to work
anymore. I am using PHPMyAdmin to access the database. When I try to upload
a file there, I get the Error "The file '[tmpdir]/php129947' must be in the
database directory or be readable by all" where [tmpdir] is the
upload_tmp_dir specified in php.ini. This directory has 777 permissions, so
it is readable by all.

I'm confused because it worked without any problems with PHP 3.

Thanks very much for any hint...

Greetz,
Kilian





On Fri, 23 Mar 2001 03:46, Kilian wrote:
> Hello All!
>
> Since I upgraded to PHP4, file upload into MySQL tables seems not to
> work anymore. I am using PHPMyAdmin to access the database. When I try
> to upload a file there, I get the Error "The file '[tmpdir]/php129947'
> must be in the database directory or be readable by all" where [tmpdir]
> is the upload_tmp_dir specified in php.ini. This directory has 777
> permissions, so it is readable by all.
>
> I'm confused because it worked without any problems with PHP 3.
>
> Thanks very much for any hint...
>
> Greetz,
> Kilian

You saty the _directory_ is world readable, but the file being uploaded 
may not be world readable - you may have to chmod it as part of the 
process.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




At 09:52 AM 3/22/01 -0500, Brooks, Ken wrote:
>Lets start at the basics.
>
>What is the easiest way to *make sure* that i am connecting to that oracle
>db?
>
>Anyway I can just list the tables, or something.
>odbc_tables or something like that?..

   To get a list of the tables, you could:

    SELECT TABLE_NAME FROM ALL_TABLES;

   ...but, since you're on Oracle anyway, why not do something even quicker?

    SELECT SYSDATE FROM DUAL;

   will return the current date.

    SELECT TO_CHAR(SYSDATE,'DD-MON-YY HH24:MI:SS') FROM DUAL;

    will return the current date and time.

  - Brian

  -------------------------------------
    Brian S. Dunworth
    Sr. Software Development Engineer
    Oracle Database Administrator
    The Printing House, Ltd.

    (850) 875-1500  x225
    <[EMAIL PROTECTED]>
  -------------------------------------





At 10:16 AM 3/22/01 -0500, Brooks, Ken wrote:
>I got it.

   ah.  :)   good


>I had the table name listed as aradmin_eps_service_instructions
>when in fact it should have been aradmin.eps_service_instructions (with 
>the dot).
>
>I did not know this because all of the tables I had seen linked to this
>before used _ ,but the actual name (which i normally don't have priveledge 
>to even view) uses the .


   Actually, in Oracle parlance, the table name is 
EPS_SERVICE_INSTRUCTIONS, and it exists in the ARADMIN schema.  If there is 
no public synonym called EPS_SERVICE_INSTRUCTIONS, then you'd need to 
specify both schema and table name (eg: owner.table_name) in order to view 
the table.

   If you didn't have the privs to view a given table, you'd not be able to 
view it whether you specified the schema or not.  :)

   A list of the tables you can "see" along with their schema (owners) can 
be obtained by running the following SQL query:

   SELECT OWNER,TABLE_NAME FROM ALL_TABLES;

>Whee!

   Indeed. :)

   ..or, try:

   SELECT OWNER||'.'||TABLE_NAME FROM ALL TABLES;

  - Brian

  -------------------------------------
    Brian S. Dunworth
    Sr. Software Development Engineer
    Oracle Database Administrator
    The Printing House, Ltd.

    (850) 875-1500  x225
    <[EMAIL PROTECTED]>
  -------------------------------------





----------------------------------------------------------------------------
----------------- 
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a
copy. 
----------------------------------------------------------------------------
-----------------
Ken,

Just a comment, have you tried using the OCI or ORA interface? instead of
going through ODBC. Since you already have SQL*Net setup (you must have for
ODBC from memory) why not try it. It should be faster than straight ODBC
plus you wont get caught by any ODBC driver issues (i know the drivers can
change things like they do accept COLUMN like '*foo*' and they have limits
on very large SQL statements).

Using ODBC will be easier if you are swapping from Access to Oracle, but if
you use a DB Abstaction layer (see PEAR, PHPLib, Metabase) this wont be an
issue either.

mn




Mark Nold
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Senior Consultant
 
Change is inevitable, except from vending machines. 



-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 11:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


I got it.

I had the table name listed as aradmin_eps_service_instructions
when in fact it should have been aradmin.eps_service_instructions (with the
dot).

I did not know this because all of the tables I had seen linked to this
before
used _ ,but the actual name (which i normally don't have priveledge to even
view) uses the .

Whee!

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


Lets start at the basics.

What is the easiest way to *make sure* that i am connecting to that oracle
db?

Anyway I can just list the tables, or something.
odbc_tables or something like that?..

-ken

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I only mentioned the part about the access, just to prove that I know i have
a select
statement working with an ODBC source. 

I know that I am connecting to the Oracle database, because if i put in a
bogus user/pass
i get an error stating so, when I supply the correct credentials I get no
errors.

So that just leaves something to do with possibly the table names.
The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS
by my count that is 32 characters. That could be a problem. Any way around
that, or
to alias a name to that? (Mind you, i don't have access to that database to
change
the table names). I can only query from it.


The exact offending line number that is returned is 37.

36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where
ATMID = 'PN2000'";
37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

-ken


-----Original Message-----
From: Greig, Euan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I haven't used Oracle with ODBC, but nothing leaps out at me from your code.
Some comments/ideas: 

The full meaning of error 0972 is that the name of a schema object (table,
view, username etc) is too long (longer than 30 characters, maybe more for
Oracle 8). The query statement you are using looks OK. How about displaying
$username and $password? And have you isolated which line is causing the
error?

The relevance of ' and " I suppose is this. By default Oracle is not case
sensitive about the names of database objects, but it is if when you create
them you enclose the name in double quotes. For instance if you simply say
'create table euan', then you will be able to access it with  'select * from
euan', 'select * from EUAN', 'select * from Euan' etc. But if you say
'create table "euan"', then you will forever have to say 'select * from
"euan"'.

Problems can indeed arise when interfacing between Access and Oracle,
because I believe that Access is case sensitive by default, and Oracle
programmers tend not to expect this. But none of this seems very applicable
to your case... or is it?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; [EMAIL PROTECTED]
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]


I'm getting this message when i try to run a query on an Oracle database
thru ODBC.
I can connect to the database just fine. 

here is the code i'm trying to use.

$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to
connect to oracle aradmin database");
$si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS";
$si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

the result i get is:
Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972:
identifier is too long., SQL state 37000 in SQLExecDirect in c:\program
files\apache group\apache\htdocs\odbc_test.php3 on line 34

i'm connecting to an MSAccess database thru odbc just fine and sending a 
similar query, it works just fine.
do i need to do something different because it is an oracle database?

(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on
the right track?

thanks!
-ken


**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hello all

  I´m trying to compile PHP 4.0 under Solaris 8.0 - SPARC 250. When I try to configure 
using the appropiate script, it test for the existence of one package called lex and 
another called flex, both couldn´t be found and the script can´t continue. Anybody has 
be in the same trouble? Any idea? What are those packages?

Thanks in advance
Emiliano





I got the same problem as you did,

Just pick-up flex on a gnu mirror and your problem will be corrected!

Regards,

Sebastien Roy
www.galeasec.com


Emiliano Marmonti wrote:

> Hello all
>
>   I´m trying to compile PHP 4.0 under Solaris 8.0 - SPARC 250. When I try to 
>configure using the appropiate script, it test for the existence of one package 
>called lex and another called flex, both couldn´t be found and the script can´t 
>continue. Anybody has be in the same trouble? Any idea? What are those packages?
>
> Thanks in advance
> Emiliano





Thank you Sebastian,
but I want to know what is flex (and I don´t know where could I obtain it).

Thanks again.
Emiliano.






If you have the "Bonus Software" pack that came with Solaris8, there
is a CD call "Companion". That CD has everything you need form the
GNU world.  Loads of GNU solaris packages.

joe

Emiliano Marmonti([EMAIL PROTECTED])@Thu, Mar 22, 2001 at 02:43:25PM -0600:
> Thank you Sebastian,
> but I want to know what is flex (and I don´t know where could I obtain it).
> 
> Thanks again.
> Emiliano.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




There it is : http://www.spiral303.com/solaris/frex254a.shtml


Regards

Sebastien Roy


Emiliano Marmonti wrote:

> Thank you Sebastian,
> but I want to know what is flex (and I don´t know where could I obtain it).
>
> Thanks again.
> Emiliano.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






>   I´m trying to compile PHP 4.0 under Solaris 8.0 - SPARC 
> 250. When I try to configure using the appropiate script, it 
> test for the existence of one package called lex and another 
> called flex, both couldn´t be found and the script can´t 
> continue. Anybody has be in the same trouble? Any idea? What 
> are those packages?

Yes, Flex is a rewrite of lex.

http://www.gnu.org/manual/flex-2.5.4/html_mono/flex.html

is all you never wanted to know about flex.

Install FLEX.

you can probably find it at http://www.sunfreeware.com




I have tried using multiple PHP content manager programs and cannot seem to
get any of them to save files that have been edited over the web interface
unless the file permissions are set to let everybody write to them.

Of course, we don't want to have out files writeable by the world. I have
tried using these different managers in their own directories, even
protected the directories with a .htaccess file. The same ID that I allow to
access the directory is also the owner of the file.

What seems to happen once I get authenticated and allowed into the
directory, I may be wrong here, is that my server thinks I am a 'nobody' and
so when I submit the file changes I get permissions error. Everything works
fine with all of the different programs I've tried; if I simply give
everybody write access to the file, but that is not an option.

Any help would be greatly appreciated.

Thanks, Phil







In article <99dcc5$vm0$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Phil") wrote:

> I have tried using multiple PHP content manager programs and cannot seem to
> get any of them to save files that have been edited over the web interface
> unless the file permissions are set to let everybody write to them.
> 
> Of course, we don't want to have out files writeable by the world. I have
> tried using these different managers in their own directories, even
> protected the directories with a .htaccess file. The same ID that I allow to
> access the directory is also the owner of the file.
> 
> What seems to happen once I get authenticated and allowed into the
> directory, I may be wrong here, is that my server thinks I am a 'nobody' and
> so when I submit the file changes I get permissions error. Everything works
> fine with all of the different programs I've tried; if I simply give
> everybody write access to the file, but that is not an option.

Yes, your web server is apparently running as user "nobody", a common 
configuration.  See the manual chapter on security for more info on setting 
proper file permissions with PHP.

-- 
CC




I've kind of hit a wall.
I am using the data in an oracle table to create a table in mysql that is
equivalent.

It only gets thru 82 sometimes 83 records. Doesn't error out or anything,
only inserts (and
reports back to the screen) 82. There are 134 fields in the table.

When i just print out the fieldnames, etc, it prints all of them out.
When I try to to alter(add) to the mysql table, it doesn't seem to make it
all the way thru.

Ideas?

-ken

Below is the major part of the sql operations.
------------------------------------
$si_oracle_cols = odbc_num_fields($si_oracle_result);
PRINT "Colums: $si_oracle_cols<BR>";

/* Print these results to the screen in a nice format */
$i = 1;
$result = 0;

IF ($si_oracle_cols == 0) :
        PRINT "No Columns(Fields) returned";
ELSEIF ($si_oracle_cols > 0) :
        WHILE($i < $si_oracle_cols):
        $fieldname = odbc_field_name($si_oracle_result, $i);
        $fieldtype = odbc_field_type($si_oracle_result, $i);
        IF($fieldtype == "VARCHAR2"):
                $fieldtype = "VARCHAR";
        ENDIF;
        IF($fieldtype == "NUMBER"):
                $fieldtype = "INT";
        ENDIF;
        
        $fieldlen = odbc_field_len($si_oracle_result, $i);
        PRINT "<br>ColNum: $i  ";
        $mysql_create_si_query = "CREATE TABLE IF NOT EXISTS
$si_mysql($fieldname $fieldtype($fieldlen))";
        $result = MYSQL_QUERY($mysql_create_si_query);

        $mysql_alter_si_query = "alter table $si_mysql add($fieldname
$fieldtype($fieldlen))";
        $alter_result = MYSQL_QUERY($mysql_alter_si_query);
        
        $i++;
        ENDWHILE;
        PRINT "End of fields";
ENDIF;

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 10:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


I got it.

I had the table name listed as aradmin_eps_service_instructions
when in fact it should have been aradmin.eps_service_instructions (with the
dot).

I did not know this because all of the tables I had seen linked to this
before
used _ ,but the actual name (which i normally don't have priveledge to even
view) uses the .

Whee!

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


Lets start at the basics.

What is the easiest way to *make sure* that i am connecting to that oracle
db?

Anyway I can just list the tables, or something.
odbc_tables or something like that?..

-ken

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I only mentioned the part about the access, just to prove that I know i have
a select
statement working with an ODBC source. 

I know that I am connecting to the Oracle database, because if i put in a
bogus user/pass
i get an error stating so, when I supply the correct credentials I get no
errors.

So that just leaves something to do with possibly the table names.
The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS
by my count that is 32 characters. That could be a problem. Any way around
that, or
to alias a name to that? (Mind you, i don't have access to that database to
change
the table names). I can only query from it.


The exact offending line number that is returned is 37.

36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where
ATMID = 'PN2000'";
37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

-ken


-----Original Message-----
From: Greig, Euan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I haven't used Oracle with ODBC, but nothing leaps out at me from your code.
Some comments/ideas: 

The full meaning of error 0972 is that the name of a schema object (table,
view, username etc) is too long (longer than 30 characters, maybe more for
Oracle 8). The query statement you are using looks OK. How about displaying
$username and $password? And have you isolated which line is causing the
error?

The relevance of ' and " I suppose is this. By default Oracle is not case
sensitive about the names of database objects, but it is if when you create
them you enclose the name in double quotes. For instance if you simply say
'create table euan', then you will be able to access it with  'select * from
euan', 'select * from EUAN', 'select * from Euan' etc. But if you say
'create table "euan"', then you will forever have to say 'select * from
"euan"'.

Problems can indeed arise when interfacing between Access and Oracle,
because I believe that Access is case sensitive by default, and Oracle
programmers tend not to expect this. But none of this seems very applicable
to your case... or is it?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; [EMAIL PROTECTED]
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]


I'm getting this message when i try to run a query on an Oracle database
thru ODBC.
I can connect to the database just fine. 

here is the code i'm trying to use.

$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to
connect to oracle aradmin database");
$si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS";
$si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

the result i get is:
Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972:
identifier is too long., SQL state 37000 in SQLExecDirect in c:\program
files\apache group\apache\htdocs\odbc_test.php3 on line 34

i'm connecting to an MSAccess database thru odbc just fine and sending a 
similar query, it works just fine.
do i need to do something different because it is an oracle database?

(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on
the right track?

thanks!
-ken


**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Nevermind.

I got smart and used CREATE TABLE with a *really* long creation_definition
specifying all fields.

Works a millions times better/faster.


-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 12:28 PM
To: Brooks, Ken; [EMAIL PROTECTED]
Subject: [PHP] ODBC only working for 82 rows


I've kind of hit a wall.
I am using the data in an oracle table to create a table in mysql that is
equivalent.

It only gets thru 82 sometimes 83 records. Doesn't error out or anything,
only inserts (and
reports back to the screen) 82. There are 134 fields in the table.

When i just print out the fieldnames, etc, it prints all of them out.
When I try to to alter(add) to the mysql table, it doesn't seem to make it
all the way thru.

Ideas?

-ken

Below is the major part of the sql operations.
------------------------------------
$si_oracle_cols = odbc_num_fields($si_oracle_result);
PRINT "Colums: $si_oracle_cols<BR>";

/* Print these results to the screen in a nice format */
$i = 1;
$result = 0;

IF ($si_oracle_cols == 0) :
        PRINT "No Columns(Fields) returned";
ELSEIF ($si_oracle_cols > 0) :
        WHILE($i < $si_oracle_cols):
        $fieldname = odbc_field_name($si_oracle_result, $i);
        $fieldtype = odbc_field_type($si_oracle_result, $i);
        IF($fieldtype == "VARCHAR2"):
                $fieldtype = "VARCHAR";
        ENDIF;
        IF($fieldtype == "NUMBER"):
                $fieldtype = "INT";
        ENDIF;
        
        $fieldlen = odbc_field_len($si_oracle_result, $i);
        PRINT "<br>ColNum: $i  ";
        $mysql_create_si_query = "CREATE TABLE IF NOT EXISTS
$si_mysql($fieldname $fieldtype($fieldlen))";
        $result = MYSQL_QUERY($mysql_create_si_query);

        $mysql_alter_si_query = "alter table $si_mysql add($fieldname
$fieldtype($fieldlen))";
        $alter_result = MYSQL_QUERY($mysql_alter_si_query);
        
        $i++;
        ENDWHILE;
        PRINT "End of fields";
ENDIF;

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 10:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


I got it.

I had the table name listed as aradmin_eps_service_instructions
when in fact it should have been aradmin.eps_service_instructions (with the
dot).

I did not know this because all of the tables I had seen linked to this
before
used _ ,but the actual name (which i normally don't have priveledge to even
view) uses the .

Whee!

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too
long]


Lets start at the basics.

What is the easiest way to *make sure* that i am connecting to that oracle
db?

Anyway I can just list the tables, or something.
odbc_tables or something like that?..

-ken

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I only mentioned the part about the access, just to prove that I know i have
a select
statement working with an ODBC source. 

I know that I am connecting to the Oracle database, because if i put in a
bogus user/pass
i get an error stating so, when I supply the correct credentials I get no
errors.

So that just leaves something to do with possibly the table names.
The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS
by my count that is 32 characters. That could be a problem. Any way around
that, or
to alias a name to that? (Mind you, i don't have access to that database to
change
the table names). I can only query from it.


The exact offending line number that is returned is 37.

36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where
ATMID = 'PN2000'";
37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

-ken


-----Original Message-----
From: Greig, Euan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: [EMAIL PROTECTED]
Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]


I haven't used Oracle with ODBC, but nothing leaps out at me from your code.
Some comments/ideas: 

The full meaning of error 0972 is that the name of a schema object (table,
view, username etc) is too long (longer than 30 characters, maybe more for
Oracle 8). The query statement you are using looks OK. How about displaying
$username and $password? And have you isolated which line is causing the
error?

The relevance of ' and " I suppose is this. By default Oracle is not case
sensitive about the names of database objects, but it is if when you create
them you enclose the name in double quotes. For instance if you simply say
'create table euan', then you will be able to access it with  'select * from
euan', 'select * from EUAN', 'select * from Euan' etc. But if you say
'create table "euan"', then you will forever have to say 'select * from
"euan"'.

Problems can indeed arise when interfacing between Access and Oracle,
because I believe that Access is case sensitive by default, and Oracle
programmers tend not to expect this. But none of this seems very applicable
to your case... or is it?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; [EMAIL PROTECTED]
Subject: Oracle ODBC sql [ORA-00972: identifier is too long]


I'm getting this message when i try to run a query on an Oracle database
thru ODBC.
I can connect to the database just fine. 

here is the code i'm trying to use.

$td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to
connect to oracle aradmin database");
$si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS";
$si_oracle_result = odbc_exec($td_oracle, $si_oracle_query);

the result i get is:
Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972:
identifier is too long., SQL state 37000 in SQLExecDirect in c:\program
files\apache group\apache\htdocs\odbc_test.php3 on line 34

i'm connecting to an MSAccess database thru odbc just fine and sending a 
similar query, it works just fine.
do i need to do something different because it is an oracle database?

(I read somewhere that oracle uses ' and/or " for Identifiers) Is that on
the right track?

thanks!
-ken


**************************************************************************
Any opinions expressed in this email are those of the individual and 
not necessarily the Company. This email and any files transmitted with 
it, including replies and forwarded copies (which may contain alterations) 
subsequently transmitted from the Company, are confidential and solely for 
the use of the intended recipient. If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be 
advised that you have received this email in error and that any use is 
strictly prohibited.

**************************************************************************

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hi!

I want to subtract to date times from each other. Like :

'2000 12 01 12:12:12' - '2000 11 10 11:39:59'

Is there any function to do this subtraction or can i do it with MySQL's
SELECT query ?

Thanks






PERIOD_DIFF(P1,P2)
or convert them both tu unix_time(p1) - unix_time(p2) then you can have
seconds and format them as you want

almir
""BlackLord"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
99dcs5$cbh$[EMAIL PROTECTED]">news:99dcs5$cbh$[EMAIL PROTECTED]...
> Hi!
>
> I want to subtract to date times from each other. Like :
>
> '2000 12 01 12:12:12' - '2000 11 10 11:39:59'
>
> Is there any function to do this subtraction or can i do it with MySQL's
> SELECT query ?
>
> Thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Make sure all the dlls used by php3_ldap.dll are available.

I have php4 and the php_ldap.dll requires the libsasl.dll to be available.

Brett

""almir"" <[EMAIL PROTECTED]> wrote in message
99d00g$j4h$[EMAIL PROTECTED]">news:99d00g$j4h$[EMAIL PROTECTED]...
> ok
> i am usng php3.0.11 ,IIS4 and NT4 trying to connect to ldap server but i
get
> a error
> Fatal error: Call to unsupported or undefined function ldap_connect() in
...
> i have included php3_ldap.dll in my php3.ini, i have even tried to include
> it dinamicaly with dl but then i get
>
> Fatal error: Unable to load dynamic library './php3_ldap.dll'
>
<snip>






Yo!
I need to know how I create a login script that uses the htaccess file to authenticate 
users.
Thankful for any answers!
/Broder B




At 06:57 PM 3/22/01 +0100, Jimmy Bäckström wrote:
>Yo!
>I need to know how I create a login script that uses the htaccess file to 
>authenticate users.
>Thankful for any answers!
>/Broder B

   Set up your .htaccess file as usual, pointing to a userfile created with 
htpasswd.   Place the .htaccess file in the directory with your PHP 
script(s), and users will be automatically prompted for username/password 
before being served any file in that directory (at least the first time 
during that session, anyway).

   Within your PHP script(s), you can determine the user by reading the 
REMOTE_USER http environment variable:

$user = getenv("REMOTE_USER");

  - Brian

  -------------------------------------
    Brian S. Dunworth
    Sr. Software Development Engineer
    Oracle Database Administrator
    The Printing House, Ltd.

    (850) 875-1500  x225
    <[EMAIL PROTECTED]>
  -------------------------------------





Greetings.

    If I would like to use mail(...), how could I make the "from" tag
something else? I have not found any solution of specifying that!

- Richard






$headers .= "From: David Smith <[EMAIL PROTECTED]>\n";

mail($recipient, $subject, $message, $headers);

-----Original Message-----
From: Richard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 1:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mail(), how can one specify <from> ?


Greetings.

    If I would like to use mail(...), how could I make the "from" tag
something else? I have not found any solution of specifying that!

- Richard



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hello again ! , i have a script that uploads a file , when i use the
function move_uploaded_file() an error raises ,"Permission denied ....."
,but if i upload the same file thru an ftp client it works correctly !


Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A





Hello Sebastian,

What a timely posting! I am trying to figure out how to allow a user (using
any internet-connected pc) to upload a file to my PHP-enabled server. I am
trying to use PHP and the FTP functions, but can't figure out how to address
the file on the user's machine. Any hints from anyone as to how to do this?
Or am I on the wrong track, altogether? Someone else suggested that I use an
HTML 'upload', but I can't find anything about this in my HTML
documentation.

Any help much appreciated!!!

John

> -----Original Message-----
> From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 1:18 PM
> To: PHP General List
> Subject: [PHP] Problems uploading Files
>
>
> Hello again ! , i have a script that uploads a file , when i use the
> function move_uploaded_file() an error raises ,"Permission denied ....."
> ,but if i upload the same file thru an ftp client it works correctly !
>
>
> Sebastián Renzi
> Consultoría & Desarrollo de Sistemas.
> CODES S.A
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Renzi, Sebastian <[EMAIL PROTECTED]> wrote:

> Hello again ! , i have a script that uploads a file , when i use the
> function move_uploaded_file() an error raises ,"Permission denied ....."
> ,but if i upload the same file thru an ftp client it works correctly !

The user the webserver process runs under may not have the permission to
upload the file. In many cases, the webserver runs as nobody. Thus, if you
want to upload a file, nobody needs write-access to the directory into which
the file should be uploaded.

  -- Kilian





John Almberg <[EMAIL PROTECTED]> wrote:

[...]
> Someone else suggested 
> that I use an
> HTML 'upload', but I can't find anything about this in my HTML
> documentation.

<input type="file" ...>

  -- Kilian





Sebastian,

Apache is running as a user, usually nobody:nobody, or sometimes www:www.
That user is trying to move the file when you do the move in php. When you
login through an ftp client, a different user is doing the move (you). You
need to make sure that the user nobody has enough permissions on your target
directory to do the move. Depending on how locked down you want it, there
are several options: rwx for owner only, make the owner/group of the
directory nobody. rwx for group - change the directory's group to nobody, or
add nobody into another group (along with, for instance, yourself) and make
that directory belong to this new group. There are several more ways, but
you probably want to keep away from 777 permissions on the directory if
possible.

John - you want to do what Sebastian is doing. Check out Chapter 19.
Handling file uploads in the php manual. It has everything you need to get
going.

Julian


-- 
Julian Wood

Multimedia Developer
University of Calgary



on 3/22/01 11:28 AM, John Almberg at [EMAIL PROTECTED] wrote:

> 
> Hello Sebastian,
> 
> What a timely posting! I am trying to figure out how to allow a user (using
> any internet-connected pc) to upload a file to my PHP-enabled server. I am
> trying to use PHP and the FTP functions, but can't figure out how to address
> the file on the user's machine. Any hints from anyone as to how to do this?
> Or am I on the wrong track, altogether? Someone else suggested that I use an
> HTML 'upload', but I can't find anything about this in my HTML
> documentation.
> 
> Any help much appreciated!!!
> 
> John
> 
>> -----Original Message-----
>> From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
>> Sent: Thursday, March 22, 2001 1:18 PM
>> To: PHP General List
>> Subject: [PHP] Problems uploading Files
>> 
>> 
>> Hello again ! , i have a script that uploads a file , when i use the
>> function move_uploaded_file() an error raises ,"Permission denied ....."
>> ,but if i upload the same file thru an ftp client it works correctly !
>> 
>> 
>> Sebastián Renzi
>> Consultoría & Desarrollo de Sistemas.
>> CODES S.A
>> 
>> 





Hello,

Can I put the user name and password at the top of my php script so it can
loggin to a site that requires authentication?

Can i put it anywhere in teh script to amek it do this?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





Hello all,
I'm mad with me....sorry but see if can understand why I'm mad.
Copy the 3 attached files, and run it.
In one.php just click to the link (it works.....), now in two.php you can see: " and now: aaaaaaa", cool hum...
Clicking in OFF link you can see the result of phpinfo, but section of Apache Evironment, in HTTP_COOKIE you (at least I have) the PHPSESSID with value, in spite of in off.php code I make a session_destroy????
Now if you use history back button, go to two.php, and OK the session variable dont appear, Back again, Forward and voila' here is aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
I have try to follow some Jeff Armstrong tips, but I have no success.Thank you very much Jeff (really...I'm no jocking...).
Any ideas ??
T.Y all
 
Best Regards
Miguel Loureiro <[EMAIL PROTECTED]>




attachments ar stripped for security purposes by the mailing list server. please post 
the code in your msg.


-- 

 Chris Lee
 [EMAIL PROTECTED]


""Miguel Loureiro"" <[EMAIL PROTECTED]> wrote in message 
00ad01c0b2ff$f12a9c00$[EMAIL PROTECTED]">news:00ad01c0b2ff$f12a9c00$[EMAIL PROTECTED]...
Hello all,
I'm mad with me....sorry but see if can understand why I'm mad.
Copy the 3 attached files, and run it.
In one.php just click to the link (it works.....), now in two.php you can see: " and 
now: aaaaaaa", cool hum...
Clicking in OFF link you can see the result of phpinfo, but section of Apache 
Evironment, in HTTP_COOKIE you (at least I have) the PHPSESSID with value, in spite of 
in off.php code I make a session_destroy????
Now if you use history back button, go to two.php, and OK the session variable dont 
appear, Back again, Forward and voila' here is 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
I have try to follow some Jeff Armstrong tips, but I have no success.Thank you very 
much Jeff (really...I'm no jocking...).
Any ideas ?? 
T.Y all

Best Regards
Miguel Loureiro <[EMAIL PROTECTED]>


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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




On Thu, Mar 22, 2001 at 10:37:41AM +0100, Daniel Svensson, Coretrek wrote:

> Hi there!
> 
> I wonder if there is someone out there who can help me out with some
> advices regarding authentification with PAM (Pluggable Authentication
> Modules)
> using PHP.

Try php_pam.

http://freshmeat.net/projects/php_pam/

Matt




I just upgraded to php4.0.4pl1( so I could use zend optimizer) with
t1lib.so.1, and I'm having some problems with t1lib work consistently.
What is happening is when I try to center certain text on a card size
image with a variable x coordinate, imagepstext will act as if $x =0. I
checked to see if my function was returning the correct number and it
is. This script has worked great with php3.0.12, and I even reinstalled
it to see if it still worked, and it did.

Here are the snippets from the script:

function getx($string,$font,$size){
    $bbox = imagepsbbox($string, $font, $size);
    $width = $bbox[2] - $bbox[0];
     $x = 252 - ceil($width/2);
     return $x;
}

$x = getx($name,$font1,18);
imagepstext($im, "$name", $font1, 18, $black, $white, $x, 45);

IF (for example)
$name = "Registered Representative" it will not center it (acts like
x=0, left justified)
$name = "Registered Representativ" it will not center it (acts like x=0,
left justified)
$name = "Registered Representati" it will center
$name = "Registered Repre5entative" it will center (char "5" can be any
letter but "s")

Any ideas? I would hate to have to go back to using ttf again.

Thanks,
JR







Hi, I am trying to set a cookie and it doesn't work.  I am running IE 5.
I have IE set to prompt before setting cookies but I never get a prompt.

Here is my code - basically, if someone logs in, it is to set a cookie.
What am I missing?   Kris

        if($success==1){
            $loginid="$id";
            NewSessionID($id);
            GetProfile($id);
            $page_title="LTT: $loginid Index";
            include("html-head.php3");
            if($id==""){
                    include("ln/ln_ln_dna.php3");
                    exit;
                }
                include("ms/rg1/index.php3");
                exit;
            }

function NewSessionID($id){
        $sid="";
        $length=16;
        srand((double)microtime()*1000000);
        $SessPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        $SessPool .= "abcdefghijklmnopqrstuvwxyz";
        $SessPool .= "0123456789";

        for($tempslime=0; $tempslime < $length; $tempslime++) {
                $sid .= substr($SessPool, (rand()%(strlen($SessPool))), 1);
                }
        setcookie("LoginAuth", $sid,time()+3600);
        }




I believe you need to set the cookie
before any other header information is 
passed.

-brian

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 2:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] need help with cookies
> 
> 
> Hi, I am trying to set a cookie and it doesn't work.  I am running IE 5.
> I have IE set to prompt before setting cookies but I never get a prompt.
> 
> Here is my code - basically, if someone logs in, it is to set a cookie.
> What am I missing?   Kris
> 
>         if($success==1){
>             $loginid="$id";
>             NewSessionID($id);
>             GetProfile($id);
>             $page_title="LTT: $loginid Index";
>             include("html-head.php3");
>             if($id==""){
>                     include("ln/ln_ln_dna.php3");
>                     exit;
>                 }
>                 include("ms/rg1/index.php3");
>                 exit;
>             }
> 
> function NewSessionID($id){
>         $sid="";
>         $length=16;
>         srand((double)microtime()*1000000);
>         $SessPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
>         $SessPool .= "abcdefghijklmnopqrstuvwxyz";
>         $SessPool .= "0123456789";
> 
>         for($tempslime=0; $tempslime < $length; $tempslime++) {
>                 $sid .= substr($SessPool, 
> (rand()%(strlen($SessPool))), 1);
>                 }
>         setcookie("LoginAuth", $sid,time()+3600);
>       }
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




I beleive I am attempting to set this cookie before any headers are sent.
?
Kris
On 22 Mar 01, at 14:38, Brian V Bonini wrote:

> I believe you need to set the cookie
> before any other header information is 
> passed.
> 
> -brian
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 22, 2001 2:23 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] need help with cookies
> > 
> > 
> > Hi, I am trying to set a cookie and it doesn't work.  I am running IE 5.
> > I have IE set to prompt before setting cookies but I never get a prompt.
> > 
> > Here is my code - basically, if someone logs in, it is to set a cookie.
> > What am I missing?   Kris
> > 
> >         if($success==1){
> >             $loginid="$id";
> >             NewSessionID($id);
> >             GetProfile($id);
> >             $page_title="LTT: $loginid Index";
> >             include("html-head.php3");
> >             if($id==""){
> >                     include("ln/ln_ln_dna.php3");
> >                     exit;
> >                 }
> >                 include("ms/rg1/index.php3");
> >                 exit;
> >             }
> > 
> > function NewSessionID($id){
> >         $sid="";
> >         $length=16;
> >         srand((double)microtime()*1000000);
> >         $SessPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
> >         $SessPool .= "abcdefghijklmnopqrstuvwxyz";
> >         $SessPool .= "0123456789";
> > 
> >         for($tempslime=0; $tempslime < $length; $tempslime++) {
> >                 $sid .= substr($SessPool, 
> > (rand()%(strlen($SessPool))), 1);
> >                 }
> >         setcookie("LoginAuth", $sid,time()+3600);
> >     }
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






as allready stated you need to set the cookie before data is outpued, you can override 
this by editing your php.ini 

output_buffering = on;

on another note, I would use sessions for all this, youve created a tone of code that 
does almost exactly what sessions can do in a matter of a few lines.

-- 

 Chris Lee
 [EMAIL PROTECTED]


<[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi, I am trying to set a cookie and it doesn't work.  I am running IE 5.
I have IE set to prompt before setting cookies but I never get a prompt.

Here is my code - basically, if someone logs in, it is to set a cookie.
What am I missing?   Kris

        if($success==1){
            $loginid="$id";
            NewSessionID($id);
            GetProfile($id);
            $page_title="LTT: $loginid Index";
            include("html-head.php3");
            if($id==""){
                    include("ln/ln_ln_dna.php3");
                    exit;
                }
                include("ms/rg1/index.php3");
                exit;
            }

function NewSessionID($id){
        $sid="";
        $length=16;
        srand((double)microtime()*1000000);
        $SessPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        $SessPool .= "abcdefghijklmnopqrstuvwxyz";
        $SessPool .= "0123456789";

        for($tempslime=0; $tempslime < $length; $tempslime++) {
                $sid .= substr($SessPool, (rand()%(strlen($SessPool))), 1);
                }
        setcookie("LoginAuth", $sid,time()+3600);
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






I would suggest for you to take all the complicated stuff out of a simple text
script and try something like this:
<%
setcookie("TestValue","Working",600)
%>

Make sure that nothing is being sent prior to setting the cookie, and see if IE
prompts you...

Good Luck!

[EMAIL PROTECTED] wrote:

> Hi, I am trying to set a cookie and it doesn't work.  I am running IE 5.
> I have IE set to prompt before setting cookies but I never get a prompt.
>
> Here is my code - basically, if someone logs in, it is to set a cookie.
> What am I missing?   Kris
>
>         if($success==1){
>             $loginid="$id";
>             NewSessionID($id);
>             GetProfile($id);
>             $page_title="LTT: $loginid Index";
>             include("html-head.php3");
>             if($id==""){
>                     include("ln/ln_ln_dna.php3");
>                     exit;
>                 }
>                 include("ms/rg1/index.php3");
>                 exit;
>             }
>
> function NewSessionID($id){
>         $sid="";
>         $length=16;
>         srand((double)microtime()*1000000);
>         $SessPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
>         $SessPool .= "abcdefghijklmnopqrstuvwxyz";
>         $SessPool .= "0123456789";
>
>         for($tempslime=0; $tempslime < $length; $tempslime++) {
>                 $sid .= substr($SessPool, (rand()%(strlen($SessPool))), 1);
>                 }
>         setcookie("LoginAuth", $sid,time()+3600);
>         }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___________________________________________________________
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net






why don't you check to see is a variable was passed to the page. If you use the post 
method then a hidden field can be used o check that the user did come from the 
application page.

a sample of the check will be

if(!$var_from_previous_page)
{
header("location: application.php");
}

--

On Thu, 22 Mar 2001 14:34:21  
 Good Fella wrote:
>Hi All,
>
>I currently have a small problem with my PHP form.  I have made two PHP 
>files (application.php and process_application.php).
>
>On submitting the form, you then move to process_application.php.  Any 
>errors will force the form NOT to be submitted to me.
>
>However, how do I stop people from accessing process_application.php 
>directly?  You can still type in the URL of this address without filling in 
>any details.
>
>Although it serves up an error, is there anyway I can prevent people from 
>getting to this page unless they press "Submit" on the actual form on 
>application.php?
>
>Thanks,
>
>SK
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




H-

I'm kinda new to the PHP scene so if the below plea for help is
incredibly simple ... well.. What can I say? I'm stuck. 

I've been on the PHP website for the last hour reading the documentation
on arrays and all the functions associated with it but have yet to find
a straight forward explaination on how to accomplish this code. 
Here's what I have: (PHP4)
 $m = "03";
 $list = array(01=>"Jan", 02=>"Feb", 03=>"Mar", 04=>"Apr", 05=>"May",
06=>"Jun", 07=>"Jul", 08=>"Aug", 09=>"Sep\", 10=>"Oct", 11=>"Nov",
12="Dec");
 $month = $list[$m];
 print "$month\n";

What I want to print is the month in Text format, which in this instance
should be Mar . 
I even tried: $month = array_keys($list, $m);

Now I know that $list[x]; references the location of an item so I know
why the previous code doesn't work in that respect, since nowhere is 01
a location but an association within the array. Right?

I've seen examples on printing every element of an array. Printing every
element of a 2d array, poping elements from the beginning and end of an
array but not an example of getting a single element from an array. 

I'm sure I'm doing something backwards and might even be confused on how
the array works but don't know what. 
If any one has any better solutions to this code please feel free to
post. 

Thanks for any assistance anyone can provide. 
-Sterling




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Sterling) wrote:

>  $m = "03";
>  $list = array(01=>"Jan", 02=>"Feb", 03=>"Mar", 04=>"Apr", 05=>"May",
> 06=>"Jun", 07=>"Jul", 08=>"Aug", 09=>"Sep\", 10=>"Oct", 11=>"Nov",
> 12="Dec");
>  $month = $list[$m];
>  print "$month\n";
> 
> What I want to print is the month in Text format, which in this instance
> should be Mar . 
> I even tried: $month = array_keys($list, $m);
> 
> Now I know that $list[x]; references the location of an item so I know
> why the previous code doesn't work in that respect, since nowhere is 01
> a location but an association within the array. Right?

The keys to an associative array should be quoted.  Also, that escaped 
quote on "Sep\" is throwing everything off.  Try:

 $m = "03";
 $list = array("01"=>"Jan", "02"=>"Feb", "03"=>"Mar", "04"=>"Apr", 
"05"=>"May", "06"=>"Jun", "07"=>"Jul", "08"=>"Aug", "09"=>"Sep", 
"10"=>"Oct", "11"=>"Nov","12"="Dec");//keys quoted, no escaped quotes
 $month = $list["$m"];//associative array element index quoted
 print "$month\n";

-- 
CC




You can do this instead..
$month[] = array("Jan","Feb" ......"Dec");

$m = 3;
$real_m = $m-1
echo "Month= $month[$real_m]; //Mar


You can also have PHP assign the first element of the array to index 1
instead of 0.. I think you accomplish that by doing something like $month[]
= array(1=>Jan,Feb,Mar...);
If you need to get the month as $m='03';  you can strip the first zero using
any one of the suitable string functions.


PS: (i noticed that this doesn't really answer your specific question. But
this will work properly for your needs)

oktay

-----Original Message-----
From: Sterling [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Array confusion.


H-

I'm kinda new to the PHP scene so if the below plea for help is
incredibly simple ... well.. What can I say? I'm stuck. 

I've been on the PHP website for the last hour reading the documentation
on arrays and all the functions associated with it but have yet to find
a straight forward explaination on how to accomplish this code. 
Here's what I have: (PHP4)
 $m = "03";
 $list = array(01=>"Jan", 02=>"Feb", 03=>"Mar", 04=>"Apr", 05=>"May",
06=>"Jun", 07=>"Jul", 08=>"Aug", 09=>"Sep\", 10=>"Oct", 11=>"Nov",
12="Dec");
 $month = $list[$m];
 print "$month\n";

What I want to print is the month in Text format, which in this instance
should be Mar . 
I even tried: $month = array_keys($list, $m);

Now I know that $list[x]; references the location of an item so I know
why the previous code doesn't work in that respect, since nowhere is 01
a location but an association within the array. Right?

I've seen examples on printing every element of an array. Printing every
element of a 2d array, poping elements from the beginning and end of an
array but not an example of getting a single element from an array. 

I'm sure I'm doing something backwards and might even be confused on how
the array works but don't know what. 
If any one has any better solutions to this code please feel free to
post. 

Thanks for any assistance anyone can provide. 
-Sterling

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




H-

Thanks to all that wrote in with input on this issue. 

I really appreciate the assistance. 

Thanks to CC Zona and James for the code sample. It looks like there
were typo's in my code and it threw me for a minute after
recieving/applying all the emails. 
That backslash wasn't suppose to be in the original email I sent out, it
was just from my Emacs window wrapping and the = next to Dec became a
problem after I quoted everything else but I found it eventually.

Thanks again. It's now working as I expected it too. 
-Sterling


CC Zona wrote:
> 
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Sterling) wrote:
> 
> >  $m = "03";
> >  $list = array(01=>"Jan", 02=>"Feb", 03=>"Mar", 04=>"Apr", 05=>"May",
> > 06=>"Jun", 07=>"Jul", 08=>"Aug", 09=>"Sep\", 10=>"Oct", 11=>"Nov",
> > 12="Dec");
> >  $month = $list[$m];
> >  print "$month\n";
> >
> > What I want to print is the month in Text format, which in this instance
> > should be Mar .
> > I even tried: $month = array_keys($list, $m);
> >
> > Now I know that $list[x]; references the location of an item so I know
> > why the previous code doesn't work in that respect, since nowhere is 01
> > a location but an association within the array. Right?
> 
> The keys to an associative array should be quoted.  Also, that escaped
> quote on "Sep\" is throwing everything off.  Try:
> 
>  $m = "03";
>  $list = array("01"=>"Jan", "02"=>"Feb", "03"=>"Mar", "04"=>"Apr",
> "05"=>"May", "06"=>"Jun", "07"=>"Jul", "08"=>"Aug", "09"=>"Sep",
> "10"=>"Oct", "11"=>"Nov","12"="Dec");//keys quoted, no escaped quotes
>  $month = $list["$m"];//associative array element index quoted
>  print "$month\n";
> 
> --
> CC
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I want to extract and save images from a large directory of PDF's... is this
possible with php? Has anyone done this??

 James






I am trying to register a session variable in a function without using the
global in the beginning.
The reason for this is that I don´t always know how many variables I am
going to register (I separate the different fields with | like this,
"username|email|cellphone" and explode them).

Is there some way I can make all the variables in the function global, so I
can get the session variables registered?

function test() {
    global $username // <-- With this, it works. Without it, it doesn´t
    session_start();
    $username="tobias";
    session_register("username");
}

The best I could come up with was (didn´t work):
global $HTTP_SESSION_VARS;

Any thoughts?
// Tobias








In article <99dn35$duo$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Tobias Talltorp") wrote:

> I am trying to register a session variable in a function without using the
> global in the beginning.

You can pass the variable(s) to the function as an argument.  Perhaps it 
will be easier to deal with a variable number variables <g> by  packing all 
of them into a single array, then passing the array.

-- 
CC




so your trying to take a list of variables and register them as session vars?

<?php

 function make_session($vars)
 {
  $vars = explode('|', $vars);
  foreach($vars as $pos => $val)
  {
   global $val;
   session_register($val);
  }
 }

?>

this will work for that.


-- 

 Chris Lee
 [EMAIL PROTECTED]



""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message 
99dn35$duo$[EMAIL PROTECTED]">news:99dn35$duo$[EMAIL PROTECTED]...
I am trying to register a session variable in a function without using the
global in the beginning.
The reason for this is that I don´t always know how many variables I am
going to register (I separate the different fields with | like this,
"username|email|cellphone" and explode them).

Is there some way I can make all the variables in the function global, so I
can get the session variables registered?

function test() {
    global $username // <-- With this, it works. Without it, it doesn´t
    session_start();
    $username="tobias";
    session_register("username");
}

The best I could come up with was (didn´t work):
global $HTTP_SESSION_VARS;

Any thoughts?
// Tobias





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Well... Whadda ya know. Right after I sent the post I figured it out.
(Solution? Variable variables!)

function register_vars($reg_var) {

    // Make the $reg_var global
    $global_vars=explode("|", $reg_var);
    for ($i=0; $i<sizeof($global_vars); $i++)

        global $$global_vars[$i]; // Variable variables

    ... session setting code
}
register_vars("username|email|cellphone") ;


This way I only make the nessesary variables global.

// Tobias


""Tobias Talltorp"" <[EMAIL PROTECTED]> wrote in message
99dn35$duo$[EMAIL PROTECTED]">news:99dn35$duo$[EMAIL PROTECTED]...
> I am trying to register a session variable in a function without using the
> global in the beginning.
> The reason for this is that I don´t always know how many variables I am
> going to register (I separate the different fields with | like this,
> "username|email|cellphone" and explode them).
>
> Is there some way I can make all the variables in the function global, so
I
> can get the session variables registered?
>
> function test() {
>     global $username // <-- With this, it works. Without it, it doesn´t
>     session_start();
>     $username="tobias";
>     session_register("username");
> }
>
> The best I could come up with was (didn´t work):
> global $HTTP_SESSION_VARS;
>
> Any thoughts?
> // Tobias
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






"McShen" <[EMAIL PROTECTED]> wrote:

 > hi
 > 
 > how do i back up a mysql DB table? Can you please write me the code?

i would just stop the database server and dump the table to a file
with mysqldump, just run it from the command line for example:

/path/to/mysqldump -h host -p password -u username databasename >
/path/to/file

then you have a comple dump of your database and database structure.

-- 
Henrik Hansen





Are there any limitations on how many records I can pull from an Oracle
Database
over ODBC?

I have it pulling one record just fine, but when I tell it to pull all
records,
which should be about 75,000, it only gets about 600 or so.

Does the php script time out (i'm running it thru a web browser).

What could it be?...

thanks,
ken




I thought maybe the php script was running to fast for the network
connection.
So i put in a sleep(1)
It still only ran for about the same amount of time (less records pulled of
course).

Could it be losing the connection instead because of lack of activity?

Would a persistent connection make any difference?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 4:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ODBC & Oracle


Are there any limitations on how many records I can pull from an Oracle
Database
over ODBC?

I have it pulling one record just fine, but when I tell it to pull all
records,
which should be about 75,000, it only gets about 600 or so.

Does the php script time out (i'm running it thru a web browser).

What could it be?...

thanks,
ken

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Okay, I'm baffled.

I told it to Connect to the database.
I then started a loop of (odbc_fetch_row)
I get about 6000 records returned (that i'm just plopping into an array for
speed).

That's all, much more than when i process each one, but I would think it is
more than possible
to grab more than 6000 records from a database.

right?

thanks,
ken

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 4:21 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] ODBC & Oracle


I thought maybe the php script was running to fast for the network
connection.
So i put in a sleep(1)
It still only ran for about the same amount of time (less records pulled of
course).

Could it be losing the connection instead because of lack of activity?

Would a persistent connection make any difference?

-----Original Message-----
From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 4:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ODBC & Oracle


Are there any limitations on how many records I can pull from an Oracle
Database
over ODBC?

I have it pulling one record just fine, but when I tell it to pull all
records,
which should be about 75,000, it only gets about 600 or so.

Does the php script time out (i'm running it thru a web browser).

What could it be?...

thanks,
ken

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




There is a timeout, that should halt a script if it runs too long.  If you
can, check
php.ini
set max_execution_time to something greater than 30 seconds, see if that
helps.

""Brooks, Ken"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I thought maybe the php script was running to fast for the network
> connection.
> So i put in a sleep(1)
> It still only ran for about the same amount of time (less records pulled
of
> course).
>
> Could it be losing the connection instead because of lack of activity?
>
> Would a persistent connection make any difference?
>
> -----Original Message-----
> From: Brooks, Ken [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 4:04 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] ODBC & Oracle
>
>
> Are there any limitations on how many records I can pull from an Oracle
> Database
> over ODBC?
>
> I have it pulling one record just fine, but when I tell it to pull all
> records,
> which should be about 75,000, it only gets about 600 or so.
>
> Does the php script time out (i'm running it thru a web browser).
>
> What could it be?...
>
> thanks,
> ken
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi, I've succesfully installed a oracle 8.1.7 (chose
server option) under a development redhat 6.2 box.

I've compiled php as DSO with a
--with-oci8=path/to/ORACLE_HOME and it compiled ok. 
If I try to start httpd I keep getting

Cannot load /etc/httpd/modules/libphp4.so into server:
libclntsh.so.8.0: cannot open shared object file: No
such file or directory                                
                                                      
      

I've tried to find it with no luck.  Any tips ?

Thanks.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/





On Thu, 22 Mar 2001, Robert Mena wrote:
> Hi, I've succesfully installed a oracle 8.1.7 (chose
> server option) under a development redhat 6.2 box.
> 
> I've compiled php as DSO with a
> --with-oci8=path/to/ORACLE_HOME and it compiled ok. 
> If I try to start httpd I keep getting
> 
> Cannot load /etc/httpd/modules/libphp4.so into server:
> libclntsh.so.8.0: cannot open shared object file: No
> such file or directory                                

Try include your ORACLE_HOME or ORACLE_HOME/lib to ld.so.conf and run
ldconfig.

Try start apache again.
Good luck.

Adi Wibowo -------------------------------
* Work matter    : [EMAIL PROTECTED]
* Private matter : [EMAIL PROTECTED]
------------------------------------------







how do you sent a Environment Variables for the php script
to execute in?  i need to set INFORMIXSERVER so i can
use the informix php functions.  This is going live tomorrow
and we don't have it working yet...PLEASE HELP!

thanks,
joe rice
Web Admin
www.bigidea.com






i figured it out...thanks.
putenv()

Joe Rice([EMAIL PROTECTED])@Thu, Mar 22, 2001 at 03:16:35PM -0600:
> 
> 
> how do you sent a Environment Variables for the php script
> to execute in?  i need to set INFORMIXSERVER so i can
> use the informix php functions.  This is going live tomorrow
> and we don't have it working yet...PLEASE HELP!
> 
> thanks,
> joe rice
> Web Admin
> www.bigidea.com
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




I would like to do this with a MySQL database containing
product information:

<tr><td>Product 1 Info</td><td>Product 2 Info</td></tr>
<tr><td>Product 3 Info</td><td>&nbsp;</td></tr>

And if there are an odd number of products I want it to 
complete the table row with nothing in the cell. I want
it to be able to automatically do this no matter how many
products there are. I'm not sure how to set it up to 
print every other like that.
Jeff Oien




now it seems like you know what is to be done and you are not willing to do the work. 
Now i have not tested this and you may have to do some work with it but you get the 
picture. if you lookup the syntax and ensure how to use the command then you will be 
ok.
of course if you still have problems then let em know


FOR($i = 0;$i < $numrows; ++$i)
{
echo"<tr><td>$mysql_result($resultidentiferfromquery, $i, 
fieldwithproduct)</td><td>$mysql_result($resultidentiferfromquery, ++$i, 
fieldwithproduct)</td></tr>";
echo"<tr><td>$mysql_result($resultidentiferfromquery, ++$i, 
fieldwithproduct)</td><td>&nbsp;</td></tr>";
if($i/2 > 0) //not even
{
echo"<tr><td>&nbsp;</td>><td>&nbsp;</td></tr>";
}
}

 
--

On Thu, 22 Mar 2001 15:19:09  
 Jeff Oien wrote:
>I would like to do this with a MySQL database containing
>product information:
>
><tr><td>Product 1 Info</td><td>Product 2 Info</td></tr>
><tr><td>Product 3 Info</td><td> </td></tr>
>
>And if there are an odd number of products I want it to 
>complete the table row with nothing in the cell. I want
>it to be able to automatically do this no matter how many
>products there are. I'm not sure how to set it up to 
>print every other like that.
>Jeff Oien
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




modulus also works for finding even nums:

if ($i % 2) { 
  // not even
}


> -----Original Message-----
> From: darion mapp [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP] Printing MySQL into HTML Tables
> 
> 
> now it seems like you know what is to be done and you are not willing to 
> do the work. Now i have not tested this and you may have to do some work 
> with it but you get the picture. if you lookup the syntax and ensure how 
> to use the command then you will be ok.
> of course if you still have problems then let em know
> 
> 
> FOR($i = 0;$i < $numrows; ++$i)
> {
> echo"<tr><td>$mysql_result($resultidentiferfromquery, $i, 
> fieldwithproduct)</td><td>$mysql_result($resultidentiferfromquery, ++$i, 
> fieldwithproduct)</td></tr>";
> echo"<tr><td>$mysql_result($resultidentiferfromquery, ++$i, 
> fieldwithproduct)</td><td>&nbsp;</td></tr>";
> if($i/2 > 0) //not even
> {
> echo"<tr><td>&nbsp;</td>><td>&nbsp;</td></tr>";
> }
> }





        Ok, I am working on a site where I would like to use sessions but NOT
cookies. I would also like to have the sessions automatically appended
to URL but I have a few questions. The current php rpm distribution was
not compiled with --enable-trans-sid (according to phpinfo.php), am I
correct in assuming I need to recompile? If that is the case, can
someone recommend a good "how-to" to walk me through it. I have no
experience with compiling at all.

-- 
Larry H




check php.net and read the 'README' and
'INSTALL' files that come in the .tar.gz file
for more detailed information.

very basically, you want to get the sources,
untar/zip them, run configure, then build the
thing and test it (you can do all of this
as an unprivileged user).   then install as
root (or whatever account has the necessary
privileges)

(replace php..... with whatever the PHP
tarball is named)

at the prompt (you dont need to be root) type:
tar xvfz php.....tar.gz
cd php.....
./configure --enable-trans-sid
make
make test


if you didnt get any errors, then (as root) type:
make install

then configure your webserver and
restart the webserver 

if you have any specific troubles, let me know,
i've config'd PHP on three different redhat
linux installations using apache and havent
had any problems yet.


> -----Original Message-----
> From: Larry Hotchkiss [mailto:[EMAIL PROTECTED]]
> Subject: [PHP] php 4.04pl 1-3 for red hat 7
> 
> 
>       Ok, I am working on a site where I would like to use sessions but NOT
> cookies. I would also like to have the sessions automatically appended
> to URL but I have a few questions. The current php rpm distribution was
> not compiled with --enable-trans-sid (according to phpinfo.php), am I
> correct in assuming I need to recompile? If that is the case, can
> someone recommend a good "how-to" to walk me through it. I have no
> experience with compiling at all.
> 
> -- 
> Larry H




hello

I use crypt to crypt member's passwords and use the following verify


"$stored_password" is the encrypted, stored password.

"$password" is the plain text password you just got from the form.

## Check the passwords
$encrypted_password = crypt($password,$stored_password);

if ($encrypted_password = $stored_password) { $logged_in = 1; };


the problem I am having is that it is only comparing the first 8 characters
of the password

so if my password was randyrandy

i could get in with randyran

How do I fix this

the crypt password is stored in the database with enough room to store the
password so it isn't cutting it off when inserting to the database.

thanks

randy





you dont... as far as i know,
crypt only works on <= 8 chars
it will truncate anything over 8.

perhaps try using md5 or mcrypt...




> -----Original Message-----
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 4:33 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Crypt problem
> 
> 
> hello
> 
> I use crypt to crypt member's passwords and use the following verify
> 
> 
> "$stored_password" is the encrypted, stored password.
> 
> "$password" is the plain text password you just got from the form.
> 
> ## Check the passwords
> $encrypted_password = crypt($password,$stored_password);
> 
> if ($encrypted_password = $stored_password) { $logged_in = 1; };
> 
> 
> the problem I am having is that it is only comparing the first 8 characters
> of the password
> 
> so if my password was randyrandy
> 
> i could get in with randyran
> 
> How do I fix this
> 
> the crypt password is stored in the database with enough room to store the
> password so it isn't cutting it off when inserting to the database.
> 
> thanks
> 
> randy
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




Hello!

I am constructing an intranet site. The site is all secure, I mean, all the
pages are under a directory that needs a password to get in. These are
facts:

A) The user information is on a LDAP;
B) The user should entry the pair login/password only once;
C) Any access to the site without logging first will be routated to a login
page;

So what would be a good solution on that?

If this work, I would like to create a documentation about it. All help will
be welcome.

Thank you in advance and for your attention,

Romulo





the way i do it for sites that need minimal to medium
is to generate a session id whenever a user comes to
the site.  this session id is stored in mysql table
and as a cookie on the user's computer.  when the
user logs in correctly, the username is stored in
the database with the session ID (not as a cookie, 
only the session ID is saved as a cookie).

i try and make it my goal to never store any usernames
or passwords on the user's computer.  the existence
of the session ID is enough to allow me to look up
that ID in the database and see if the user logged
in correctly in the past few hours (expire time is ~6
hours, so after 6 hours of inactivity, the id is
cleansed from the database)

at the top of ever PHP page that requires a 
valid login, i check to see if the user has
a session ID stored as a cookie, then look up
that ID in the database to check if it's valid.
if the ID is valid, i check to see if a username
is also stored in the database.  if there's a
valid username stored alongside the session ID,
then the user is recognized as being logged in.
if no username is in the database, then i ask the
user to log in.

the session table has these fields:
id (the generated session id)
lastused (last time the user accessed a page)
username (the username that the user logged in as)

(password information is stored in another table)


so... basically, if the user logs in correctly,
it will generate a random session id and store
the username in the database.  *only* the session
id will be stored on the client.

when the user comes back to the website, if the
id in their cookie matches an id in the database
*and* the username field has a valid username,
the user is not asked to log in again.  if the
session id is not found in the database (or is
expired) the user is directed to a login page.


any comments or thoughts on my method are welcome;
especially any weaknesses that you may find in my system.

thanks


> -----Original Message-----
> From: Romulo Roberto Pereira [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 4:30 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] I need an authentication method that is good... any
> Ideas? - please help
> 
> 
> Hello!
> 
> I am constructing an intranet site. The site is all secure, I mean, all the
> pages are under a directory that needs a password to get in. These are
> facts:
> 
> A) The user information is on a LDAP;
> B) The user should entry the pair login/password only once;
> C) Any access to the site without logging first will be routated to a login
> page;
> 
> So what would be a good solution on that?
> 
> If this work, I would like to create a documentation about it. All help will
> be welcome.
> 
> Thank you in advance and for your attention,
> 
> Romulo
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




I'm trying to use Fopen to check and see if a URL exist with this bit of code.  
$url=$row[url];
echo "<strong>Old URL = ".$url."</strong><br>";
$urlcheck = fopen($url,"r");
echo "urlcheck = ".$urlcheck."<br>";
switch ($url){
case "":
case "http://":
echo "<strong>No URL Set</strong><br>";
break;
default:
switch ($urlcheck){
case 1:
echo "<strong>Valid URL</strong><br>";
break;
case 0: 
echo "<strong>URL Is Not Valid</strong><br>";
$url="http://";
break;
default:
echo "<strong>Fopen Did Not Work</strong><br>";
}
break;
}
echo "<strong>New URL = ".$url."</strong><br>";


So far all I can get it to do is the default response.  Can someone point out what I'm 
doing wrong or tell me how to see what the contents of a resource id is please?

Old URL = http://www.s-series.org/htm/firestorm/firestorm.htm
urlcheck = Resource id #4
Fopen Did Not Work
New URL = http://www.s-series.org/htm/firestorm/firestorm.htm



Kenneth R Zink II     [EMAIL PROTECTED]    ICQ# 5095094
'87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!!  
http://www.s-series.org/htm/windstorm/project-windstorm.htm
'85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!!  
http://www.s-series.org/htm/firestorm/firestorm.htm
'84 5.0L (307 "Y") Carbed Oldsmobile Delta 88 Royal Brougham.  Daily driver until 
FireStorm is ready.
Racing by the Grace of God!!




ok, so i have want to encrypt my user password in the mySQL Database and well that is 
not working but in addition to that when the user logges into the system i have to 
encrypt their password and compare the two encrypted passwords to see if they match. 
this is where my problem starts. I get the same error for both the registration 
process where the password is encrypted to be placed into the database and when the 
use logs in and the password is encrypted to be compared.

The web browser errors to "Page cannot bbe displayed (IE)" and only when the line 
below is commented out does it work fine.

HELP!!!! Project was due last week so i am pressed for time

$txtPass = mcrypt_ecb(MCRYPT_BLOWFISH, $key, $txtPass, MCRYPT_ENCRYPT);


Get 250 color business cards for FREE! at Lycos Mail
http://mail.lycos.com/freemail/vistaprint_index.html




quite possibly you did not compile PHP with mcrypt
library support.

for linux distrib's, mcrypt is not default, you have
to specify ./configure --with-mcrypt to get mcrypt
functionality (i dont know whether it's included
by default with the win binary, but i doubt it)

do the phpinfo() thing and see if mcrypt is there.


> -----Original Message-----
> From: darion mapp [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 22, 2001 5:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Encryption Problem
> 
> 
> ok, so i have want to encrypt my user password in the mySQL Database and 
> well that is not working but in addition to that when the user logges into 
> the system i have to encrypt their password and compare the two encrypted 
> passwords to see if they match. this is where my problem starts. I get the 
> same error for both the registration process where the password is 
> encrypted to be placed into the database and when the use logs in and the 
> password is encrypted to be compared.
> 
> The web browser errors to "Page cannot bbe displayed (IE)" and only when 
> the line below is commented out does it work fine.
> 
> HELP!!!! Project was due last week so i am pressed for time
> 
> $txtPass = mcrypt_ecb(MCRYPT_BLOWFISH, $key, $txtPass, MCRYPT_ENCRYPT);
> 
> 
> Get 250 color business cards for FREE! at Lycos Mail
> http://mail.lycos.com/freemail/vistaprint_index.html
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




Hi all,
    This is a tough one, wasn't able to find a solution so far. But
I hope that someone can help me out
or point me in the right direction.

Here is what I got:

/src contains a bunch of cgi scripts that require apache to have an
entry like this

ScriptAlias /src "/home/src/"

When I try to run a file with .php extension in /src I get an error.
I figured out since I have ScriptAlias /src,  Apache will handle every
file called in that directory as if it were a perl /cgi program.

I need to be able to have apache  execute the .cgi and .php files in
/src
Any ideas on how to make Apache differentiate between the two.

Any help would be greatly appreciated.


Nick

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nicholas Marouf || http://www.RamallahOnline.com







do .php files work anywhere else?


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Maroufski
> Sent: Thursday, March 22, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP/CGI Help
> 
> 
> Hi all,
>     This is a tough one, wasn't able to find a solution so far. But
> I hope that someone can help me out
> or point me in the right direction.
> 
> Here is what I got:
> 
> /src contains a bunch of cgi scripts that require apache to have an
> entry like this
> 
> ScriptAlias /src "/home/src/"
> 
> When I try to run a file with .php extension in /src I get an error.
> I figured out since I have ScriptAlias /src,  Apache will handle every
> file called in that directory as if it were a perl /cgi program.
> 
> I need to be able to have apache  execute the .cgi and .php files in
> /src
> Any ideas on how to make Apache differentiate between the two.
> 
> Any help would be greatly appreciated.
> 
> 
> Nick
> 
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Nicholas Marouf || http://www.RamallahOnline.com
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





you also need to have 
ScriptAlias /src "/home/src/"
        Action application/x-httpd-php4 "php excicution file location"
        AddType application/x-httpd-php4 .php
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> Of Maroufski
> Sent: Thursday, March 22, 2001 5:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP/CGI Help
> 
> 
> Hi all,
>     This is a tough one, wasn't able to find a solution so far. But
> I hope that someone can help me out
> or point me in the right direction.
> 
> Here is what I got:
> 
> /src contains a bunch of cgi scripts that require apache to have an
> entry like this
> 
> ScriptAlias /src "/home/src/"
> 
> When I try to run a file with .php extension in /src I get an error.
> I figured out since I have ScriptAlias /src,  Apache will handle every
> file called in that directory as if it were a perl /cgi program.
> 
> I need to be able to have apache  execute the .cgi and .php files in
> /src
> Any ideas on how to make Apache differentiate between the two.
> 
> Any help would be greatly appreciated.
> 
> 
> Nick
> 
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Nicholas Marouf || http://www.RamallahOnline.com
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hi Peter,
    Thanks for all the help.  I actually started playing with what you told
me, and then did some trial-and-error testing
and found out that I didn't need ScriptAlias /src "/home/src/" at all.    The
.php3 files ran when I removed it, then I added these
two lines to get the .pl and .cgi to work for the virtual host.

    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl

Works like a charm.

Thanks again.

Nick



Peter Houchin wrote:

> you also need to have
> ScriptAlias /src "/home/src/"
>         Action application/x-httpd-php4 "php excicution file location"
>         AddType application/x-httpd-php4 .php
>

> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf
> > Of Maroufski
> > Sent: Thursday, March 22, 2001 5:41 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] PHP/CGI Help
> >
> >
> > Hi all,
> >     This is a tough one, wasn't able to find a solution so far. But
> > I hope that someone can help me out
> > or point me in the right direction.
> >
> > Here is what I got:
> >
> > /src contains a bunch of cgi scripts that require apache to have an
> > entry like this
> >
> > ScriptAlias /src "/home/src/"
> >
> > When I try to run a file with .php extension in /src I get an error.
> > I figured out since I have ScriptAlias /src,  Apache will handle every
> > file called in that directory as if it were a perl /cgi program.
> >
> > I need to be able to have apache  execute the .cgi and .php files in
> > /src
> > Any ideas on how to make Apache differentiate between the two.
> >
> > Any help would be greatly appreciated.
> >
> >
> > Nick
> >

--
Nicholas Marouf || System Administrator/Security Response Team
http://www.ramallahonline.com







Hello,

Does anybody know where I could find out how to Move data from one Mysql
table to another.

I have a query showing all the results, and I am trying to put a link at the
end of each row that says "move"

Clicking this will move that records information to another table.
IE From table orders to table ordered

Make sense?

Please help

--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------






Probably on the MySQL list.  This is the PHP. (This is arguments,abuse is
down the hall.)

Try:
http://www.mysql.com/documentation/lists.html


Cal
http://www.calevans.com


-----Original Message-----
From: YoBro [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 5:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Move data from one MySql table to another?


Hello,

Does anybody know where I could find out how to Move data from one Mysql
table to another.

I have a query showing all the results, and I am trying to put a link at the
end of each row that says "move"

Clicking this will move that records information to another table.
IE From table orders to table ordered

Make sense?

Please help

--
Regards,


YoBro
-------------------------------------------------------------
DO NOT REPLY TO THIS VIA EMAIL
PLEASE USE THE NEWSGROUP
All emails sent to this address are automatically deleted.
This is to avoid SPAM!
-------------------------------------------------------------



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






OK say you old table is this
create table old_table (
id int auto_increment,
name varchar(100),
address varchar(200),
comments text);

and you new table is:

create table new_table (
id int auto_increment,
name varchar(200),
address varchar(200));

To populate new_table from old_table you can give it this SQL:

INSERT INTO new_table (name, address) VALUES SELECT name, address FROM
old_table;

Hope that helps

- James

> -----Original Message-----
> From: YoBro [mailto:[EMAIL PROTECTED]]
> Sent: March 22, 2001 3:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Move data from one MySql table to another?
>
>
> Hello,
>
> Does anybody know where I could find out how to Move data from one Mysql
> table to another.
>
> I have a query showing all the results, and I am trying to put a
> link at the
> end of each row that says "move"
>
> Clicking this will move that records information to another table.
> IE From table orders to table ordered
>
> Make sense?
>
> Please help
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





I need to know how to do it in PHP?


""Cal Evans"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Probably on the MySQL list.  This is the PHP. (This is arguments,abuse is
: down the hall.)
:
: Try:
: http://www.mysql.com/documentation/lists.html
:
:
: Cal
: http://www.calevans.com
:
:
: -----Original Message-----
: From: YoBro [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, March 22, 2001 5:20 PM
: To: [EMAIL PROTECTED]
: Subject: [PHP] Move data from one MySql table to another?
:
:
: Hello,
:
: Does anybody know where I could find out how to Move data from one Mysql
: table to another.
:
: I have a query showing all the results, and I am trying to put a link at
the
: end of each row that says "move"
:
: Clicking this will move that records information to another table.
: IE From table orders to table ordered
:
: Make sense?
:
: Please help
:
: --
: Regards,
:
:
: YoBro
: -------------------------------------------------------------
: DO NOT REPLY TO THIS VIA EMAIL
: PLEASE USE THE NEWSGROUP
: All emails sent to this address are automatically deleted.
: This is to avoid SPAM!
: -------------------------------------------------------------
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:






Technically, that would be a COPY. The original data would still be there.
To do a MOVE he would need to issue a delete in old_table after confirming
that the insert into new_table succeeded.

HTH,
Cal
http://www.calevans.com


-----Original Message-----
From: James Atkinson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 5:26 PM
To: YoBro
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Move data from one MySql table to another?


OK say you old table is this
create table old_table (
id int auto_increment,
name varchar(100),
address varchar(200),
comments text);

and you new table is:

create table new_table (
id int auto_increment,
name varchar(200),
address varchar(200));

To populate new_table from old_table you can give it this SQL:

INSERT INTO new_table (name, address) VALUES SELECT name, address FROM
old_table;

Hope that helps

- James

> -----Original Message-----
> From: YoBro [mailto:[EMAIL PROTECTED]]
> Sent: March 22, 2001 3:20 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Move data from one MySql table to another?
>
>
> Hello,
>
> Does anybody know where I could find out how to Move data from one Mysql
> table to another.
>
> I have a query showing all the results, and I am trying to put a
> link at the
> end of each row that says "move"
>
> Clicking this will move that records information to another table.
> IE From table orders to table ordered
>
> Make sense?
>
> Please help
>
> --
> Regards,
>
>
> YoBro
> -------------------------------------------------------------
> DO NOT REPLY TO THIS VIA EMAIL
> PLEASE USE THE NEWSGROUP
> All emails sent to this address are automatically deleted.
> This is to avoid SPAM!
> -------------------------------------------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Hi,

I've managed to install oracle and to compile and
install php (--with-oci8).  Unfortunately when I start
the server it gives me a httpd dead but subsys locked.

Searching the archives I found one link to PHP.net
manual (http://www.php.net/manual/en/ref.oci8.php)
where it tells me that I should compile apache with
pthreads support.

Well, I downloaded apache-1.3.14.src.rpm from redhat
(6.2 updates) and compiled it but no luck (the same
result).

My ldd /usr/sbin/httpd shows :
libpthread.so.0 => /lib/libpthread.so.0 (0x4001b000)
libm.so.6 => /lib/libm.so.6 (0x4002e000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004b000)
libdb.so.3 => /lib/libdb.so.3 (0x40078000)
libdl.so.2 => /lib/libdl.so.2 (0x400b2000)
libc.so.6 => /lib/libc.so.6 (0x400b7000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I do not know if is this is related but the
/var/log/httpd/errorlog shows me
PHP Warning:  Function registration failed - duplicate
name - define in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - defined in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - each in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - strlen in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - strcmp in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - strcasecmp in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - error_reporting in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - leak in Unknown on line 0
PHP Warning:  Function registration failed - duplicate
name - function_exists in Unknown on line 0
PHP Warning:  Basic Functions:  Unable to register
functions, unable to load in Unknown on line 0

Thanks.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




Hello list,

I just can't make sessions work. This is driving me mad, I'm sure it's
something silly, but maybe my headache made me a fool :P :) ... could you
please tell me what's wrong here?. hello.php has a link to next.php:

--- start of hello.php ---

<?php
   session_start();
   session_register("hello");
   $hello = "Hello World!";
?>
<html>
<head><title></title></head>
<body>
<?php
   print "<a href=\"next.php\">$hello</a>";
?>
</body>
</hmtl>

--- end of hello.php ---

-- start of next.php

<?php
   // following the manual, I need to call session_start to resume the
   // session I started at hello.php (?)

   session_start();
?>
<html>
<head><title></title></head>
<body>

<?php
   print "Hello is set to: $HTTP_SESSION_VARS[hello] - $hello";
?>

</body>
</html>

--- end of next.php ---

Now I click on the hyperlink and get a new cookie (produced by call to
session_start() in next.php). Using PHP4.0.4pl1 (with --enable-trans-id),
Apache, and the linux version of ns navigator as browser.

Thank you!,
Rodolfo.






other way around, set the variable the register it

    session_start();
    $hello = 'chris lee';
    session_register('hello');

here is my session file.

<?php

 include_once('time.egn');

 if ( isset($PHPSESSID) )
  session_id($PHPSESSID);

 session_start();

 if (!isset($HTTP_SESSION_VARS['SessionID']))
 {
  $SessionID = mtime();
  session_register('SessionID');
 }

 $PHPSESSID = session_id();
 $SID = "PHPSESSID=$PHPSESSID";

?>


-- 

 Chris Lee
 [EMAIL PROTECTED]




""Lic. Rodolfo Gonzalez Gonzalez"" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello list,

I just can't make sessions work. This is driving me mad, I'm sure it's
something silly, but maybe my headache made me a fool :P :) ... could you
please tell me what's wrong here?. hello.php has a link to next.php:

--- start of hello.php ---

<?php
   session_start();
   session_register("hello");
   $hello = "Hello World!";
?>
<html>
<head><title></title></head>
<body>
<?php
   print "<a href=\"next.php\">$hello</a>";
?>
</body>
</hmtl>

--- end of hello.php ---

-- start of next.php

<?php
   // following the manual, I need to call session_start to resume the
   // session I started at hello.php (?)

   session_start();
?>
<html>
<head><title></title></head>
<body>

<?php
   print "Hello is set to: $HTTP_SESSION_VARS[hello] - $hello";
?>

</body>
</html>

--- end of next.php ---

Now I click on the hyperlink and get a new cookie (produced by call to
session_start() in next.php). Using PHP4.0.4pl1 (with --enable-trans-id),
Apache, and the linux version of ns navigator as browser.

Thank you!,
Rodolfo.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






> I just can't make sessions work.

Now this is strange! I copied exactly the same scripts I posted to my
win98SE box running Apache 1.3.19 and PHP  4.0.4pl1 and they worked!.
Which could be the reasons for the sessions not to work?. Do they work
transparently for name based virtuals, don't they?.







I would like to know if there is a way to determine the name of a variable.

Example:
I have the variable $firstname, with a value of Jon

I want to be able to

echo name_of_variable : value_of_variable;

So the user would see

firstname : Jon

I want to be able to do this without knowing what variables will be passed
to the PHP script in advance.

Any help is appreciated in advance.

<Jon>
===============================
And shepards we shall be
For thee, my lord, for thee
For thou hath descended forth from thy hands
That our feats may swiftly carry out thy command
We will flow a river forth unto thee
And teaming with souls shall it ever be...
===============================
http://jcampbell.blacklightning.net





If it's in some kind of collections, you could iterate through the
collection.  ($HTTP_POST, $HTTP_GET, any associative array, etc.)

Cal
http://www.calevans.com


-----Original Message-----
From: JCampbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 6:06 PM
To: Main PHP List
Subject: [PHP] Hello $variable, whats your name?


I would like to know if there is a way to determine the name of a variable.

Example:
I have the variable $firstname, with a value of Jon

I want to be able to

echo name_of_variable : value_of_variable;

So the user would see

firstname : Jon

I want to be able to do this without knowing what variables will be passed
to the PHP script in advance.

Any help is appreciated in advance.

<Jon>
===============================
And shepards we shall be
For thee, my lord, for thee
For thou hath descended forth from thy hands
That our feats may swiftly carry out thy command
We will flow a river forth unto thee
And teaming with souls shall it ever be...
===============================
http://jcampbell.blacklightning.net


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






$HTTP_POST_VARS

Jerry Lake            - [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online     - http://www.pacifier.com


-----Original Message-----
From: JCampbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 4:06 PM
To: Main PHP List
Subject: [PHP] Hello $variable, whats your name?


I would like to know if there is a way to determine the name of a variable.

Example:
I have the variable $firstname, with a value of Jon

I want to be able to

echo name_of_variable : value_of_variable;

So the user would see

firstname : Jon

I want to be able to do this without knowing what variables will be passed
to the PHP script in advance.

Any help is appreciated in advance.

<Jon>
===============================
And shepards we shall be
For thee, my lord, for thee
For thou hath descended forth from thy hands
That our feats may swiftly carry out thy command
We will flow a river forth unto thee
And teaming with souls shall it ever be...
===============================
http://jcampbell.blacklightning.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






You can cycle through the $HTTP_POST_VARS or $HTTP_GET_VARS arrays depending
on whether you use 'post' or 'get' for the methos in you form

while(list($key,$val)=each($HTTP_POST_VARS)) {
print "$key:$val<br>\n";
}


----- Original Message -----
From: JCampbell <[EMAIL PROTECTED]>
To: Main PHP List <[EMAIL PROTECTED]>
Sent: Tuesday, December 12, 2000 4:05 PM
Subject: [PHP] Hello $variable, whats your name?


> I would like to know if there is a way to determine the name of a
variable.
>
> Example:
> I have the variable $firstname, with a value of Jon
>
> I want to be able to
>
> echo name_of_variable : value_of_variable;
>
> So the user would see
>
> firstname : Jon
>
> I want to be able to do this without knowing what variables will be passed
> to the PHP script in advance.
>
> Any help is appreciated in advance.
>
> <Jon>
> ===============================
> And shepards we shall be
> For thee, my lord, for thee
> For thou hath descended forth from thy hands
> That our feats may swiftly carry out thy command
> We will flow a river forth unto thee
> And teaming with souls shall it ever be...
> ===============================
> http://jcampbell.blacklightning.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





theres even $GLOBALS()

""Data Driven Design"" <[EMAIL PROTECTED]> wrote in message
001301c0b347$d96ca5c0$[EMAIL PROTECTED]">news:001301c0b347$d96ca5c0$[EMAIL PROTECTED]...
> You can cycle through the $HTTP_POST_VARS or $HTTP_GET_VARS arrays
depending
> on whether you use 'post' or 'get' for the methos in you form
>
> while(list($key,$val)=each($HTTP_POST_VARS)) {
> print "$key:$val<br>\n";
> }
>
>
> ----- Original Message -----
> From: JCampbell <[EMAIL PROTECTED]>
> To: Main PHP List <[EMAIL PROTECTED]>
> Sent: Tuesday, December 12, 2000 4:05 PM
> Subject: [PHP] Hello $variable, whats your name?
>
>
> > I would like to know if there is a way to determine the name of a
> variable.
> >
> > Example:
> > I have the variable $firstname, with a value of Jon
> >
> > I want to be able to
> >
> > echo name_of_variable : value_of_variable;
> >
> > So the user would see
> >
> > firstname : Jon
> >
> > I want to be able to do this without knowing what variables will be
passed
> > to the PHP script in advance.
> >
> > Any help is appreciated in advance.
> >
> > <Jon>
> > ===============================
> > And shepards we shall be
> > For thee, my lord, for thee
> > For thou hath descended forth from thy hands
> > That our feats may swiftly carry out thy command
> > We will flow a river forth unto thee
> > And teaming with souls shall it ever be...
> > ===============================
> > http://jcampbell.blacklightning.net
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi,

I wrote a web based SMTP client using the mail() function. When the mail
form is submitted, I pass the content of the form's textarea (the mail body)
to the mail() function.

When I was testing the script, I wrote some text on different lines in the
form:
"this is line 1
this is line 2
this the 3rd
etc
etc"

I read the mail fine in my hotmail.com account, but when I read that same
mail in my MS Outlook client the mail is one long line of text:
"this is line 1 this is line 2 this the 3rd etc etc"

I understand from this difference in layout that the 'carriage return' is
required. Is there a function that adds a 'carriage return' after every
'newline' found in a string? Or is this another problem?

Regards;
Eelco.





In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Eelco de Vries) wrote:

> "this is line 1
> this is line 2
> this the 3rd
> etc
> etc"
> 
> I read the mail fine in my hotmail.com account, but when I read that same
> mail in my MS Outlook client the mail is one long line of text:
> "this is line 1 this is line 2 this the 3rd etc etc"
> 
> I understand from this difference in layout that the 'carriage return' is
> required. Is there a function that adds a 'carriage return' after every
> 'newline' found in a string? Or is this another problem?

Use \r\n for email line breaks.

-- 
CC




> > I read the mail fine in my hotmail.com account, but when I read
> that same
> > mail in my MS Outlook client the mail is one long line of text:
> > "this is line 1 this is line 2 this the 3rd etc etc"
> >
> > I understand from this difference in layout that the 'carriage
> return' is
> > required. Is there a function that adds a 'carriage return' after every
> > 'newline' found in a string? Or is this another problem?
>
> Use \r\n for email line breaks.
>


Should I write a function that replace any corrance of '\n' with '\r\n' in a
string myself?
Hard to believe that the PHP guys haven't encountered this before and didn't
write some PHP function to do this for us, not?

Cheers;
Eelco.





i found the problem , could you believe one of my scripts caused php to
crash,,, how frustrating, i sent al evening fiddling with the bloody
software....
"Yasuo Ohgaki" <[EMAIL PROTECTED]> wrote in message
99bkir$es0$[EMAIL PROTECTED]">news:99bkir$es0$[EMAIL PROTECTED]...
> I think this should go to BugDB.
> http://bugs.php.net
>
> Try older versions if you in hurry.
>
> Regards,
> --
> Yasuo Ohgaki
>
>
> ""Fred"" <[EMAIL PROTECTED]> wrote in message
> 99be8l$m4u$[EMAIL PROTECTED]">news:99be8l$m4u$[EMAIL PROTECTED]...
> > I got this error when i try to ran a script of mine:
> > "PHP caused a stack fault in module MSVCRT.DLL at 0177:7800f75d.
> > Registers:
> > EAX=005421f4 CS=0177 EIP=7800f75d EFLGS=00010202
> > EBX=00542254 SS=017f ESP=00541f94 EBP=005421dc
> > ECX=00542244 DS=017f ESI=019dab14 FS=7f67
> > EDX=0000006a ES=017f EDI=00000029 GS=0000
> > Bytes at CS:EIP:
> > 53 56 57 8b 7d 0c 33 f6 8a 1f 47 84 db 89 75 f4
> > Stack dump:
> > 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
"
> >
> > this is the details of the "illegal operation" box, for some reason when
i
> > try to run a script using the mysql databases the thing crashes, ive
jsut
> > installed MyODBC and im pretty sure that's what's causing hte problem,
im on
> > a win32, running the latest version of php,mysql,apache and myodbc,
> >
> > please reply asap
> > ~Fred
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Windows, ha ha ha.

K E I T H  V A N C E
Software Engineer
n-Link Corporation

On Thu, 22 Mar 2001, Fred wrote:

> i found the problem , could you believe one of my scripts caused php to
> crash,,, how frustrating, i sent al evening fiddling with the bloody
> software....
> "Yasuo Ohgaki" <[EMAIL PROTECTED]> wrote in message
> 99bkir$es0$[EMAIL PROTECTED]">news:99bkir$es0$[EMAIL PROTECTED]...
> > I think this should go to BugDB.
> > http://bugs.php.net
> >
> > Try older versions if you in hurry.
> >
> > Regards,
> > --
> > Yasuo Ohgaki
> >
> >
> > ""Fred"" <[EMAIL PROTECTED]> wrote in message
> > 99be8l$m4u$[EMAIL PROTECTED]">news:99be8l$m4u$[EMAIL PROTECTED]...
> > > I got this error when i try to ran a script of mine:
> > > "PHP caused a stack fault in module MSVCRT.DLL at 0177:7800f75d.
> > > Registers:
> > > EAX=005421f4 CS=0177 EIP=7800f75d EFLGS=00010202
> > > EBX=00542254 SS=017f ESP=00541f94 EBP=005421dc
> > > ECX=00542244 DS=017f ESI=019dab14 FS=7f67
> > > EDX=0000006a ES=017f EDI=00000029 GS=0000
> > > Bytes at CS:EIP:
> > > 53 56 57 8b 7d 0c 33 f6 8a 1f 47 84 db 89 75 f4
> > > Stack dump:
> > > 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> > > 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> "
> > >
> > > this is the details of the "illegal operation" box, for some reason when
> i
> > > try to run a script using the mysql databases the thing crashes, ive
> jsut
> > > installed MyODBC and im pretty sure that's what's causing hte problem,
> im on
> > > a win32, running the latest version of php,mysql,apache and myodbc,
> > >
> > > please reply asap
> > > ~Fred
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>






Hello,

Not sure if this is exactly focused on PHP, but i thought some of you
guys might know.

The general problem:
    I want to be able to send SMS messages from my computer using one of
the free SMS services.
    I want to be able to do this without logging on each time - i.e.
from a program (eiither C or java or the like).

In essence, the problem is to get a program to 'Log In' to a site, and
keep the user 'Logged In' (by sending cookies with
each request i presume..)

So the 2 questions are:

    1. how do i send a POST query (containing login details) to a page?
(if it were GET, i could just append to the URL, how do i do it with
POST?)

    2. once i have sent this (correct) login, i will receive back a
cookie. I can store this, but need to know how to send it back with each
request? (in the header somehow i presume..?)

Thanks in advance,

Jonathan





On Thu, 22 Mar 2001 12:51, Erick Papadakis wrote:
> hello, i need to read a microsoft Word document on the server through
> my file system. is there a way i can read the text of a word document?
>
> thanks/erick

If youu are on a *nix system, there is a package called mswordview, or 
alternatively you could check the www.htdig.org site for document parsers 
(catdoc.pl and parsedoc.pl, I think).

If you are on Windows you could of course use Turd itself, but I think 
there is also some sort of Word doc viewer; whether they will do what you 
want is another story.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Good day to all!

Before, I was able to password protect html and php files via a username
and passowrd script which used sessions. Now, I need to password protect
a folder (via .htaccess) that has images (for a family album thing). Can
this be done via sessions (or even cookies)? I don't want to
authenticate the user via forms and not via the pop-up that a browser
presents when using an .htaccess file. Any scripts that already do this
(password protect a directory)?

Thanks for all your help.

- Kyutums





At 18:18 21/3/2001 -0800, you wrote:
>If you're on windows, (which i'm assuming you are) you can call the PHP
>binary with the path to your php script...
>
>so (assuming you have C:\php\bin\ as part of your PATH enviromental
>variables for windows) you could do PHP C:\path\to\php-script.php and it
>will run on the command line...or just give the full path to the php.exe
>file...
>
>C:\php\bin\php.exe C:\path\to\php-script.php

oh okay... I was thinking more of a standalone file like php-script.exe... 
but that should work as well...
Thanks!
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





I would like to right justify some text, as far as I know, I will need to determin how 
many pixels wide a string will be on the image, then subtract that value from the x 
cord of the line your right justifing it to. you know have the x cord for the text. am 
I correct? if so how do I figure our how long my string is ?


-- 

 Chris Lee
 [EMAIL PROTECTED]







Chris,

 why wouldn't you just use the html way of right justifying text? ie <align="right">
so in php just use echo "<align=\"right"\> blah foo boo"; 
-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] how do I find out how many pixels wide / tall a string
will be with gd ?


I would like to right justify some text, as far as I know, I will need to determin how 
many pixels wide a string will be on the image, then subtract that value from the x 
cord of the line your right justifing it to. you know have the x cord for the text. am 
I correct? if so how do I figure our how long my string is ?


-- 

 Chris Lee
 [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





how might i write to a file called "comment.php.comment" and only write the
text specified to the top of the file, instead of writing it to the bottom?






On Fri, 23 Mar 2001 12:39, adam wrote:
> how might i write to a file called "comment.php.comment" and only write
> the text specified to the top of the file, instead of writing it to the
> bottom?

You need several steps to achieve this:

read all of comment.php.comment into an array
open a temp file to write
write the 'text specified' to the temp file
write the array from comment.php.comment to the temp file
once you're happy all is written, close open temp file
rename temp file to comment.php.comment

The functions you need for this can be found in the Filesystem section of 
the docs.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Hi,

I have been developing PHP for a few years now as an employeee of other companies.
I have now started working from home doing contracts for various businesses.

Does anyone know of where I can find the wording of a software license I can give to 
my clients when I hand over the code.
It should cover the following points.

1. I am offering them unlimited licensed use of the code I have produced.
2. They cannot on sell my code.
3. I retain copyright for my code. (This might come as a default)
4. 40% - 60% of my code is generic functions that I use in all my websites and I 
retain the ability to use this code again in developing work for other businesses.
5. They are free to modify and adjust my code as much as they want.

Does anyone know where I can find some sort of legal document I can give to these 
clients as a license for the software I produce for them.

Is there any important points I have missed?
I know the law is very different from country to country but I'm sure much of this 
would be the same.



****************************************************************
Cameron Just ([EMAIL PROTECTED])

Phoenix Digital Development
****************************************************************





In PHP how do I make it so a script cannot be called from somewhere else
other than from my server.

Example

http://domain.com/mail.php   is my mail script that is called by
http://domain.com/signup.html

How do I make it so

http://somebodyelsesdomain.com/signup.html cannot call the mail.php script.


thanks

Randy





check HTTP_REFERER. If it's not your server. toss it. It's not the most
secure way but check the page, there are other variables you can use to
accomplish the same thing.

http://www.php.net/manual/en/language.variables.predefined.php



Cal
http://www.calevans.com


-----Original Message-----
From: Randy Johnson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 9:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] security


In PHP how do I make it so a script cannot be called from somewhere else
other than from my server.

Example

http://domain.com/mail.php   is my mail script that is called by
http://domain.com/signup.html

How do I make it so

http://somebodyelsesdomain.com/signup.html cannot call the mail.php script.


thanks

Randy


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






On Fri, 23 Mar 2001 14:18, Randy Johnson wrote:
> In PHP how do I make it so a script cannot be called from somewhere
> else other than from my server.
>
> Example
>
> http://domain.com/mail.php   is my mail script that is called by
> http://domain.com/signup.html
>
> How do I make it so
>
> http://somebodyelsesdomain.com/signup.html cannot call the mail.php
> script.
>
>
> thanks
>
> Randy


If you are using the POST method to pass data, set a hidden value in 
signup.html which you can test for in mail.php. Not a perfect method, as 
doing a 'view source' on signup.html will reveal it.


-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




I'm using PHP4.0.4pl1 and t1lib.1.1.0

I'm getting this warning with imagepstext on some of my scripts (not
all), but everything prints fine. I only saw it because I commented out
the jpeg header line. Has anyone seen this?

Thanks,
JR



Reply via email to