Re: [PHP-DB] Compile php5-sybase_ct-5.2.9 with freetds-devel-0.82.1_1,1 in FreeBSD ports will Failed!

2009-03-26 Thread Steven Cruz

Hello;

   I had several problem installing Sybase 15 64 bit with php 5,  I was 
using sybase open client libraries and with some twinking I got it to 
work, with compile warnings. Have you tried the native Sybase client 
libraries?


steven.



James Chang wrote:

Dear Sir,

   I'm running almost 300 boxes of FreeBSD with PHP 5.2.9 as my Web
Application front-end.

   Because my backend DB Server is Sybase ASE 15.0.2, I need to re-build my
php5-sybase_ct-5.2.9 with FreeTDS 0.82(or above). Or I will encounter truncated
problem when column type is Char(n), VarChar(n), Binary(n), and VarBinary(n)
datatypes where n is more than 255 bytes.

   Could you please do me a favor ?

Best Regards!

P.S.
1.The following is compiling Error message :
/usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct/php_sybase_ct.c:809:
warning: cast from pointer to integer of different size
/bin/sh /usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct/libtool
--mode=link cc -DPHP_ATOM_INC
-I/usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct/include
-I/usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct/main
-I/usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct
-I/usr/local/include/php -I/usr/local/include/php/main
-I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
-I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
-I/usr/local/include  -I/usr/local/include/php -DHAVE_CONFIG_H  -O3
-fno-strict-aliasing -pipe -march=opteron   -o ./sybase_ct.la
-export-dynamic -avoid-version -prefer-pic -module -rpath
/usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct/modules
 php_sybase_ct.lo -lsybtcl -lintl -lcomn -lct -lcs -R/usr/local/lib
-L/usr/local/lib
cc -shared  .libs/php_sybase_ct.o  -Wl,--rpath -Wl,/usr/local/lib
-Wl,--rpath -Wl,/usr/local/lib -lsybtcl /usr/local/lib/libintl.so
-L/usr/local/lib -lcomn /usr/local/lib/libct.so -L/usr/lib -lcs
-march=opteron -Wl,-soname -Wl,sybase_ct.so -o ./.libs/sybase_ct.so
/usr/bin/ld: cannot find -lsybtcl
*** Error code 1

Stop in /usr/ports/databases/php5-sybase_ct/work/php-5.2.9/ext/sybase_ct.


2.The following are the FreeTDS log:
==
15:51:06.317420 48508 (net.c:542):Received packet
 25 00 00 01 0a 05 30 31-30 30 34 00 01 00 b7 00 |%.01 004.|
0010 43 68 61 72 61 63 74 65-72 20 6f 72 20 62 69 6e |Characte r or bin|
0020 61 72 79 20 64 61 74 61-20 72 65 74 75 72 6e 65 |ary data  returne|
0030 64 20 66 72 6f 6d 20 41-64 61 70 74 69 76 65 20 |d from A daptive |
0040 53 65 72 76 65 72 20 68-61 73 20 62 65 65 6e 20 |Server h as been |
0050 74 72 75 6e 63 61 74 65-64 2e 20 54 68 65 20 63 |truncate d. The c|
0060 6c 69 65 6e 74 20 61 70-70 6c 69 63 61 74 69 6f |lient ap plicatio|
0070 6e 20 64 6f 65 73 20 6e-6f 74 20 73 75 70 70 6f |n does n ot suppo|
0080 72 74 20 6d 6f 72 65 20-74 68 61 6e 20 32 35 35 |rt more  than 255|
0090 20 62 79 74 65 73 20 6f-66 20 64 61 74 61 20 61 | bytes o f data a|
00a0 73 20 61 20 72 65 73 75-6c 74 20 63 6f 6c 75 6d |s a resu lt colum|
00b0 6e 20 6f 72 20 6f 75 74-70 75 74 20 70 61 72 61 |n or out put para|
00c0 6d 65 74 65 72 2e 0a 06-64 6f 72 6f 72 6f 00 01 |meter... dororo..|
00d0 00 fd 10 00 02 00 01 00-00 00   | ..|
==
i.e. Sybase ASE 15.0.2 response:Character or binary data returned
from Adaptive Server has been truncated. The client application does
not support more than 255 bytes of data as a result column or output
parameter.

  



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



RE: [PHP-DB] How to do a Newsletter

2008-05-01 Thread STEVEN CRUZ

Hello;

What exactly do you mean? I have some jobs in cron that run a query and then 
spit out an thml page via email. That type of thing?





From: Nasreen Laghari [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] How to do a Newsletter
Date: Thu, 1 May 2008 08:59:33 -0700 (PDT)

Hi,
Does any one know a better way of doing Newsletter. I have to run a query 
and send that data to clients.

Regards


  


Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ




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



Re: [PHP-DB] md5() function

2008-01-14 Thread Steven Cruz

Hello;

I maybe wrong, but I believe it is one way. What you need to do is take 
your input and encrypt it and check if matches your current encrypted 
value. :)


peace and hugs.

Miguel Guirao wrote:

Hi!!

I'm using the md5() function to encrypt a password and store it into a
database. Now I want to retrieve that MD5 password and convert it into it's
human readable condition.
Is there a function opposite to md5()??

Best Regards,

M Guirao

  


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



Re: [PHP-DB] Re: MySQL Query on the Fly

2007-05-13 Thread Steven Cruz
You can the entire thing in Java script with Style sheets. Depends on 
what he wants to do. iframes could be far simpler. :)



itoctopus wrote:

You have to use an iframe to do what you want. Once the user select
something, you referesh the iframe and you pass specific parameters to it
based on the user's choice.

  


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



Re: [PHP-DB] Sybase and PHP

2007-04-03 Thread Steven Cruz
I got a similar setup up and running a few months ago.  Sadly I am 
having connection problems, else I would give you the configure string I 
used. When netowrk does come around, I will see what I can do.


Steven

[EMAIL PROTECTED] wrote:

We have been using sybase with PHP4 and now are looking to move to PHP5.  I ran 
into an installation problem with PHP5 and starting looking at the bug reports 
and can't tell for sure whether sybase is being supported any longer.
I was working with PHP5 source rpm on Fedora 6 when I ran into a problem with 
recompiling it (rpmbuild -ba).  I really couldn't make much of the error.

php-5.1.6-3

Building from rpm source I get the following errors.

with standard Fedora6 src I added the following line to the
--with-sybase-ct=/opt/sybase/OCS-15_0 \

Building from rpm source I get the following errors.
-
screen error
--
checking for string.h... (cached) yes
checking for char... yes
checking size of char... configure: error: cannot compute sizeof (char), 77
See `config.log' for more details.
error: Bad exit status from /var/tmp/rpm-tmp.17076 (%build)
--
partial output from config logs
config.log
before this it indicated that it was in confdefs.h
---

#define SIZEOF_LONG 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG 4
#define SIZEOF_LONG_LONG 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF_LONG_LONG_INT 8
#define SIZEOF_PTRDIFF_T 4
#define SIZEOF_SHORT 2
#define SIZEOF_SHORT 2
#define SIZEOF_SIZE_T 4
#define SIZEOF_SSIZE_T 4
#define STDC_HEADERS 1
#define STDC_HEADERS 1
#define TIME_WITH_SYS_TIME 1
#define UCD_SNMP_HACK 1
#define UNDEF_THREADS_HACK
#define USE_GD_IMGSTRTTF 1
#define USE_GD_IMGSTRTTF 1
#define YYTEXT_POINTER 1
#define _GNU_SOURCE 1

configure: exit 1

  


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



Re: [PHP-DB] Storing 4KB jpeg images on hospital web server

2007-03-08 Thread Steven Cruz
Yeah, do what the boss says,  but I will tend agree, storing the images 
the database will slow it down.  There is one place that holds large 
images and even small vids in the DB.  IO over kill. They have two 
servers to run one database.



Micah Stevens wrote:

On 03/08/2007 01:35 AM, Chetan Graham wrote:
Back to the Hospital website.  Now the Web Boss wants to put the 
images in

the DB.  I do feel the webserver folders would simply and well.
However, we do what the boss says.
 
I'm with Bastien on this one, I've stored images in a database in the 
past, and although I have to admit that it makes a certain amount of 
sense in the fact it keeps all your data in one place, practically 
it's a pain in the butt. It's faster, more efficient and better in 
almost every respect to let the filesystem do what it does best and 
store the files, and the database deal with data you need to organize 
and sort.


-Micah



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



Re: [PHP-DB] Using BLOBs

2006-12-22 Thread Steven Cruz

Hello;

 I do not think this is best with any database. Simple put you are 
large chucks of data that you can not do anything with. On access them, 
they only slow down the server through put. What I prefer to do is store 
the location in the database, and let the web server or front end get it 
directly.



Steven Cruz.


Miguel Guirao wrote:


Hi!!

I'm thinking abou to store MP3 files and PDF files in BLOB fields in a a
table, Is this a best practice in MySQL?
Or should I just store a reference to a file stored some where in a file
system?

I want to store sermons and preachings, both a PDF and MP3 for reading and
listening on a web site!

Best Regards,

Miguel Guirao



Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta 
dirigido; contiene informacion estrictamente confidencial y legalmente 
protegida, cuya divulgacion es sancionada por la ley. Si el lector de este 
mensaje no es a quien esta dirigido, ni se trata del empleado o agente 
responsable de esta informacion, se le notifica por medio del presente, que su 
reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio 
este comunicado por error, favor de notificarlo inmediatamente al remitente y 
destruir el mensaje. Todas las opiniones contenidas en este mail son propias 
del autor del mensaje y no necesariamente coinciden con las de Radiomovil 
Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, 
afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.

This message is for the sole use of the person or entity to whom it is being 
sent.  Therefore, it contains strictly confidential and legally protected 
material whose disclosure is subject to penalty by law.  If the person reading 
this message is not the one to whom it is being sent and/or is not an employee 
or the responsible agent for this information, this person is herein notified 
that any unauthorized dissemination, distribution or copying of the materials 
included in this facsimile is strictly prohibited.  If you received this 
document by mistake please notify  immediately to the subscriber and destroy 
the message. Any opinions contained in this e-mail are those of the author of 
the message and do not necessarily coincide with those of Radiomovil Dipsa, 
S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries 
companies. No part of this message or attachments may be used or reproduced in 
any manner whatsoever.

 



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



Re: RE: [PHP-DB] Fulltext SELECTing only part of a field entry

2006-11-24 Thread Steven Cruz
I use to perl scripts to do something like this. But you just back and forward 
from the location in the string you are. You are count for word bounderies, in 
short, mostly white spaces. Next you count the number of characters, and 
substring!
 
 From: Miguel Guirao [EMAIL PROTECTED]
 Date: 2006/11/24 Fri PM 01:19:31 EST
 To: benmoreassynt [EMAIL PROTECTED],  php-db@lists.php.net
 Subject: RE: [PHP-DB] Fulltext SELECTing only part of a field entry
 
 
 
 I guess you will still need to get the whole texts, but do the selecting
 befores displaying results. There are functions to to select an amount of
 text of certain lenght, starting at certain point of the string.
 
 -Original Message-
 From: benmoreassynt [mailto:[EMAIL PROTECTED]
 Sent: Viernes, 24 de Noviembre de 2006 11:59 a.m.
 To: php-db@lists.php.net
 Subject: [PHP-DB] Fulltext SELECTing only part of a field entry
 
 
 Hi,
 
 Not really sure if this is possible.
 
 I am using a fulltext search to search through very large entries. Basically
 an entry might contain 200,000 words, which are searched for exact matches.
 
 What I want to do is SELECT, say, the 300 words surrounding the exact match
 from the 200,000 word entry and pass it to a PHP script, rather than
 passing the entire 200,000 words to the script.
 
 Am I explaining myself clearly? In other words I want to limit the amount of
 text SELECTed, so that I am not wasting memory, etc, by passing huge
 strings to PHP.
 
 Is it possible? I've done a lot of looking, but the MySQL documentation is
 pretty limited on fulltext. If it is possible, can anyone give me a rough
 idea of how to go about it?
 
 The end result would be the sort of contextual search text results that you
 get in a Google search.
 
 Many thanks
 
 BMA
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 Este mensaje es exclusivamente para el uso de la persona o entidad a quien 
 esta dirigido; contiene informacion estrictamente confidencial y legalmente 
 protegida, cuya divulgacion es sancionada por la ley. Si el lector de este 
 mensaje no es a quien esta dirigido, ni se trata del empleado o agente 
 responsable de esta informacion, se le notifica por medio del presente, que 
 su reproduccion y distribucion, esta estrictamente prohibida. Si Usted 
 recibio este comunicado por error, favor de notificarlo inmediatamente al 
 remitente y destruir el mensaje. Todas las opiniones contenidas en este mail 
 son propias del autor del mensaje y no necesariamente coinciden con las de 
 Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, 
 controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no 
 contiene acentos.
 
 This message is for the sole use of the person or entity to whom it is being 
 sent.  Therefore, it contains strictly confidential and legally protected 
 material whose disclosure is subject to penalty by law.  If the person 
 reading this message is not the one to whom it is being sent and/or is not an 
 employee or the responsible agent for this information, this person is herein 
 notified that any unauthorized dissemination, distribution or copying of the 
 materials included in this facsimile is strictly prohibited.  If you received 
 this document by mistake please notify  immediately to the subscriber and 
 destroy the message. Any opinions contained in this e-mail are those of the 
 author of the message and do not necessarily coincide with those of 
 Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates 
 and subsidiaries companies. No part of this message or attachments may be 
 used or reproduced in any manner whatsoever.
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP-DB] Can't Connect to MySQL local Server

2006-10-26 Thread Steven Cruz
I had a similar problem the other day I think.  plus many permission 
problems.  But I got it work.


I added these two lines to the bottom of my /etc/my.cnf file

[client]
socket=/usr/local/mysql/mysql.sock

Just put in the path to your sock file and see if that helps.


ROGER DEBRY wrote:


Janet and Miles, Thank you for your suggestions.

Here is more information for you.
I am running:
   Fedora core 5 Linux 
   php 5.14

   apache 2.2.2
   mysql 5.0.22

I have added the mysql_error code to my script as you suggested.
I already knew the what the error was by looking in the error logs.
It is, Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (13)

I have run phpinfo, and it appears that MYSQL is enabled.
The MYSQL_SOCKET line in phpinfo( ) gives the path to the socket file
exactly as above.
I have checked and the socket is there with read and execute
permissions for everyone.
I did try to connect using 127.0.0.1 and got a similar error message,
  Can't connect to MySQL server on '127.0.0.1' (13)

I can connect to the server just fine at the command line with the
mysql client,
using the command mysql -hlocalhost -uusename -ppassword

The socket declaration in my.cnf is /var/lib/mysql/mysql.sock so it
matches
what php expects.

What other suggestions can you give to me?
Thank you.

 



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