php-general Digest 10 May 2007 13:21:15 - Issue 4783
Topics (messages 254706 through 254716):
Re: PhP and Java login trouble
254706 by: Brad Sumrall
Re: Search function
254707 by: Chris
Re: Scalable Site Architecture
254708 by: Chris
SESSION LOST!
254709
Hi Fellows,
I am developing on a large project. Its containing
a couple of ajax scripts. One day, my temporeary
folder was full, because everytime i clicked some-
where in the page, a new session file was created.
So i decided, to change to a database driven session
management. But it did not
Richard Lynch wrote:
PostgreSQL will
simply throw an error, because '8' is not no way no how an INT. It's
a string.
Since when?
test=# create table b(b int);
CREATE TABLE
test=# insert into b(b) values ('1');
INSERT 0 1
test=# SELECT * from b;
b
---
1
(1 row)
test=# select * from b where
Sorry, your question has nothing to do with PHP. Maybe try a CSS list?
http://www.google.com/search?rls=sv-seq=css+discussion
+listie=UTF-8oe=UTF-8
http://www.google.com/search?rls=sv-seq=why+ie+sucksie=UTF-8oe=UTF-8
http://whyiesucks.blogspot.com/
//frank
9 maj 2007 kl. 15.13 skrev Farid
Hi,
Wednesday, May 9, 2007, 11:13:50 PM, you wrote:
FJ Hello,
FJ To me this seems to be a very strange problem.
FJ I have a static html page (index.html) that shows correctly on both FF2
FJ IE7.
FJ I splitted the website up into different sections: (header, footer, ...). To
FJ do this I have
Thanks Daniel, Greg, Richard,
I made a script with:
?php
print_r($_ENV);
?
and it results only into: Array ( ) nothing else ...
So it must be caused by a different environment ?
All I want is to check the $_ENV['OS'] within PHP scripts.
Regards, Cor
- Original Message -
From: Daniel
On 09 May 2007 16:36, [EMAIL PROTECTED] wrote:
Ford, Mike writes:
You can also set up php.ini and use the built-in sessions with
http://php.net/session_start so that PHP will take care of this
for you.
That is what I was intending to do. How do I find out if
whether or
JavaScript (and AJAX) took the fun out of programming.
Before AJAX, programming for web was easy and fast. Now its the oposite.
- Original Message -
From: jekillen [EMAIL PROTECTED]
To: Emil Edeholt [EMAIL PROTECTED]
Cc: PHP List php-general@lists.php.net
Sent: Wednesday, May 09,
Farid,
Can you copy each .php file to a .phps extension and link us to it?
That will allow us to view the source of each page and see for ourselves.
If there's any private information (passwords, database info, etc.),
however, please DO NOT do this. Only if it's a simple HTML-style page.
Cor,
If it's suggesting that it's an array, that's a little baffling, because
that means there are multiple entries (at least two), but they appear to
either be null or otherwise unable to display.
Did you get that result when running the script from the CLI or via the
web?
On
Am Donnerstag, 10. Mai 2007 08:59 schrieb Sascha Braun:
but after a little
time, the session is just lost.
That doesn't say anything to me. Could you be more verbose on what you mean by
the sessin is lost?
Regards,
Oliver
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Hi,
Could be stray carriage returns in your include files, good idea to
remove any '? in the include files as they are not needed.
Perhaps I should have said:
remove any '?' at the END of the include file as they are not needed,
of course any escaping to html in the middle will still be
Daniel,
I did get the result via the web / IE with the address:
http://127.0.0.1/test/ENVtest.php
with ENVtest.php having:
?php
print_r($_ENV);
?
using Windows XP, PHP 5.2.0
- Original Message -
From: Daniel Brown
To: C.R.Vegelin
Cc: [EMAIL PROTECTED]
Sent: Thursday, May
Daniel Brown wrote:
If it's suggesting that it's an array, that's a little baffling, because
that means there are multiple entries (at least two), but they appear to
either be null or otherwise unable to display.
The $_ENV superb-global contains an array of environment settings, so
it's
What HTTP server are you using, Apache, IIS, AnalogX SimpleServer?
That last one is actually one of my favorites for simple desktop page
hosting. Tiny, no installation boom, there you go.
http://www.analogx.com/ --- There's a bunch of stuff there. No, I'm not
affiliated with
I guess I really didn't understand that myself before either. So
Richard, even though it's disabling data output, it still exists as an
array?
Well, damn you really DO learn something new every day.
On 5/10/07, Richard Davey [EMAIL PROTECTED] wrote:
Daniel Brown wrote:
If
On Thu, 2007-05-10 at 08:52 -0300, Rangel Reale wrote:
JavaScript (and AJAX) took the fun out of programming.
Before AJAX, programming for web was easy and fast. Now its the oposite.
Maybe you're doing it wrong :|
Cheers,
Rob.
--
Hi,
This might be a real obvious question/answer... but I have been up all
night geeking on code, so my mind is kinda mushy -- please be kind. :)
I have a class called Randimg. Within that class, I have several
methods. Within a few of those methods, I use the below code snippet:
Yes, my PHPinfo shows under configuration: variables_order = GPCS
I will test EGPCS setting in php.ini
But that also means that code using $_ENV cannot be run with hosts hiding
the environment settings ?!
And I assume that EGPCS will also affect: ?php print_r($_FILES); ?
Now with GPCS this
Daniel Brown wrote:
I guess I really didn't understand that myself before either. So
Richard, even though it's disabling data output, it still exists as an
array?
The array ($_ENV) exists, it is just the population of it that has been
disabled, thus it's empty. Just in the same way that
Micky Hulse wrote:
I have a class called Randimg. Within that class, I have several
methods. Within a few of those methods, I use the below code snippet:
$_SERVER['DOCUMENT_ROOT']
What would be the best way to assign the above code to a global
variable/constant within the class?
Within
2007. 05. 10, csütörtök keltezéssel 16.05-kor C.R.Vegelin ezt írta:
Yes, my PHPinfo shows under configuration: variables_order = GPCS
I will test EGPCS setting in php.ini
But that also means that code using $_ENV cannot be run with hosts hiding
the environment settings ?!
And I assume that
On 5/10/07, Micky Hulse [EMAIL PROTECTED] wrote:
Hi,
This might be a real obvious question/answer... but I have been up all
night geeking on code, so my mind is kinda mushy -- please be kind. :)
I have a class called Randimg. Within that class, I have several
methods. Within a few of those
Hi Rich! Thanks for the quick reply. I really appreciate your help. :)
Richard Davey wrote:
In PHP 5 could you create $docroot as a protected class constant, but in
PHP 4 the above will have to do.
Ahhh! Very interesting. Many thanks for the code example and explanation
-- that approach
C.R.Vegelin wrote:
Yes, my PHPinfo shows under configuration: variables_order = GPCS
I will test EGPCS setting in php.ini
But that also means that code using $_ENV cannot be run with hosts
hiding the environment settings ?!
Correct. Sucks I know, but some hosts just do this.
And I assume
Hi Eric! Thanks for the fast reply. I really appreciate the help on this
one. :D
Eric Butera wrote:
As Rich pointed out you cannot have constants within a class in PHP4.
To answer the second part of your mail, one technique that I have seen
is something like the code below.
Ahhh, that is
Micky Hulse wrote:
I assume setting basic strings (i.e. settings) for my error messages
would be best done via:
class Randimg
{
var $msg_1 = 'This is a string';
var $msg_2 = 'This is another string';
function rand_img() { echo $this-msg_1; }
function foo() { echo $this-msg_2; }
}
I don't
Okay, I will use getenv() and keep variables_order = GPCS in php.ini
Thanks all and
with regards, Cor
- Original Message -
From: Richard Davey [EMAIL PROTECTED]
To: [EMAIL PROTECTED] php-general@lists.php.net
Sent: Thursday, May 10, 2007 3:34 PM
Subject: Re: [PHP] getting $_ENV
Richard Davey wrote:
I don't know if that's the *best* way, personally I'd not really do it
like that, but no-one can tell you it is 'right' or 'wrong' because it
...snip...
Perfect answer! Thanks!
I do not have too many error messages to store, but I do like the
constant approach... Looks
Hello all,
I'am looking for an WSDL generator class. The aim is to generate an wsdl
file to use with the soap extension. The generator will look at the included
classes and print all functions (except maybe abstract or private) in a
correct xml format.
I tried this one which is great :
Thank you all for your tips and solutions !!
I use chmod and my upload form works fine ;)
Eric
Le 2007-05-09 à 10:23, Daniel Brown a écrit :
PHP has two functions that may help you here, Eric --- chmod() and
chown().
http://php.net/chmod
http://php.net/chown
It should be
I hope it's not the wrong place to ask, but has anyone experience with
scrolling HTML tables ?
According http://www.w3schools.com/tags/tag_thead.asp
The thead, tfoot and tbody elements enable you to group rows in a table.
When you create a table, you might want to have a header row, some rows
That's a CSS question, Cor. Check the web for the CSS property
overflow.
On 5/10/07, C.R.Vegelin [EMAIL PROTECTED] wrote:
I hope it's not the wrong place to ask, but has anyone experience with
scrolling HTML tables ?
According http://www.w3schools.com/tags/tag_thead.asp
The thead, tfoot
C.R.Vegelin wrote:
I hope it's not the wrong place to ask, but has anyone experience with
scrolling HTML tables ?
It's not really a PHP question, and while personally I don't care, you
ought to keep on-topic to avoid retribution from the if it isn't PHP,
it shouldn't be talked about list
Mike,
Thanks for the super clear explanation.
This brings up a question. In order to decide whether to use
cookies or SID the built-in sessions must be testing to see if
the user's browser will accept the session cookies. How do
they do that?
By sending it out and checking to see
[EMAIL PROTECTED] wrote:
That being the case I can never find out (using the built-in
sessions) until the second page request and it will always
include the session cookie in the URL. Which means the value
of the seesion cookie will be exposed, even if I am using SSL.
:( Back to the drawing
On May 10, 2007, at 11:40 AM, Richard Davey wrote:
[EMAIL PROTECTED] wrote:
That being the case I can never find out (using the built-in
sessions) until the second page request and it will always
include the session cookie in the URL. Which means the value
of the seesion cookie will be
Edward Vermillion wrote:
And the session id is open to being stored in a bookmark or worse, sent
to someone else through a cut and paste of the URL.
Depending on what information that id controls and how long the sessions
are kept around id's in the URL could be a very bad thing indeed.
(I've cross posted at the MySQL list as well)
Here's an example with a simple table:
describe collection;
+--+-+--+-
+-++
| Field| Type| Null | Key |
Default | Extra
James Tu wrote:
(I've cross posted at the MySQL list as well)
Here's an example with a simple table:
describe collection;
+--+-+--+-
+-++
Field| Type| Null | Key |
Default
On Thu, 2007-05-10 at 14:00 -0400, James Tu wrote:
(I've cross posted at the MySQL list as well)
Here's an example with a simple table:
describe collection;
+--+-+--+-
+-++
| Field| Type
Let's try to make a long story short.
I'm writing a (not too complex) system visible to authorized users only. My
users are stored in a MySQL database table with usr_id and usr_typ (user
type) among other fields.
When a user logs in, I retrieve those values from the database and store them
On Thu, 2007-05-10 at 14:51 -0400, Armando Acosta wrote:
Let's try to make a long story short.
I realized that the server uses a different PHP configuration, specially:
register_globals set to ON. I already got them to change this value to
OFF... but this did not solve the problem.
I will
Armando;
First, you can just change these:
$id = (integer)$HTTP_GET_VARS[id];
$usr_typ = (integer)$HTTP_GET_VARS[typ];
to:
$id = $_GET['id'];
$usr_typ = $_GET['typ'];
Second, I see that you're using $row[] variables for your MySQL result
sets but where and how are the
Another small and unrelated point - you don't need to use double quotes
inside the array brackets - you're not processing them at all.
Hello all,
I have a question concerning .CSV array sorting. I have tried googling
for an answer and have tried different techniques, but nothing seems
to works as I would like it to work. Here is my situation:
Test file is located here: http://veanndesign.com/test.php
I would like to be able to
One place to start reading, Anna, would be the PHP manual for the
fgetcsv() function, which is specifically for CSV parsing.
http://www.php.net/fgetcsv
On 5/10/07, Anna Vester [EMAIL PROTECTED] wrote:
Hello all,
I have a question concerning .CSV array sorting. I have tried googling
for
On 5/10/07, Daniel Brown [EMAIL PROTECTED] wrote:
One place to start reading, Anna, would be the PHP manual for the
fgetcsv() function, which is specifically for CSV parsing.
http://www.php.net/fgetcsv
Thanks for your quick reply Daniel. Yes I've seen that function before
and i am
When you load your data into your array, you can use the timezone (or whatever
field you're using to sort) as the array key, then use ksort().
Check the see also for a bunch of other types of sorting you can do.
When it comes to the multisorts and user defined sorts, I'm at a bit of a
I'm looking for a shared host with an up-to-date php5, and one who at least
tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
Any suggestions. I'm looking at Host Monster, anyone have experience with them?
Thanks...
--
PHP General Mailing
Hello,
I have a loop on an sqlite query which checks $domain until the status of
$domain changes and then it deletes $domain.
However when all the $domain items have been deleted I need the script to
stop.. regardless of how many querys the loop
still has to run. So I want to detect when
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who at
least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
Any suggestions. I'm looking at Host Monster, anyone have experience
with them?
Thanks...
Check out
Edward Kay wrote:
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who at
least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
Any suggestions. I'm looking at Host Monster, anyone have experience
with them?
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who at
least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
Any suggestions. I'm looking at Host Monster, anyone have experience
with them?
Thanks...
Hi Everyone,
I know this isn't strictly a PHP question, and I apologize in advance
for that. I'm trying to setup a website for some of my customers that
would allow them to update a database on their schedule, making it
easier for us to have the most up to date info, and taking some of
Afan Pasalic wrote:
Edward Kay wrote:
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who
at least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
Any suggestions. I'm looking at Host Monster, anyone have
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who at
least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
I'll throw my plug in here for Pair Networks too. Sure, you can get
cheaper, but they run a really
Hi Bruce,
In looking for what's required fo a site, I'm trying to find
docs/overview/mentors to talk to/etc
You can read all about it from one of the world's leading scalability
experts:
http://www.amazon.com/Scalable-Internet-Architectures-Developers-Library/dp/067232699X
Disclaimer: I work
hey chris...
thanks for the reply. can you tell me if the author (your friend) has
thought of releasing a complete suite of code/source that would actually
demonstrate an entire app.
i'm talking about website, admin function/site, database function/systems,
load balancing apps, etc
thanks
I'm no big fan of SOAP and certainly think it's silly that I have to use like 8
million lines of WSDL to describe a 20 line function
in PHP. I don't know WSDL - at all - don't want to know it -- shouldn't have to
know it. Grrr.
Sadly I had the same frustrating experience you did and ultimately
Just curious if anybody else is using Zend's PHP port on an AS400/iSeries/i5?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Davey wrote:
Within the constructor for Randimg you could set a local protected
variable:
class Randimg
{
var $docroot = false;
function Randimg ()
{
$this-docroot = $_SERVER['DOCUMENT_ROOT'];
}
Hi Rich and all, just one other quick question...
Which approach below would
Hi,
I dislike the output of print_r(), so I desited write my own print_r().
I need this funktion for debugging issues, and therfor it is nice to
have the private attributs, which are normaly hidden.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Like most sites, someone needs to join up to use mine.
I'm using a wee-bit-o-AJAX to pull some results from a database and display
them dynamically.
For the AJAX to work, it has to hit a script that's accessible from the htdocs
tree right?
Effectively it's just a (JavaScript initiated) GET
Micky Hulse wrote:
Seems like I have always read/heard that it is best to explicitly pass
variables as function parameters... vs throwing around globals.
Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my
confusion:
...snip...
Here's a simple class definition of the
Micky Hulse wrote:
Ah, well Chapter 6, page 144-145 have helped clear-up a little bit of my
confusion:
Sorry, forgot to mention what book I was refering to:
O'Reilly Programming PHP By Rasmus Lerdorf Kevin Tatroe
http://snipurl.com/1k4ug
--
Wishlists: http://snipurl.com/1gqpj
Switch:
That's a humongous, humongous security risk there.
What if someone goes http://example.com/gimmedata.php?query=DROP DATABASE hi?
Unless I misunderstood.
A better way would be in the script:
switch ($_GET['query']) {
case fetch: $dbquery = 'SELECT stuff FROM stuff'; break;
case eatsnacks:
A somewhat more extensible version of the 1 query method:
http://www.garfieldtech.com/blog/php-group-by
If you will only ever have 2 values there, then either method is probably
fine. The php group by method (above) is more extensible if you're going
to have a variable or arbitrary number of
On Thursday 10 May 2007, Richard Davey wrote:
Al wrote:
I'm looking for a shared host with an up-to-date php5, and one who at
least tries to keep it relatively current.
Needs are modest. Just need good ftp access, cgi-bin, shell, etc.
I'll throw my plug in here for Pair Networks too.
Thanks for the suggestion and concern. Fear not, I'm a PHP Guru as mentioned. I
never said that I execute the code directly like
that. Perhaps my query keyname was a bit misleading. Would
http://example.com/gimmedata.php?id=3foo=barmap=on have been more
clear? I also am not so silly as to run
On Thu, 2007-05-10 at 21:23 -0700, Daevid Vincent wrote:
Thanks for the suggestion and concern. Fear not, I'm a PHP Guru as mentioned.
A Guru would have spent 60 seconds testing to see if the session_start()
scenario worked BEFORE posting to the list :B
Cheers,
Rob.
--
How would I find the next id and the prev id in sql statement like the one
below. The id number is not going to be in order so I can't do a or
limit 1 on the search
SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND
members_id= '8' ORDER BY lastname
Richard Kurth wrote:
How would I find the next id and the prev id in sql statement like the one
below. The id number is not going to be in order so I can't do a or
limit 1 on the search
SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND
members_id= '8' ORDER BY lastname
73 matches
Mail list logo