OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 8 Jul 2005 15:38:27 -0000 Issue 3556

php-general-digest-helplists.php.net
Date: Fri Jul 08 2005 - 10:38:27 CDT


php-general Digest 8 Jul 2005 15:38:27 -0000 Issue 3556

Topics (messages 218330 through 218354):

Re: Screen Scraping with php
        218330 by: Graham Anderson
        218333 by: Robert Cummings

Re: TimeStamp BEFORE 1970 AND AFTER 2035
        218331 by: Bruno B B Magalhães

Re: TimeStamp BEFORE 1970
        218332 by: Edward Vermillion

Re: Problem serializing a mysqli_result object.
        218334 by: Bjarke Freund-Hansen
        218343 by: Jason Barnett

Lampshade Download Site
        218335 by: Aaron Greenspan

Security, Late Nights and Overall Paranoia
        218336 by: Edward Vermillion
        218345 by: Jason Barnett
        218349 by: Greg Donald
        218352 by: Ryan A
        218353 by: Greg Donald
        218354 by: Ryan A

Re: url reload
        218337 by: Nadim Attari

Re: Strange Problem: session_set_save_handler
        218338 by: Thorsten Friedrich

Re: recompiling php
        218339 by: Mikhail Makarov

Register globals and ini_set
        218340 by: virtualsoftware.gmail.com
        218341 by: Sebastian
        218346 by: Terry Romine
        218347 by: Jason Barnett
        218348 by: Jason Barnett
        218351 by: Terry Romine

Re: iPowerWeb ISP Are they good?
        218342 by: chris
        218344 by: Terry Romine

Re: Display picture from MySQL
        218350 by: Bagus Nugroho

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

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

attached mail follows:


thank Robert :)

I ran the script and got:
Warning: ereg(): REG_BADRPT on line 6 which is in the ereg function

do you know what it could be ?

will woodshed a bit on ereg
g
On Jul 7, 2005, at 6:51 PM, Robert Cummings wrote:

> $html = file(
> 'http://www.gamespot.com/pc/rpg/guildwars/screens.html?page=264' );
>
> $matches = array();
> if( ereg( 'END SCREENSHOT NAVIGATION.*?img src="([^")+"', $html,
> $matches ) )
> {
> $image = $matches[1];
> }

attached mail follows:


On Thu, 2005-07-07 at 23:46, Graham Anderson wrote:
> thank Robert :)
>
> I ran the script and got:
> Warning: ereg(): REG_BADRPT on line 6 which is in the ereg function
>
>
> do you know what it could be ?
>
> will woodshed a bit on ereg
> g
> On Jul 7, 2005, at 6:51 PM, Robert Cummings wrote:
>
> > $html = file(
> > 'http://www.gamespot.com/pc/rpg/guildwars/screens.html?page=264' );
> >
> > $matches = array();
> > if( ereg( 'END SCREENSHOT NAVIGATION.*?img src="([^")+"', $html,
> > $matches ) )
> > {
> > $image = $matches[1];
> > }

My bad, forgot to use file_get_contents() so as to not have an array,
and also forgot that ereg() doesn't support the ? for changing
greediness of the matching. The following works as expected (tested :)

$html = file_get_contents(
'http://www.gamespot.com/pc/rpg/guildwars/screens.html?page=264' );
$matches = array();
if( preg_match( '/END SCREENSHOT NAVIGATION.*?img src="([^"]+)"/',
$html, $matches ) )
{
    $image = $matches[1];
}

echo 'Foo: '.$image."\n";

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


Just a quick fix, as now I've tested in a real environment, with a
real application, and now it's working 100%, well, I think so.

     /
*********************************************************************
     * Stritotime workaround for dates before 1970 and after 2038
      
*********************************************************************/
     function str2time($input = '01/01/1969')
     {
         if(($timestamp = strtotime($input)) !== -1 && $timestamp !==
false)
         {
             return (float)$timestamp;
         }
         else
         {
             preg_match('([0-9][0-9][0-9][0-9])', $input, $year);
             $input = str_replace($year[0], '1976', $input);
             return (float)floor(strtotime($input) + (($year[0] -
1976) * (31557376.189582)));
         }
     }

Shoot!

Best Regards,
Bruno B B Magalhaes

attached mail follows:


On Jul 7, 2005, at 10:17 PM, Bruno B B Magalhães wrote:

> Hi Edward,
>
> thanks for replying!
>
>

[snip]
> Why 1976, because it's a leap year and is between valid range for
> windows systems.
>
> Let me try to explain the rest.
>
> First I get the input year... which by the way is working fine here...
> preg_match('([0-2][0-9][0-9][0-9])', $input, $year);
>
> Was it clear, or I am dreaming awake? hehehehhe
>

Actually I think I'm the one that is dreaming awake. ;)

Operation + vicodin = fuzzy head.

The math is amazing if it really works for you, and thanks for
explaining what your doing.

But my comments on the regex still stand. Just to be sure you
understand that the match is
working in this case because you are matching the whole string, which
is what is in $year[0].

It would return the same results if you used the "normal" string
delimiter, not sure that's the
right term for it, of a forward slash instead of the parenthesis. ie

preg_match('/[0-2][0-9][0-9][0-9]/', $input, $year);
                    ^ ^

But in the end it's what works that counts, eh? ;)

Edward Vermillion
evermilliondoggydoo.net

attached mail follows:


Richard Lynch wrote:

>On Thu, July 7, 2005 12:53 pm, Bjarke Freund-Hansen said:
>
>
>>>You can't serialize resource objects. Try:
>>>
>>>serialize($res->fetch_assoc());
>>>
>>>
>>I know I can serialize the array fetch_assoc returns, but I really need to
>>serialize a mysqli_result, so I can feed it to any function expecting a
>>mysqli_result.
>>
>>
>
>The connection simply WILL NOT survive the ending of a PHP script.
>
>Period.
>
>
But I'm not trying to keep the connection, I don't care about the
connection. What I want to serialize is the object returned from
mysqli->query().

>If you want to hack the PHP source to try to change that, go for it...
>
>
I've gone so far as to rewrite the mysqli_result class (in PHP), and
parse the object returned from mysqli->query() to my own class, and
serialize that one. Which I guess will work. But is that really the
easiest way?

--
Bjarke Freund-Hansen <bjarkerocekiller.dk>

attached mail follows:


But why are you going to all of that trouble? What does the
mysqli_result object have that you really need? If you just need the
result set then you can fetch it as an assoc array and serialize that.

attached mail follows:


Hello again,

Before I say anything else, Jaap and Casey, thanks for your feedback on
our site design. I was laughing while I read it because I tend to agree
with pretty much everything you mentioned. I don't know if I will "sack
the design staff," but I'll see what I can do.

Meanwhile, site design notwithstanding, you can visit:

http://www.thinkcomputer.com/software/lampshade/free.html

to download the free version of the Lampshade framework, version 1.0.2.
We require you to tell us something about yourself, but that's basically
it. Not a bad deal for normally expensive stuff that's being used all
the way up to the Fortune 500. (Note: there's a catch--the e-commerce
libraries aren't included in the free version, since profit
automatically means commercial use, which you have to pay for.)

Aside from the obvious marketing value of doing this, my hope is that
Lampshade will help prove that PHP is just as able as Java (and other
languages) in a commercial environment, if not more so.

If you have any questions or comments, please feel free to e-mail.

Thanks,

Aaron

Aaron Greenspan
President & CEO
Think Computer Corporation

http://www.thinkcomputer.com

attached mail follows:


I'm currently trying to develop a simple CMS system for folks to use on
their web sites.
Thanks to all the great people on this list I've learned a lot about
securing php, especially
along the lines of never trust anything you get from the user.

So far I've been able to verify, allow, deny data that comes from the
user, but I've run into
a problem. I want the templates used on the site to be editable through
the web interface.
I know a lot of the forum/CMS software out there allows this, but it's
an area where I have to
implicitly "trust" the data coming in to be "good". While I can run
mysql_real_escape_string()
on the incoming data to help guard against sql injection attacks, I
can't do any strip_tags()
or htmlentities() to guard against html injection. I've set the
permissions up so that only one
"super administrator" account will have access to this area. And
overall the users who have
access to the CMS are going to be only from the organization who owns
the site, ie. it's not
"open to the public" in any way.

My concern though is that "bad guys" from outside the organization will
be able to "attack"
the CMS application portion at this point to deface or otherwise inject
malicious html into the
web site. I've got a "session" management part that controls access
through a md5(random #)
"session id"/cookie that is changed on each page load, and the forms
all have another hidden
md5(random #) value that is checked on form submission, and I'm
requiring an SSL connection
for all transactions. I"m also checking the ip and user agent, although
I know the pros/cons of
that too, I'm figuring it's one more thing an attacker will have to
guess/get.

My question is, does an SSL connection provide enough protection
against a man-in-the-middle
attack that could possibly get the cookie/ip/user agent from a valid
user? I'm figuring the web site
owner will have to be responsible for keeping the one and only
username/password that can
access this part of the site out of the hands of untrusted employees,
but I'm still wondering about
an outside attack.

Is there anything else that can be checked to verify the identity of a
request/post?

Is it really stupid to allow the templates to be edited through the web
interface?

TIA to all who read and reply. (TM)" I love you guys"(TM)

Edward Vermillion
evermilliondoggydoo.net

attached mail follows:


The typical way that forums handle this is to use what is called
"BBCode". In short, you have a non-HTML way for users to supply
information that will produce markup instead of just plain text. So if
you want to allow italics, bolds, URL's, etc. then you have some codes
for it like:

[i]This text will be in italics.[/i]
[b]This text will be in bold.[/b]
[url=http://php.net]This will be a URL that points to php.net.[/url]

Mailing archives probably have some code that does this... or you could
see what the maintainers of phpBB do under the hood. Ah, the beauty of
Open Source!

attached mail follows:


On 7/8/05, Jason Barnett <jason.barnetttelesuite.com> wrote:
> The typical way that forums handle this is to use what is called
> "BBCode". In short, you have a non-HTML way for users to supply
> information that will produce markup instead of just plain text. So if
> you want to allow italics, bolds, URL's, etc. then you have some codes
> for it like:
>
> [i]This text will be in italics.[/i]
> [b]This text will be in bold.[/b]
> [url=http://php.net]This will be a URL that points to php.net.[/url]

While I do not disagree with the information content of your post, I
do think this sort of thing is pretty silly.

If you're gonna allow the <i> tag then just allow it. There's no
point in allowing something else just to spend CPU cycles converting
it to what you could have allowed in the first place. It doesn't make
it more safe that way. Just clean out the stuff you don't want and be
done with it.

define( 'ALLOWED_TAGS',
'<a><b><blockquote><br><cite><dd><div><dl><dt><ecode><em><i><li><ol><p><strong><tt><ul>'
);

$string = strip_tags( $string, ALLOWED_TAGS );

Cleaning an <a> tag can be accomplished just as easily as cleaning a [url] tag.

--
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/

attached mail follows:


Hey,

<clip>
> > The typical way that forums handle this is to use what is called
> > "BBCode". In short, you have a non-HTML way for users to supply
....
> > [i]This text will be in italics.[/i]
> > [b]This text will be in bold.[/b]
</clip>

> If you're gonna allow the <i> tag then just allow it. There's no
> point in allowing something else just to spend CPU cycles converting
> it to what you could have allowed in the first place. It doesn't make
> it more safe that way. Just clean out the stuff you don't want and be
> done with it.
>
> define( 'ALLOWED_TAGS',
>
'<a><b><blockquote><br><cite><dd><div><dl><dt><ecode><em><i><li><ol><p><stro
ng><tt><ul>' );
>
> $string = strip_tags( $string, ALLOWED_TAGS );

The problem with this approach is if people dont close their tags properly
(mistake or purpose)
they can screw up your page....
eg <br blah blah blah blah
<cite>something<cite> (no closing tag)

my $0.2

Cheers,
Ryan

attached mail follows:


On 7/8/05, Ryan A <ryancoinpass.com> wrote:
> The problem with this approach is if people dont close their tags properly

Nothing makes it impossible for me to hand type and not close one of those tags.

[i]blah

--
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/

attached mail follows:


Hey,

> > The problem with this approach is if people dont close their tags
properly

> Nothing makes it impossible for me to hand type and not close one of those
> tags.
>
> [i]blah

Yep, but this has no way of breaking my html....

the max you would get is:

[i this will be in italics

which is obvious that the person who wrote the above forgot to write the tag
properly.

but if you have something like this:

<!-- start page code --!>
<table>
<tr>
<td>
<!-- end page code --!>

<í blah blah blah blah blah blah blah blah blah blah blah blah

<!-- start page code --!>
</td>
<tr>
</table>
<!-- end page code --!>

Not a very good example, but you should get the idea..

Cheers,
Ryan

attached mail follows:


First of all you should go to:
http://www.google-is-my-best-friend.com <jk>

Then
http://www.google.com.au/search?hl=en&q=%22call+same+page%22+%2B+php

Found in the comments:
http://www.zend.com/zend/spotlight/code-gallery-wade7.php?article=code-gallery-wade7&kind=sl&id=3324&open=1&anc=0&view=1

-----------------
Ok. Here it goes:
http://www.php.net/manual/en/reserved.variables.php

function myFunction($anchor = '')
{
    $link = "$anchor";
    return $link;
}

// the page calling the function
$aLink = myFunction($_SERVER['PHP_SELF'] . '?var=' . $data);
echo $aLink;

Best Regards,
Nadim Attari
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////

"timothy johnson" <mr2bigjohnsongmail.com> a écrit dans le message
This should be pretty simple but I cant find any info on it at the
site. I am writing a function that will create a anchor, but I want it
to call the same page it is on. Is there a way to get the current php
page I am on so that when I output my anchor for that correct page.

so if I call it from index.php the link will say:
index.php?var=data

but if I can the same function from say photos.php then the link would be:
photos.php?var=data......

thanks

attached mail follows:


Ok,

i try to describe what i´ve done.

i have written a sql-wrapper-class wich is used to insert and update the
entries in the mysql-table.

the mysql-table has the following columns (types)

id varchar(255) - holds the session-id

data blob - holds the session-data

created timestamp - used to identifiy the creation-date

lastmodify timestamp - used to identifiy the last-change on this row

the wrapper-class is created in the read / write / destroy and
timeout -callbackfunction

in the read-function only the row by the session-id is selected

in the write-function first i check if a row by this session-id exists

if not -> insert a new row with the give session-id and session-data

if exists -> update the row identified by the given session-id

in the destroy-function i drop the row identified by the session-id and
reset the session_set_save_handler

(i´ve read that this function also destroy the handler-settings)

in the timeout-function which is called in the open-function i check if
there are rows older than the given session-timeout (by default set to 1440
seconds)

now the logging:

in the wrapper-class i´ve implemented a function that is able to log every
query made to any table of the database to a file on the server. i think
this should write ALL queries to the log-file even these one made by the
session-handlers.

(perhaps it should be said that i see the DELETE QUERY made by the
timout-function and also the SELECT Query made by the read-function)

ok. at least i again will describe what happens yesterday.

i got this problem and searched the internet for the solution. i´ve found
some articles in different forums but mostly not the answer i needed to
solve the problem.

to see what realy happens i enabled the error_reporting to log really all
what happens (error_reporting=E_ALL).. restarted the webserver (which i´ve
restart several times during this problem) and then it works again. after
disabling the error_reporting (set to E_ALL & ~E_NOTICE) nothing has
changed. it works like the problem hasn´t been.

i know that this step has nothing to do with it... but i want to see if php
returns an error to identify.

so i´m a little bit confused because i´ve neither edited the config-file nor
changed something in my session-functions.

again the problem i HAD :)

when i´ve started the web-application and turned on (i do this by a flag) my
db-based-session-handling the write-function does nothing (no session-data
is added or removed from session-data in the mysql-table). if i turned on
the logging in the sql-wrapper-class (to write the queries made by the
application and wich is also used and called in the handling functions) php
crashes with no error and no output to the browser. so it is a must that php
crashed before the stream to the client is made.

to check if php gives an error if done the following (this is no joke).

i want to produce an error in the write-function by adding a line like this:

adasdfasdf

without the ; in the end it works (sure the write-function doesn´t update
the db-entry)

adding the ; at the and php crashes

to see if post-streaming a error is displayed i logged in via ssh and call a
script by using the following command:

php -q ./<script.php> same result.

and again: after i´ve changed the loggin in the php.ini from E_ALL &
~E_NOTICE to E_ALL and than again back to E_ALL & ~E_NOTICE the problem has
gone. it now works like the 2 weeks before i restarted the server.

so i hope the problem (i had *G) is better described as in the news-letter.

i you know what the problem is it would be nice to answer because i want to
know how to fix the problem if it occours the next time.

Thx 4 Help and best greetz

Thorsten Friedrich

""Thorsten Friedrich"" <t.friedrichtebra.net> schrieb im Newsbeitrag
news:47.51.05285.0BE0DC24pb1.pair.com...
> Hi, i´ve a strange Problem with the session_set_save_handler-Function.
>
> Firt of all my config:
>
> in my intranet i´m using 2 servers
>
> the first server is the db-server running mysql v. 12.22 dist 4.0.24
>
> the second server is the webserver
>
> running apache2 Linux apache 2.6.5-7.147-smp running
>
> and is using php v. 4.3.4
>
> i´ve written some function to store session-data in a table on the
>
> mysql-server.
>
> because of the fact that i´ll never see if the write-session-function is
>
> called i´ve placed a write-a-log-to-disk function in all session-function
to
>
> see if they are called.
>
> when i use "files" in the /tmp-directory to store the session-data
>
> everything works fine, but if i switch to the db-based-system php crashes
>
> with no error message (crash in this case means that a empty page is
>
> transfered to the client).
>
> a sideeffect of this problem is the following:
>
> i use some wrapper-classes to handle database-insert/select and updates.
if
>
> i use the file-based-session-handling i can select the content of the
>
> session-table, but when i use the db-based my wrapper class get a empty
>
> record-set when i try to select the table where the session-data is
stored.
>
> using a programm like sqlyog i can see the entries written by my
>
> handler-functions.
>
>
>
> the realy strange thing is the following:
>
> till yesterday everything works fine (yes, also the db-based-handling).
>
> today i´ve rebootet the webserver. no config-files has been changed. after
>
> the computer has been booted the described problem occured.
>
>
>
> can anybody help me to fix this problem or give some hints where to find
the
>
> error?
>
> thx for help.

attached mail follows:


Çäðàâñòâóéòå, blackwater.

Âû ïèñàëè 6 èþëÿ 2005 ã., 18:57:17:

> I have a linux box which I use periodically. I built php 5.0.3 on it
> and it runs fine. I just came across a situation where I need to
> compile in the zlib extension so I got into my php folder and did
> ./configure with my options, then make and make install. I then
> restarted Apache but when I look at phpinfo, it still shows the old
> command used to build php, not the command I just used to recompile.
> Are there other things needed in a recompile?

> Thanks!

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

$ ./confugure --with-my-options
$ make clean
$ make
$ make install

--
Ñ óâàæåíèåì,
 Mikhail mailto:mikhail.makarovgmail.com

attached mail follows:


Hi,

If i use, at the beginning of my scripts, ini_set('register_globals', 0), register globals will be turned off?

Thanks

attached mail follows:


if you have php <= 4.2.3 yes, otherwise no.
it has to be set in php.ini, .htaccess, or httpd.conf

virtualsoftwaregmail.com wrote:

>Hi,
>
>If i use, at the beginning of my scripts, ini_set('register_globals', 0), register globals will be turned off?
>
>Thanks
>
>

attached mail follows:


I'm having a serious pain with globals.. maybe someone can help.

My major client moved her service from one server to another, and with it, PHP went from 4.1 to 4.2+.
Register Globals was turned off, and when everything failed to work, tech support turned them back on via .htaccess. I'm planning to update the hundreds of scripts over the next weekend or so, but for right now,
my $_SESSION['variable'] seem to be failing sporatically. It doesn't seem to make a difference whether I have session_start() at the top of the file or not.

Shouldn't something like this work?
<?php
    session_start();
    $my_local=$_SESSION['global_var'];
    echo($my_local);
?>

where $global_var is set in one file and then used in another?

Thanks for any help

Terry

-----Original Message-----
From: Sebastian <sebastianbroadbandgaming.net>
Sent: Jul 8, 2005 6:42 AM
To: virtualsoftwaregmail.com
Cc: php-generallists.php.net
Subject: Re: [PHP] Register globals and ini_set

if you have php <= 4.2.3 yes, otherwise no.
it has to be set in php.ini, .htaccess, or httpd.conf

virtualsoftwaregmail.com wrote:

>Hi,
>
>If i use, at the beginning of my scripts, ini_set('register_globals', 0), register globals will be turned off?
>
>Thanks
>
>

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

attached mail follows:


virtualsoftwaregmail.com wrote:
> Hi,
>
> If i use, at the beginning of my scripts, ini_set('register_globals', 0), register globals will be turned off?
>
> Thanks

ini_set() just doesn't make sense for that directive. register_globals
takes the input data from HTTP requests and sets them in the symbol
table before any of your PHP code gets parsed. PHP has already done the
work. Doesn't seem too terribly efficient to just throw all of that
away on every script invocation, now does it?

But what you *can* do, is to ini_get('register_globals') and have your
script act accordingly. You could for example extract() your $_GET and
$_POST variables.

http://php.net/manual/en/function.extract.php

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

attached mail follows:


Since you mention the PHP version was old (4.1) then I have to ask: were
you using the $_SESSION array all along or were you using
session_register to register session variables? Although you probably
aren't since that would be rather easy to debug.

The script in which your global_variable was set makes absolutely no
difference. PHP is just looking for the SID someplace anyways (whether
that's COOKIE, GET or POST) and then it goes and retrieves that session
that matches that SID.

OK... when you say that it fails sporadically, what do you mean exactly?

Probably, based on what you've just said, you're somehow assigning into
your $_SESSION variables through the use of global variables that have
the same name as your $_SESSION indexes.

http://php.net/manual/en/ref.session.php#ini.session.bug-compat-42

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

attached mail follows:


I was setting the $_SESSION by:
$_SESSION['var_name'] = "this";
or
$my_local = "this";
$_SESSION['var_name'] = $my_local;

I had stopped using session_register() some time back.

"Sporatically" meaning that some of my variables are working fine, while others seem to become empty when referenced by a later script. These scripts were working fine on the older PHP version. I'm sure it's just a quick determination as to what to change, and then I can do a global update across the site. There are about 20-30 websites that this affects, so you can see my frustration in trying to do this by bits and pieces. I had done a test file like this:

test1.php:
<?php
  $_SESSION['check'] = "test 1";
  echo($_SESSION['check']);
?>
<a href='test2.php'>Click</a>

and
test2.php:
<?php
  echo($_SESSION['check']);
?>
test1.php displays "test1" but test2.php displays nothing.

Terry

-----Original Message-----
From: Jason Barnett <jason.barnetttelesuite.com>
Sent: Jul 8, 2005 9:15 AM
To: php-generallists.php.net
Subject: Re: [PHP] Register globals and ini_set

Since you mention the PHP version was old (4.1) then I have to ask: were
you using the $_SESSION array all along or were you using
session_register to register session variables? Although you probably
aren't since that would be rather easy to debug.

The script in which your global_variable was set makes absolutely no
difference. PHP is just looking for the SID someplace anyways (whether
that's COOKIE, GET or POST) and then it goes and retrieves that session
that matches that SID.

OK... when you say that it fails sporadically, what do you mean exactly?

Probably, based on what you've just said, you're somehow assigning into
your $_SESSION variables through the use of global variables that have
the same name as your $_SESSION indexes.

http://php.net/manual/en/ref.session.php#ini.session.bug-compat-42

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

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

attached mail follows:


I have used iPowerWeb for a few years now and have only had "maybe" 5 min.
worth out outages. Even when I had a question on a Sunday, there was someone
to answer the tech phone. It did take a while but still, its all good in my
book.

Chris

""Jason Manaigre"" <jmanaigreiisd.ca> wrote in message
news:47AB1D483BC00940AC5DE54F9587ACAD0150F0C2proton.iisd.ca...
Hi everyone, currently I have a site hosted with Powweb and suffice it
to say, it's not good, so I wanted to get everyone's opinion here on
iPowerWeb? Or can you recommend another ISP that you swear by which has
similar features http://www.ipowerweb.com/products/webhosting/index.html

Thanks people.

attached mail follows:


I had a client hosted on Powweb and I dropped that service pretty fast. Now I host primarily on eHostPros.com (past 2-3 years). I've had a few problems, but they work pretty close with the clients to handle issues. Maybe a 90-95% satisfaction rate for me. The nice thing is their billing system; they use PayPal and can charge monthly/quarterly/yearly as the customer needs.

Terry

-----Original Message-----
From: chris <chrisjdata-trak.com>
Sent: Jul 7, 2005 4:51 PM
To: php-generallists.php.net
Subject: [PHP] Re: iPowerWeb ISP Are they good?

I have used iPowerWeb for a few years now and have only had "maybe" 5 min.
worth out outages. Even when I had a question on a Sunday, there was someone
to answer the tech phone. It did take a while but still, its all good in my
book.

Chris

""Jason Manaigre"" <jmanaigreiisd.ca> wrote in message
news:47AB1D483BC00940AC5DE54F9587ACAD0150F0C2proton.iisd.ca...
Hi everyone, currently I have a site hosted with Powweb and suffice it
to say, it's not good, so I wanted to get everyone's opinion here on
iPowerWeb? Or can you recommend another ISP that you swear by which has
similar features http://www.ipowerweb.com/products/webhosting/index.html

Thanks people.

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

attached mail follows:


Here is my situation
I have 3 record data as (lotID is char and Picture is longblob type)
LotId |Picture
---------------
123 |Picture1
124 |Picture2
125 |Picture3

then I would like to display like this
>>>>>>>>>>>
Lot ID : 123
Picture: Picture1

Lot ID : 124
Picture: Picture2

Lot ID : 125
Picture: Picture3
>>>>>>>>>>>
Or maybe thumbnail view.
How I can do this?

Thanks

-----Original Message-----
From: Richard Lynch [mailto:ceol-i-e.com]
Sent: Friday, July 08, 2005 3:58 AM
To: Bagus Nugroho
Cc: replies-lists-phplistmail.innovate.net; php-generallists.php.net
Subject: RE: [PHP] RE: Display picture from MySQL

On Thu, July 7, 2005 12:32 pm, Bagus Nugroho said:
> How about, if we need several pictures from several record?

You can create a page of HTML that has IMG tags, and each IMG tag can call
ANOTHER php script that sends out one, and only one, image.

You'll never ever get two images crammed into a single HTTP request/response.

You also cannot smush the HTML and the IMG itself all into one file/script.

HTML with IMG tag is one script.
Actual image output (JPEG, GIF, etc) is another.

* Actually, they can be the same "script" if enough code is shared, but
it's got to have an "if" in there and only output the HTML for the .htm
request, and only output the JPEG for the .jpg request, but that's for
another day, after you get it working in separate scripts.

--
Like Music?
http://l-i-e.com/artists.htm