|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Mar 22 2001 - 22:46:34 CST
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:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I 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
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
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" <kvance
n-link.net> wrote in message
news:Pine.LNX.4.30.0103220904540.7317-100000
jojo.n-link.net...
> 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: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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: mgeier
cdmsports.com
Phone: 314.991.1511 x 6505
attached mail follows:
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
attached mail follows:
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
attached mail follows:
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
<brian
theprintinghouse.com>
-------------------------------------
attached mail follows:
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
<brian
theprintinghouse.com>
-------------------------------------
attached mail follows:
----------------------------------------------------------------------------
-----------------
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
postmaster
normandy.com.au 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
markn
enspace.com <mailto:markn
enspace.com>
Senior Consultant
Change is inevitable, except from vending machines.
-----Original Message-----
From: Brooks, Ken [mailto:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 11:16 PM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:52 AM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:32 AM
To: php-general
lists.php.net
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:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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
attached mail follows:
Thank you Sebastian, but I want to know what is flex (and I donīt know where could I obtain it).
Thanks again. Emiliano.
attached mail follows:
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(emarmonti
siu.edu.ar)
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> 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
attached mail follows:
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
attached mail follows:
In article <99dcc5$vm0$1
toye.p.sourceforge.net>,
phil
computerusa.com ("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
attached mail follows:
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 10:16 AM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:52 AM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:32 AM
To: php-general
lists.php.net
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:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 12:28 PM
To: Brooks, Ken; php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 10:16 AM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:52 AM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 9:32 AM
To: php-general
lists.php.net
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:Euan.Greig
brann.com]
Sent: Thursday, March 22, 2001 9:21 AM
To: Brooks, Ken
Cc: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: 22 March 2001 14:04
To: 'Greig, Euan'; php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi!
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
attached mail follows:
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"" <black_lordus
yahoo.com> schrieb im Newsbeitrag
news:99dcs5$cbh$1
toye.p.sourceforge.net...
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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"" <a.kazazic
medienhaus.co.at> wrote in message
news:99d00g$j4h$1
toye.p.sourceforge.net...
> 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>
attached mail follows:
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
attached mail follows:
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
<brian
theprintinghouse.com>
-------------------------------------
attached mail follows:
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
attached mail follows:
$headers .= "From: David Smith <webmaster
indywebdesign.com>\n";
mail($recipient, $subject, $message, $headers);
-----Original Message-----
From: Richard [mailto:oblivion
lunamorena.net]
Sent: Thursday, March 22, 2001 1:00 PM
To: php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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:srenzi
codes.com.ar]
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Renzi, Sebastian <srenzi
codes.com.ar> 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
attached mail follows:
John Almberg <jalmberg
identry.com> 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
attached mail follows:
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 WoodMultimedia Developer University of Calgary
on 3/22/01 11:28 AM, John Almberg at jalmberg
identry.com 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:srenzi
codes.com.ar] >> 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 >> >>
attached mail follows:
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
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
attached mail follows:
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 <m.loureiro
distrim2.pt>
attached mail follows:
attachments ar stripped for security purposes by the mailing list server. please post the code in your msg.
--Chris Lee lee
mediawaveonline.com
""Miguel Loureiro"" <m.loureiro
distrim2.pt> wrote in message news:00ad01c0b2ff$f12a9c00$560210ac
loureiro.distrim2.pt... 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 <m.loureiro
distrim2.pt>
--------------------------------------------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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
attached mail follows:
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
attached mail follows:
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); }
attached mail follows:
I believe you need to set the cookie before any other header information is passed.
-brian
> -----Original Message-----
> From: kris
grinz.com [mailto:kris
grinz.com]
> Sent: Thursday, March 22, 2001 2:23 PM
> To: php-general
lists.php.net
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
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: kris
grinz.com [mailto:kris
grinz.com]
> > Sent: Thursday, March 22, 2001 2:23 PM
> > To: php-general
lists.php.net
> > 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: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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 lee
mediawaveonline.com
<kris
grinz.com> wrote in message news:20010322193049.DDB289248
hegel.grinz.com... 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: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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!
kris
grinz.com 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- ___________________________________________________________ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net
attached mail follows:
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: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
Get 250 color business cards for FREE! at Lycos Mail http://mail.lycos.com/freemail/vistaprint_index.html
attached mail follows:
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
attached mail follows:
In article <3ABA565C.D65183EE
omeninc.com>,
smullett
omeninc.com (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
attached mail follows:
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:smullett
omeninc.com]
Sent: Thursday, March 22, 2001 2:46 PM
To: php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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 <3ABA565C.D65183EE
omeninc.com>,
> smullett
omeninc.com (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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I want to extract and save images from a large directory of PDF's... is this possible with php? Has anyone done this??
James
attached mail follows:
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
attached mail follows:
In article <99dn35$duo$1
toye.p.sourceforge.net>,
tobias
talltorp.com ("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
attached mail follows:
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 lee
mediawaveonline.com
""Tobias Talltorp"" <tobias
talltorp.com> wrote in message news:99dn35$duo$1
toye.p.sourceforge.net... 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: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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"" <tobias
talltorp.com> wrote in message
news:99dn35$duo$1
toye.p.sourceforge.net...
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
"McShen" <webmaster
celebritieszones.com> 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
attached mail follows:
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
attached mail follows:
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 4:04 PM
To: php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 4:21 PM
To: php-general
lists.php.net
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:KBrooks
netEPS.com]
Sent: Thursday, March 22, 2001 4:04 PM
To: php-general
lists.php.net
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
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"" <KBrooks
netEPS.com> wrote in message
news:AB148893DC60D211B2CA000083627B0206ED3C8F
wiueex02.neteps.com...
> 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:KBrooks
netEPS.com]
> Sent: Thursday, March 22, 2001 4:04 PM
> To: php-general
lists.php.net
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi, 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/
attached mail follows:
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 : adiw
peter.petra.ac.id
* Private matter : adiwibowo
excite.com
------------------------------------------
attached mail follows:
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
attached mail follows:
i figured it out...thanks. putenv()
Joe Rice(jrice
bigidea.com)
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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
attached mail follows:
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> </td></tr>"; if($i/2 > 0) //not even { echo"<tr><td> </td>><td> </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: php-general-unsubscribe
lists.php.net >For additional commands, e-mail: php-general-help
lists.php.net >To contact the list administrators, e-mail: php-list-admin
lists.php.net > >
Get 250 color business cards for FREE! at Lycos Mail http://mail.lycos.com/freemail/vistaprint_index.html
attached mail follows:
modulus also works for finding even nums:
if ($i % 2) { // not even }
> -----Original Message-----
> From: darion mapp [mailto:godd_mapp
lycos.com]
> 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> </td></tr>";
> if($i/2 > 0) //not even
> {
> echo"<tr><td> </td>><td> </td></tr>";
> }
> }
attached mail follows:
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
attached mail follows:
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:no.spam.lhotch
unicap.com]
> 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
attached mail follows:
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
attached mail follows:
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:programmer
jennybug.com]
> Sent: Thursday, March 22, 2001 4:33 PM
> To: php-general
lists.php.net
> 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: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
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
attached mail follows:
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 weakn