[PHP] how to get id from table I just inserted into

2002-10-10 Thread Pablo Oliva

I have a mysql db with a particular table that I am inserting into.
This table has an id column that auto-increments.  Is it possible to get
the id of the row that I just inserted into, without re-querying???

The problem that I have is that the data being inserted will be
identical for several rows, and hence there is no way to assure that
when I query with certain parameters that a unique row, the row that I
just inserted, will be returned.  The only way that I can think of doing
this is by creating a timestamp as an identifying piece.  Am I making
any sense?


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




Re: [PHP] how to get id from table I just inserted into

2002-10-10 Thread Jason Wong

On Thursday 10 October 2002 15:37, Pablo Oliva wrote:
> I have a mysql db with a particular table that I am inserting into.
> This table has an id column that auto-increments.  Is it possible to get
> the id of the row that I just inserted into, without re-querying???

rftm, mysql_insert_id().

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

/*
Consider well the proportions of things.  It is better to be a young June-bug
than an old bird of paradise.
-- Mark Twain, "Pudd'nhead Wilson's Calendar"
*/


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




[PHP] how to ping

2002-10-10 Thread Achi

Hi

 how to ping by PHP  ???   
I wanna to ping some hosts and get echo back. 
 thanx.


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




RE: [PHP] how to ping

2002-10-10 Thread Timothy J Hitchens

Use a call out to a shell ... eg

$result = `ping x.xy.z.i`;

oh and you may need to use a path and capture the stand out.. as well.



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Achi [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 12:18 AM
To: Daniel Kushner; 'Muhammad Khairuzzaman'; [EMAIL PROTECTED]
Subject: [PHP] how to ping 


Hi

 how to ping by PHP  ???   
I wanna to ping some hosts and get echo back. 
 thanx.


-- 
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




Re: [PHP] how to create files??

2002-10-10 Thread Aidal

I'm using the following function to create the files. the function is part
of a class so "$this->somthing" refers to somthing in that class:

function create_file($file_name) {
if (!$this->fp = fopen($file_name, wb)) {
$this->error_msg .= $this->error_create . ' ' . $file_name;
return false;
} else {
$this->file = $file_name;
return $this->fp;
}
}

Also the script using this class is in the http-server-root and includes
this class. the include file isn't in the http-server-root, but that
shouldn't have any effect since it's not the include file that calls to
function.

The calling script: http-server-root
The include class: http-server-root\nef
Where I want to create files: http-server-root\nef\articles

Hope this gave you a better chance of helping me out :)

~ Aidal


"Timothy J Hitchens" <[EMAIL PROTECTED]> wrote in message
006b01c26f7a$28ffa110$0500a8c0@BAMBINO">news:006b01c26f7a$28ffa110$0500a8c0@BAMBINO...
> If the script is in the same directory just try either "{file}" nothing
> in front or "./{file}"
>
> What function are you using to create files?
>
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: Aidal [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 9 October 2002 4:24 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] how to create files??
>
>
> Hi NG.
>
> I'm having problems creating files at a certain location.
> If I attemt to create a file it gets created in the rootdir (htdocs)
> even though I add a path infront of the file name. I've tried severel
> ways of adding a path (with "/" and "\\") but nothing works.
>
> eksample: "/nef/articles/54.txt"
>
> File 54.txt gets created but not at the intented location, instead it
> gets created in htdocs.
>
> Can anyone help me by telling me how I'm suppose to do this? I'm running
> PHP on Win98 with Apache.
>
> ~ Aidal
>
>
>
> --
> 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] Embed C in PHP

2002-10-10 Thread arun kv

hai is it possible to embed C code in PHP as we do in PostGreSQL using
ecpg. if so how do i go about.
 thanks
 Arun



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




[PHP] how can i work with trace an IP or host ?

2002-10-10 Thread yasin inat

hii 
Ý've  tried  a  trace  practice   but  it  doesnt  work ...
my  server  NT5   on  W2K 

local  testing  W2K  apache2.0.40
i've   been  to  work  it  on  my  local  testing  server  

it  return's  a  failure  that :

Warning:  Unable to fork [tracert dummyhost.com] in
D:\inetweb\agencyturk\uziletim.com\uziletim.com\php\trace.php on line 26

url  :
http://www.uziletim.com/php/trace.php

where  is  my  wrong ?  i  couldn't  understand  it  clearly  ?

maybe  www  server  has  no  tracert.exe  ?




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




Re: [PHP] Animation in PHP

2002-10-10 Thread Marek Kilimajer

This cannot be done in php, but in javascript. I won't tell you how, 
because I'm lazy

arun kv wrote:

>
>  hai ,
>   I want to create an animated line in php from (x,y) to (x1,y1).will
>  php support animation.if so how do i go about in doing this.how do i
>  draw a char so that it keeps on changing colors till i close browser.
>  thanks for help
> Arun
>
>
>
>
>
>
>  
>


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




php-general Digest 10 Oct 2002 10:24:20 -0000 Issue 1635

2002-10-10 Thread php-general-digest-help


php-general Digest 10 Oct 2002 10:24:20 - Issue 1635

Topics (messages 119465 through 119508):

Re: My boss wants to know...
119465 by: Timothy J Hitchens
119469 by: John W. Holmes

Re: 4.2.2 > 4.2.3 - Incompatibility
119466 by: Liam MacKenzie

Re: Encrypting passwords in a flat file before import
119467 by: Brad Bonkoski

ASP Option Explicit equivalent in PHP
119468 by: R. Z.
119471 by: John W. Holmes
119472 by: Marco Tabini
119473 by: Nick Eby
119474 by: Nick Eby

Re: Object methods - memory usage?
119470 by: John W. Holmes

Re: Image problem
119475 by: Owen Prime

problem with SUM and Postgres
119476 by: webmaster
119477 by: Marco Tabini
119478 by: Marco Tabini

CC Processing Merchants
119479 by: Andrew Brampton
119480 by: Jarrad Kabral
119492 by: Peter J. Schoenster
119496 by: Joshua Alexander
119498 by: olinux

Re: Found the problem with the libmcrypt.
119481 by: Tom Rogers

PHP problem
119482 by: Miguel Brás
119483 by: John W. Holmes

Re: POST method not allowed
119484 by: Tom Rogers

displaying a select number of rows from a sql query
119485 by: Keith Posehn
119486 by: Owen Prime

Extract HTML tags
119487 by: Shawn McKenzie
119488 by: Smith, Benjamin
119489 by: Owen Prime
119491 by: Jonathan

Multi-Dimensional Arrays
119490 by: Jonathan Duncan
119497 by: Jonathan

Re: MySQL back up
119493 by: Ken
119495 by: Owen Prime

Re: Undefined variable
119494 by: Steve Yates

Animation in PHP
119499 by: arun kv
119500 by: arun kv
119508 by: Marek Kilimajer

how to get id from table I just inserted into
119501 by: Pablo Oliva
119502 by: Jason Wong

how to ping
119503 by: Achi
119504 by: Timothy J Hitchens

Re: how to create files??
119505 by: Aidal

Embed C in PHP
119506 by: arun kv

how can i work with trace an IP or host ?
119507 by: yasin inat

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 ---

Look at the odbc access using php:

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

You will still need to have a windows box with odbc to your
webserver.. pref unixish..



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Randum Ian [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] My boss wants to know...


Hi guys, got a tricky question here and I know I will probably get
flamed for asking it here but here goes!

My boss wants me to put a large Access database onto the net so that
people can query it both from the company and from the outside and he
wants to be able to have the database up to date and also easy to
change.

As far as I can see that leaves me with only Active Server Pages in
which to access this database or am I wrong?

Randum Ian
[EMAIL PROTECTED]
DJ / Reviewer / Webmaster, DancePortal (UK) Limited 
DancePortal.co.uk - Global dance music media




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



--- End Message ---
--- Begin Message ---

> Hi guys, got a tricky question here and I know I will probably get
> flamed for asking it here but here goes!
> 
> My boss wants me to put a large Access database onto the net so that
> people can query it both from the company and from the outside and he
> wants to be able to have the database up to date and also easy to
> change.
> 
> As far as I can see that leaves me with only Active Server Pages in
> which to access this database or am I wrong?

You can use PHP, of course. ODBC or COM.

Here is an example some program automatically created that shows how to
connect to and query an Access database:

$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$conn->Open("Driver={Microsoft Access Driver (*.mdb)};Dbq="
.realpath("datab/test.mdb"). ";Password=;");
$SQL="SELECT COUNT(*) AS Count FROM test";
$countx = 0;
$rs = $conn->Execute("$SQL");
while (!$rs->EOF) {
$countx = $rs->Fields("Count");

---John Holmes...



--- End Message ---
--- Begin Message ---

Well, just in case anyone's interested...

My problem was fixed by just compiling PHP as a standard module, not APXS.



- Original Message -
From: "Liam MacKenzie" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Tuesday, October 08, 2002 10:37 PM
Subject: Re: [PHP] 4.2.2 > 4.2.3 - Incompatibility


Another note, phpMyAdmin causes a segmentation fault as well...

APACHE:
--
./configure \
"-

Re: [PHP] Embed C in PHP

2002-10-10 Thread Marek Kilimajer

No, it is not possible, you have to use executables or write your own 
module.

arun kv wrote:

>hai is it possible to embed C code in PHP as we do in PostGreSQL using
>ecpg. if so how do i go about.
> thanks
> Arun
>
>
>
>  
>


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




[PHP] preg_match_all problem

2002-10-10 Thread Etienne SEITER

Hi, I'm a frog (french),

I,ve some troubles with the preg_match_all function.

  
  $strSearchWords = Trim($search);
 $pattern = $strSearchWords;

andwhile (!feof($openFile))
 {
  $strFileContents .= fgets($openFile, 4096);
  }

$strPageTitle = htmlentities(GetFileMetaTag("",
"", $strFileContents));
$strPageDescription = htmlentities(GetFileMetaTag("", $strFileContents));
$strPageKeywords = htmlentities(GetFileMetaTag("", $strFileContents));
$strFileContents = $strPageTitle." ".$strPageDescription."
".$strPageKeywords;
$strFileContents = str_replace("; ","  ",$strFileContents);
$strFileContents = str_replace(",","  ",$strFileContents);

then I get the following warning message:

Delimiter must not be alphanumeric or backslash in  :
if (preg_match_all($pattern,$strFileContents,$match) > 0)

WHAT CAN I DO ???



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




Re: [PHP] preg_match_all problem

2002-10-10 Thread Archibald Zimonyi


> Hi, I'm a frog (french),
> 
> I,ve some troubles with the preg_match_all function.
> 
>   
>   $strSearchWords = Trim($search);
>  $pattern = $strSearchWords;
> 
> andwhile (!feof($openFile))
>  {
>   $strFileContents .= fgets($openFile, 4096);
>   }
> 
> $strPageTitle = htmlentities(GetFileMetaTag("",
> "", $strFileContents));
> $strPageDescription = htmlentities(GetFileMetaTag(" name=\"description\" content=\"", "\">", $strFileContents));
> $strPageKeywords = htmlentities(GetFileMetaTag(" name=\"keywords\" content=\"", "\">", $strFileContents));
> $strFileContents = $strPageTitle." ".$strPageDescription."
> ".$strPageKeywords;
> $strFileContents = str_replace("; ","  ",$strFileContents);
> $strFileContents = str_replace(",","  ",$strFileContents);
> 
> then I get the following warning message:
> 
> Delimiter must not be alphanumeric or backslash in  :
> if (preg_match_all($pattern,$strFileContents,$match) > 0)
> 
> WHAT CAN I DO ???
> 
I had this problem only a day ago. You have forgotten to add slashes to
your pattern. The variable $pattern looks something like this:

"\d+\s"

when it should look like this:

"/\d+\s/"

Hope that was helpful,

Archie

---
Archibald Zimonyi
[EMAIL PROTECTED]

"There is no logic like no logic"


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




[PHP] How to do Date Calculation

2002-10-10 Thread Jack

Dear all
I'm trying to make a script which will show the month before current month!
Is there anyway i can do this?

Example :

CurrentPervious

OctoberSeptember

Thx a lot
Jack
[EMAIL PROTECTED]



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




Re: [PHP] Re: Object methods - memory usage?

2002-10-10 Thread Bogdan Stancescu


Heh, I should probably be mad at your reply - but I'm not, I'm objective 
enough to realize I could've replied the same way to a whining message 
like mine below. What I AM mad about is the reply of rest of the people 
on this list. And that's not because nobody replied to this question 
alone, but because this is the third (or so) question I ask on this 
list, and it's the third time I get no reply.

And yes, I know I'm not paying for support so there's no guarantee for 
any, but c'mon, we're humans, you'd be annoyed as well if this happened 
to you, especially since there are few unanswered questions here.

Anyway, I don't expect this message to gain me a reply to my original 
question - just wanted to explain myself for whoever has the curiosity 
to find out why I reacted like that. There.

Bogdan

John W. Holmes wrote:
> OK.
> 
> 
>>-Original Message-
>>From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, October 09, 2002 4:30 PM
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] Re: Object methods - memory usage?
>>
>>Well, I guess my questions are just too stupid to deserve an answer
>>anyway. Sorry for spamming you guys with my retarded questions! I'll
>>refrain from asking any more questions on this list in the future,
> 
> since
> 
>>I always seem to ask the wrong ones.
>>
>>Humbly yours,
>>Bogdan
>>
>>Bogdan Stancescu wrote:
>>
>>>Hello!
>>>
>>>Ok, this is probably a very stupid question for someone who knows
> 
> how
> 
>>>these things work internally - but I don't, therefore I ask. :)
>>>
>>>When I instantiate an object, do the methods get instantiated as
> 
> well?
> 
>>>The question is asked memory-wise, not functionality-wise. More to
> 
> the
> 
>>>point, if I instantiate many identical objects with no class
> 
> variables
> 
>>>of their own but with many methods, will I get memory used up for
> 
> the
> 
>>>methods?
>>>
>>>If I were to guess, I'd say no extra memory is used for the methods
>>>since I don't think you can dynamically redefine class methods, so
> 
> there
> 
>>>would be no reason for duplicating them instead of simply
> 
> referencing
> 
>>>the class definition - but then again, I don't know how PHP works
>>>internally...
>>>
>>>Thank you!
>>>
>>>Bogdan
>>>
>>
>>
>>--
>>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




Re: [PHP] How to do Date Calculation

2002-10-10 Thread Jason Wong

On Thursday 10 October 2002 18:37, Jack wrote:
> Dear all
> I'm trying to make a script which will show the month before current month!
> Is there anyway i can do this?
>
> Example :
>
> CurrentPervious
>
> OctoberSeptember

date("F", strtotime("last month"));

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

/*
You will be aided greatly by a person whom you thought to be unimportant.
*/


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




Re: [PHP] Re: Object methods - memory usage?

2002-10-10 Thread Chris Hewitt

Bogdan Stancescu wrote:

> Anyway, I don't expect this message to gain me a reply to my original 
> question - just wanted to explain myself for whoever has the curiosity 
> to find out why I reacted like that. There.

There are many reasons why people do not reply. In my case it is sheer 
ignorance, I don't know the answer or anything that can help.

You are asking questions about how the internals of php work, I imagine 
most on this list are users rather than php developers. Unless I had 
examined extensively the source code, I would not know the answers to 
what you ask.

The php-dev list sounds the sort of place where most will have examined 
the source code, though whether it is a good idea to ask there I do not 
know. At least, being open source, it is possible to look at it yourself 
if you do not find anyone who does know.

Regards

Chris


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




Re: [PHP] How to do Date Calculation

2002-10-10 Thread Noodle Snacks


"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thursday 10 October 2002 18:37, Jack wrote:
> > Dear all
> > I'm trying to make a script which will show the month before current
month!
> > Is there anyway i can do this?
> >
> > Example :
> >
> > CurrentPervious
> >
> > OctoberSeptember
>
> date("F", strtotime("last month"));
To find more about PHP's date/time functions go here:

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

in particular look at:

date() -- Format a local time/date
mktime() -- Get UNIX timestamp for a date
time() -- Return current UNIX timestamp
strtotime() --  Parse about any English textual datetime description into a
UNIX timestamp


--
JJ Harrison
[EMAIL PROTECTED]



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




[PHP] DB speed

2002-10-10 Thread Uros Gruber

Hi!

 I'm making some testing over DB.php  (PEAR)

 And i wan't to know if this is normal.

 I've made some script where I connect do SQL server
 and execute one simple (1row) query.

 I use pgsql and mysql. tables and indexes are same for both
 servers. So test table is identical

 Whe i execute those script i get some timing results

PGSQL
Total time: 0.0576
Execution time: 0.0185

MySQL
Total time: 0.0086
Execution time: 0.0028 

Time is in seconds.

My machine is PIII 333 MHz with 128MB RAM. I table is only 3
rows of data.

I want to know why is sucsh diference. Both servers runing
with socket connections and using connnect (non-persistant)

-- 
tia,
 Uros  mailto:[EMAIL PROTECTED]


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




RE: [PHP] Re: MySQL back up

2002-10-10 Thread John W. Holmes

> Okay here is the new code and this is still not working.
> 
>  
> require("./config.php");
> 
> $sqlserver = $server1;
> $sqlusername = $username1;
> $sqlpassword = $password1;
> $sqldatabase = $database1;
> 
> //**
> $nam_bak=date('D,d-m-Y');

Can you have a filename with a comma in it?

> exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\"
>
> $backupdir/$nam.sql");

Take out the \" quotes around username, password, and database.

> 
> exec("gzip $backupdir/$nam.sql");

---John Holmes...



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




RE: [PHP] Re: MySQL back up

2002-10-10 Thread Daniel Masson

Ken ..

You have to replace

exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\" >
$backupdir/$nam.sql");

With this

exec("mysqldump -u \"$sqlusername\" --password=\"$sqlpassword\"
\"$sqldatabase\" > $backupdir/$nam.sql");

Please not the space after -u

And i agree owen about

2. $backupdir MUST BE writeable by apache

IT HAS TO WORK MAN !!


Cordialmente
Daniel Massón => Ingeniero de desarollo
[EMAIL PROTECTED]
www.imagine.com.co
Tels: (57)(1) 2182064 - 6163218
Bogotá - Colombia

- Soluciones web para internet e intranet
- Asesoría y Soporte Técnico
- Licenciamiento de Software 
 



-Mensaje original-
De: Ken [mailto:[EMAIL PROTECTED]] 
Enviado el: miércoles, 09 de octubre de 2002 22:36
Para: [EMAIL PROTECTED]
Asunto: Re: [PHP] Re: MySQL back up


Okay here is the new code and this is still not working.


$backupdir/$nam.sql");

exec("gzip $backupdir/$nam.sql");

?>



-- 
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




RE: [PHP] Animation in PHP

2002-10-10 Thread Daniel Masson

No way man !!





  hai ,
   I want to create an animated line in php from (x,y) to
(x1,y1).will
  php support animation.if so how do i go about in doing this.how do i
  draw a char so that it keeps on changing colors till i close browser.
  thanks for help
 Arun






-- 
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] private and public in class objects

2002-10-10 Thread electroteque

hi i was wondering when this was or is going to be implemented into class
objects ? i have the syntax for it ie setting a private function _function()
and private var $_var, it doesnt seem to be working in PHP 4.2.2 ?



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




RE: [PHP] DB speed

2002-10-10 Thread Simon Taylor

Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
got variable results from different db's - even got an odbc connection to
access to run faster than mysql at one stage!! - something tells me there
are other factors contributing..
Cheers
Simon

-Original Message-
From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
Sent: 10 October 2002 14:17
To: [EMAIL PROTECTED]
Subject: [PHP] DB speed


Hi!

 I'm making some testing over DB.php  (PEAR)

 And i wan't to know if this is normal.

 I've made some script where I connect do SQL server
 and execute one simple (1row) query.

 I use pgsql and mysql. tables and indexes are same for both  servers. So
test table is identical

 Whe i execute those script i get some timing results

PGSQL
Total time: 0.0576
Execution time: 0.0185

MySQL
Total time: 0.0086
Execution time: 0.0028 

Time is in seconds.

My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.

I want to know why is sucsh diference. Both servers runing
with socket connections and using connnect (non-persistant)

-- 
tia,
 Uros  mailto:[EMAIL PROTECTED]


-- 
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




RE: [PHP] DB speed

2002-10-10 Thread tuxen

I think i read something a while ago, about mysql being faster, having
less features, but postgres being a little slower but able to handle
LARGE databases better than mysql. I could be wrong, so dont take my
word for it. At the end of the day they are both good db's.

On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
> Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
> got variable results from different db's - even got an odbc connection to
> access to run faster than mysql at one stage!! - something tells me there
> are other factors contributing..
> Cheers
> Simon
> 
> -Original Message-
> From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
> Sent: 10 October 2002 14:17
> To: [EMAIL PROTECTED]
> Subject: [PHP] DB speed
> 
> 
> Hi!
> 
>  I'm making some testing over DB.php  (PEAR)
> 
>  And i wan't to know if this is normal.
> 
>  I've made some script where I connect do SQL server
>  and execute one simple (1row) query.
> 
>  I use pgsql and mysql. tables and indexes are same for both  servers. So
> test table is identical
> 
>  Whe i execute those script i get some timing results
> 
> PGSQL
> Total time: 0.0576
> Execution time: 0.0185
> 
> MySQL
> Total time: 0.0086
> Execution time: 0.0028 
> 
> Time is in seconds.
> 
> My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.
> 
> I want to know why is sucsh diference. Both servers runing
> with socket connections and using connnect (non-persistant)
> 
> -- 
> tia,
>  Uros  mailto:[EMAIL PROTECTED]
> 
> 
> -- 
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: site path

2002-10-10 Thread Bogdan Stancescu

I generally use both - the first for includes and the second for HTML links.

Do NOT include the trailing slash. The reason is simple:
Go home");
?>
is much simpler to write and follow than
Go home");
?>
because you obviously can't write
Go home");
?>

Please remember that since the trailing slash will be included in every 
use of this var, if your URL is the root then the variable will have to 
be empty! (otherwise you'll end up with a double slash at the beginning 
of every URL)

Bogdan

Wilmar Perez wrote:
> Hello guys
> 
> I'm just looking for some advise:  I've got a variable which I use to store 
> my site's main path.  Is it better to have it like this:
> 
> $site_path = "/my/web/path/"
> 
> or like this:
> 
> $site_path = "http://my_url.com/";
> 
> ?
> 
> What about the trailing slash?, should I use it or not?
> 
> I know these are simple question but haven't been able to get to an answer on 
> my own.
> 
> Thanks a lot
> 
> ***
>  Wilmar Pérez
>  Network Administrator
>Library System
>   Tel: ++57(4)2105145
> University of Antioquia
>Medellín - Colombia
>   2002
> ***
>  
>  


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




Re: [PHP] Found the problem with the libmcrypt.....

2002-10-10 Thread Scott Fletcher

Hello Tom!

Oh yea, I tried the '--with-mcrypt=../mcrypt-2.6.3' option and the PHP's
'./configure' stopped accepting the mcrypt stuffs.  After compiling and
installing it.  PHP got messed up and didn't work too well.  It took me many
times to find the workaround to it but they don't work.  So, I had no
choices but to go back to the default libmcrypt where PHP's '.configure'
accept the libmcrypt.  The problem is with the PHP './configure'.

I noticed on the PHP Manual, it stresses and make some point that libmcrypt
is to be used.  From the look of hte problem, I get the impression that PHP
is moving away from mcrypt and instead, lean toward the libmcrypt.  Well,
PHP developer have hell of a lot of work to do to fix the problem.  There's
nothing I can do about it because when I filed the bug report, the PHP
developer said it's not a bug and that I need to use the php.ini.  Problem
is php.ini didn't fix the problem too well.

So, I have no idea what am I suppose to do about it.  PHP Developer had some
choices and they choose to be slient on this issue,.so who am I to complain
about?  I also found that some other PHP users had some problem with the
'--with-mcrypt' features, so we're 'stuck on the log' and it will be that
way for a while.  I did get to read the PHP course code, mcrypt.h which is
found in the 'php-4.2.3/ext/mcrypt' directory.  Noticed that there's some
problem with the programming there because it listed some features that
should work on the machine but it didn't.  It also explain why phpinfo()
stopped working when trying to display the mcrypt information.  So, it is
obviously an PHP issues with the developer but they said it isn't, so what
am I gonna do about it?  It's their problem, not mine!


"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Thursday, October 10, 2002, 5:35:12 AM, you wrote:
> SF> Found the problem with libmcrypt-2.5.3.  When I configured PHP using
> SF> the --with-mcrypt option and the PHP configuration found libmcrypt
without a
> SF> problem.  After compiling and installing it.
>
> SF> Once I fired up Apache.  I checked the PHP Info using phpinfo()
function.
> SF> The mcrypt showed up but there is no support ciphers (algorithms &
modes).
> SF> So, I had to use the php.ini as the PHP Manual stated on
> SF> 'http://php.net/mcrypt'.  So, I added the two lines as shown in the
clipping
> SF> where libmcrypt was installed in.
>
> SF> --clip--
> SF> mcrypt.algorithms_dir = /usr/local/lib/libmcrypt
> SF> mcrypt.modes_dir = /usr/local/lib/libmcrypt
> SF> --clip--
>
> SF> That is when PHP Info showed the 'mcrypt.algorithms_dir' and
> SF> 'mcrypt.modes_dir' with data in it.  But the problem is I still get
the
> SF> error message when I tried any mcrypt function, the error message
range from
> SF> being unable to initalize the module to whatever the other error
messages
> SF> are.  I assumed there's a bug and filed a bug report to PHP but was
rejected
> SF> because I was told that I had the php.ini incorrect.  That doesn't
make
> SF> sense.  It took me a long time to find some clues to the problem.
What I
> SF> found is that with any files in the "/usr/local/lib/libmcrypt" that
end with
> SF> *.a and *.la, they don't work.  There is no *.c and *.h files in that
> SF> directory.
>
> SF> I discovered that when I set the php.ini to point to the untarred
libmcrypt
> SF> directory where *.c and *.h are found in both
> SF> '/usr/local/src4/libmcrypt-2.5.3/modules/algorithms' and
> SF> '/usr/local/src4/libmcrypt-2.5.3/modules/modes'.  That's when the
mcrypt
> SF> function start working without a problem.  The problem is PHP doesn't
work
> SF> with the *.la and *.a files.  Again, I saw the OpenSSL directory where
*.c
> SF> and *.h files are found in both the algorithms and modes directory of
the
> SF> '/usr/local/ssl/include/openssl/' directory, it work just fine too.
>
> SF> This had lead me to question of whether is there a bug in libmcrypt or
php.
> SF> You be the judge of it.  It would be so nice if this problem can be
> SF> resolved.  I'm not sure if I'm allowed to use the open source code
instead
> SF> of the compiled codes.
>
> You dont normally need to specify anything in php.ini for it to work
> just make sure you have
>
> --with-mcrypt=/usr/src/mcrypt-2.6.x (thats where it was untarred)
>
> when you configure php. I have it working with nothing set in php.ini
>
> --
> regards,
> Tom
>



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




[PHP] NewB PHP / mysql Q

2002-10-10 Thread inpho

Hi all,

I need a bit of quick help here
I've joined 2 tables together with this code here:

$result=mysql_query("select u.id, u.cid, u.lname, u.fname, u.vld, c.id,
c.cname from tblclient u, tblcompany c where u.vld=1 and u.cid = c.id",$db);

then I put it into an array:

while ($row=mysql_fetch_array($result)) {
print "$row[UName]$row[FName]
$row[LName]$row[cname]";
}

but the $row[xxx] aren't displaying any info, if I put $row[u.unam] it
returns an error. I run the SQL query in phpmyadmin and it runs fine,
returning 2 results
how do I access those results through an array???

- inpho -





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




RE: [PHP] NewB PHP / mysql Q

2002-10-10 Thread Timothy J Hitchens

Try this..

select u.id, u.lname as lastname, u.frname as firstname, ... etc

oh and the reason you get an error is that you can't have a dot in a
variable etc...



Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: inpho [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 4:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] NewB PHP / mysql Q


Hi all,

I need a bit of quick help here
I've joined 2 tables together with this code here:

$result=mysql_query("select u.id, u.cid, u.lname, u.fname, u.vld, c.id,
c.cname from tblclient u, tblcompany c where u.vld=1 and u.cid =
c.id",$db);

then I put it into an array:

while ($row=mysql_fetch_array($result)) {
print "$row[UName]$row[FName]
$row[LName]$row[cname]";
}

but the $row[xxx] aren't displaying any info, if I put $row[u.unam] it
returns an error. I run the SQL query in phpmyadmin and it runs fine,
returning 2 results how do I access those results through an array???

- inpho -





-- 
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




Re: [PHP] DB speed

2002-10-10 Thread Chris Hewitt

Simon Taylor wrote:

>Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
>got variable results from different db's - even got an odbc connection to
>access to run faster than mysql at one stage!! - something tells me there
>are other factors contributing..
>-Original Message-
>From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>Sent: 10 October 2002 14:17
>To: [EMAIL PROTECTED]
>Subject: [PHP] DB speed
>
>And i wan't to know if this is normal.
>PGSQL
>Total time: 0.0576
>Execution time: 0.0185
>
>MySQL
>Total time: 0.0086
>Execution time: 0.0028 
>
If the MySQL table is standard (not INNODB) then there are no 
transactions, thus is faster.  I have not tried tests on these two 
databases in particular, but some (e.g. Oracle), cache results so a 
second time of asking can be very much quicker than the first.

HTH
Chris



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




[PHP] connecting to a txt file - newbie

2002-10-10 Thread jennifer

good morning, im having some issues with the simple task of pulling from a
txt file.

my code is:


 
  job app
 db


  


and the txt file contains one line of bogus txt. you can see my results
here: http://www.villany2k1.com/text.php.

if anyone has any info as to what i am doing wrong, i would really
appreciate it.

thanks so much
jennifer
([EMAIL PROTECTED])



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




RE: [PHP] connecting to a txt file - newbie

2002-10-10 Thread Timothy J Hitchens

Try:





Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: jennifer [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 11 October 2002 12:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] connecting to a txt file - newbie


good morning, im having some issues with the simple task of pulling from
a txt file.

my code is:


 
  job app
 db


  


and the txt file contains one line of bogus txt. you can see my results
here: http://www.villany2k1.com/text.php.

if anyone has any info as to what i am doing wrong, i would really
appreciate it.

thanks so much
jennifer
([EMAIL PROTECTED])



-- 
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




Re: [PHP] How to do Date Calculation

2002-10-10 Thread Greg Macek

You could also check out this class someone wrote called Date_calc. It's
a nice frontend to all sorts of date calculations you may run across.
It's helping me quite a bit for my projects.

http://www.phpinsider.com/php/code/Date_Calc/

On Thu, 2002-10-10 at 06:04, Noodle Snacks wrote:
> 
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Thursday 10 October 2002 18:37, Jack wrote:
> > > Dear all
> > > I'm trying to make a script which will show the month before current
> month!
> > > Is there anyway i can do this?
> > >
> > > Example :
> > >
> > > CurrentPervious
> > >
> > > OctoberSeptember
> >
> > date("F", strtotime("last month"));
> To find more about PHP's date/time functions go here:
> 
> http://www.php.net/manual/en/ref.datetime.php
> 
> in particular look at:
> 
> date() -- Format a local time/date
> mktime() -- Get UNIX timestamp for a date
> time() -- Return current UNIX timestamp
> strtotime() --  Parse about any English textual datetime description into a
> UNIX timestamp
> 
> 
> --
> JJ Harrison
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> 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




Re: [PHP] How to do Date Calculation

2002-10-10 Thread Aaron Gould

This is actually in PEAR.  I use this all the time for my date calculations.

Just use this code in your script and you'll have access to all the
Date_Calc functions...

   include("Date/Calc.php")
   $dc = new Date_Calc;
   $dc->[Date_Calc_Function1];
   $dc->[Date_Calc_Function2];
   $dc->[Date_Calc_Function3];
   etc, etc

--
Aaron Gould
Web Developer
Parts Canada


- Original Message -
From: "Greg Macek" <[EMAIL PROTECTED]>
To: "Noodle Snacks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 10:29 AM
Subject: Re: [PHP] How to do Date Calculation


> You could also check out this class someone wrote called Date_calc. It's
> a nice frontend to all sorts of date calculations you may run across.
> It's helping me quite a bit for my projects.
>
> http://www.phpinsider.com/php/code/Date_Calc/
>
> On Thu, 2002-10-10 at 06:04, Noodle Snacks wrote:
> >
> > "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > On Thursday 10 October 2002 18:37, Jack wrote:
> > > > Dear all
> > > > I'm trying to make a script which will show the month before current
> > month!
> > > > Is there anyway i can do this?
> > > >
> > > > Example :
> > > >
> > > > CurrentPervious
> > > >
> > > > OctoberSeptember
> > >
> > > date("F", strtotime("last month"));
> > To find more about PHP's date/time functions go here:
> >
> > http://www.php.net/manual/en/ref.datetime.php
> >
> > in particular look at:
> >
> > date() -- Format a local time/date
> > mktime() -- Get UNIX timestamp for a date
> > time() -- Return current UNIX timestamp
> > strtotime() --  Parse about any English textual datetime description
into a
> > UNIX timestamp
> >
> >
> > --
> > JJ Harrison
> > [EMAIL PROTECTED]
> >
> >
> >
> > --
> > 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] who's in the chat?

2002-10-10 Thread Oliver Witt

Hi all,
Here's my problem:
I created a web site with a chat. People have to log in to get on the
site, but not to get into the chat. I can tell who's on the site but not
in the chat. Is there anywhy to tell who's in the chat?
Thanks,
Olli


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




Re: [PHP] Re: site path

2002-10-10 Thread @ Edwin

Just a thought...

If you're going to write an XHTML compatible code, you wouldn't really have
this problem -->

>echo("Go home");

since you'll probably write something like this:

  echo 'Go home';

Of course, I didn't mean that you can't do that with HTML...

Anyway, for the original question, I think, you shouldn't really add
"http://"; to every link that points to the same site. Most probably, the
browser and the server can handle the request faster since *I think* it
doesn't need to query a DNS server for each request. I'm not sure about this
one though... :( Need more research...

- E

On Thursday, October 10, 2002 10:18 PM
Bogdan Stancescu wrote:

> I generally use both - the first for includes and the second for HTML
links.
>
> Do NOT include the trailing slash. The reason is simple:
> echo("Go home");
> ?>
> is much simpler to write and follow than
> echo("Go home");
> ?>
> because you obviously can't write
> echo("Go home");
> ?>
>
> Please remember that since the trailing slash will be included in every
> use of this var, if your URL is the root then the variable will have to
> be empty! (otherwise you'll end up with a double slash at the beginning
> of every URL)
>
> Bogdan
>
> Wilmar Perez wrote:
> > Hello guys
> >
> > I'm just looking for some advise:  I've got a variable which I use to
store
> > my site's main path.  Is it better to have it like this:
> >
> > $site_path = "/my/web/path/"
> >
> > or like this:
> >
> > $site_path = "http://my_url.com/";
> >
> > ?
> >
> > What about the trailing slash?, should I use it or not?
> >
> > I know these are simple question but haven't been able to get to an
answer on
> > my own.
> >
> > Thanks a lot
> >
> > ***
> >  Wilmar Pérez
> >  Network Administrator
> >Library System
> >   Tel: ++57(4)2105145
> > University of Antioquia
> >Medellín - Colombia
> >   2002
> > ***
> >
> >
>
>
> --
> 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] Problems with Fileupload

2002-10-10 Thread Sascha Braun

Hi freaks,

my image library isn't still finished yet, but it's running and with a
running system are comming new problems up.

I remember that there was a discussion about big file uploads.

It seems, that i stepped into the same trap, 'cause my web-
server doesn't accept more than two uploads each upload
session. I wrote a script which should make it possible to
upload 10 files at a time. The files are up to 3 MB each so
I had to set up the upload_max_filesize in php.ini to an 
amount of 50 MB Data. But it seems, that there still can
be uploaded about 5 or 6 MB in two files at a time.

Would be nice if somebody could tell me about made
experiences.

Thank you very much.

Sascha Braun



[PHP] Re: who's in the chat?

2002-10-10 Thread Jason Young

What's the chat built in? Is this web-page-based, telnet-based?
Is this your code (i.e. you have access to the source and can modify it 
on-the-fly)?



Oliver Witt wrote:
> Hi all,
> Here's my problem:
> I created a web site with a chat. People have to log in to get on the
> site, but not to get into the chat. I can tell who's on the site but not
> in the chat. Is there anywhy to tell who's in the chat?
> Thanks,
> Olli
> 


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




[PHP] Re: who's in the chat?

2002-10-10 Thread Oliver Witt

Jason Young schrieb:

> What's the chat built in? Is this web-page-based, telnet-based?
> Is this your code (i.e. you have access to the source and can modify it
> on-the-fly)?
>
> Oliver Witt wrote:
> > Hi all,
> > Here's my problem:
> > I created a web site with a chat. People have to log in to get on the
> > site, but not to get into the chat. I can tell who's on the site but not
> > in the chat. Is there anywhy to tell who's in the chat?
> > Thanks,
> > Olli
> >

Yeah, I wrote the chat, it's php. I have access to everything.
Olli



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




[PHP] Re: Problems with Fileupload

2002-10-10 Thread Jason Young

Hmm.. I have a page where I can upload up to 9 files at once -- and it 
works quite well..

However, these are just standard JPG pictures, and wouldn't get anywhere 
near 3M -- maybe its the way that PHP scripts time out after 30 seconds??

--Jason

Sascha Braun wrote:
> Hi freaks,
> 
> my image library isn't still finished yet, but it's running and with a
> running system are comming new problems up.
> 
> I remember that there was a discussion about big file uploads.
> 
> It seems, that i stepped into the same trap, 'cause my web-
> server doesn't accept more than two uploads each upload
> session. I wrote a script which should make it possible to
> upload 10 files at a time. The files are up to 3 MB each so
> I had to set up the upload_max_filesize in php.ini to an 
> amount of 50 MB Data. But it seems, that there still can
> be uploaded about 5 or 6 MB in two files at a time.
> 
> Would be nice if somebody could tell me about made
> experiences.
> 
> Thank you very much.
> 
> Sascha Braun
> 


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




[PHP] Re: who's in the chat?

2002-10-10 Thread Jason Young

Without knowing how your chat works as far as entering the chat, you DO 
have to put some sort of name with the person, right?  Perhaps you could 
just update a temp table with their chat name..

Or if you can only get into chat by logging into the site, you could 
just set a bit with their cookie data or something..

Is this not what you wanted to do? (I guess I should have asked you to 
elaborate :) )

Just throwing suggestions out there
-Jason

Oliver Witt wrote:
> Jason Young schrieb:
> 
> 
>>What's the chat built in? Is this web-page-based, telnet-based?
>>Is this your code (i.e. you have access to the source and can modify it
>>on-the-fly)?
>>
>>Oliver Witt wrote:
>>
>>>Hi all,
>>>Here's my problem:
>>>I created a web site with a chat. People have to log in to get on the
>>>site, but not to get into the chat. I can tell who's on the site but not
>>>in the chat. Is there anywhy to tell who's in the chat?
>>>Thanks,
>>>Olli
>>>
> 
> 
> Yeah, I wrote the chat, it's php. I have access to everything.
> Olli
> 
> 


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




[PHP] Re: who's in the chat?

2002-10-10 Thread Oliver Witt

Jason Young schrieb:

> Without knowing how your chat works as far as entering the chat, you DO
> have to put some sort of name with the person, right?  Perhaps you could
> just update a temp table with their chat name..
>
> Or if you can only get into chat by logging into the site, you could
> just set a bit with their cookie data or something..
>
> Is this not what you wanted to do? (I guess I should have asked you to
> elaborate :) )
>
> Just throwing suggestions out there
> -Jason
>

I've been trying something similar like that. How can I update a temp table
when they enter and leave the chat? That's my problem,
Olli




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




RE: [PHP] Re: who's in the chat?

2002-10-10 Thread James E Hicks III

My chat stores usernames, timestamps in a table on DB. When refresh script runs,
it updates the timestamp on usernames and deletes rows in DB with stale
timestamps (no refresh run). Pulling usernames from this table gives current
chat users.

James


-Original Message-
From: Oliver Witt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 11:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: who's in the chat?


Jason Young schrieb:

> Without knowing how your chat works as far as entering the chat, you DO
> have to put some sort of name with the person, right?  Perhaps you could
> just update a temp table with their chat name..
>
> Or if you can only get into chat by logging into the site, you could
> just set a bit with their cookie data or something..
>
> Is this not what you wanted to do? (I guess I should have asked you to
> elaborate :) )
>
> Just throwing suggestions out there
> -Jason
>

I've been trying something similar like that. How can I update a temp table
when they enter and leave the chat? That's my problem,
Olli




--
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] Re: who's in the chat?

2002-10-10 Thread Jason Young

Well, when they enter, when its building all of the frames or however 
you ahd it set up.. just throw an INSERT in there..

Do you know if the chat patrons use the 'leave' button? That could throw 
out another SQL statement, or put it wherever you have your unload 
functions...

-J

Oliver Witt wrote:
> Jason Young schrieb:
> 
> 
>>Without knowing how your chat works as far as entering the chat, you DO
>>have to put some sort of name with the person, right?  Perhaps you could
>>just update a temp table with their chat name..
>>
>>Or if you can only get into chat by logging into the site, you could
>>just set a bit with their cookie data or something..
>>
>>Is this not what you wanted to do? (I guess I should have asked you to
>>elaborate :) )
>>
>>Just throwing suggestions out there
>>-Jason
>>
> 
> 
> I've been trying something similar like that. How can I update a temp table
> when they enter and leave the chat? That's my problem,
> Olli
> 
> 
> 


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




Re: [PHP] Re: who's in the chat?

2002-10-10 Thread Oliver Witt

James E Hicks III schrieb:

> My chat stores usernames, timestamps in a table on DB. When refresh script runs,
> it updates the timestamp on usernames and deletes rows in DB with stale
> timestamps (no refresh run). Pulling usernames from this table gives current
> chat users.
>
> James
>

That's a cool idea, I'll try that.
Thanks,
Olli





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




[PHP] Re: who's in the chat?

2002-10-10 Thread Oliver Witt

Jason Young schrieb:

> Well, when they enter, when its building all of the frames or however
> you ahd it set up.. just throw an INSERT in there..
>
> Do you know if the chat patrons use the 'leave' button? That could throw
> out another SQL statement, or put it wherever you have your unload
> functions...
>
> -J
>
>

The problem is when they leave. There is no leave button because most of them
wouldn't use it anyway.
Olli





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




Re: [PHP] Multi-Dimensional Arrays

2002-10-10 Thread Jonathan Duncan

Yeah, you rock, that works great.  Not to mention you have a great name.

Jonathan Duncan


"Jonathan Sharp" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> try doing this for each item:
>
> $cartArray[] = array('itemnumber' => $itemnumber, 'brand' => $brand,
> 'quantity' => $itemqty, 'name' => $itemname);
>
> -js
>
> Jonathan Duncan wrote:
> > I am trying to create an array to hold shopping cart information.  The
array
> > I am using is called "cartArray".  What I want to do is to define a
> > sub-array of cartArray with the information from one product.  Then the
next
> > time a product is added it appends then new information as a second
> > sub-array to cartArray and so forth.  Following is some code I have been
> > using to test with and so far PHP will let me use ".=" to append but
when I
> > try to call it back with "print_r" or echo array[][] only the first
entry is
> > returned.  Any ideas what I am doing wrong?
> >
> > 
> >  $brand="Brand1";
> >  $itemnumber="456789";
> >  $itemname="Some Item Name";
> >  $itemqty=3;
> >  $cartArray[] .= array(0=>array($itemnumber=>"$brand", "$itemqty",
> > "$itemname"));
> >  print_r($cartArray)."";
> >  $brand="Brand2";
> >  $itemnumber="123456";
> >  $itemname="Another Item Name";
> >  $itemqty=9;
> >  array_push($cartArray, array($itemnumber=>"$brand", "$itemqty",
> > "$itemname"));
> >  print_r($cartArray)."";
> >  echo $cartArray[0][0]."";
> > 
> >
> > Thank you,
> > Jonathan Duncan
> >
> >
> >
>
>
>



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




Re: [PHP] NewB PHP / mysql Q

2002-10-10 Thread 1LT John W. Holmes

The problem is that array keys are case sensitive. You can use what you've
got, but the case has to match what you're selecting in your query. I see
you are trying to use $row['UName'] but I don't see you selecting that in
your query.

---John Holmes...


- Original Message -
From: "Timothy J Hitchens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 9:33 AM
Subject: RE: [PHP] NewB PHP / mysql Q


> Try this..
>
> select u.id, u.lname as lastname, u.frname as firstname, ... etc
>
> oh and the reason you get an error is that you can't have a dot in a
> variable etc...
>
>
>
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
>
> HITCHO has Spoken!
>
>
>
>
>
>
> -Original Message-
> From: inpho [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 10 October 2002 4:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] NewB PHP / mysql Q
>
>
> Hi all,
>
> I need a bit of quick help here
> I've joined 2 tables together with this code here:
>
> $result=mysql_query("select u.id, u.cid, u.lname, u.fname, u.vld, c.id,
> c.cname from tblclient u, tblcompany c where u.vld=1 and u.cid =
> c.id",$db);
>
> then I put it into an array:
>
> while ($row=mysql_fetch_array($result)) {
> print "$row[UName]$row[FName]
> $row[LName]$row[cname]";
> }
>
> but the $row[xxx] aren't displaying any info, if I put $row[u.unam] it
> returns an error. I run the SQL query in phpmyadmin and it runs fine,
> returning 2 results how do I access those results through an array???
>
> - inpho -
>
>
>
>
>
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] displaying fixed number of records

2002-10-10 Thread DoL

Hi

I would like to fixed the number of records for example 10 to be display on
a web page.  That is when there is more than 10 records, I would like to
display a "2" for user to click on to display the second page starting with
record number 11, and so on.

Appreciate if someone can share their experience.

Thanks



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




Re: [PHP] displaying fixed number of records

2002-10-10 Thread Jason Wong

On Thursday 10 October 2002 23:41, DoL wrote:
> Hi
>
> I would like to fixed the number of records for example 10 to be display on
> a web page.  That is when there is more than 10 records, I would like to
> display a "2" for user to click on to display the second page starting with
> record number 11, and so on.

google -> php next previous database

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

/*
The 80's -- when you can't tell hairstyles from chemotherapy.
*/


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




RE: [PHP] Problems with Fileupload

2002-10-10 Thread Daniel Masson


Sascha:

I worked on a web based file share system, .. Users had to select the
file(s) to share and start uploading to the remote servers, had, timeout
problems, size problems, etc. This users are inside an intranet, so i
started to use the php ftp functions, so i placed the web based
application to a local server inside the intranet, and it could handle
the files very fast and big sizes, when this local server gets the files
starts to trnsfer via ftp functions of php to the remote server, ... So
that way i avoided the problems, doing direct upload to the remote
server.

I hope this is a little helpful to you.


Hi freaks,

my image library isn't still finished yet, but it's running and with a
running system are comming new problems up.

I remember that there was a discussion about big file uploads.

It seems, that i stepped into the same trap, 'cause my web- server
doesn't accept more than two uploads each upload session. I wrote a
script which should make it possible to upload 10 files at a time. The
files are up to 3 MB each so I had to set up the upload_max_filesize in
php.ini to an 
amount of 50 MB Data. But it seems, that there still can
be uploaded about 5 or 6 MB in two files at a time.

Would be nice if somebody could tell me about made
experiences.

Thank you very much.

Sascha Braun



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




Re: [PHP] Re: site path

2002-10-10 Thread Bogdan Stancescu

I'm not sure exactly what you're trying to point out - does XHTML 
require double quotes?

Bogdan

@ Edwin wrote:
> Just a thought...
> 
> If you're going to write an XHTML compatible code, you wouldn't really have
> this problem -->
> 
>>   echo("Go home");
> 
> 
> since you'll probably write something like this:
> 
>   echo 'Go home'; >
> Of course, I didn't mean that you can't do that with HTML...
> 
> Anyway, for the original question, I think, you shouldn't really add
> "http://"; to every link that points to the same site. Most probably, the
> browser and the server can handle the request faster since *I think* it
> doesn't need to query a DNS server for each request. I'm not sure about this
> one though... :( Need more research...
> 
> - E
> 
> On Thursday, October 10, 2002 10:18 PM
> Bogdan Stancescu wrote:
> 
> 
>>I generally use both - the first for includes and the second for HTML
> 
> links.
> 
>>Do NOT include the trailing slash. The reason is simple:
>>>   echo("Go home");
>>?>
>>is much simpler to write and follow than
>>>   echo("Go home");
>>?>
>>because you obviously can't write
>>>   echo("Go home");
>>?>
>>
>>Please remember that since the trailing slash will be included in every
>>use of this var, if your URL is the root then the variable will have to
>>be empty! (otherwise you'll end up with a double slash at the beginning
>>of every URL)
>>
>>Bogdan
>>
>>Wilmar Perez wrote:
>>
>>>Hello guys
>>>
>>>I'm just looking for some advise:  I've got a variable which I use to
> 
> store
> 
>>>my site's main path.  Is it better to have it like this:
>>>
>>>$site_path = "/my/web/path/"
>>>
>>>or like this:
>>>
>>>$site_path = "http://my_url.com/";
>>>
>>>?
>>>
>>>What about the trailing slash?, should I use it or not?
>>>
>>>I know these are simple question but haven't been able to get to an
> 
> answer on
> 
>>>my own.
>>>
>>>Thanks a lot
>>>
>>>***
>>> Wilmar Pérez
>>> Network Administrator
>>>   Library System
>>>  Tel: ++57(4)2105145
>>>University of Antioquia
>>>   Medellín - Colombia
>>>  2002
>>>***
>>>
>>>
>>
>>
>>--
>>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




Re: [PHP] Re: who's in the chat?

2002-10-10 Thread Chris Hewitt

Oliver Witt wrote:

>The problem is when they leave. There is no leave button because most of them
>wouldn't use it anyway.
>Olli
>
That is a problem with html, not a particular application. You have to 
time the visitor out.

HTH
Chris



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




[PHP] Problems pulling up a certain url with curl

2002-10-10 Thread Brandon Orther

Hello,
 
I am farely familar with the use of curl.  I have used it in the past
and it seems to be working going to test pages such as php.ner and so
on.  When I try to goto
https://members.ev1.net/rsmembers/english/index.asp?pge=ttick it doesn't
return any headers or html at all.  But if you got there in a browser it
shows up just fine.  Does anyone have any idead why it would do this?
 
Thanks,

 

Brandon Orther 

WebIntellects Design/Development Manager

  [EMAIL PROTECTED]
800-994-6364

  www.webintellects.com



 



Re: [PHP] Problems pulling up a certain url with curl

2002-10-10 Thread Marco Tabini

Did you compile curl from scratch? If so, did you enable https?


On Thu, 2002-10-10 at 12:13, Brandon Orther wrote:
> Hello,
>  
> I am farely familar with the use of curl.  I have used it in the past
> and it seems to be working going to test pages such as php.ner and so
> on.  When I try to goto
> https://members.ev1.net/rsmembers/english/index.asp?pge=ttick it doesn't
> return any headers or html at all.  But if you got there in a browser it
> shows up just fine.  Does anyone have any idead why it would do this?
>  
> Thanks,
> 
>  
> 
> Brandon Orther 
> 
> WebIntellects Design/Development Manager
> 
>   [EMAIL PROTECTED]
> 800-994-6364
> 
>   www.webintellects.com
> 
> 
> 
>  



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




[PHP] Echo Regular Expression Pattern

2002-10-10 Thread Mike Smith

I'm trying to return a pattern found in a regular expression. I can find the
Expression (Q followed by 6 numbers, yes MS Q articles) using this:

$GetLine = explode("\r", ereg_replace("Q+[0-9]{6}","http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6}\";
target=\"blank\">'Q+[0-9]{6}'",$Data[$n]));

I'm basically trying to find the pattern and 'replace' it with itself as a
clickable link to MS's Q articles so I need to insert "Q+[0-9]{6}" after
[LN]; in the href and then again as the text of the link. The script runs
but produces:

http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6} and echos
Q+[0-9]{6} as the clickable link.

Thanks,
Mike Smith



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




[PHP] Re: Found the problem with the libmcrypt.....

2002-10-10 Thread Scott Fletcher

Found another workaround to the libmcrypt problem.  What I did is to get
into the source directory that hold all of hte untarred source code.  I then
use the command, 'cp -r libmcrypt-2.5.3 /usr/local/lib' then I edit the
php.ini as shown 

 --clip--
mcrypt.algorithms_dir =  /usr/local/lib/libmcrypt-2.5.3/modules/algorithms
mcrypt.modes_dir =  /usr/local/lib/libmcrypt-2.5.3/modules/modes
--clip--

It work like a charm!!

"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Found the problem with libmcrypt-2.5.3.  When I configured PHP using
> the --with-mcrypt option and the PHP configuration found libmcrypt without
a
> problem.  After compiling and installing it.
>
> Once I fired up Apache.  I checked the PHP Info using phpinfo() function.
> The mcrypt showed up but there is no support ciphers (algorithms & modes).
> So, I had to use the php.ini as the PHP Manual stated on
> 'http://php.net/mcrypt'.  So, I added the two lines as shown in the
clipping
> where libmcrypt was installed in.
>
> --clip--
> mcrypt.algorithms_dir = /usr/local/lib/libmcrypt
> mcrypt.modes_dir = /usr/local/lib/libmcrypt
> --clip--
>
> That is when PHP Info showed the 'mcrypt.algorithms_dir' and
> 'mcrypt.modes_dir' with data in it.  But the problem is I still get the
> error message when I tried any mcrypt function, the error message range
from
> being unable to initalize the module to whatever the other error messages
> are.  I assumed there's a bug and filed a bug report to PHP but was
rejected
> because I was told that I had the php.ini incorrect.  That doesn't make
> sense.  It took me a long time to find some clues to the problem.  What I
> found is that with any files in the "/usr/local/lib/libmcrypt" that end
with
> *.a and *.la, they don't work.  There is no *.c and *.h files in that
> directory.
>
> I discovered that when I set the php.ini to point to the untarred
libmcrypt
> directory where *.c and *.h are found in both
> '/usr/local/src4/libmcrypt-2.5.3/modules/algorithms' and
> '/usr/local/src4/libmcrypt-2.5.3/modules/modes'.  That's when the mcrypt
> function start working without a problem.  The problem is PHP doesn't work
> with the *.la and *.a files.  Again, I saw the OpenSSL directory where *.c
> and *.h files are found in both the algorithms and modes directory of the
> '/usr/local/ssl/include/openssl/' directory, it work just fine too.
>
> This had lead me to question of whether is there a bug in libmcrypt or
php.
> You be the judge of it.  It would be so nice if this problem can be
> resolved.  I'm not sure if I'm allowed to use the open source code instead
> of the compiled codes.
>
>



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




[PHP] Re: Echo Regular Expression Pattern

2002-10-10 Thread Mike Smith

Nevermind.

This works:

ereg("Q+[0-9]{6}",$Data[$n],$qarticle);
$GetLine = explode("\r", ereg_replace("Q+[0-9]{6}","http://support.microsoft.com/default.aspx?scid=kb;[LN];$qarticle[0]\";
target=\"blank\">$qarticle[0]",$Data[$n]));





"Mike Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm trying to return a pattern found in a regular expression. I can find
the
> Expression (Q followed by 6 numbers, yes MS Q articles) using this:
>
> $GetLine = explode("\r", ereg_replace("Q+[0-9]{6}"," href=\"http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6}\";
> target=\"blank\">'Q+[0-9]{6}'",$Data[$n]));
>
> I'm basically trying to find the pattern and 'replace' it with itself as a
> clickable link to MS's Q articles so I need to insert "Q+[0-9]{6}" after
> [LN]; in the href and then again as the text of the link. The script runs
> but produces:
>
> http://support.microsoft.com/default.aspx?scid=kb;[LN];Q+[0-9]{6} and
echos
> Q+[0-9]{6} as the clickable link.
>
> Thanks,
> Mike Smith
>
>



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




Re: [PHP] displaying fixed number of records

2002-10-10 Thread Chris Hewitt

This often comes up. If you look in the archives there is reference to 
code for this. I know there is also some complete code on phpbuilder, 
phpclasses or another server, sorry I don't remember which but you will 
find it in the archives.

HTH
Chris

DoL wrote:

>Hi
>
>I would like to fixed the number of records for example 10 to be display on
>a web page.  That is when there is more than 10 records, I would like to
>display a "2" for user to click on to display the second page starting with
>record number 11, and so on.
>
>Appreciate if someone can share their experience.
>
>Thanks
>
>
>




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




Re: [PHP] Re: site path

2002-10-10 Thread @ Edwin

Not exactly. Single quotes are fine. I missed the fact that the single
quotes here

>> echo("Go home");

will be included in the source--sorry about that.

Well, then, to rewrite the code earlier,

> echo 'Go home';

this way:

  echo "Go home";

that would still not give you the "trailing slash" problem. In other words,
it's just a matter of how you write the code... ;)

- E

On Friday, October 11, 2002 1:06 AM
Bogdan Stancescu wrote:

> I'm not sure exactly what you're trying to point out - does XHTML
> require double quotes?
>
> Bogdan
>
> @ Edwin wrote:
> > Just a thought...
> >
> > If you're going to write an XHTML compatible code, you wouldn't really
have
> > this problem -->
> >
> >>   echo("Go home");
> >
> >
> > since you'll probably write something like this:
> >
> >   echo 'Go home'; >
> > Of course, I didn't mean that you can't do that with HTML...
[snip]

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




Re: [PHP] DB speed

2002-10-10 Thread Dan Ostrowski

For SIMPLE SIMPLE selects and inserts, MySQL will probably remain 
faster.  If you are doing a very simple web set up where you are mostly 
inserting and spitting out single table information, MySQL will be the 
way to go.

Anything else, I would recommend PostgreSQL. It's got FAR superior 
features and anytime you start very complex queries ( like JOINS and 
multi-table aggregate functions, etc ) postgres will blow MySQL out of 
the water.

They are both nice, just for different purposes. MySQL = simple, 
PostgreSQL = anything else.

Also, you can run "EXPLAIN " on PostgreSQL to find out exactly 
what is happening when you do a query and if it's using an index 
properly or not.


regards,
dan


tuxen wrote:

>I think i read something a while ago, about mysql being faster, having
>less features, but postgres being a little slower but able to handle
>LARGE databases better than mysql. I could be wrong, so dont take my
>word for it. At the end of the day they are both good db's.
>
>On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
>  
>
>>Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
>>got variable results from different db's - even got an odbc connection to
>>access to run faster than mysql at one stage!! - something tells me there
>>are other factors contributing..
>>Cheers
>>Simon
>>
>>-Original Message-
>>From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>>Sent: 10 October 2002 14:17
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] DB speed
>>
>>
>>Hi!
>>
>> I'm making some testing over DB.php  (PEAR)
>>
>> And i wan't to know if this is normal.
>>
>> I've made some script where I connect do SQL server
>> and execute one simple (1row) query.
>>
>> I use pgsql and mysql. tables and indexes are same for both  servers. So
>>test table is identical
>>
>> Whe i execute those script i get some timing results
>>
>>PGSQL
>>Total time: 0.0576
>>Execution time: 0.0185
>>
>>MySQL
>>Total time: 0.0086
>>Execution time: 0.0028 
>>
>>Time is in seconds.
>>
>>My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.
>>
>>I want to know why is sucsh diference. Both servers runing
>>with socket connections and using connnect (non-persistant)
>>
>>-- 
>>tia,
>> Uros  mailto:[EMAIL PROTECTED]
>>
>>
>>-- 
>>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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] DB speed

2002-10-10 Thread Randum Ian

Would access be a lot slower than these then for a query with multiple
tables and other such things? Is there a resource on the net regarding
this?

-Original Message-
From: Dan Ostrowski [mailto:[EMAIL PROTECTED]] 
Sent: 10 October 2002 18:43
To: tuxen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] DB speed

For SIMPLE SIMPLE selects and inserts, MySQL will probably remain 
faster.  If you are doing a very simple web set up where you are mostly 
inserting and spitting out single table information, MySQL will be the 
way to go.

Anything else, I would recommend PostgreSQL. It's got FAR superior 
features and anytime you start very complex queries ( like JOINS and 
multi-table aggregate functions, etc ) postgres will blow MySQL out of 
the water.

They are both nice, just for different purposes. MySQL = simple, 
PostgreSQL = anything else.

Also, you can run "EXPLAIN " on PostgreSQL to find out exactly 
what is happening when you do a query and if it's using an index 
properly or not.


regards,
dan


tuxen wrote:

>I think i read something a while ago, about mysql being faster, having
>less features, but postgres being a little slower but able to handle
>LARGE databases better than mysql. I could be wrong, so dont take my
>word for it. At the end of the day they are both good db's.
>
>On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
>  
>
>>Well obviously - cos MySQL rocks!!, but seriously I also did some
tests and
>>got variable results from different db's - even got an odbc connection
to
>>access to run faster than mysql at one stage!! - something tells me
there
>>are other factors contributing..
>>Cheers
>>Simon
>>
>>-Original Message-
>>From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>>Sent: 10 October 2002 14:17
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] DB speed
>>
>>
>>Hi!
>>
>> I'm making some testing over DB.php  (PEAR)
>>
>> And i wan't to know if this is normal.
>>
>> I've made some script where I connect do SQL server
>> and execute one simple (1row) query.
>>
>> I use pgsql and mysql. tables and indexes are same for both  servers.
So
>>test table is identical
>>
>> Whe i execute those script i get some timing results
>>
>>PGSQL
>>Total time: 0.0576
>>Execution time: 0.0185
>>
>>MySQL
>>Total time: 0.0086
>>Execution time: 0.0028 
>>
>>Time is in seconds.
>>
>>My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of
data.
>>
>>I want to know why is sucsh diference. Both servers runing
>>with socket connections and using connnect (non-persistant)
>>
>>-- 
>>tia,
>> Uros  mailto:[EMAIL PROTECTED]
>>
>>
>>-- 
>>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 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




Re: [PHP] DB speed

2002-10-10 Thread PHP List

>From my experience, I found this:

Selecting 1000 records from 2 tables using a join, 10secs and up.

Selecting 1000 records for table 1, all records from table 2, then using php
to figure out which rows from table 2 belong to table 1 and building my own
combined array, less than a second.



> Would access be a lot slower than these then for a query with multiple
> tables and other such things? Is there a resource on the net regarding
> this?
>
> -Original Message-
> From: Dan Ostrowski [mailto:[EMAIL PROTECTED]]
> Sent: 10 October 2002 18:43
> To: tuxen
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] DB speed
>
> For SIMPLE SIMPLE selects and inserts, MySQL will probably remain
> faster.  If you are doing a very simple web set up where you are mostly
> inserting and spitting out single table information, MySQL will be the
> way to go.
>
> Anything else, I would recommend PostgreSQL. It's got FAR superior
> features and anytime you start very complex queries ( like JOINS and
> multi-table aggregate functions, etc ) postgres will blow MySQL out of
> the water.
>
> They are both nice, just for different purposes. MySQL = simple,
> PostgreSQL = anything else.
>
> Also, you can run "EXPLAIN " on PostgreSQL to find out exactly
> what is happening when you do a query and if it's using an index
> properly or not.
>
>
> regards,
> dan
>
>
> tuxen wrote:
>
> >I think i read something a while ago, about mysql being faster, having
> >less features, but postgres being a little slower but able to handle
> >LARGE databases better than mysql. I could be wrong, so dont take my
> >word for it. At the end of the day they are both good db's.
> >
> >On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
> >
> >
> >>Well obviously - cos MySQL rocks!!, but seriously I also did some
> tests and
> >>got variable results from different db's - even got an odbc connection
> to
> >>access to run faster than mysql at one stage!! - something tells me
> there
> >>are other factors contributing..
> >>Cheers
> >>Simon
> >>
> >>-Original Message-
> >>From: Uros Gruber [mailto:[EMAIL PROTECTED]]
> >>Sent: 10 October 2002 14:17
> >>To: [EMAIL PROTECTED]
> >>Subject: [PHP] DB speed
> >>
> >>
> >>Hi!
> >>
> >> I'm making some testing over DB.php  (PEAR)
> >>
> >> And i wan't to know if this is normal.
> >>
> >> I've made some script where I connect do SQL server
> >> and execute one simple (1row) query.
> >>
> >> I use pgsql and mysql. tables and indexes are same for both  servers.
> So
> >>test table is identical
> >>
> >> Whe i execute those script i get some timing results
> >>
> >>PGSQL
> >>Total time: 0.0576
> >>Execution time: 0.0185
> >>
> >>MySQL
> >>Total time: 0.0086
> >>Execution time: 0.0028
> >>
> >>Time is in seconds.
> >>
> >>My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of
> data.
> >>
> >>I want to know why is sucsh diference. Both servers runing
> >>with socket connections and using connnect (non-persistant)
> >>
> >>--
> >>tia,
> >> Uros  mailto:[EMAIL PROTECTED]
> >>
> >>
> >>--
> >>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 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] xmlDoValidityCheckingDefaultValue undefined?

2002-10-10 Thread David Busby

List,
I was installing PHP 4.2.3 with the latest zlib and latest libxml2 onto 
my RH73 box.  When loading the libphp4.so Apache reports
that 'xmlDoValidityCheckingDefaultValue' is undefined, there is no error 
in the compile of Apache (2.0.43) or PHP.  I have tried recompiling 
Apache with the new libxml2, and then recompiling PHP to no avail.  The 
list archive, and google searches have not given much help.  I saw no 
errors that related to this in any of my logs.  Is there another option 
I should try?  Reccomendations?

/B


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




Re: [PHP] DB speed

2002-10-10 Thread 1LT John W. Holmes

> >From my experience, I found this:
>
> Selecting 1000 records from 2 tables using a join, 10secs and up.

I'd say you have a problem in your database / table configuration, i.e.
indexes. There's no way a join between two tables that are properly indexed
should take 10 seconds for only 1000 rows.

> Selecting 1000 records for table 1, all records from table 2, then using
php
> to figure out which rows from table 2 belong to table 1 and building my
own
> combined array, less than a second.

You're using a lot more memory on the server, though, by building up a huge
array and recordsets. But, RAM is cheap...

---John Holmes...


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




[PHP] Re: displaying a select number of rows from a sql query

2002-10-10 Thread Keith Posehn

I tried this code, and it still just keeps 'a loopin'...

What is wierd is that I have some if the code I tried in my site on other
pages, and it functions without a problem...any thoughts?

Thanks for the help.

-Keith Posehn

"Owen Prime" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> With the line:
>
> while (list($link, $title, $content) = mysql_fetch_array($result)) {
>
> The php docs don't actually say what the list() function returns, but
since
> your getting an infinite loop i would say that it probably evaluates to
> true no matter whats on the right hand side of the assignment. I would
> suggest that you use:
>
> while ($tmp = mysql_fetch_array($result)) {
> list($link, $title, $content) = $tmp;
>
> Cheers,
>
> Owen Prime
> http://www.noggin.com.au
>
>
> Keith Posehn wrote:
>
> > Ok, here is the question:
> >
> > I have a sql query, nothing special. It has 3 variables. I have created
> > the php code to display the variables in context with the html code. I
> > need it to loop a select number of times, most likely twice, and
therefore
> > display the first two rows of the query.
> >
> > In other words, querying the database for a set of rows, it needs to
> > display the first two of the rows on the page.
> >
> > Here is the code I have tried so far, which has either looped
continuosly
> > or displayed the top row twice (edited for security):
> >
> >  >
> >
> >  $sql  = "SELECT * FROM [database] ORDER BY [collumn] LIMIT 2";
> >  $result = mysql_query($sql) or die("problem with $sql");
> >  // list($title) = mysql_fetch_array($result);
> > ?>
> >
> > 
> >
> > What's New?
> >
> >  >
> > /* It tried this: */ while(list($link, $title, $content) =
> > mysql_fetch_array($result)){
> >
> > /* And this: */ while($row = mysql_fetch_array($result) and
> > (($count++)<2)){
> >
> > // The first kept looping infinitely, the second displayed the top row
> > twice. Grr... >_<
> >
> > ?>
> >
> > 
> > "> > mysql_result($result,0,"title"); ?>
> > 
> > 
> > 
> > 
> >
> >  > }
> > ?>
> >
> > 
> >
> > Thanks for any help you can provide.
> >
> > -Keith Posehn
>
>



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




[PHP] help with mysql query / logic

2002-10-10 Thread Pablo Oliva

I have 2 tables, one with job ad information, and a second one with the
locations that this ad applies to.
 
When a person queries the job ad table with their criteria, I would also
have to query the location table to see if the location that they chose
applies to this ad.  I am not sure how to construct the sql query
though, or if there is a better way to set this up.
 
Any suggestions will be appreciated.



Re: [PHP] help with mysql query / logic

2002-10-10 Thread Marco Tabini

Can you perhaps post the structure of your tables? That would make it
easier to help (at least for me)


On Thu, 2002-10-10 at 15:40, Pablo Oliva wrote:
> I have 2 tables, one with job ad information, and a second one with the
> locations that this ad applies to.
>  
> When a person queries the job ad table with their criteria, I would also
> have to query the location table to see if the location that they chose
> applies to this ad.  I am not sure how to construct the sql query
> though, or if there is a better way to set this up.
>  
> Any suggestions will be appreciated.



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




RE: [PHP] help with mysql query / logic

2002-10-10 Thread Pablo Oliva

Please disregard, I think that I figured it out.


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




Re: [PHP] PHP 4.3.0pre1

2002-10-10 Thread bbonkosk

Is there a changelog for this, so we know what to test?
-Brad

> Hello,
> 
> PHP 4.3.0pre1 is available for download from http://qa.php.net. PHP
> 4.3.0 incorporates a very large number of changes, new features, and
> bugfixes, and thus requires extensive testing. This preliminary release
> is meant to kick-start this testing while the fixes are still being
> performed. Please join in and help us make this a high-quality release.
> You can use the build tracker at http://qa.php.net/buildtest-submit.php
> to report the results of your testing.
> 
> Thank you,
> 
> -Andrei   http://www.gravitonic.com/
> * Quantum Mechanics: The Dreams of Which Stuff is Made. *
> 
> -- 
> 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] Undefined variables?

2002-10-10 Thread Justoman

I get this with almost all the scripts I run,

It's a whole shit load of undefined variables! what are these and please,
how can they be fixed?

Here's what I'm talkin bout,
http://www.darkwatchclan.com/battlestats/bfserverinfo.php

-Justoman



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




Re[2]: [PHP] DB speed

2002-10-10 Thread Uros Gruber

Hi!

I make some more test for this.

When i enable pconect (persistant) the result amazed me.

PGSQL
Total time: 0.0070
Execution time: 0.0034
MySQL
Total time: 0.0072
Execution time: 0.0027

Now PGSQL is as fast as mysql or maybe a lile slower.
So is this normal that non-persistant is so much overhead for
pg. Is there any tools to check this. Or is some kind of a
bug in php. I use 4.2.3. And pg is 7.2.1. Can somebody make
some test. I can send script what i've run.


-- 
tia,
 Urosmailto:[EMAIL PROTECTED]


Friday, October 11, 2002, 5:09:31 AM, you wrote:

t> I think i read something a while ago, about mysql being faster, having
t> less features, but postgres being a little slower but able to handle
t> LARGE databases better than mysql. I could be wrong, so dont take my
t> word for it. At the end of the day they are both good db's.

t> On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
>> Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
>> got variable results from different db's - even got an odbc connection to
>> access to run faster than mysql at one stage!! - something tells me there
>> are other factors contributing..
>> Cheers
>> Simon
>> 
>> -Original Message-
>> From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>> Sent: 10 October 2002 14:17
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] DB speed
>> 
>> 
>> Hi!
>> 
>>  I'm making some testing over DB.php  (PEAR)
>> 
>>  And i wan't to know if this is normal.
>> 
>>  I've made some script where I connect do SQL server
>>  and execute one simple (1row) query.
>> 
>>  I use pgsql and mysql. tables and indexes are same for both  servers. So
>> test table is identical
>> 
>>  Whe i execute those script i get some timing results
>> 
>> PGSQL
>> Total time: 0.0576
>> Execution time: 0.0185
>> 
>> MySQL
>> Total time: 0.0086
>> Execution time: 0.0028 
>> 
>> Time is in seconds.
>> 
>> My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.
>> 
>> I want to know why is sucsh diference. Both servers runing
>> with socket connections and using connnect (non-persistant)
>> 
>> -- 
>> tia,
>>  Uros  mailto:[EMAIL PROTECTED]
>> 
>> 
>> -- 
>> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini

Of course, you should switch to UNIX :-)

Seriously, have you looked at the source on those lines? Can you post
the source code otherwise so we can take a look and let you know?

The error you are receiving usually means that a variable is used
without having been initialized. For example:

$b = $a * 10;

Will cause a warning if $a is not set to something.


Marco

On Thu, 2002-10-10 at 16:07, Justoman wrote:
> I get this with almost all the scripts I run,
> 
> It's a whole shit load of undefined variables! what are these and please,
> how can they be fixed?
> 
> Here's what I'm talkin bout,
> http://www.darkwatchclan.com/battlestats/bfserverinfo.php
> 
> -Justoman
> 
> 
> 
> -- 
> 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




Fw: [PHP] Undefined variables?

2002-10-10 Thread Kevin Stone

Not to be rude.. but you have got to be kidding.  :-\

There's no way for anybody to tell what's going on without seeing the code.
One way or another the script isn't being given the information it is
expecting.  My guess is that the programmer isn't doing any checking within
the script.  He's assuming that these values are set but when they're not it
spews this list of errors.

Is this a script that you wrote or are you here on behalf of the programmer?

-Kevin

- Original Message -
From: "Justoman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 2:07 PM
Subject: [PHP] Undefined variables?


> I get this with almost all the scripts I run,
>
> It's a whole shit load of undefined variables! what are these and please,
> how can they be fixed?
>
> Here's what I'm talkin bout,
> http://www.darkwatchclan.com/battlestats/bfserverinfo.php
>
> -Justoman
>
>
>
> --
> 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




Re: [PHP] Undefined variables?

2002-10-10 Thread Justoman


Thanks for the feedback,
I've never actually posted here, so Kevin, cut me some slack.

Here's whats up,
The script I'm trying to run is called "Battlestats"
It's set up on at: http://www.darkwatchclan.com/battlestats/bfserverinfo.php
(That's where I'm trying to get it to work)

Now, the exact same "unedited" scipt has been set up on,
http://jk2.gamersimpact.com/bf1942/bfserverinfo.php and runs perfectly.

The source for it, could be found with this link:
http://jk2.gamersimpact.com/download.php?op=getit&lid=3

So really, its not so much a programmer error, it just has something to do
with either an error concerning OS working with script, or something wrong
with the PHP that's set up on the server, because this isn't the only
working script that doesn't parse properly on this server. All the errors I
get are undefined variables.

-Justin "Justoman" Antolini



"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
005701c2709c$b651d2e0$6501a8c0@kevin">news:005701c2709c$b651d2e0$6501a8c0@kevin...
> Not to be rude.. but you have got to be kidding.  :-\
>
> There's no way for anybody to tell what's going on without seeing the
code.
> One way or another the script isn't being given the information it is
> expecting.  My guess is that the programmer isn't doing any checking
within
> the script.  He's assuming that these values are set but when they're not
it
> spews this list of errors.
>
> Is this a script that you wrote or are you here on behalf of the
programmer?
>
> -Kevin
>
> - Original Message -
> From: "Justoman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, October 10, 2002 2:07 PM
> Subject: [PHP] Undefined variables?
>
>
> > I get this with almost all the scripts I run,
> >
> > It's a whole shit load of undefined variables! what are these and
please,
> > how can they be fixed?
> >
> > Here's what I'm talkin bout,
> > http://www.darkwatchclan.com/battlestats/bfserverinfo.php
> >
> > -Justoman
> >
> >
> >
> > --
> > 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




RE: Re[2]: [PHP] DB speed

2002-10-10 Thread SHEETS,JASON (HP-Boise,ex1)

Checkout osdb, it's the "Open Source Database Benchmark" it supports
Postgres and MySQL and is available at http://osdb.sourceforge.net.

To test Postgres and MySQL you will need both installed on the machine you
try to compile from, you will need to compile with --with-mysql and
--with-postgresql and you may need to specify the install points (i.e.
./configure --with-mysql=/usr/local --with-postgresql=/usr/local).

I successfully compiled it on FreeBSD 4.6 but compile failed on HP-UX 11.11.

Jason

-Original Message-
From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, October 10, 2002 2:29 PM
To: tuxen
Cc: [EMAIL PROTECTED]
Subject: Re[2]: [PHP] DB speed

Hi!

I make some more test for this.

When i enable pconect (persistant) the result amazed me.

PGSQL
Total time: 0.0070
Execution time: 0.0034
MySQL
Total time: 0.0072
Execution time: 0.0027

Now PGSQL is as fast as mysql or maybe a lile slower.
So is this normal that non-persistant is so much overhead for
pg. Is there any tools to check this. Or is some kind of a
bug in php. I use 4.2.3. And pg is 7.2.1. Can somebody make
some test. I can send script what i've run.


-- 
tia,
 Urosmailto:[EMAIL PROTECTED]


Friday, October 11, 2002, 5:09:31 AM, you wrote:

t> I think i read something a while ago, about mysql being faster, having
t> less features, but postgres being a little slower but able to handle
t> LARGE databases better than mysql. I could be wrong, so dont take my
t> word for it. At the end of the day they are both good db's.

t> On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
>> Well obviously - cos MySQL rocks!!, but seriously I also did some tests
and
>> got variable results from different db's - even got an odbc connection to
>> access to run faster than mysql at one stage!! - something tells me there
>> are other factors contributing..
>> Cheers
>> Simon
>> 
>> -Original Message-
>> From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>> Sent: 10 October 2002 14:17
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] DB speed
>> 
>> 
>> Hi!
>> 
>>  I'm making some testing over DB.php  (PEAR)
>> 
>>  And i wan't to know if this is normal.
>> 
>>  I've made some script where I connect do SQL server
>>  and execute one simple (1row) query.
>> 
>>  I use pgsql and mysql. tables and indexes are same for both  servers. So
>> test table is identical
>> 
>>  Whe i execute those script i get some timing results
>> 
>> PGSQL
>> Total time: 0.0576
>> Execution time: 0.0185
>> 
>> MySQL
>> Total time: 0.0086
>> Execution time: 0.0028 
>> 
>> Time is in seconds.
>> 
>> My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of
data.
>> 
>> I want to know why is sucsh diference. Both servers runing
>> with socket connections and using connnect (non-persistant)
>> 
>> -- 
>> tia,
>>  Uros  mailto:[EMAIL PROTECTED]
>> 
>> 
>> -- 
>> 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 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] MS SQL server TEXT column

2002-10-10 Thread Vail, Warren

Encountered the following problem with the Microsoft SQL Server interface.
I am not sure where the problem exists, but I am looking for a workaround.

I inserted a row into a table that contained a text column, and inserted
over 5kb string into the text field.  On retrieving the row the server
returned the column values truncated to 4096 bytes exactly.  Tried to code
SET TEXTSIZE nnn into my query string, the query refused to return anything
at all.  Then I tried coding SET TEXTSIZE as a separate query on the same
connection, just prior to my data query, both appeared to be successful, but
still only got 4096 bytes of data.

select DATALENGTH(availabilitySample) from mftsmainframeavailability where
availabilityID = 1

using the MSSQL 7 Query analyzer returns;
 
--- 
5242

(1 row(s) affected)

This shows that my text was stored, I just can't seem to get the server (or
the interface) to give me back more than 4096 bytes.

any clues would be greatly appreciated.
thanks in advance,

Warren Vail
Tools, Metrics & Quality Processes

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




Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini

I think the problem is simply that the other server had a different
configuration setting for error reporting, since I can't find
$debug_wintrmte configured anywhere.

I don't know what this code is for, so it's difficult for me to say how
to fix it, since any changes I make may affect the outcome in a way that
will cause the system to stop working properly.

The only suggestion is to contact the original author or (if you are the
original author) to figure out how those variables should be managed. As
a last resort, and only if you are satisfied with the way the site works
right now (aside from the errors, of course), as James Hicks was
suggesting, you can just "hide" the errors by typing 

error_reporting(0); 

on the second line of the file, right after the " 
> Thanks for the feedback,
> I've never actually posted here, so Kevin, cut me some slack.
> 
> Here's whats up,
> The script I'm trying to run is called "Battlestats"
> It's set up on at: http://www.darkwatchclan.com/battlestats/bfserverinfo.php
> (That's where I'm trying to get it to work)
> 
> Now, the exact same "unedited" scipt has been set up on,
> http://jk2.gamersimpact.com/bf1942/bfserverinfo.php and runs perfectly.
> 
> The source for it, could be found with this link:
> http://jk2.gamersimpact.com/download.php?op=getit&lid=3
> 
> So really, its not so much a programmer error, it just has something to do
> with either an error concerning OS working with script, or something wrong
> with the PHP that's set up on the server, because this isn't the only
> working script that doesn't parse properly on this server. All the errors I
> get are undefined variables.
> 
> -Justin "Justoman" Antolini
> 
> 
> 
> "Kevin Stone" <[EMAIL PROTECTED]> wrote in message
> 005701c2709c$b651d2e0$6501a8c0@kevin">news:005701c2709c$b651d2e0$6501a8c0@kevin...
> > Not to be rude.. but you have got to be kidding.  :-\
> >
> > There's no way for anybody to tell what's going on without seeing the
> code.
> > One way or another the script isn't being given the information it is
> > expecting.  My guess is that the programmer isn't doing any checking
> within
> > the script.  He's assuming that these values are set but when they're not
> it
> > spews this list of errors.
> >
> > Is this a script that you wrote or are you here on behalf of the
> programmer?
> >
> > -Kevin
> >
> > - Original Message -
> > From: "Justoman" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, October 10, 2002 2:07 PM
> > Subject: [PHP] Undefined variables?
> >
> >
> > > I get this with almost all the scripts I run,
> > >
> > > It's a whole shit load of undefined variables! what are these and
> please,
> > > how can they be fixed?
> > >
> > > Here's what I'm talkin bout,
> > > http://www.darkwatchclan.com/battlestats/bfserverinfo.php
> > >
> > > -Justoman
> > >
> > >
> > >
> > > --
> > > 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




Re: [PHP] MS SQL server TEXT column

2002-10-10 Thread Marco Tabini

Set TEXTSIZE usually does it for me:



Make sure that you select a database first and that the connection is
not closed between your Set TEXTSIZE op and the actual query. If you are
not specifying a connection in you mssql_query statement, make sure that
you haven't opened a different connection between Set TEXTSIZE and your
actual query--PHP uses the most recently opened connection as a default,
and if you open a new connection between the two queries, the second
connection will not have the TEXTSIZE set. Hope that helps.


Marco

On Thu, 2002-10-10 at 17:04, Vail, Warren wrote:
> Encountered the following problem with the Microsoft SQL Server interface.
> I am not sure where the problem exists, but I am looking for a workaround.
> 
> I inserted a row into a table that contained a text column, and inserted
> over 5kb string into the text field.  On retrieving the row the server
> returned the column values truncated to 4096 bytes exactly.  Tried to code
> SET TEXTSIZE nnn into my query string, the query refused to return anything
> at all.  Then I tried coding SET TEXTSIZE as a separate query on the same
> connection, just prior to my data query, both appeared to be successful, but
> still only got 4096 bytes of data.
> 
> select DATALENGTH(availabilitySample) from mftsmainframeavailability where
> availabilityID = 1
> 
> using the MSSQL 7 Query analyzer returns;
>  
> --- 
> 5242
> 
> (1 row(s) affected)
> 
> This shows that my text was stored, I just can't seem to get the server (or
> the interface) to give me back more than 4096 bytes.
> 
> any clues would be greatly appreciated.
> thanks in advance,
> 
> Warren Vail
> Tools, Metrics & Quality Processes
> 
> -- 
> 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




RE: [PHP] MS SQL server TEXT column

2002-10-10 Thread Vail, Warren

Seems to me I tried this, but I could have had another problem, I'll give it
another try, thanks,

It's really great working with all this help available, double thanks,

Warren Vail
Tools, Metrics & Quality Processes

-Original Message-
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 2:01 PM
To: Vail, Warren
Cc: PHP-General
Subject: Re: [PHP] MS SQL server TEXT column


Set TEXTSIZE usually does it for me:



Make sure that you select a database first and that the connection is
not closed between your Set TEXTSIZE op and the actual query. If you are
not specifying a connection in you mssql_query statement, make sure that
you haven't opened a different connection between Set TEXTSIZE and your
actual query--PHP uses the most recently opened connection as a default,
and if you open a new connection between the two queries, the second
connection will not have the TEXTSIZE set. Hope that helps.


Marco

On Thu, 2002-10-10 at 17:04, Vail, Warren wrote:
> Encountered the following problem with the Microsoft SQL Server interface.
> I am not sure where the problem exists, but I am looking for a workaround.
> 
> I inserted a row into a table that contained a text column, and inserted
> over 5kb string into the text field.  On retrieving the row the server
> returned the column values truncated to 4096 bytes exactly.  Tried to code
> SET TEXTSIZE nnn into my query string, the query refused to return
anything
> at all.  Then I tried coding SET TEXTSIZE as a separate query on the same
> connection, just prior to my data query, both appeared to be successful,
but
> still only got 4096 bytes of data.
> 
> select DATALENGTH(availabilitySample) from mftsmainframeavailability where
> availabilityID = 1
> 
> using the MSSQL 7 Query analyzer returns;
>  
> --- 
> 5242
> 
> (1 row(s) affected)
> 
> This shows that my text was stored, I just can't seem to get the server
(or
> the interface) to give me back more than 4096 bytes.
> 
> any clues would be greatly appreciated.
> thanks in advance,
> 
> Warren Vail
> Tools, Metrics & Quality Processes
> 
> -- 
> 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] slow form / server problem

2002-10-10 Thread Omar Campos

Hi. I run php in win2k server, IIS and MS SQL Server 2k.
I've created some data bases and tables. On the beginning, sending a php
form (through the intranet) was quick. Now, it spends 32 seconds (sometimes
less) to send a form.
I've tried on a empty data base but it's still slow. I don´t have a clue
about what could it be?
Maybe the HDD of the server, maybe the SQL Server
Could you help me.

Thank you so much.



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




[PHP] Refresh my Memory

2002-10-10 Thread Stephen

Hello,

I forget exactly how to do this so I'm turning to you all for some help. How can I 
make it so that if a user does not have a resolution of atleast 1024x768, it sends 
them to another page or recomends that they up their screen size before viewing the 
page? Any help will be great. Thanks!

Thanks,
Stephen Craton
http://www.melchior.us


RE: [PHP] Refresh my Memory

2002-10-10 Thread Timothy J Hitchens

You will need to use Javascript... NOT PHP..


Timothy Hitchens (HITCHO)
[EMAIL PROTECTED]

HITCHO has Spoken!






-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 11 October 2002 8:05 AM
To: PHP List
Subject: [PHP] Refresh my Memory


Hello,

I forget exactly how to do this so I'm turning to you all for some help.
How can I make it so that if a user does not have a resolution of
atleast 1024x768, it sends them to another page or recomends that they
up their screen size before viewing the page? Any help will be great.
Thanks!

Thanks,
Stephen Craton
http://www.melchior.us


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




Re: [PHP] DB speed

2002-10-10 Thread Dan Ostrowski

Yes persistant connections to pg make a LOT of difference and are 
recommended.. I have never had overhead problems using them eaither. I 
am terribly sorry i didn't mention this before.

Just make sure you have proper indexes and you should be good to go.

regards,
dan



Uros Gruber wrote:

>Hi!
>
>I make some more test for this.
>
>When i enable pconect (persistant) the result amazed me.
>
>PGSQL
>Total time: 0.0070
>Execution time: 0.0034
>MySQL
>Total time: 0.0072
>Execution time: 0.0027
>
>Now PGSQL is as fast as mysql or maybe a lile slower.
>So is this normal that non-persistant is so much overhead for
>pg. Is there any tools to check this. Or is some kind of a
>bug in php. I use 4.2.3. And pg is 7.2.1. Can somebody make
>some test. I can send script what i've run.
>
>
>  
>




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




[PHP] Calling PHP (cgi) from a perl script and passsing parameters

2002-10-10 Thread Jim Carey

Hi,

have been having problems passing parameters to a PHP script from a Perl script . I 
call the PHP script using (as an example):

$a=`/home/ozbcoz/http/testphp.php fred=testing`; 
print "$a"; 


then I have a PHP script showing: 

#!/usr/local/php/bin/php -q 
"; 
print "0=$argv[0]"; 
print "1=$argv[1]"; 
print "2=$argv[2]"; 
phpinfo(); 
?> 

the outout comes out as: 

count=0 
0= 
1= 
2= 
plus the phpinfo bumpf - which shows argc as 0 and an empty array for argv

sny clues anyone ?

Jim Carey
www.OZbcoz.com discount domain registration




Re: [PHP] Refresh my Memory

2002-10-10 Thread Stephen

I though PHP had an element that got that information from the user...


- Original Message - 
From: "Timothy J Hitchens" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "'PHP List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 5:06 PM
Subject: RE: [PHP] Refresh my Memory


> You will need to use Javascript... NOT PHP..
> 
> 
> Timothy Hitchens (HITCHO)
> [EMAIL PROTECTED]
> 
> HITCHO has Spoken!
> 
> 
> 
> 
> 
> 
> -Original Message-
> From: Stephen [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, 11 October 2002 8:05 AM
> To: PHP List
> Subject: [PHP] Refresh my Memory
> 
> 
> Hello,
> 
> I forget exactly how to do this so I'm turning to you all for some help.
> How can I make it so that if a user does not have a resolution of
> atleast 1024x768, it sends them to another page or recomends that they
> up their screen size before viewing the page? Any help will be great.
> Thanks!
> 
> Thanks,
> Stephen Craton
> http://www.melchior.us
> 

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




RE: [PHP] MS SQL server TEXT column

2002-10-10 Thread John W. Holmes

Make sure you're using POST as your form method and not GET. 

---John Holmes...

> -Original Message-
> From: Vail, Warren [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 10, 2002 5:04 PM
> To: php
> Subject: [PHP] MS SQL server TEXT column
> 
> Encountered the following problem with the Microsoft SQL Server
interface.
> I am not sure where the problem exists, but I am looking for a
workaround.
> 
> I inserted a row into a table that contained a text column, and
inserted
> over 5kb string into the text field.  On retrieving the row the server
> returned the column values truncated to 4096 bytes exactly.  Tried to
code
> SET TEXTSIZE nnn into my query string, the query refused to return
> anything
> at all.  Then I tried coding SET TEXTSIZE as a separate query on the
same
> connection, just prior to my data query, both appeared to be
successful,
> but
> still only got 4096 bytes of data.
> 
> select DATALENGTH(availabilitySample) from mftsmainframeavailability
where
> availabilityID = 1
> 
> using the MSSQL 7 Query analyzer returns;
> 
> ---
> 5242
> 
> (1 row(s) affected)
> 
> This shows that my text was stored, I just can't seem to get the
server
> (or
> the interface) to give me back more than 4096 bytes.
> 
> any clues would be greatly appreciated.
> thanks in advance,
> 
> Warren Vail
> Tools, Metrics & Quality Processes
> 
> --
> 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




Re: [PHP] Calling PHP (cgi) from a perl script and passsing parameters

2002-10-10 Thread Sascha Cunz

What you're referring is CLI, not CGI Version of PHP.

Anyway, i assume, you're using a PHP version 4.2 or higher.
Have a look at the $_SERVER['argc'] and $_SERVER['argv'].

Sascha

Am Donnerstag, 10. Oktober 2002 23:57 schrieb Jim Carey:
> Hi,
> 
> have been having problems passing parameters to a PHP script from a Perl
> script . I call the PHP script using (as an example):
 
> $a=`/home/ozbcoz/http/testphp.php fred=testing`; 
> print "$a"; 
> 
> 
> then I have a PHP script showing: 
> 
> #!/usr/local/php/bin/php -q 
>   
> print "count=$argc"; 
> print "0=$argv[0]"; 
> print "1=$argv[1]"; 
> print "2=$argv[2]"; 
> phpinfo(); 
> ?> 
> 
> the outout comes out as: 
> 
> count=0 
> 0= 
> 1= 
> 2= 
> plus the phpinfo bumpf - which shows argc as 0 and an empty array for argv
> 
> sny clues anyone ?
> 
> Jim Carey
> www.OZbcoz.com discount domain registration
> 


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




[PHP] Re: Refresh my Memory

2002-10-10 Thread Omar Campos

Visit
http://javascript.internet.com/user-details/resolution-page.html
it'll be helpful.


"Stephen" <[EMAIL PROTECTED]> escribió en el mensaje
000e01c270a9$08ba5b90$0200a8c0@melchior">news:000e01c270a9$08ba5b90$0200a8c0@melchior...
Hello,

I forget exactly how to do this so I'm turning to you all for some help. How
can I make it so that if a user does not have a resolution of atleast
1024x768, it sends them to another page or recomends that they up their
screen size before viewing the page? Any help will be great. Thanks!

Thanks,
Stephen Craton
http://www.melchior.us



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




[PHP] Redhat 8.0 / php-cvs - /usr/lib/httpd/build/instdso.sh: No such file or directory

2002-10-10 Thread Robert Mena

Hi, I've reinstalled my devel machine with RedHat 8.0.

After a cvs update of php I've decided to recompile
and install since the mod-php (which I did not
install) from RedHat is a little outdated :)

I've removed the config.cache, make clean and make.

The compilation was ok, but while trying to make
install

Installing PHP SAPI module
/usr/lib/httpd/build/instdso.sh
SH_LIBTOOL='/usr/lib/httpd/build/libtool' libphp4.la
/usr/lib/httpd/modules
sh: line 1: /usr/lib/httpd/build/instdso.sh: No such
file or directory
apxs:Error: Command failed with rc=8323072

Any tips.

I've searched the archives with no luck.

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

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




RE: [PHP] Calling PHP (cgi) from a perl script and passsing parameters

2002-10-10 Thread Jim Carey

yes - am using 4.2.1

output from phpinfo() shows:

_SERVER["argv"] Array
(
)
  
_SERVER["argc"] 0  

which agrees with the $argc and $argv output.

details on the build include:

Build Date Jul 18 2002 08:29:02 
Configure Command './configure' '--prefix=/usr/local/php' 
'--with-config-file-path=/usr/local/bin/' '--enable-ftp' '--without-gd' '--with-mysql' 
 
Server API CGI 

the php.ini shows register_globals on and register_argc_argv on

works fine if I call the php mod directly from the command line - and parses the 
passed variable fine - just doesnt do it when called using the tick (or system 
function) from Perl


Jim Carey
www.OZbcoz.com discount domain registration



> -Original Message-
> From: Sascha Cunz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 11 October 2002 9:28 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Calling PHP (cgi) from a perl script and passsing
> parameters
> 
> 
> What you're referring is CLI, not CGI Version of PHP.
> 
> Anyway, i assume, you're using a PHP version 4.2 or higher.
> Have a look at the $_SERVER['argc'] and $_SERVER['argv'].
> 
> Sascha
> 
> Am Donnerstag, 10. Oktober 2002 23:57 schrieb Jim Carey:
> > Hi,
> > 
> > have been having problems passing parameters to a PHP script from a Perl
> > script . I call the PHP script using (as an example):
>  
> > $a=`/home/ozbcoz/http/testphp.php fred=testing`; 
> > print "$a"; 
> > 
> > 
> > then I have a PHP script showing: 
> > 
> > #!/usr/local/php/bin/php -q 
> >  >  
> > print "count=$argc"; 
> > print "0=$argv[0]"; 
> > print "1=$argv[1]"; 
> > print "2=$argv[2]"; 
> > phpinfo(); 
> > ?> 
> > 
> > the outout comes out as: 
> > 
> > count=0 
> > 0= 
> > 1= 
> > 2= 
> > plus the phpinfo bumpf - which shows argc as 0 and an empty 
> array for argv
> > 
> > sny clues anyone ?
> > 
> > Jim Carey
> > www.OZbcoz.com discount domain registration
> > 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


RE: [PHP] Calling PHP (cgi) from a perl script and passsing parameters

2002-10-10 Thread Jim Carey

sorry - seems my earlier post was base64 - apologies to all :-( - here it is
again


yes - am using 4.2.1

output from phpinfo() shows:

_SERVER["argv"] Array
(
)

_SERVER["argc"] 0

which agrees with the $argc and $argv output.

details on the build include:

Build Date Jul 18 2002 08:29:02
Configure Command './configure' '--prefix=/usr/local/php'
'--with-config-file-path=/usr/local/bin/' '--enable-ftp' '--without-gd'
'--with-mysql'
Server API CGI

the php.ini shows register_globals on and register_argc_argv on

works fine if I call the php mod directly from the command line - and parses
the passed variable fine - just doesnt do it when called using the tick (or
system function) from Perl


Jim Carey
www.OZbcoz.com discount domain registration



> -Original Message-
> From: Sascha Cunz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 11 October 2002 9:28 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Calling PHP (cgi) from a perl script and passsing
> parameters
>
>
> What you're referring is CLI, not CGI Version of PHP.
>
> Anyway, i assume, you're using a PHP version 4.2 or higher.
> Have a look at the $_SERVER['argc'] and $_SERVER['argv'].
>
> Sascha
>
> Am Donnerstag, 10. Oktober 2002 23:57 schrieb Jim Carey:
> > Hi,
> >
> > have been having problems passing parameters to a PHP script from a Perl
> > script . I call the PHP script using (as an example):
>
> > $a=`/home/ozbcoz/http/testphp.php fred=testing`;
> > print "$a";
> >
> >
> > then I have a PHP script showing:
> >
> > #!/usr/local/php/bin/php -q
> >  >
> > print "count=$argc";
> > print "0=$argv[0]";
> > print "1=$argv[1]";
> > print "2=$argv[2]";
> > phpinfo();
> > ?>
> >
> > the outout comes out as:
> >
> > count=0
> > 0=
> > 1=
> > 2=
> > plus the phpinfo bumpf - which shows argc as 0 and an empty
> array for argv
> >
> > sny clues anyone ?
> >
> > Jim Carey
> > www.OZbcoz.com discount domain registration
> >
>
>
> --
> 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] PHP 4.3.0pre1

2002-10-10 Thread Andrei Zmievski

Hello,

PHP 4.3.0pre1 is available for download from http://qa.php.net. PHP
4.3.0 incorporates a very large number of changes, new features, and
bugfixes, and thus requires extensive testing. This preliminary release
is meant to kick-start this testing while the fixes are still being
performed. Please join in and help us make this a high-quality release.
You can use the build tracker at http://qa.php.net/buildtest-submit.php
to report the results of your testing.

Thank you,

-Andrei   http://www.gravitonic.com/
* Quantum Mechanics: The Dreams of Which Stuff is Made. *

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




[PHP] PHP 4.3.0pre1 [updated]

2002-10-10 Thread Andrei Zmievski

Apologies, the correct URL to download PHP 4.3.0pre1 from is:

http://www.php.net/~andrei/php-4.3.0pre1.tar.bz2

-Andrei   http://www.gravitonic.com/
* 2 + 2 = 5 for extremely large values of 2. *

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




[PHP] Re: [PHP-DEV] PHP 4.3.0pre1 [updated]

2002-10-10 Thread Markus Fischer

Shouldn't this be synchronised with a Win32 binary release?

(Apologies if pre1 binaries for Win32 are available, I can't
seem to get the inforamtion where they are?)

thanks,

- Markus

On Thu, Oct 10, 2002 at 03:05:22PM -0400, Andrei Zmievski wrote : 
> Apologies, the correct URL to download PHP 4.3.0pre1 from is:
> 
>   http://www.php.net/~andrei/php-4.3.0pre1.tar.bz2
> 
> -Andrei   http://www.gravitonic.com/
> * 2 + 2 = 5 for extremely large values of 2. *
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
 Derick, while ($xml) $ass->get_new_ideas();
<[James]> Markus: IE on_user_fart()
-- People doesn't seem to like the new XHTML2 specs :) --

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




Re: [PHP] Re: MySQL back up

2002-10-10 Thread Ken

Okay, I took out all the reason for error, I took the variables out of the
code and replaced them with the actual values. I do not execute the gzip
function. All I get is an empty file. Also I made sure the back up directory
is set to 777.

Now phpMySQLAdmin will perform the same function, so there must be a way to
do this without the phpMySQLAdmin program? Has anyone tried to do what I am
trying to do? Has anyone tried with this code?

One more thing, I borrowed a free script written in perl that uses mysqldump
and it worked. The point here is that I want this to work in PHP so I can
include this code in a bigger application I am writing.

Thanks for all your ideas!


"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
01c27058$c1770170$7c02a8c0@coconut">news:01c27058$c1770170$7c02a8c0@coconut...
> > Okay here is the new code and this is still not working.
> >
> >  >
> > require("./config.php");
> >
> > $sqlserver = $server1;
> > $sqlusername = $username1;
> > $sqlpassword = $password1;
> > $sqldatabase = $database1;
> >
> > //**
> > $nam_bak=date('D,d-m-Y');
>
> Can you have a filename with a comma in it?
>
> > exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\"
> >
> > $backupdir/$nam.sql");
>
> Take out the \" quotes around username, password, and database.
>
> >
> > exec("gzip $backupdir/$nam.sql");
>
> ---John Holmes...
>
>



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




[PHP] Re: PDF to PHP (code)

2002-10-10 Thread Ken

Jason,

I had trouble with PDFLib too, and I turned to this site for help! I found
this much easier to implement and the webmaster will give you lots of help!!

http://ros.co.nz/pdf/

This does not use PDFLib.

"Jason Morehouse" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> I've got a pretty detailed PDF that I need to dynamically re-create with
> PHP / pdflib.  Before I sit around for endless hours inputing x, y, fonts
and line
> coordinates, is there *any* tool that can help automate this?
>
> Basically, the miracle I'm looking for would take a PDF file, and export
> it to PHP code that can reproduce it -- or something along that line.
>
> Thanks in Advance!
> -J
>
> --
>  Jason Morehouse (jm[ät]netconcepts[döt]com)
>  Netconcepts - http://www.netconcepts.com
>  Auckland, New Zealand
>  Linux: Because rebooting is for adding hardware.
>



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




[PHP] Re: displaying fixed number of records

2002-10-10 Thread DoL

Sorry I am working with flat file records.  I have put all the records in an
array, but would I be able to keep the values in the array and loop thru it
for the subsequent pages (by calling the same page itself)?

Thanks.


"Dol" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I would like to fixed the number of records for example 10 to be display
on
> a web page.  That is when there is more than 10 records, I would like to
> display a "2" for user to click on to display the second page starting
with
> record number 11, and so on.
>
> Appreciate if someone can share their experience.
>
> Thanks
>
>



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




[PHP] Best way to put layout, code on pages?

2002-10-10 Thread Leif K-Brooks

I've been using php for a while now, and I've made plenty of web sites 
in that time.  But there's been a nagging problem: the best way to put a 
layout and global code on each page.  My first site had two .txt files 
with header and footer code which were fopen()ed (with absolute paths!) 
and eval()ed on each page at the top and bottom - not the best option! 
 Even if I include()d them and made them .php, that approach would still 
have some problems.  No way to get the global code without the layout, 
and no way to die() and use the layout in functions without knowing what 
variables it needs (for globalizing them).  Right now, I'm doing 
something like this:



There are still problems with this, though.  No way to use global code 
at the bottom of the page, for one thing.  I've also considered 
something like:



I can't find any problems with this approach, what are everyone;'s 
thoughts on this?

-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.




Re: [PHP] Best way to put layout, code on pages?

2002-10-10 Thread Jule Slootbeek

What i usually do, is make a file layout.php with a couple of 
functions, header() footer() etc.

then i include ('layout.php') and call the functions when i need them

and i can send things to the header, like the page title etc.

include ('layout.php');
header("Home");
blablablab
footer();

i hope this is about what you mean

Jule

On Thursday, Oct 10, 2002, at 23:00 US/Eastern, Leif K-Brooks wrote:

> I've been using php for a while now, and I've made plenty of web sites 
> in that time.  But there's been a nagging problem: the best way to put 
> a
>
> layout and global code on each page.  My first site had two .txt files 
> with header and footer code which were fopen()ed (with absolute 
> paths!) and eval()ed on each page at the top and bottom - not the best 
> option! Even if I include()d them and made them .php, that approach 
> would still
>
> have some problems.  No way to get the global code without the layout, 
> and no way to die() and use the layout in functions without knowing 
> what
>
> variables it needs (for globalizing them).  Right now, I'm doing 
> something like this:
>
>include("include.php"); //This contains the database connection code
>and whatever other global code, as well as the layout functions.
>doheader(); //This function contains the top of the layout.
>//Do whatever the page does
>dofooter(); //This function contains the bottom of the layout
>?>
>
> There are still problems with this, though.  No way to use global code 
> at the bottom of the page, for one thing.  I've also considered 
> something like:
>
>$uselayout = true; //Set whether this page wants the layout or not.
>include("include.php");
>headercode(); //Database connection and whatever other global code
>that goes at the top, as well as the layout if $uselayout is true.
>//Whatever this page does goes here.
>footercode(); //Whatever global code that goes at the bottom goes
>here, as well as the layout if $uselayout is true.
>?>
>
> I can't find any problems with this approach, what are everyone;'s 
> thoughts on this?
>
> -- 
> The above message is encrypted with double rot13 encoding.  Any
> unauthorized attempt to decrypt it will be prosecuted to the full 
> extent
> of the law.
>
>
Jule Slootbeek
[EMAIL PROTECTED]


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




Re: [PHP] Re: site path

2002-10-10 Thread Bogdan Stancescu

Ok, then I honestly don't understand why anyone would rather write this

echo "Go home";

instead of this

echo "Go home";

IMHO, the second comes more natural to write, is easier to understand at 
a glance, is less prone to errors and, well, it's shorter!

Bogdan

@ Edwin wrote:
> Not exactly. Single quotes are fine. I missed the fact that the single
> quotes here
> 
> 
>>>echo("Go home");
> 
> 
> will be included in the source--sorry about that.
> 
> Well, then, to rewrite the code earlier,
> 
> 
>>echo 'Go home';
> 
> 
> this way:
> 
>   echo "Go home";
> 
> that would still not give you the "trailing slash" problem. In other words,
> it's just a matter of how you write the code... ;)
> 
> - E
> 
> On Friday, October 11, 2002 1:06 AM
> Bogdan Stancescu wrote:
> 
> 
>>I'm not sure exactly what you're trying to point out - does XHTML
>>require double quotes?
>>
>>Bogdan
>>
>>@ Edwin wrote:
>>
>>>Just a thought...
>>>
>>>If you're going to write an XHTML compatible code, you wouldn't really
> 
> have
> 
>>>this problem -->
>>>
  echo("Go home");
>>>
>>>
>>>since you'll probably write something like this:
>>>
>>>  echo 'Go home'; >
>>>Of course, I didn't mean that you can't do that with HTML...
> 
> [snip]


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




  1   2   >