Re: [PHP-DB] MySQL problem on Yellow Dog Linux

2002-06-07 Thread Jason Wong

On Saturday 08 June 2002 05:29, Garrett Nelson wrote:
> I now downloaded "php-mysql-4.1.2-1a.ppc.rpm" from rpmfinder, and again I
> get
>
> rpm -ivh php-mysql*
> Preparing...###
> [100%]
> package php-mysql-4.1.2-1a is already installed
>
> (Same error with -Uvh, too)
>
> So I suppose it's something else. Do I have to uninstall PHP first? Or,
> again, could it be something wrong with the PHP configs? Is php.ini the
> only config file that might need to be edited?

Check in your httpd.conf file that you have these lines:

LoadModule php4_modulemodules/libphp4.so
AddModule mod_php4.c

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
To err is human, to moo bovine.
*/


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




Re: [PHP-DB]

2002-06-07 Thread Jason Wong

On Saturday 08 June 2002 07:02, Tony wrote:

Please enter a subject when you post.

> I have a huge database that some of the content need to be update weekly or
> even daily.
> I wrote a PHP script for that purpose.
> It's supposed to get the data from database, find the URL, fopen() it, find
> the information, then update it back into the database.
> Unfortunately, everytime I run the script I get an error message from
> browser saying "attempt loading page "MyPage's URL" failed".
> Some guy indicated the problem is probably caused by PHP execution timeout.
> I tried to set the time longer, no luck.
> Tried to use flush() after each data, no luck.

If this is a php-db question post your code ...

> Now I gotta think of other ways to do this.
> I am thinking about using AppleScript (I am using OS X).
> Does anyone know how to communicate with MySQL via AppleScript, if
> possible? Thanks.

... if it's an AppleScript question, post on the AppleScript list (assuming 
there is one).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
share, n.:
To give in, endure humiliation.
*/


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




Re: [PHP-DB] Unique SQL query?????????????

2002-06-07 Thread Jason Wong

On Saturday 08 June 2002 08:42, Georgie Casey wrote:
> Is there any SQL command that will return a list of *unique* entries from a
> fied. ie only repeat one for duplicates
>
> i have a database of products, each having a category, and obviously a lot
> of products have the same category and I want to create an index of all the
> different categories.

SELECT DISTINCT category FROM products

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Ocean:  A body of water occupying about two-thirds of a world made for man --
who has no gills.
-- Ambrose Bierce
*/


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




[PHP-DB] MS Access DB Open as file ?

2002-06-07 Thread Ivan Lam

Hi All,
I'm new in PHP and I whether I can open a MS Access database file
directly with PHP?
There is a thing called ODBC but in the function odbc_connect(), The
first parameter is something called dsn, what's that? And does that mean I
can't open the MS Access database directly by somehow only giving it's path?
Thanks.
Ivan




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




[PHP-DB] Unique SQL query?????????????

2002-06-07 Thread Georgie Casey

Is there any SQL command that will return a list of *unique* entries from a
fied. ie only repeat one for duplicates

i have a database of products, each having a category, and obviously a lot
of products have the same category and I want to create an index of all the
different categories.
 thanks

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



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




[PHP-DB] MyCC Problem

2002-06-07 Thread César L . Aracena

Hi all. I know that this isn’t probably the best place to make this
question, but I uses that some of you uses MyCC to connect to a remote
MySQL DB. My connection is no problem, but when I issue a SQL command,
which tells the DB to INSERT multiple rows into one table, It gives me
an error every time. Imagine what it takes to pass a 1000 rows to the
“live” DB one each time. Does anyone who uses MyCC had this problem
before? Know how to solve this?
 
Thanks in advance,
 
Cesar   Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
 



[PHP-DB]

2002-06-07 Thread Tony

I have a huge database that some of the content need to be update weekly or
even daily.
I wrote a PHP script for that purpose.
It's supposed to get the data from database, find the URL, fopen() it, find
the information, then update it back into the database.
Unfortunately, everytime I run the script I get an error message from
browser saying "attempt loading page "MyPage's URL" failed".
Some guy indicated the problem is probably caused by PHP execution timeout.
I tried to set the time longer, no luck.
Tried to use flush() after each data, no luck.
Now I gotta think of other ways to do this.
I am thinking about using AppleScript (I am using OS X).
Does anyone know how to communicate with MySQL via AppleScript, if possible?
Thanks.


Tony S. Wu
[EMAIL PROTECTED]


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




Re: [PHP-DB] Anyone know why this won't return results?

2002-06-07 Thread Blaine Dinsmore

Thanks Paul,

You were absolutely right!

I can't believe I didn't see that hidden in there. That explains why I
never got any error messages.

Thanks again,

Blaine

>>> Paul DuBois <[EMAIL PROTECTED]> 06/07/02 05:55PM >>>
At 17:45 -0400 6/7/02, Blaine Dinsmore wrote:
>
>
>Results Test
>
>
>
>
>$server = "mdotlims";
>$user = "httpuser";
>$pass = "pass";
>
>
> $db = @mysql_connect($server,$user,$pass);
>   if (!$db) {
>   echo( "Unable to connect to the " .
> "database server at this time.");
> exit();
>   }
>if (! @mysql_select_db("lims_issues")) {
>   echo("Unable to locate the issues " .
>"database at this time." );
>   exit();
>   }
>
>$result = @mysql_query("SELECT Notes FROM Bugs");
>
>   if (!$result) {
>   echo("Error performing query: " . 
>mysql_error() . "");
>   exit();
>   }
>
>   While( $myrow = mysql_fetch_array($result) );{

You have a semicolon on the previous line, which terminates the while
loop - a bit prematurely, I'd guess. :-)


>   echo ("" . $myrow["NOTES"]);
>   }
>
>
>   mysql_free_result($result);
>
>?>
>
>
>


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




Re: [PHP-DB] Anyone know why this won't return results?

2002-06-07 Thread Paul DuBois

At 17:45 -0400 6/7/02, Blaine Dinsmore wrote:
>
>
>Results Test
>
>
>
>
>$server = "mdotlims";
>$user = "httpuser";
>$pass = "pass";
>
>
> $db = @mysql_connect($server,$user,$pass);
>   if (!$db) {
>   echo( "Unable to connect to the " .
> "database server at this time.");
> exit();
>   }
>if (! @mysql_select_db("lims_issues")) {
>   echo("Unable to locate the issues " .
>"database at this time." );
>   exit();
>   }
>
>$result = @mysql_query("SELECT Notes FROM Bugs");
>
>   if (!$result) {
>   echo("Error performing query: " . 
>mysql_error() . "");
>   exit();
>   }
>
>   While( $myrow = mysql_fetch_array($result) );{

You have a semicolon on the previous line, which terminates the while
loop - a bit prematurely, I'd guess. :-)


>   echo ("" . $myrow["NOTES"]);
>   }
>
>
>   mysql_free_result($result);
>
>?>
>
>
>


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




[PHP-DB] Anyone know why this won't return results?

2002-06-07 Thread Blaine Dinsmore



Results Test




Unable to connect to the " .
  "database server at this time.");
  exit();
}
if (! @mysql_select_db("lims_issues")) {
echo("Unable to locate the issues " .
 "database at this time." );
exit();
}

 $result = @mysql_query("SELECT Notes FROM Bugs");

if (!$result) {
echo("Error performing query: " . mysql_error() . "");
exit();
}

While( $myrow = mysql_fetch_array($result) );{
echo ("" . $myrow["NOTES"]);
}


mysql_free_result($result);

?>






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




Re: [PHP-DB] MySQL problem on Yellow Dog Linux

2002-06-07 Thread Garrett Nelson

On 6/6/02 4:48 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote:

> On Friday 07 June 2002 04:36, Garrett Nelson wrote:
>> I'm a relative newbie to the Linux/web server world, having worked with
>> Macs most of my life. I recently installed the Server install of Yellow Dog
>> Linux, with no window managers, CLI only. Everything is working pretty much
>> correctly, except PHP interaction with MySQL. When I tried to install
>> Invision Board, I got the following error‹
>> 
>> Fatal error: Call to undefined function: mysql_connect() in
>> /var/www/default/forums/sm_install.php on line 249
> 
> It means there's no support in php for mysql
> 
>> I figured this meant MySQL or PHP was configured incorrectly so I installed
>> PhpMyAdmin to see if that would work, and I got the error message
>> 
>> cannot load MySQL extension,
>> please check PHP Configuration.
> 
> ditto
> 
>> What needs to be configured? I was under the impression that MySQL support
>> was built into PHP now and that it needs no extension.
> 
> Yes and no. PHP has 'builtin' support for MySQL but it needs to be enabled at
> compile time.
> 
>> I downloaded the RPM
>> of PHP 4.1.2 (the latest PPC RPM available at rpmfind) and it told me it
>> was already installed. I then installed MySQL 3.23.41 to no effect.
>> 
>> So what can I do to fix this?
> 
> Try looking for an RPM with both 'php' and 'mysql' in its name. Eg for Redhat
> a suitable rpm would be named: php-mysql-4.1.2-7.i386.rpm.


Hrm 

I now downloaded "php-mysql-4.1.2-1a.ppc.rpm" from rpmfinder, and again I
get

rpm -ivh php-mysql*
Preparing...###
[100%]
package php-mysql-4.1.2-1a is already installed

(Same error with -Uvh, too)

So I suppose it's something else. Do I have to uninstall PHP first? Or,
again, could it be something wrong with the PHP configs? Is php.ini the only
config file that might need to be edited?


-- 



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




RE: [PHP-DB] MySQL won't return results to screen.

2002-06-07 Thread Gary . Every

Do you have SELECT permissions for your httpd user on the DB?

Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com


-Original Message-
From: Blaine Dinsmore [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 2:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL won't return results to screen.


Im using PHP 4.2.1, MySQL 4.23.49 and IIS 4.0 on a Windows NT 4.0 Server
machine. I have success when adding data to the database using PHP but
getting it to report to the webpage I have had no luck. I only get a blank
screen despite using error trapping for all mysql functions. Does anyone
know what this could be?

Thanks,

Blaine 


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



[PHP-DB] Re: Slow performance (PHP & MYSQL)

2002-06-07 Thread Andy

PHP is known to be verry fast. MySQL as well. So your problem my be
somewhere else.

I am doing a similar thing on my site with thumbnails.

Check it out on http://www.globosapiens.net

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"Radek Zajkowski" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am making pages for a client signed up with verio under signature
> hosting.
>
> The pages are very simple request from db for thumbnails, which are
> displayed 4 at a time etc.
>
> could it be because I'm generating the entire pages via PHP eg.
>
> echo("")
> echo("")
> echo("I'm so slow")
> echo("") etc. etc.
>
> as oppose to embedding the php into the html
>
> R>
>
> Thanks in advance.
>
> --__-__-__
> eat pasta
> type fasta
>



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




RE: [PHP-DB] MySQL won't return results to screen.

2002-06-07 Thread Ray Hunter

Edit your php.ini and log all errors to a file and then review the
filesalso you can turn on all errors and warnings to be displayed---this
has helped me many times...

Thank you,

RAY HUNTER



-Original Message-
From: Blaine Dinsmore [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 1:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL won't return results to screen.


Im using PHP 4.2.1, MySQL 4.23.49 and IIS 4.0 on a Windows NT 4.0 Server
machine. I have success when adding data to the database using PHP but
getting it to report to the webpage I have had no luck. I only get a blank
screen despite using error trapping for all mysql functions. Does anyone
know what this could be?

Thanks,

Blaine 


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



[PHP-DB] MySQL won't return results to screen.

2002-06-07 Thread Blaine Dinsmore

Im using PHP 4.2.1, MySQL 4.23.49 and IIS 4.0 on a Windows NT 4.0 Server machine. I 
have success when adding data to the database using PHP but getting it to report to 
the webpage I have had no luck. I only get a blank screen despite using error trapping 
for all mysql functions. Does anyone know what this could be?

Thanks,

Blaine 


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




[PHP-DB] warning : Unknown list entry type in request shutdown (0) in Unknown on line 0

2002-06-07 Thread chidambaram

Hi,

  i am getting this warnin when i run php file in browser
Warning: Unknown list entry type in request shutdown (0) in Unknown
on line 0

could anyone help in solving this 
i am using php4.1.2 apahce1.3.24 wndows2000


thanks in advance for your help

chidambaram



Everything you always wanted to know about cars and bikes,now
 at: http://in.autos.yahoo.com

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




[PHP-DB] Using PHP on Cygwin-apache on W2k

2002-06-07 Thread Menno Harzing

A few questions, on which I cannot find the answer myself :(

- Where should I place my php.ini? (is it still c:\winnt\system32)
- Where do I place the module needed for apache?
- How do I include php in apache (the 'loadmodule...' and-so-on)

Thnx for reading, hope anyone has an answer...

Menno

_
Meld je aan bij de grootste e-mailservice wereldwijd met MSN Hotmail: 
http://www.hotmail.com/nl


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




Re: [PHP-DB] Fw: PHP amd MYSQL

2002-06-07 Thread Jason Wong

On Friday 07 June 2002 14:27, Peter Goggin wrote:
> Following my earlier message I had some replies which suggested a way to
> solve my problem. Unfortuantelu I cannot seem to get the suggested code to
> work. This may well be because I have mistyoed something.

OK we'll work back to front on this one.

> Is there any documentation which directly relates to using PHP with MySQL?

Yes. Loads. Really. google -> "mysql php tutorial" should turn up bucket loads 
of the stuff.

> The screen displays the icons and the connection message but nothing else

It's good to isolate the parts of the log which indicates the error on hand

> The error log from apache is:
> [Fri Jun 07 16:07:55 2002] [info] Parent: Created child process -1734187
> [Fri Jun 07 16:07:55 2002] [info] Parent: Duplicating socket 104 and
> sending it to child process -1734187
> [Fri Jun 07 16:07:56 2002] [info] BytesRead = 372 WSAProtocolInfo = 020

Which is really just this one line:
> [Fri Jun 07 16:08:38 2002] [error] PHP Warning:  Invalid argument supplied
> for foreach() in c:\usr\www\my-domain\cataloguerangeslist.php on line 27

And again because you ran the script again:
> [Fri Jun 07 16:09:43 2002] [error] PHP Warning:  Invalid argument supplied
> for foreach() in c:\usr\www\my-domain\cataloguerangeslist.php on line 27

The error suggests something is wrong on line 27. Which is this part here:

>   foreach($result as $row){
>  echo ' href="delete.php?id='.$row[catalogue_range_key].'">'.$row[sg_start_number].
>' ';
>  }

Please in future if the error messages mention a line number, _do_ indicate on 
your code which line that is.

OK the error says that the argument(s) supplied to foreach is incorrect. 
Reading the manual entry for foreach() should reveal that the argument in 
question is $result. Where is $result being set?

Here:

> $result = mysql_query("SELECT * FROM CATALOGUE_RANGES");

Reading the manual entry for mysql_query() reveals that it returns a "resource 
identifier". Further it says " mysql_query() returns a new result identifier 
that you can pass to mysql_fetch_array() and other functions dealing with 
result tables".

> Can anyone please tell me what the problem is.

Basically as it stands, $result is a pointer to a set of results returned from 
the DB. To get at the actual results themselves you need to run 
mysql_fetch_array() (or similar, see manual).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
This week only, all our fiber-fill jackets are marked down!
*/


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