php-general Digest 18 Aug 2007 10:33:00 -0000 Issue 4968
Topics (messages 260981 through 260990):
Re: apache/php with sybase12.5
260981 by: ROUKOS Michel
260986 by: Thijs Lensselink
Re: www.soongy.com
260982 by: Dan
Re: About Session And Cookies
260983 by: Warren Vail
260984 by: Bastien Koert
html to jpeg conversion.
260985 by: Bindu Walia
iterating and changing value of an array using foreach and references - PHP
5.2.3
260987 by: Yashesh Bhatia
Cookies and sent headers
260988 by: Otto Wyss
260989 by: Kelvin Park
Some of my wounded are non-transportable.
260990 by: DIANJU koehn
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
I installed libtool 1.5 and tried again. The libphp.so was not created
as well.
I tried also to run with
./configure --with-apx2=/usr/local/apache2/bin/apxs
make
make install
same results: libphp5.so is not created under modules/ directory.
Thanks and regards,
Michel
-----Original Message-----
From: Lens Development [mailto:[EMAIL PROTECTED]
Sent: Friday, August 17, 2007 7:57 PM
To: ROUKOS Michel
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] apache/php with sybase12.5
ROUKOS Michel wrote:
> Hi,
>
> I am integrating httpd-2.0.59 with php-5.2.1 and Sybase 12.5 on a
> solaris 8 machine. I followed these steps:
> Install apache:
>
> ./configure --prefix=/usr/local/apache2 --enable-so
> make
> make install
>
>
> PHP configuration:
>
>
> I edited this file php-5.2.1/ext/sybase_ct/ php_sybase_ct.h and
changed
> this line:
> #define CTLIB_VERSION CS_VERSION_100
> ...to...
> #define CTLIB_VERSION CS_VERSION_125
>
> Then:
> ./configure --with-apx2=/usr/local/apache2/bin/apxs
> --with-sybase-ct=/opt/sybase/oc12.5-EBF11486/OCS-12_5/ --enable-bcmath
> --enable-calendar --enable-ctype --enable-exif --enable-ftp
> --enable-trans-sid --enable-shmop --enable-sockets --enable-sysvsem
> --enable-sysvshm --enable-wddx
> make
> make install
>
>
> then added these 2 lines in httpd.conf:
> AddType application/x-httpd-php .php .phtml
> AddType application/x-httpd-php-source .phps
>
>
> When I access test.php, I am asked to download the file - meaning php
is
> not working well. I also don't see libphp5.so under modules/
directory.
>
> test.php is locate under htdocs/ and has this content:
>
> <?phpinfo()?>
>
>
> Could you please point to me why libphp5.so was not generated? Also
why
> php is not working well with apache and sybase?
>
> *******************************
> This e-mail contains information for the intended recipient only. It
may contain proprietary material or confidential information. If you
are not the intended recipient you are not authorised to distribute,
copy or use this e-mail or any attachment to it. Murex cannot guarantee
that it is virus free and accepts no responsibility for any loss or
damage arising from its use. If you have received this e-mail in error
please notify immediately the sender and delete the original email
received, any attachments and all copies from your system.
>
>
What version of libtool do you use?
What happens if you just run
./configure --with-apx2=/usr/local/apache2/bin/apxs
make
make install
*******************************
This e-mail contains information for the intended recipient only. It may
contain proprietary material or confidential information. If you are not the
intended recipient you are not authorised to distribute, copy or use this
e-mail or any attachment to it. Murex cannot guarantee that it is virus free
and accepts no responsibility for any loss or damage arising from its use. If
you have received this e-mail in error please notify immediately the sender and
delete the original email received, any attachments and all copies from your
system.
--- End Message ---
--- Begin Message ---
ROUKOS Michel wrote:
> Hi,
> I installed libtool 1.5 and tried again. The libphp.so was not created
> as well.
> I tried also to run with
> ./configure --with-apx2=/usr/local/apache2/bin/apxs
> make
> make install
>
> same results: libphp5.so is not created under modules/ directory.
>
> Thanks and regards,
> Michel
>
> -----Original Message-----
> From: Lens Development [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 17, 2007 7:57 PM
> To: ROUKOS Michel
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] apache/php with sybase12.5
>
> ROUKOS Michel wrote:
>
>
>> Hi,
>>
>> I am integrating httpd-2.0.59 with php-5.2.1 and Sybase 12.5 on a
>> solaris 8 machine. I followed these steps:
>> Install apache:
>>
>> ./configure --prefix=/usr/local/apache2 --enable-so
>> make
>> make install
>>
>>
>> PHP configuration:
>>
>>
>> I edited this file php-5.2.1/ext/sybase_ct/ php_sybase_ct.h and
>>
> changed
>
>> this line:
>> #define CTLIB_VERSION CS_VERSION_100
>> ...to...
>> #define CTLIB_VERSION CS_VERSION_125
>>
>> Then:
>> ./configure --with-apx2=/usr/local/apache2/bin/apxs
>> --with-sybase-ct=/opt/sybase/oc12.5-EBF11486/OCS-12_5/ --enable-bcmath
>> --enable-calendar --enable-ctype --enable-exif --enable-ftp
>> --enable-trans-sid --enable-shmop --enable-sockets --enable-sysvsem
>> --enable-sysvshm --enable-wddx
>> make
>> make install
>>
>>
>> then added these 2 lines in httpd.conf:
>> AddType application/x-httpd-php .php .phtml
>> AddType application/x-httpd-php-source .phps
>>
>>
>> When I access test.php, I am asked to download the file - meaning php
>>
> is
>
>> not working well. I also don't see libphp5.so under modules/
>>
> directory.
>
>> test.php is locate under htdocs/ and has this content:
>>
>> <?phpinfo()?>
>>
>>
>> Could you please point to me why libphp5.so was not generated? Also
>>
> why
>
>> php is not working well with apache and sybase?
>>
>> *******************************
>> This e-mail contains information for the intended recipient only. It
>>
> may contain proprietary material or confidential information. If you
> are not the intended recipient you are not authorised to distribute,
> copy or use this e-mail or any attachment to it. Murex cannot guarantee
> that it is virus free and accepts no responsibility for any loss or
> damage arising from its use. If you have received this e-mail in error
> please notify immediately the sender and delete the original email
> received, any attachments and all copies from your system.
>
>>
>>
> What version of libtool do you use?
> What happens if you just run
>
> ./configure --with-apx2=/usr/local/apache2/bin/apxs
> make
> make install
>
> *******************************
> This e-mail contains information for the intended recipient only. It may
> contain proprietary material or confidential information. If you are not the
> intended recipient you are not authorised to distribute, copy or use this
> e-mail or any attachment to it. Murex cannot guarantee that it is virus free
> and accepts no responsibility for any loss or damage arising from its use.
> If you have received this e-mail in error please notify immediately the
> sender and delete the original email received, any attachments and all copies
> from your system.
>
>
I have the feeling your build tools are hosed.
Maybe somebody else on the list has a suggestion.
You could try a newer version or a snapshot.
--- End Message ---
--- Begin Message ---
What is this supposed to be exactly? I gather from looking at it quickly
that uses can signup, then send messages to other signed up users right?
So it's like email, but you can only send messages to other people that
signup, and login through that specific webpage. Forgive me but I don't see
the appeal, what is this for?
- Dan
""Gevorg Harutyunyan"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello,
I am Gevorg.
I just wanted to introduce you my new PHP based work here www.soongy.com
<http://www.soongy.com/> .
It is working on PHP and MySQL and here is used DHTML, AJAX.
Thank you very much.
Waiting for your response
Regards,
Gevorg
--- End Message ---
--- Begin Message ---
Kelvin,
Sessions is just one of the items recommended for an e-commerce website. I
seem to recall that if cookies were not enabled that there was a way of
passing the session id in the URL as a "Get" parameter.
Basically you will store the items to be purchased in a special table and a
shopper ID or cart ID number will be assigned with the first selected item
and needs to be retained to be able to recall the selected items when the
shopper is ready to check out. A session variable is a good place to store
this id, but it could also be passed in the form as a hidden field. A
session is also a convenient way of providing a generic storage of the items
to be purchased, separate table is possibly more common. You don't have to
be too concerned about security up to the point where someone begins to
check out when you begin gathering personal information from the buyer.
Give it some thought, but I suspect in most cases that if someone were to
capture a session at this point, the worse that could happen is they would
both order and pay for the same items.
When you gather personal information it becomes a different matter, and at
this point I would first recomment you consider passing your order items to
a resource like paypal and let them collect the personal information. If
that is not possible you will want to switch to SSL communication with the
browser before when you present your form for the personal information, and
even in this mode I would recommend that if you detect errors on the forma
and need to represent the form for the buyer to correct info, toss away the
credit card info and have them reenter it. You do not want to store this in
your session, or anywhere on your system without really secure incryption
(I'm talking about the DB side here, not the SSL channel to the browser).
Once you begin collecting personal information (and this is not limited to
the obvious like social security numbers), you should make sure the session
cannot be hijacked, to prevent identity theft, this is where cookies work so
well. Anyone who doesn't allow cookies is forcing you into a situation
where you must expose their session information in the URL or a hidden field
on the form where it can be hijacked, in which case I would refuse to have
them as a customer, it's not worth the risk.
Hope this helps,
Warren
-----Original Message-----
From: Kelvin Park [mailto:[EMAIL PROTECTED]
Sent: Friday, August 17, 2007 3:02 PM
To: [EMAIL PROTECTED]
Subject: [PHP] About Session And Cookies
I am trying to setup a secure login system.
I've heard that if I use just cookies for login, members without cookie
turned out won't be able to see the member pages.
Is using session recommended for e-commerce websites with shopping carts?
Or, using both of them might be more effective in some way.
--- End Message ---
--- Begin Message ---
If cookies are not available, you can either
hide the id in the hidden form field element
or
enable trans_sid to automatically pass the session id in the url
bastien> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]>
Date: Fri, 17 Aug 2007 17:03:54 -0700> Subject: RE: [PHP] About Session And
Cookies> > Kelvin,> > Sessions is just one of the items recommended for an
e-commerce website. I> seem to recall that if cookies were not enabled that
there was a way of> passing the session id in the URL as a "Get" parameter.> >
Basically you will store the items to be purchased in a special table and a>
shopper ID or cart ID number will be assigned with the first selected item> and
needs to be retained to be able to recall the selected items when the> shopper
is ready to check out. A session variable is a good place to store> this id,
but it could also be passed in the form as a hidden field. A> session is also a
convenient way of providing a generic storage of the items> to be purchased,
separate table is possibly more common. You don't have to> be too concerned
about security up to the point where someone begins to> check out when you
begin gathering personal information from the buyer.> Give it some thought, but
I suspect in most cases that if someone were to> capture a session at this
point, the worse that could happen is they would> both order and pay for the
same items.> > When you gather personal information it becomes a different
matter, and at> this point I would first recomment you consider passing your
order items to> a resource like paypal and let them collect the personal
information. If> that is not possible you will want to switch to SSL
communication with the> browser before when you present your form for the
personal information, and> even in this mode I would recommend that if you
detect errors on the forma> and need to represent the form for the buyer to
correct info, toss away the> credit card info and have them reenter it. You do
not want to store this in> your session, or anywhere on your system without
really secure incryption> (I'm talking about the DB side here, not the SSL
channel to the browser).> > Once you begin collecting personal information (and
this is not limited to> the obvious like social security numbers), you should
make sure the session> cannot be hijacked, to prevent identity theft, this is
where cookies work so> well. Anyone who doesn't allow cookies is forcing you
into a situation> where you must expose their session information in the URL or
a hidden field> on the form where it can be hijacked, in which case I would
refuse to have> them as a customer, it's not worth the risk.> > Hope this
helps,> > Warren> > > -----Original Message-----> From: Kelvin Park
[mailto:[EMAIL PROTECTED] > Sent: Friday, August 17, 2007 3:02 PM> To: [EMAIL
PROTECTED]> Subject: [PHP] About Session And Cookies> > I am trying to setup a
secure login system.> I've heard that if I use just cookies for login, members
without cookie> turned out won't be able to see the member pages.> > Is using
session recommended for e-commerce websites with shopping carts?> Or, using
both of them might be more effective in some way.> > -- > PHP General Mailing
List (http://www.php.net/)> To unsubscribe, visit:
http://www.php.net/unsub.php>
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces.
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
--- End Message ---
--- Begin Message ---
Hi,
I am looking for a way to convert a html page to a jpeg image. The html
page is a file with images and text. Could someone please suggest a method
or point me to any existing work on this?
Thanks,
Bindu
--- End Message ---
--- Begin Message ---
Hi,
Here's an interesting observation i noticed while using foreach to
iterate on arrays using
references for it's values.
-----------------------------------------------------------------------------------------------------------------
PHP version
$ php -v
PHP 5.2.3 (cli) (built: Jun 8 2007 14:31:21)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
-----------------------------------------------------------------------------------------------------------------
Source code
<?php
// initialize array
$cat1 = array();
$cat1[15] = array('tid' => 15, 'ar_needed' => 'no');
$cat1[16] = array('tid' => 16, 'ar_needed' => 'no');
$cat1[17] = array('tid' => 17, 'ar_needed' => 'no');
// print it
print "\n\$cat1 = ";
print_r($cat1);
print "\n";
// iterate using foreach and reference
foreach ($cat1 as $k => &$v) {
if ($k == 15) {
$v['ar_needed'] = 'yes'; // dummy change
}
}
// print array
print "\n\$cat1 = ";
print_r($cat1);
print "\n";
// reiterate
foreach ($cat1 as $k => $v) {
print "\$k = $k\n";
print "\$v = ";
print_r($v);
print "\n";
}
?>
-----------------------------------------------------------------------------------------------------------------
OUTPUT
$cat1 = Array
(
[15] => Array
(
[tid] => 15
[ar_needed] => no
)
[16] => Array
(
[tid] => 16
[ar_needed] => no
)
[17] => Array
(
[tid] => 17
[ar_needed] => no
)
)
$cat1 = Array
(
[15] => Array
(
[tid] => 15
[ar_needed] => yes
)
[16] => Array
(
[tid] => 16
[ar_needed] => no
)
[17] => Array
(
[tid] => 17
[ar_needed] => no
)
)
$k = 15
$v = Array
(
[tid] => 15
[ar_needed] => yes
)
$k = 16
$v = Array
(
[tid] => 16
[ar_needed] => no
)
$k = 17
$v = Array
(
[tid] => 16
[ar_needed] => no
)
-----------------------------------------------------------------------------------------------------------------
As seen in the above output all the print statements give expected
output except the last
set in the 2nd iteration
$k = 17
$v = Array
(
[tid] => 16
[ar_needed] => no
)
the $k looks fine but the $v is not correct for some reason. Any clue
what could be wrong
here ?. Also, in the 2nd iteration of the name of the variable is
changed from $v to $v1
it displays correctly
$k = 17
$v1 = Array
(
[tid] => 17
[ar_needed] => no
)
Thanks.
Yashesh Bhatia.
------------------------------------------------------------------
Go Pre
http://www2.localaccess.com/rlalonde/pre.htm
------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
If built a simple login page and store any information within
$_SESSION's. Yet I'd like to move these into cookies but I always get an
error about sent headers. Is there a way to circumvent this problem
without changing too much in the page?
The setting of the cookies happens just at the end of the page.
if (!$errortext and $Anmelden) {
if (!empty($Permanent)) {
$expires = time()+ 365 * 86400; // 365 days
setcookie ("l.Lastname", $_SESSION['l_Lastname'], $expires);
setcookie ("l.Firstname", $_SESSION['l_Firstname'], $expires);
setcookie ("l.Email1", $_SESSION['l_Email1'], $expires);
setcookie ("l.Email2", $_SESSION['l_Email2'], $expires);
}
echo "<script type=\"text/javascript\">
parent.location.replace('$index_php";
</script>";
exit;
}
O. Wyss
--- End Message ---
--- Begin Message ---
Kelvin Park wrote:
Otto Wyss wrote:
If built a simple login page and store any information within
$_SESSION's. Yet I'd like to move these into cookies but I always get
an error about sent headers. Is there a way to circumvent this
problem without changing too much in the page?
The setting of the cookies happens just at the end of the page.
if (!$errortext and $Anmelden) {
if (!empty($Permanent)) {
$expires = time()+ 365 * 86400; // 365 days
setcookie ("l.Lastname", $_SESSION['l_Lastname'], $expires);
setcookie ("l.Firstname", $_SESSION['l_Firstname'], $expires);
setcookie ("l.Email1", $_SESSION['l_Email1'], $expires);
setcookie ("l.Email2", $_SESSION['l_Email2'], $expires);
}
echo "<script type=\"text/javascript\">
parent.location.replace('$index_php";
</script>";
exit;
}
O. Wyss
ob_start() might help
--- End Message ---
--- Begin Message ---
H'E-R+E WE GO AGAI.N!
T H,E B-I-G O N,E B-EFORE T'H.E SEPTEMBER.RA'+LLY!
T'H_E MAR.KET IS AB,OUT TO P,O.P-, A'N-D SO IS E+X*M+T !
F.irm: EXCHANG_+E MOBIL'E T,E,L'E (Othe,r O*T.C-: E XMT.PK)
Tic_k: E+X_M*T
A.s+k_: 0'.-0.8
5-'day pote+,ntial: 0-.,4_0
T,h'i+s a gre.at opp.or.tunity to at leas't do uble up!
N'o*t o,n*l_y d*o_e*s t,h-i+s f,i*r*m h-a_v,e gre*at fundam*enta*ls, b,u_t gettin g t.h*i-s oppo_rtu'nity at t+h e r.ight time', rig.ht be'fore t*h'e rall.y is w.h*a't m akes t.h*i's d*e+a_l so swe-et!
Wat,ch it s-o+a.r*!
Wr*ite t-h+e gen'e rated i+n_s.n as a par,,allel w.i+t.h e_+lements be+ing a s*e't of o*n_e re.gi*ster f.r.o_m t'h+e app.,ropriate me,mory locatio,*n (_y-o u m'a.y a*l_s_o n'e.e,d u.s.e or clo*bber elem'*ents).
M*a+n y L-inux ker-nel networ'k driver-s u.s'e an aut,opro.be rou,tine t'h,a't c,a+n de.tect t,h'e networ,k boar'd a_n,d i,t*s setti_n_gs at b,o.o't t+i-m+e,.
T+h*e t_y*p_e of t.h+e s econd " inn.er" fu+n,ction in t,h_e f+unct+ion c,ompositio n operat-,ion.
Al*ong o*n+e w_a.l+l of t h-e kit-chen a met_al trou'gh -- or w a,s it m'etal, exactly .
I w_a_s t_ired of atta,cks c-oming f+r'o*m be*hind.
--- End Message ---