php-general Digest 8 Sep 2006 05:05:56 -0000 Issue 4335

Topics (messages 241441 through 241471):

Re: Spreadsheet Writer
        241441 by: tedd
        241446 by: John Ellingsworth
        241447 by: John Ellingsworth
        241448 by: John Ellingsworth
        241453 by: Colin Guthrie

Query DBF records using PHP
        241442 by: Rahul S. Johari
        241461 by: Chris

Segfault problem [long]
        241443 by: Daniel A. Ramaley
        241462 by: Chris

Re: Accessing .mdb Ms Access file from Linux without ODBC
        241444 by: Fourat Zouari
        241445 by: Fourat Zouari

reading a PDF's title
        241449 by: Shu Hung (Koala)

Re: php generated javascript
        241450 by: Shu Hung (Koala)

GD2
        241451 by: Steve Marquez
        241452 by: Kyle

Arabic
        241454 by: Ronald Cole
        241457 by: Anas Mughal
        241464 by: Frank Arensmeier

Re: Format of Encrypted Password
        241455 by: Oscar Gosdinski
        241456 by: Eric Butera
        241458 by: Kevin Murphy
        241459 by: Chris

Database.table issue
        241460 by: Steve Marquez
        241463 by: Chris

Data validation at the db level
        241465 by: Chris W. Parker
        241466 by: Stephen Edberg
        241467 by: Jay Blanchard
        241468 by: Chris W. Parker
        241469 by: Jay Blanchard

Re: PHP Access Violations
        241470 by: Christopher Watson

Strange server crash problem
        241471 by: Larry Garfield

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 ---
At 7:43 AM -0600 9/7/06, Jef Sullivan wrote:
Greeting all,

I have done some research on the web with no luck so far.
I will continue to check some other options but I wanted
To check here as well.

I have used the Spreadsheet Excel Writer with PHP before
With great success. What I need to do now is create some
Charts with this application.

Does any one know if that is possible?
If so, can you give me a reference for that information?

Is it possible to take Excel data and produce charts with php?

Yes.

You have to upload the data and then present it.

Uploaded example:

http://xn--ovg.com/demo

Chart example:

http://xn--ovg.com/charts

There are all sorts of references on doing this -- try Google for "php excel" and "php charts"

hth's

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
Jef Sullivan wrote:

I have used the Spreadsheet Excel Writer with PHP before With great success. What I need to do now is create some
Charts with this application.

Does any one know if that is possible?
If so, can you give me a reference for that information?


JpGraph is a great tool for doing this:

http://www.aditus.nu/jpgraph/

Regards,

John

--- End Message ---
--- Begin Message ---
Jef Sullivan wrote:

I have used the Spreadsheet Excel Writer with PHP before With great success. What I need to do now is create some
Charts with this application.

Does any one know if that is possible?
If so, can you give me a reference for that information?


JpGraph is a great tool for doing this:

http://www.aditus.nu/jpgraph/

Regards,

John

--- End Message ---
--- Begin Message ---
Jef Sullivan wrote:

I have used the Spreadsheet Excel Writer with PHP before With great success. What I need to do now is create some
Charts with this application.

Does any one know if that is possible?
If so, can you give me a reference for that information?


JpGraph is a great tool for doing this:

http://www.aditus.nu/jpgraph/

Regards,

John

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
--- End Message ---
--- Begin Message ---
Jef Sullivan wrote:
Greeting all,

I have done some research on the web with no luck so far. I will continue to check some other options but I wanted
To check here as well.

I have used the Spreadsheet Excel Writer with PHP before With great success. What I need to do now is create some
Charts with this application.

Does any one know if that is possible?
If so, can you give me a reference for that information?

You could also look at Image_Graph:
http://pear.speedpartner.de/packages.php (examples)
http://pear.php.net/package/Image_Graph

Hope this helps.

Col

--- End Message ---
--- Begin Message ---
Ave,

Let¹s say I have a DBF file residing on my somewhere. It has 20 fields, and
about 100 records. Is it possible for me to Query that DBF file, so I can
search that database for a record and Display the row using PHP?

Basically what I want to do is pull out a record from that DBF file that
matches the ³Phone Number² entered by the user... And show that record on my
PHP page. 

What I¹m doing is importing all the DBF records in my mySQL database, and
then doing the search on that mySQL database and displaying records. I want
to eliminate the mySQL database and query the DBF file directly and display
records from it. 

There¹s very little that I find anywhere on the internet pertaining to the
dbase functions in php. I¹m easily able to open a DBF file, read all the
data and import it into mySQL using some functions I¹ve written. I just
don¹t know if I can search the Database or match a record and display it
without importing it into mySQL.

Any suggestions?

Rahul S. Johari
Supervisor, Internet & Administration
Informed Marketing Services Inc.
500 Federal Street, Suite 201
Troy NY 12180

Tel: (518) 687-6700 x154
Fax: (518) 687-6799
Email: [EMAIL PROTECTED]
http://www.informed-sources.com


--- End Message ---
--- Begin Message ---
Rahul S. Johari wrote:
Ave,

Let¹s say I have a DBF file residing on my somewhere. It has 20 fields, and
about 100 records. Is it possible for me to Query that DBF file, so I can
search that database for a record and Display the row using PHP?

Yes.

http://www.php.net/manual/en/ref.dbase.php

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Hello. I have been struggling for a few months to solve a problem with 
an Apache web server. First i'll try to describe the symptoms, then 
give details about the configuration and what i have tried so far. I 
would greatly appreciate any suggestions on how to diagnose and correct 
the problem.


Symptom 1:

After starting Apache during periods of high load the server appears to 
run fine for awhile ("awhile" is highly variable but on the order of 90 
minutes) then starts returning empty pages. When the empty pages start, 
Apache's error_log gets filled with lines like this:

[Thu Sep 07 09:09:11 2006] [notice] child pid 3579 exit signal 
Segmentation fault (11), possible coredump in /etc/httpd/core

These errors are very intermittent during periods of light load. I have 
had CoreDumpDirectory defined for awhile and have amassed quite a 
collection of core files. This is the first few lines of what gdb 
reports for one of them:

(gdb) bt
#0  0x0000002a99ff2492 in preg_replace_impl (ht=Variable "ht" is not 
available.)
    at /usr/src/redhat/BUILD/php-4.3.9/ext/pcre/php_pcre.c:1154
#1  0x0000002a9a0ac255 in execute (op_array=0x552afe2798)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1640
#2  0x0000002a9a0a9386 in execute (op_array=0x552aff7fb8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#3  0x0000002a9a0a9386 in execute (op_array=0x552b0e26c8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#4  0x0000002a9a0a9386 in execute (op_array=0x552af80db8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684

Symptom 2:

A further symptom of problems is found in PostgreSQL's logs. The web 
applications the server runs rely on PostgreSQL, which logs several 
times per minute messages like this:

Sep  7 10:16:09 sun12 postgres[7411]: [1-1] LOG:  unexpected EOF on 
client connection

PostgreSQL is configured to accept 256 connections, twice as many 
children as Apache should spawn.


Configuration:

The server is a Sun v40z, which is a dual Opteron box with 2 GB RAM. It 
is running Red Hat Linux Enterprise AS 4.4 64-bit, with Apache 2.0.52, 
PHP 4.3.9, and eAccelerator 0.9.4. The server's purpose is to run Horde 
and Imp, with the latest versions of those packages and a few other 
Horde components (Ingo, Passwd, and Turba).

Apache is installed with Red Hat's RPMs. PHP is compiled from Red Hat's 
source RPMs; i added mcrypt support which is not included by default 
(but needed to improve performance of Horde).

Below is a list of things i have tried that did not work. After each 
test that failed to provide results i reverted to the previous 
configuration.

1) Using Red Hat's RPMs even though they don't have mcrypt support. This 
did nothing.

2) Upgrading PHP to the latest 4.4.x (x==2 at the time i tried that), 
compiled from source. This had no effect.

3) Removed eAccelerator. Problems remained, but server responds to 
requests a bit slower (as would be expected).

4) Running with a uniprocessor kernel. No effect on the errors.

5) Switched Apache and PHP to 32-bit. The rest of the system is 64-bit. 
This also had no effect.

Over the last few months i have exchanged many messages on the Horde, 
Imp, and Apache users mailing lists trying to track down the problems. 
The consensus seems to be that i need to ask on the PHP forums. Does 
anyone recognize this problem? Do you know a solution for the problem?

------------------------------------------------------------------------
Dan Ramaley                            Dial Center 118, Drake University
Network Programmer/Analyst             2407 Carpenter Ave
+1 515 271-4540                        Des Moines IA 50311 USA

--- End Message ---
--- Begin Message ---
Daniel A. Ramaley wrote:
Hello. I have been struggling for a few months to solve a problem with an Apache web server. First i'll try to describe the symptoms, then give details about the configuration and what i have tried so far. I would greatly appreciate any suggestions on how to diagnose and correct the problem.


Symptom 1:

After starting Apache during periods of high load the server appears to run fine for awhile ("awhile" is highly variable but on the order of 90 minutes) then starts returning empty pages. When the empty pages start, Apache's error_log gets filled with lines like this:

[Thu Sep 07 09:09:11 2006] [notice] child pid 3579 exit signal Segmentation fault (11), possible coredump in /etc/httpd/core

These errors are very intermittent during periods of light load. I have had CoreDumpDirectory defined for awhile and have amassed quite a collection of core files. This is the first few lines of what gdb reports for one of them:

(gdb) bt
#0 0x0000002a99ff2492 in preg_replace_impl (ht=Variable "ht" is not available.)
    at /usr/src/redhat/BUILD/php-4.3.9/ext/pcre/php_pcre.c:1154
#1  0x0000002a9a0ac255 in execute (op_array=0x552afe2798)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1640
#2  0x0000002a9a0a9386 in execute (op_array=0x552aff7fb8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#3  0x0000002a9a0a9386 in execute (op_array=0x552b0e26c8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684
#4  0x0000002a9a0a9386 in execute (op_array=0x552af80db8)
    at /usr/src/redhat/BUILD/php-4.3.9/Zend/zend_execute.c:1684

Symptom 2:

A further symptom of problems is found in PostgreSQL's logs. The web applications the server runs rely on PostgreSQL, which logs several times per minute messages like this:

The php crash would probably explain the postgres problems.

You're probably better off asking the internals list, http://www.php.net/mailing-lists.php, because they write the C code behind PHP.

Have you run any hardware tests to make sure it's not memory/cpu related?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
i want to understand something : when using a dsn like this with adodb :

"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=/var/tmp/etiq.db"

should i have an ODBC layer or not ?

On 9/7/06, Joe Wollard <[EMAIL PROTECTED]> wrote:

I think kOffice can read mdb files on Linux - maybe that would be a
good starting point for research. Perhaps they have built a kind of
API to allow other programs to do the same......then again, maybe not
- but like I said, it's some place to start.


On Sep 7, 2006, at 7:57 AM, Fourat Zouari wrote:

> it's a PHP question : how can we access Ms Access mdb files without
> ODBC ?
>
> On 9/7/06, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
>>
>>
>>
>> Fourat Zouari wrote:
>>
>> > Hello all,
>> > I need to create a script that can open a connection to a
>> given .mdb
>> file
>> > (Microsoft Access) and do some light selects on it, anyway ...
>> > The problem that i wont create an ODBC instance, i wont and cant
>> install
>> > ODBC support on the server for the unique purpose of doing that
>> on the
>> > mdb
>> > file.
>> > I'm seeking how to do such thing on a Linux env (no COM) and
>> without
>> > ODBC,
>> > googling, i found that AdoDB doesnt do it (?) and PDO didnt got a
>> support
>> > for that (?)
>> > Any helpers around ? thanks
>> >
>>
>> what does this have to do with PHP?
>>
>> --
>> ---------------------------------------------------------------------
>> ---
>> Angelo Zanetti
>> Systems developer
>> ---------------------------------------------------------------------
>> ---
>>
>> *Telephone:* +27 (021) 469 1052
>> *Mobile:*       +27 (0) 72 441 3355
>> *Fax:*            +27 (0) 86 681 5885
>> *
>> Web:* http://www.zlogic.co.za
>> *E-Mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>



--- End Message ---
--- Begin Message ---
trying this code :

--------------------------- BEGIN
<?php
require_once('/var/www/classes/adodb/adodb.inc.php');

$db = '/var/tmp/db1.mdb';
$dsn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db";
//$dsn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db";

$sourceDB =& ADONewConnection('access');
$sourceDB->Connect($dsn) or die('here');

$res = $sourceDB->Execute('SELECT * FROM Modelos;');
echo 'err: ';
echo $sourceDB->ErrorMsg();

$rows = $res->GetRows($res);

print_r($rows);
?>
--------------------------- END

i get this error :

*Warning*: odbc_connect()
[function.odbc-connect<http://localhost/test/function.odbc-connect>]:
SQL error: [unixODBC][Driver Manager]Data source name not found, and no
default driver specified, SQL state IM002 in SQLConnect in *
/var/www/classes/adodb/drivers/adodb-odbc.inc.php* on line *60*
here

On 9/7/06, Fourat Zouari <[EMAIL PROTECTED]> wrote:

i want to understand something : when using a dsn like this with adodb :

"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=/var/tmp/etiq.db"

should i have an ODBC layer or not ?


On 9/7/06, Joe Wollard <[EMAIL PROTECTED]> wrote:
>
> I think kOffice can read mdb files on Linux - maybe that would be a
> good starting point for research. Perhaps they have built a kind of
> API to allow other programs to do the same......then again, maybe not
> - but like I said, it's some place to start.
>
>
> On Sep 7, 2006, at 7:57 AM, Fourat Zouari wrote:
>
> > it's a PHP question : how can we access Ms Access mdb files without
> > ODBC ?
> >
> > On 9/7/06, Angelo Zanetti < [EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> Fourat Zouari wrote:
> >>
> >> > Hello all,
> >> > I need to create a script that can open a connection to a
> >> given .mdb
> >> file
> >> > (Microsoft Access) and do some light selects on it, anyway ...
> >> > The problem that i wont create an ODBC instance, i wont and cant
> >> install
> >> > ODBC support on the server for the unique purpose of doing that
> >> on the
> >> > mdb
> >> > file.
> >> > I'm seeking how to do such thing on a Linux env (no COM) and
> >> without
> >> > ODBC,
> >> > googling, i found that AdoDB doesnt do it (?) and PDO didnt got a
> >> support
> >> > for that (?)
> >> > Any helpers around ? thanks
> >> >
> >>
> >> what does this have to do with PHP?
> >>
> >> --
> >> ---------------------------------------------------------------------
> >> ---
> >> Angelo Zanetti
> >> Systems developer
> >> ---------------------------------------------------------------------
> >> ---
> >>
> >> *Telephone:* +27 (021) 469 1052
> >> *Mobile:*       +27 (0) 72 441 3355
> >> *Fax:*            +27 (0) 86 681 5885
> >> *
> >> Web:* http://www.zlogic.co.za
> >> *E-Mail:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >>
>
>


--- End Message ---
--- Begin Message ---
Hello,

I know PDF files stores a "Title" somewhere.
I'm not sure if it is at meta data or elsewhere.

Does anyone have any method to get this "Title" out?

Thanks
Koala Yeung

--- End Message ---
--- Begin Message ---
On 8/31/06, Curt Zirzow <[EMAIL PROTECTED]> wrote:

On 8/30/06, Shu Hung (Koala) <[EMAIL PROTECTED]> wrote:
> On 8/31/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
> >
> > Koala,
> >
> > There is no difference with the php generated javascript and
javascript on
> > a
> > static html page.
> >
> > Take a look at the source code of the page that has been generated in
the
> > browser, and if that one looks as it should, it is probably your
> > javascript
> > that is not doing what it should :)
> >
> > And if that is the case you can join the [EMAIL PROTECTED] list
for
> > that
> > purpose.
> >
> > /Peter
> >
> >
> Petar,
>
> Thanks for your reply.
>
> I've used some server side cache for that javascript generation now.
> It works a lot better. Seems to me that it takes too long to generate
> the javascript. Sometimes browsers decided to ignores the javascript
> and just run.

You might want to be more elaborate than that... What is considered
longer, What do you mean it ignores the javascript?

> I used "document.write" in that javascript. When it isn't loaded
> completely, nothing shows. I wonder if there is any better way.

This i dont understand, perhaps an example of what you are doing?

Curt.


Curt,

I found the problem.
I have some "\n" inside a javascript variable sometimes.
That cause the error by chance and I thought that was
browser issue.

Thanks a lot.

Koala Yeung

--- End Message ---
--- Begin Message ---
Does anyone know anything about the gd2 for imagecreatetruecolor?

I have written a script that uploads an image to a directory and displays a
thumbnail of the image to the viewer. It works when I am using the live
site, but on the testing server, on my machine, it does not work. We will be
using an in-house machine for future use and we were wondering if anyone has
run into this issue before.

Could it be that we need to create a module in the php.ini file?

I am kind of new to the back-end of PHP. You could probably tell. I
appreciate any help.

Thanks,

Steve Marquez

--- End Message ---
--- Begin Message ---
It could be that the PHP you are using for testing does not have GD
support (whoever packaged it didn't have it compiled in).  The quick way
to check would be a quick phpinfo() script.  That should at least give
you somewhere to start.

Kyle

Steve Marquez wrote:
> Does anyone know anything about the gd2 for imagecreatetruecolor?
> 
> I have written a script that uploads an image to a directory and displays a
> thumbnail of the image to the viewer. It works when I am using the live
> site, but on the testing server, on my machine, it does not work. We will be
> using an in-house machine for future use and we were wondering if anyone has
> run into this issue before.
> 
> Could it be that we need to create a module in the php.ini file?
> 
> I am kind of new to the back-end of PHP. You could probably tell. I
> appreciate any help.
> 
> Thanks,
> 
> Steve Marquez
> 

--- End Message ---
--- Begin Message ---
Hi,

        I'm trying to use pdflib to generate Arabic.

        Is this possible?

        If so, what font should one use?

Someone has told me that I may need to manipulate the unicode characters to change the order to right-to-left. Has anyone done this before?

Thanks,
Skip

Ronald "Skip" Cole
Program Officer
United States Institute of Peace (http://www.usip.org)
(202)457-1700 ext 4717

“The more you sweat in peace, the less you bleed in war” – Asian Proverb

--- End Message ---
--- Begin Message ---
I have not done this before. I am unsure of how this could be done. Here is
what comes to my mind:


  - I would think you would need to change the x-coordinate of the page
  to start from the top-right of the page -- instead of top-left.
  - The rendering of characters needs to be done from right to left.
  (Unless you do that already in your string generation code: basically flip
  the text.)
  - I wouldn't think you would need to manipulate anything with respect
  to the unicode characters.
  - The font needs to be provided or supported by pdflib.


Please do let me know if you find an answer to this interesting problem.
Regards.



On 9/7/06, Ronald Cole <[EMAIL PROTECTED]> wrote:

Hi,

        I'm trying to use pdflib to generate Arabic.

        Is this possible?

        If so, what font should one use?

        Someone has told me that I may need to manipulate the unicode
characters to change the order to right-to-left. Has anyone done this
before?

Thanks,
Skip

Ronald "Skip" Cole
Program Officer
United States Institute of Peace (http://www.usip.org)
(202)457-1700 ext 4717

"The more you sweat in peace, the less you bleed in war" – Asian Proverb

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




--
Anas Mughal

--- End Message ---
--- Begin Message ---
I would...

a) read the PDFlib manual
b) search the PDFlib list archives for information (this has been discussed previously, I am rather sure)
c) post your question to the PDFlib list

/frank

7 sep 2006 kl. 21.16 skrev Ronald Cole:

Hi,

        I'm trying to use pdflib to generate Arabic.

        Is this possible?

        If so, what font should one use?

Someone has told me that I may need to manipulate the unicode characters to change the order to right-to-left. Has anyone done this before?

Thanks,
Skip

Ronald "Skip" Cole
Program Officer
United States Institute of Peace (http://www.usip.org)
(202)457-1700 ext 4717

“The more you sweat in peace, the less you bleed in war” – Asian Proverb

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



--- End Message ---
--- Begin Message ---
On 9/5/06, Kevin Murphy <[EMAIL PROTECTED]> wrote:
The only thing I can find anywhere in the code is this:

$auth_user = $_SERVER['PHP_AUTH_USER'];
$auth_pw = $_SERVER['PHP_AUTH_PW'];
$query = "select name from table where name = '$authuser' and
password = password('$auth_pw')";


You are using the password() function of mysql to 'encrypt' the password.

--
Saludos
Oscar

--- End Message ---
--- Begin Message ---
On 9/5/06, Kevin Murphy <[EMAIL PROTECTED]> wrote:

$query = "select name from table where name = '$authuser' and
password = password('$auth_pw')";



If you haven't tried this you can probably create accounts yourself manually
in MySQL like this:
INSERT INTO table (name, password) VALUES ('user', PASSWORD('pass'));

--- End Message ---
--- Begin Message --- Yup, that's got it. It didn't occur to me that its a MySQL thing.... I'm used to doing this as a PHP thing and inserting an already encrypted password into MySQL.

Anyone have any thoughts one way or another as to if this mysql password function is better/worse than doing it all in PHP?

--
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada Community College
www.wncc.edu
775-445-3326


On Sep 7, 2006, at 12:50 PM, Eric Butera wrote:

On 9/5/06, Kevin Murphy <[EMAIL PROTECTED]> wrote:
$query = "select name from table where name = '$authuser' and
password = password('$auth_pw')";


If you haven't tried this you can probably create accounts yourself manually in MySQL like this:
INSERT INTO table (name, password) VALUES ('user', PASSWORD('pass'));


--- End Message ---
--- Begin Message ---
Kevin Murphy wrote:
Yup, that's got it. It didn't occur to me that its a MySQL thing.... I'm used to doing this as a PHP thing and inserting an already encrypted password into MySQL.

Anyone have any thoughts one way or another as to if this mysql password function is better/worse than doing it all in PHP?

You're becoming reliant on mysql to do it all which means it would be a pain to port this to another database (may or may not be a problem, no idea).


You're actually sending the password across the wire in plain text in the sql query - that is php is sending password('your_password') to the mysql server. Not a problem if it's localhost but if it's a remote db server there is a possibility of it being captured (sniffer). If you encode it in php, you're sending across the hash (password='hashed_value_here').


Mysql passwords have changed between versions and may change again.

http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html

Prior to MySQL 4.1, password hashes computed by the PASSWORD() function are 16 bytes long.

As of MySQL 4.1, the PASSWORD() function has been modified to produce a longer 41-byte hash value


The last one is probably the most important one.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Greetings,

I have a script that uploads images to a directory and information into a
MySQL database. It works on an external server, but it does not work on our
in-house server. 

I am getting the following error:

Table Œphoto_archive.categories¹ doesn¹t exist

I know that the DB Œphoto_archive¹ and the Table Œcategories¹ exists. I have
been able to use the shell to insert info into the table and it works fine,
even on the in-house server.

Does anyone know what this could be?

Thanks,

--
Steve Marquez

--- End Message ---
--- Begin Message ---
Steve Marquez wrote:
Greetings,

I have a script that uploads images to a directory and information into a
MySQL database. It works on an external server, but it does not work on our
in-house server.
I am getting the following error:

Table Œphoto_archive.categories¹ doesn¹t exist

I know that the DB Œphoto_archive¹ and the Table Œcategories¹ exists. I have
been able to use the shell to insert info into the table and it works fine,
even on the in-house server.

Are you doing cross database queries? Just wondering why you're using 'database.tablename' instead of just 'tablename'.

Are you connecting to the right database server?

Are you connecting as the right database user? Maybe the user you're using in PHP can't access the database because of user permissions.

Are the mysql versions the same?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Hey everyone,

Is there any work being done in the database world for data validation
at the db level?

It would be cool to just define a field as being an email address (of
length nn) instead of saying a TEXT field (of length nn) and validating
it in the application layer. Same goes for other things as well.

Sure, it's not really possible to account for all different types of
data, but the basics would be nice. (email, numbers only, letters only,
alphanumeric only, [a-z0-9#-] only, etc.)



Chris.



 

--- End Message ---
--- Begin Message ---
On Thu, 7 Sep 2006, Chris W. Parker wrote:

> Hey everyone,
>
> Is there any work being done in the database world for data validation
> at the db level?
>
> It would be cool to just define a field as being an email address (of
> length nn) instead of saying a TEXT field (of length nn) and validating
> it in the application layer. Same goes for other things as well.
>
> Sure, it's not really possible to account for all different types of
> data, but the basics would be nice. (email, numbers only, letters only,
> alphanumeric only, [a-z0-9#-] only, etc.)
>

That would be what CHECK constraints are for; MySQL doesn't have them yet,
Postgresql does:

http://www.postgresql.org/docs/8.1/interactive/ddl-constraints.html#AEN1954

You could emulate them in MySQL5 using triggers and stored procedures.

If your database allowed user-defined column types, you could maybe define
one as 'email address' with the approriate restrictions.

        steve

 ...........................................................
. Steve Edberg                       [EMAIL PROTECTED] .
. Computer Consultant     University of California, Davis .
.                                           (530)754-9127 .
...........................................................

--- End Message ---
--- Begin Message ---
[snip]
Hey everyone,

Is there any work being done in the database world for data validation
at the db level?

It would be cool to just define a field as being an email address (of
length nn) instead of saying a TEXT field (of length nn) and validating
it in the application layer. Same goes for other things as well.

Sure, it's not really possible to account for all different types of
data, but the basics would be nice. (email, numbers only, letters only,
alphanumeric only, [a-z0-9#-] only, etc.)
[/snip]

There are all sorts of ways to validate data at the DB level and this is
a PHP question how? I only ask because validation at the DB level
removes the need to validate at the application level. 

--- End Message ---
--- Begin Message ---
Jay Blanchard <mailto:[EMAIL PROTECTED]>
    on Thursday, September 07, 2006 5:16 PM said:

> There are all sorts of ways to validate data at the DB level and this
> is a PHP question how?

Just because!

--- End Message ---
--- Begin Message ---
[snip]
Jay Blanchard <mailto:[EMAIL PROTECTED]>
    on Thursday, September 07, 2006 5:16 PM said:

> There are all sorts of ways to validate data at the DB level and this
> is a PHP question how?

Just because!
[/snip]

Oil changes to the right.... 

--- End Message ---
--- Begin Message ---
Following up on this now...

I have successfully installed Apache 2.0.59 (Win32), and configured
successfully for PHP 5.1.6 and MySQL 5.0.24.  The app is running fine,
but I ran a few manipulation queries from the SQLyog interface and
Apache did crash.  I'll have try to reproduce the problem again in
order to get the exception data.  This is looking more and more like a
SQLyog problem.  Maybe I should try another MySQL admin client.

-Christopher

On 9/6/06, Christopher Watson <[EMAIL PROTECTED]> wrote:
Spoke too soon.  After a reboot, I had only IE and Homesite open,
making changes to PHP code and running the app, and it hit an access
violation.  So SQLyog ain't it.

-Chris

On 9/6/06, Christopher Watson <[EMAIL PROTECTED]> wrote:
> Thanks for the input, Jon.  I'll get to the Apache and IIS restart
> suggestions soon.
>
> Meanwhile, I think I have a semi-repeatable recipe for getting the
> access violation to happen.  As far as I can tell, everything is cool
> until I open up SQLyog and do some sort of database manipulation
> within it.  Almost immediately after that, switching back to the
> browser and flying through the app a little more brings on the
> violation.  So far, my testing is indicating to me that the violation
> does not occur without SQLyog having done some work in the database.
>
> -Chris


--- End Message ---
--- Begin Message ---
I'm not certain if this is a PHP problem per se, but as the problem manifests 
itself in PHP I'll give it a go.

I've a PHP-based CMS for a site that I am maintaining.  It's a large site with 
a few thousand pages.  Most of them work fine.  However, twice now we've run 
into a problem where a specific page will exhibit very odd behavior.

When building the page, the script will seemingly terminate after it outputs 
about 4 KB of data.  It's not exactly 4 KB, but it's always about 4 KB of 
data.  If I add debugging information to the page, it will still stop at 
about 4 KB of data, which is then less "real" output.

The damned thing is, the 4KB mark is reached while outputting the left-side 
navigation bar.  The way the CMS is structured (I didn't write it), that 
happens before any page-specific content is even loaded.  There shouldn't be 
anything different about the code there yet.  

I've been unable to figure out why it happens.  Any idea what to check?  I'm 
stumped.

The server itself is (get this) a Windows/IIS box running PHP 4.0.6 (yes, 
really) and MS SQL server via ODBC.  I unfortunately do not have direct 
access to the box, so I can't check server logs myself.

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

--- End Message ---

Reply via email to