Re: [PHP] ARG: Seg Faults with PHP 5.0.5, now on Solaris and SLES9

2005-10-11 Thread Jochem Maas

Chuck wrote:
Yes, prefork is what I am using. 


ah ok.

Also made sure and linked with pthread 


php + threads are not bedfellows - maybe try dropping
pthread as your AcceptMutex apache directive?

otherwise it could be time to crack open gdb and run apache
through it try and figure out exactly where the problem lies:

something like (I googled for it):

$ gdb /usr/local/apache/bin/httpd
 run -X -DSSL -f /usr/local/apache/conf/httpd.conf
then view a pagfe and grab a BT

also/alternatively try recompiling php with only the --with-apxs configure
flag - if that works recompile, each time adding a single flag,
this may pinpoint the problem some more.

... and you could try stepping down to 5.0.4 and wait until 5.1 has
a stable release.


as well.

-CC

On 10/10/05, *Jochem Maas* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Chuck wrote:
  After 3 months of headache and intermittent seg faults on Solaris
9, we
  decided to give SLES 9 a try.
 
  Now we get continuous seg faults.
 
  I am running apache 2.0.54 on SLES 9 with all updates, and Oracle
  10.2.0.1 http://10.2.0.1http://10.2.0.1.
  (everything is the 32-bit flavor)
 
  I built PHP as follows:
  adcinfops02:/usr/local/httpd-2.0.54/htdocs #./configure
  --prefix=/usr/local/php-5.0.5
--with-apxs2=/usr/local/httpd-2.0.54/bin/apxs

long shot: which worker module do you have enabled in httpd.conf?
you can only use 'pre-fork' with php.

  --enable-cli --enable-debug
--with-config-file-path=/usr/local/php-5.0.5/lib
   --with-zlib --with-bz2 --enable-ftp --with-gettext
  --enable-mbstring --with-ncurses
--with-oci8=/u01/app/oracle/product/10.2
  --enable-session --enable-sockets --enable-shared --disable-xml
  --disable-libxml --disable-dom --with-jpeg-dir=/usr/lib
  --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib
--with-xpm-dir=/usr/lib
  --disable-simplexml --without-pear
 
  Here is the simply php page that seg faults _every_ time it is
called. (On
  solaris, it only seg faulted 25% of the time)
  ?php
 
  putenv(ORACLE_HOME=/u01/app/oracle/product/10.2);
  putenv(ORACLE_SID=ADCDM02);
  putenv(TNS_ADMIN=/var/opt/oracle);
 
 
  $ora = ociplogon(dm,mypassword, MYSID);
 
  $stmt=OCIParse($ora, select USERNAME from dba_users);
  $res=OCIExecute($stmt);
 
  $rows = OCIFetchstatement($stmt, $results);
 
  print DEBUG: rows=$rowsBR\n;
 
  $keys = array_keys($results);
  foreach($keys as $key)
  {
  print $keyBR\n;
  }
  for($i=0; $i  $rows; $i++)
  {
  print   . $results[USERNAME][$i] . BR\n;
  }
 
  OCIFreeStatement($stmt);
  OCILogoff($ora);
 
  ?
 
 
  I can run this script 100 times from the command line ( # php
oratest.php )
  and not a single seg fault.
 
  Anyone have any idea why this is happenning?
 
  Also, is there a config, any OS, any version, and combination AT
ALL, where
  PHP is reliable when using Oracle 10g as the back end? Any
configuration at
  all?
 
  Thx,
  CC
  --
 




--

To reply to this message, remove 'N_O_S_P_A_M' from the reply-to address.


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



[PHP] ARG: Seg Faults with PHP 5.0.5, now on Solaris and SLES9

2005-10-10 Thread Chuck
After 3 months of headache and intermittent seg faults on Solaris 9, we
decided to give SLES 9 a try.

Now we get continuous seg faults.

I am running apache 2.0.54 on SLES 9 with all updates, and Oracle
10.2.0.1http://10.2.0.1.
(everything is the 32-bit flavor)

I built PHP as follows:
adcinfops02:/usr/local/httpd-2.0.54/htdocs #./configure
--prefix=/usr/local/php-5.0.5 --with-apxs2=/usr/local/httpd-2.0.54/bin/apxs
--enable-cli --enable-debug --with-config-file-path=/usr/local/php-5.0.5/lib
--enable-sigchild --with-zlib --with-bz2 --enable-ftp --with-gettext
--enable-mbstring --with-ncurses --with-oci8=/u01/app/oracle/product/10.2
--enable-session --enable-sockets --enable-shared --disable-xml
--disable-libxml --disable-dom --with-jpeg-dir=/usr/lib
--with-png-dir=/usr/lib --with-zlib-dir=/usr/lib --with-xpm-dir=/usr/lib
--disable-simplexml --without-pear

Here is the simply php page that seg faults _every_ time it is called. (On
solaris, it only seg faulted 25% of the time)
?php

putenv(ORACLE_HOME=/u01/app/oracle/product/10.2);
putenv(ORACLE_SID=ADCDM02);
putenv(TNS_ADMIN=/var/opt/oracle);


$ora = ociplogon(dm,mypassword, MYSID);

$stmt=OCIParse($ora, select USERNAME from dba_users);
$res=OCIExecute($stmt);

$rows = OCIFetchstatement($stmt, $results);

print DEBUG: rows=$rowsBR\n;

$keys = array_keys($results);
foreach($keys as $key)
{
print $keyBR\n;
}
for($i=0; $i  $rows; $i++)
{
print   . $results[USERNAME][$i] . BR\n;
}

OCIFreeStatement($stmt);
OCILogoff($ora);

?


I can run this script 100 times from the command line ( # php oratest.php )
and not a single seg fault.

Anyone have any idea why this is happenning?

Also, is there a config, any OS, any version, and combination AT ALL, where
PHP is reliable when using Oracle 10g as the back end? Any configuration at
all?

Thx,
CC
--


Re: [PHP] ARG: Seg Faults with PHP 5.0.5, now on Solaris and SLES9

2005-10-10 Thread Jochem Maas

Chuck wrote:

After 3 months of headache and intermittent seg faults on Solaris 9, we
decided to give SLES 9 a try.

Now we get continuous seg faults.

I am running apache 2.0.54 on SLES 9 with all updates, and Oracle
10.2.0.1http://10.2.0.1.
(everything is the 32-bit flavor)

I built PHP as follows:
adcinfops02:/usr/local/httpd-2.0.54/htdocs #./configure
--prefix=/usr/local/php-5.0.5 --with-apxs2=/usr/local/httpd-2.0.54/bin/apxs


long shot: which worker module do you have enabled in httpd.conf?
you can only use 'pre-fork' with php.


--enable-cli --enable-debug --with-config-file-path=/usr/local/php-5.0.5/lib
--enable-sigchild --with-zlib --with-bz2 --enable-ftp --with-gettext
--enable-mbstring --with-ncurses --with-oci8=/u01/app/oracle/product/10.2
--enable-session --enable-sockets --enable-shared --disable-xml
--disable-libxml --disable-dom --with-jpeg-dir=/usr/lib
--with-png-dir=/usr/lib --with-zlib-dir=/usr/lib --with-xpm-dir=/usr/lib
--disable-simplexml --without-pear

Here is the simply php page that seg faults _every_ time it is called. (On
solaris, it only seg faulted 25% of the time)
?php

putenv(ORACLE_HOME=/u01/app/oracle/product/10.2);
putenv(ORACLE_SID=ADCDM02);
putenv(TNS_ADMIN=/var/opt/oracle);


$ora = ociplogon(dm,mypassword, MYSID);

$stmt=OCIParse($ora, select USERNAME from dba_users);
$res=OCIExecute($stmt);

$rows = OCIFetchstatement($stmt, $results);

print DEBUG: rows=$rowsBR\n;

$keys = array_keys($results);
foreach($keys as $key)
{
print $keyBR\n;
}
for($i=0; $i  $rows; $i++)
{
print   . $results[USERNAME][$i] . BR\n;
}

OCIFreeStatement($stmt);
OCILogoff($ora);

?


I can run this script 100 times from the command line ( # php oratest.php )
and not a single seg fault.

Anyone have any idea why this is happenning?

Also, is there a config, any OS, any version, and combination AT ALL, where
PHP is reliable when using Oracle 10g as the back end? Any configuration at
all?

Thx,
CC
--



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



[PHP] ARG, call to undefined function, same problem I had on SuSE

2005-07-19 Thread Chuck Carson
Okay, just built php 5.0.4 on solaris 9 and added mysql and oracle
support (using Oracle 10.2.0.1). phpinfo() shows that oracle support
is enabled, however, a simple call to ora_logon doesnt work:

Fatal error: Call to undefined function ora_logon() in
/usr/local/apache2/htdocs/oratest.php
on line 2

I configured php as follows:
./configure --prefix=/usr/local/php-5.0.4
--with-apxs2=/usr/local/apache2/bin/apxs --enable-cli --enable-cgi
--with-openss=/usr/local/ssl --with-zlib --with-bz2 --enable-dio
--with-gd --with-gettext --with-mysql=/usr/local/mysql
--with-mysql-sock=/tmp/mysql.sock --enable-sockets
--with-oci8=/u01/app/oracle/product/10.2

Anyone have any ideas???
Thx,
CC

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



Re: [PHP] ARG, call to undefined function, same problem I had on SuSE

2005-07-19 Thread Chris
I've never used the Oracle functions before, but the ora_* functions are 
different than the oci_* functions.


The ./configure  added the oci_*  not the ora_*.

Just looking in from the outside it seems that you need the oci_* , so 
try it wiith those?


Chris

Chuck Carson wrote:


Okay, just built php 5.0.4 on solaris 9 and added mysql and oracle
support (using Oracle 10.2.0.1). phpinfo() shows that oracle support
is enabled, however, a simple call to ora_logon doesnt work:

Fatal error: Call to undefined function ora_logon() in
/usr/local/apache2/htdocs/oratest.php
on line 2

I configured php as follows:
./configure --prefix=/usr/local/php-5.0.4
--with-apxs2=/usr/local/apache2/bin/apxs --enable-cli --enable-cgi
--with-openss=/usr/local/ssl --with-zlib --with-bz2 --enable-dio
--with-gd --with-gettext --with-mysql=/usr/local/mysql
--with-mysql-sock=/tmp/mysql.sock --enable-sockets
--with-oci8=/u01/app/oracle/product/10.2

Anyone have any ideas???
Thx,
CC

 



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



Re: [PHP] ARG, call to undefined function, same problem I had on SuSE

2005-07-19 Thread Chris

You didn't send the questionto the list...

I have no idea.

Chris
Chuck Carson wrote:


Using ocilogon, I get this error:
Warning: ocilogon() [function.ocilogon]: _oci_open_server: Error while
trying to retrieve text for error ORA-12154 in
/usr/local/apache2/htdocs/oratest.php on line 2

Can anyone point me in the right direction?

Thx,
CC

On 7/19/05, Chris [EMAIL PROTECTED] wrote:
 


I've never used the Oracle functions before, but the ora_* functions are
different than the oci_* functions.

The ./configure  added the oci_*  not the ora_*.

Just looking in from the outside it seems that you need the oci_* , so
try it wiith those?

Chris

Chuck Carson wrote:

   


Okay, just built php 5.0.4 on solaris 9 and added mysql and oracle
support (using Oracle 10.2.0.1). phpinfo() shows that oracle support
is enabled, however, a simple call to ora_logon doesnt work:

Fatal error: Call to undefined function ora_logon() in
/usr/local/apache2/htdocs/oratest.php
on line 2

I configured php as follows:
./configure --prefix=/usr/local/php-5.0.4
--with-apxs2=/usr/local/apache2/bin/apxs --enable-cli --enable-cgi
--with-openss=/usr/local/ssl --with-zlib --with-bz2 --enable-dio
--with-gd --with-gettext --with-mysql=/usr/local/mysql
--with-mysql-sock=/tmp/mysql.sock --enable-sockets
--with-oci8=/u01/app/oracle/product/10.2

Anyone have any ideas???
Thx,
CC



 


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


   




 



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



[PHP] arg parsing

2002-11-08 Thread phil
Apologies for revisting any old ground but I am not able to resolve this.

I have been running a php script that uses an argument

http://..././process.php?action=new

It used to work on linux 7.3 php4 apache 1.3.2

I have just upgraded my test environment to
linux 8.0 php4.3.2 apache 2.040

now it doesn't work becuase the arg does not get parsed. I am sure that this
is a config issue but I do not know it - any assistance much appreciated.


regards


Phil



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




Re: [PHP] arg parsing

2002-11-08 Thread Marco Tabini
Well, it's probably the fifth time it's asked today :-)

The setting is register_globals


Marco
-- 

php|architect - The magazine for PHP Professionals
The first monthly worldwide  magazine dedicated to PHP programmer

Come visit us at http://www.phparch.com!


---BeginMessage---
Apologies for revisting any old ground but I am not able to resolve this.

I have been running a php script that uses an argument

http://..././process.php?action=new

It used to work on linux 7.3 php4 apache 1.3.2

I have just upgraded my test environment to
linux 8.0 php4.3.2 apache 2.040

now it doesn't work becuase the arg does not get parsed. I am sure that this
is a config issue but I do not know it - any assistance much appreciated.


regards


Phil



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



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


RE: [PHP] arg parsing

2002-11-08 Thread John W. Holmes
Look at register_globals in your php.ini.

Your variables are being passed, it's just that with register_globals
OFF, you reference it as $_GET['action'] and with it on, you reference
it as just $action.

---John Holmes...

 -Original Message-
 From: phil [mailto:phil;localwebpages.co.uk]
 Sent: Friday, November 08, 2002 10:18 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] arg parsing
 
 Apologies for revisting any old ground but I am not able to resolve
this.
 
 I have been running a php script that uses an argument
 
 http://..././process.php?action=new
 
 It used to work on linux 7.3 php4 apache 1.3.2
 
 I have just upgraded my test environment to
 linux 8.0 php4.3.2 apache 2.040
 
 now it doesn't work becuase the arg does not get parsed. I am sure
that
 this
 is a config issue but I do not know it - any assistance much
appreciated.
 
 
 regards
 
 
 Phil
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] arg, this is crazy :\ - i dont get it, is the variable, uhm, NOT GLOBAL or something?

2001-10-29 Thread Richard Marks

what in the world is wrong here?



?
Header (Content-type: image/png);
$img = imagecreate ($width,$height);
$color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
$pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
function box( $img, $x, $y, $x2, $y2, $color )
{
 imageline( $img,$x,$y,$x2,$y,$color );
 imageline( $img,$x,$y2,$x2,$y2,$color );
 imageline( $img,$x,$y,$x,$y2,$color );
 imageline( $img,$x2,$y,$x2,$y2,$color );
}
function Square( $x, $y, $size, $pcolor )
{
 if ($size  50)
  break;
 box($img,$x,$y,$x+$size,$y-$size,$pcolor );
 Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
 Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
}
imagerectangle($img,0,0,$width,$height,$color);
Square ($img, -1000,1000,2000,$pixel_color );
imagepng($img);
?



thanks,
Sincerely,
GZM Software® WebMaster
[EMAIL PROTECTED]
http://www.gzmsoftware.f2s.com



Re: [PHP] arg, this is crazy :\ - i dont get it, is the variable,uhm, NOT GLOBAL or something?

2001-10-29 Thread Rasmus Lerdorf

Please read http://us.php.net/manual/en/language.variables.scope.php

On Mon, 29 Oct 2001, Richard Marks wrote:

 what in the world is wrong here?
 
 
 
 ?
 Header (Content-type: image/png);
 $img = imagecreate ($width,$height);
 $color = imagecolorallocate ($img,$tx_r,$tx_g,$tx_b);
 $pixel_color = imagecolorallocate ($img,$px_r,$px_g,$px_b);
 function box( $img, $x, $y, $x2, $y2, $color )
 {
  imageline( $img,$x,$y,$x2,$y,$color );
  imageline( $img,$x,$y2,$x2,$y2,$color );
  imageline( $img,$x,$y,$x,$y2,$color );
  imageline( $img,$x2,$y,$x2,$y2,$color );
 }
 function Square( $x, $y, $size, $pcolor )
 {
  if ($size  50)
   break;
  box($img,$x,$y,$x+$size,$y-$size,$pcolor );
  Square($img,$x-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($img,$x+$size-$size/4,$y+$size/4,$size/2,$pcolor );
  Square($img,$x-$size/4,$y-$size+$size/4,$size/2,$pcolor );
  Square($img,$x+$size-$size/4,$y-$size+$size/4,$size/2,$pcolor );
 }
 imagerectangle($img,0,0,$width,$height,$color);
 Square ($img, -1000,1000,2000,$pixel_color );
 imagepng($img);
 ?
 
 
 
 thanks,
 Sincerely,
 GZM Software® WebMaster
 [EMAIL PROTECTED]
 http://www.gzmsoftware.f2s.com
 


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




[PHP] Arg seperators

2001-05-18 Thread DAve Goodrich

According to the w3c validation program;

A URL for a CGI program that uses `' as a separator, such as
http://host/prog?x=1y=2;. This is a common problem: the inventors of CGI
didn't think things through very carefully when they decided to use the ''
character as a separator between CGI arguments, because '' has special
status in HTML. One way to get around this is for the author of the CGI
program to use a different value between arguments, like ';' or '|', which
would allow the link to be coded as img
src=http://site/cgi?opt1=val1;opt2=val2; or whatever.

I know that php 4.0.5 has a new ini directive for this, is there any way to
change this on older versions of PHP?

Thanks,

DAve
--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.com



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




Re: [PHP] Arg seperators

2001-05-18 Thread Rasmus Lerdorf

 According to the w3c validation program;

 A URL for a CGI program that uses `' as a separator, such as
 http://host/prog?x=1y=2;. This is a common problem: the inventors of CGI
 didn't think things through very carefully when they decided to use the ''
 character as a separator between CGI arguments, because '' has special
 status in HTML. One way to get around this is for the author of the CGI
 program to use a different value between arguments, like ';' or '|', which
 would allow the link to be coded as img
 src=http://site/cgi?opt1=val1;opt2=val2; or whatever.

 I know that php 4.0.5 has a new ini directive for this, is there any way to
 change this on older versions of PHP?

That directive has been there for a long time.

-Rasmus


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




RE: [PHP] Arg seperators

2001-05-18 Thread scott [gts]

i had to do that once with a perl script i was writing
because there were a variable number of options that
could be passed in, yet i needed to have a fixed number
of paramaters going into the script.

i used: ./prog.cgi?opts=x:1,y:2,z:3

sort-of like a primitive form of php's ability to pass
arrays on the command line.  i was using PHP before it
was even written ;)

 -Original Message-
 From: DAve Goodrich [mailto:[EMAIL PROTECTED]]
 Subject: [PHP] Arg seperators
 
 
 According to the w3c validation program;
 
 A URL for a CGI program that uses `' as a separator, such as
 http://host/prog?x=1y=2;. This is a common problem: the inventors of CGI
 didn't think things through very carefully when they decided to use the ''
 character as a separator between CGI arguments, because '' has special
 status in HTML. One way to get around this is for the author of the CGI
 program to use a different value between arguments, like ';' or '|', which
 would allow the link to be coded as img
 src=http://site/cgi?opt1=val1;opt2=val2; or whatever.
 
 I know that php 4.0.5 has a new ini directive for this, is there any way to
 change this on older versions of PHP?
 
 Thanks,
 
 DAve
 --
 Dave Goodrich
 Director of Interface Development
 Reality Based Learning Company
 9521 NE Willows Road, Suite 100
 Redmond, WA 98052 
 Toll Free 1-877-869-6603 ext. 237
 Fax (425) 558-5655 
 [EMAIL PROTECTED] 
 http://www.rblc.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

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




Re: [PHP] Arg seperators

2001-05-18 Thread DAve Goodrich

on 5/18/01 8:58 AM, Rasmus Lerdorf at [EMAIL PROTECTED] wrote:

 According to the w3c validation program;
 
 A URL for a CGI program that uses `' as a separator, such as
 http://host/prog?x=1y=2;. This is a common problem: the inventors of CGI
 didn't think things through very carefully when they decided to use the ''
 character as a separator between CGI arguments, because '' has special
 status in HTML. One way to get around this is for the author of the CGI
 program to use a different value between arguments, like ';' or '|', which
 would allow the link to be coded as img
 src=http://site/cgi?opt1=val1;opt2=val2; or whatever.
 
 I know that php 4.0.5 has a new ini directive for this, is there any way to
 change this on older versions of PHP?
 
 That directive has been there for a long time.
 
 -Rasmus
 

Ahhh  you are right! I appologise.

I am confused now because arg_seperator...

is not in the php.ini sample (php.ini_dist),

but it is in http://www.php.net/manual/en/ref.info.php,

but it's not in http://www.php.net/manual/en/configuration.php,

But it is in the output of php.info(),

Is there a *single* source of the options and their values that can be
set/unset using php.ini, or http.conf? When/where these can be set?

Would I be able to get this info into a matrix for everyones benefit?
Something like the table at
http://www.php.net/manual/en/function.ini-set.php

Thanks,

DAve
--
Dave Goodrich
Director of Interface Development
Reality Based Learning Company
9521 NE Willows Road, Suite 100
Redmond, WA 98052 
Toll Free 1-877-869-6603 ext. 237
Fax (425) 558-5655 
[EMAIL PROTECTED] 
http://www.rblc.com



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




[PHP] arg....

2001-01-26 Thread Kurth Bemis

i'm having a horrible time updating 2 fields in the same db.  I don't get 
an error but the fields aren't updatedcan anyone send me a snippet for 
the to learn from?

~kurth


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




RE: [PHP] arg....

2001-01-26 Thread Kurth Bemis

At 12:31 PM 1/26/2001, Krznaric Michael wrote:

sorry - here you all go..


// number crunching time
$count++;
$time = date("Y-m-d H:i:s");

$result = mysql_query("INSERT INTO links (count) VALUES $count WHERE lid=$id");

echo $result;



 You need to be a little more specific about DB and problem type.
You may have to commit the transaction if commit is not implict (ex Oracle).
There could be many resons including your SQL statement.

Mike

-Original Message-
From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 12:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP] arg


i'm having a horrible time updating 2 fields in the same db.  I don't get
an error but the fields aren't updatedcan anyone send me a snippet for
the to learn from?

~kurth


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


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




Re: [PHP] arg....

2001-01-26 Thread Shawn Blaylock

You might want to try this:

mysql_query("INSERT INTO links (count) VALUES ("$count") WHERE
lid=$id");


Kurth Bemis wrote:
 
 At 12:31 PM 1/26/2001, Krznaric Michael wrote:
 
 sorry - here you all go..
 
 // number crunching time
 $count++;
 $time = date("Y-m-d H:i:s");
 
 $result = mysql_query("INSERT INTO links (count) VALUES $count WHERE lid=$id");
 
 echo $result;
 
  You need to be a little more specific about DB and problem type.
 You may have to commit the transaction if commit is not implict (ex Oracle).
 There could be many resons including your SQL statement.
 
 Mike
 
 -Original Message-
 From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 26, 2001 12:23 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] arg
 
 
 i'm having a horrible time updating 2 fields in the same db.  I don't get
 an error but the fields aren't updatedcan anyone send me a snippet for
 the to learn from?
 
 ~kurth
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

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




Re: [PHP] arg....

2001-01-26 Thread Iván Sánchez Ortega \MR\

"Kurth Bemis" ...
 At 12:31 PM 1/26/2001, Krznaric Michael wrote:

 sorry - here you all go..


 // number crunching time
 $count++;
 $time = date("Y-m-d H:i:s");

 $result = mysql_query("INSERT INTO links (count) VALUES $count WHERE
lid=$id");

 i'm having a horrible time updating 2 fields in the same db.  I don't get
 an error but the fields aren't updatedcan anyone send me a snippet
for
 the to learn from?

well, if you want to UPDATE fields into a database, then PLEASE NOT INSERT
data...

that code should look:

$result = mysql_query("UPDATE links (count) VALUES ($count) WHERE lid=$id");

i suppose that you are getting $count from the DB before doing $count++; ...

and also have a look at the data types of that table... if the column
'count' is not of NUMBER type, you'll need some quotes in the query... also
applies for the lid.




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