[PHP] Startup

2001-08-17 Thread Roman

I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
I must start thei manualy. I want to start this services automatically when
starts the linux. How ?

roman


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




RE: [PHP] Startup

2001-08-17 Thread Lawrence . Sheed

you're startup files are typically in /etc/rc.d/init.d on redhat

be *very* careful though!

Create a script which starts whatever you need in there.

create a text file which starts apache.

eg  pico startapache

#start apache
apachectl start

save file

chmod +x it to make it executable

do the same for mysql (I forget the command line at the moment).

restart and test.

you may need to be root to access /etc/rd.d/init/d  depends on your system

cheers.  

Lawrence.

-Original Message-
From: Roman [mailto:[EMAIL PROTECTED]]
Sent: August 17, 2001 2:47 PM
To: Php-General
Subject: [PHP] Startup


I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
I must start thei manualy. I want to start this services automatically when
starts the linux. How ?

roman


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

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




Re: [PHP] Startup

2001-08-17 Thread Daniel Rezny

Hello Roman,

Friday, August 17, 2001, 8:46:45 AM, you wrote:

R I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
R I must start thei manualy. I want to start this services automatically when
R starts the linux. How ?

R roman


give a link to /etc/rc.d/rcxx where xx is a number of your runlevel.

or give the start script to /etc/rc.d/rc.local. On the end of this
file.

I hope it helps

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




Re: [PHP] Startup

2001-08-17 Thread Krzysztof Helbin

Dnia Fri, 17 Aug 2001, Roman napisa(a):

 I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
 I must start thei manualy. I want to start this services automatically when
 starts the linux. How ?

try this:

as type 'setup', from menu select 'System services' and
select httpd to start every time.
-- 
Krzysztof Helbin
___


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




Re: [PHP] How to resume session by id?

2001-08-17 Thread Darius Ivanauskas



On Thu, 16 Aug 2001, Renze Munnik wrote:

 On Thu, Aug 16, 2001 at 05:41:47PM +0200, Darius Ivanauskas wrote:
  What we have here: registering variable $Session into current session.
  This code works perfectly if session id is propogated normally.
  Bu what i need is to set session_id and session_name so it can resume
  given session by given id. Normally session id is propagating through
  cookie. I have set [ini] session.use_cookie = 0; So it passes GET/POST
  session_id propagating method. And using url as i wrote before it doesn't
  gets session id and starts new session :(( So i need somehow to force it
  to use known session_id and start session using this session_id.
  
  --
  Darius Ivanauskas 
 
 
I can't use cookies because i need to navigate through different dns, and
http--https urls. But you can specify only one cookie domain for session
cookies. :(

--
Darius Ivanauskas

 Why don't you use session.use_cookie. When U use cookies for your
 sessions, you can use whatever URL you like. PHP won't care about
 that, and just use the cookie in order to determine the current
 session.
 
 -- 
 
 * RzE:
 
 -- 
 -- Renze Munnik
 -- DataLink BV
 --
 -- E: [EMAIL PROTECTED]
 -- W: +31 23 5326162
 -- F: +31 23 5322144
 -- M: +31 6 21811143
 -- H: +31 23 5516190
 --
 -- Stationsplein 82
 -- 2011 LM  HAARLEM
 --
 -- http://www.datalink.nl
 -- 
 


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




[PHP] MySQL Error.

2001-08-17 Thread ERISEN, Mehmet Kamil



Hello All,
I receive the following warning message. When I reload the page, the message is the 
error message does not show up again. Funny thing is, that there are other parts of 
the page generated from the same database using the same mysql_pconnect and they are 
fine.
I am using a standard $sql mysql_query($sql) mysql_fetch_array($result) kind of 
command, nothing too fancy.
Did anybody have a similar experince?

Warning: Supplied argument is not a valid MySQL result resource in 
/xxx/xxx//index.php on line 45


thanks.

Roman wrote: I install apache 1.3.20, php 4.0.6 and mysql on Red Hat Linux 7.0 but
I must start thei manualy. I want to start this services automatically when
starts the linux. How ?

roman


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


Mehmet Erisen
http://www.erisen.com


-
Do You Yahoo!?
Make international calls for as low as $0.04/minute with Yahoo! Messenger.


Mehmet Erisen
http://www.erisen.com


-
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/


Fw: [PHP] Help.

2001-08-17 Thread Balaji Ankem




first let me know about that exe file.

can u call that exe file in browser??? If yes can we give like http://path to exe//??input co-ords...

-Balaji

  - Original Message - 
  From: 
  rajarajeswari 
  balasubramanian 
  To: [EMAIL PROTECTED] 
  Sent: Friday, August 17, 2001 12:09 
  PM
  Subject: [PHP] Help.
  Hi,I have created a database with the backend of 
  Mysqland i am accesing the database using PHP scripts.In the 
  database there is one field, which has theinformation of the structure of 
  a molecule as aCoordinate data.when i am using the 
  mysql_fetch_array() command toretrive the data, it's just taking the text 
  part ofthe file, which is simply a ASCII characters anddisplaying that 
  on the browser screen.I have a program whihc will take that coordinate 
  fileas the input and it will convert that file into a 3Dstructure, i 
  have the exe file of that program.Now my query is how do i 
  access this exe file in the php script???,Is that Possible in some 
  way??? so the data is retrived it has to automatically invokethe 
  ./xxx file and it will give the 3D rendering ofthat data which is in the 
  form of coordinate file.Please give me some suggestiosn about 
  this.Thanks in 
  advance.Raji__Do 
  You Yahoo!?Make international calls for as low as $.04/minute with Yahoo! 
  Messengerhttp://phonecard.yahoo.com/-- 
  PHP General Mailing List (http://www.php.net/)To unsubscribe, 
  e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]To 
  contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Information transmitted by this E-MAIL is proprietary to Wipro Limited and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




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


[PHP] GD - ttf without anti-aliasing

2001-08-17 Thread Tobias Strauß

How can I create images with gd, so that the text (true type font) written
on it will not be anti-aliased?



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




Re: [PHP] GD - ttf without anti-aliasing

2001-08-17 Thread Rasmus Lerdorf

 How can I create images with gd, so that the text (true type font) written
 on it will not be anti-aliased?

Supposedly by using a negative colour index.  Although I have had limited
success with that.

-Rasmus


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




[PHP] Dnsquery

2001-08-17 Thread J.Mueller, pro.vider.de GmbH

Hello,

I've tried to execute the system function dnsquery, which works fine
from a shell:

% dnsquery -h domain.net
;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;;  domain.net, type = ANY, class = IN
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
NS2.domain.net. 2D IN A 198.182.225.2
NS1.domain.net. 2D IN A 204.107.140.2

but not with PHP-functions, e.g.

system(dnsquery -h domain.net);
exec(dnsquery -h domain.net);

There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04

Does anyone have an idea how I can get this work?

Thanks very much.

Juergen 



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




RE: [PHP] Dnsquery

2001-08-17 Thread Jon Haworth

I think you need to assign it to a variable and then echo that:

$dnsquery = exec(dnsquery -h domain.net);
echo $dnsquery;

HTH
Jon


-Original Message-
From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]]
Sent: 17 August 2001 09:29
To: '[EMAIL PROTECTED]'
Subject: [PHP] Dnsquery


Hello,

I've tried to execute the system function dnsquery, which works fine
from a shell:

% dnsquery -h domain.net
;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;;  domain.net, type = ANY, class = IN
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
NS2.domain.net. 2D IN A 198.182.225.2
NS1.domain.net. 2D IN A 204.107.140.2

but not with PHP-functions, e.g.

system(dnsquery -h domain.net);
exec(dnsquery -h domain.net);

There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP
4.04

Does anyone have an idea how I can get this work?

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




Re[2]: [PHP] Dnsquery

2001-08-17 Thread Gianluca Baldo

JH I think you need to assign it to a variable and then echo that:
JH $dnsquery = exec(dnsquery -h domain.net);
JH echo $dnsquery;

This is from the manual:
exec() executes the given command, however it does not output
anything

Use system instead.

Cheers,
   Gianluca

JH -Original Message-
JH From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]]
JH Sent: 17 August 2001 09:29
JH To: '[EMAIL PROTECTED]'
JH Subject: [PHP] Dnsquery


JH Hello,

JH I've tried to execute the system function dnsquery, which works fine
JH from a shell:

JH % dnsquery -h domain.net
;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611
JH ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
JH ;;  domain.net, type = ANY, class = IN
JH domain.net. 2D IN NSNS2.domain.net.
JH domain.net. 2D IN NSNS1.domain.net.
JH domain.net. 2D IN NSNS2.domain.net.
JH domain.net. 2D IN NSNS1.domain.net.
JH NS2.domain.net. 2D IN A 198.182.225.2
JH NS1.domain.net. 2D IN A 204.107.140.2

JH but not with PHP-functions, e.g.

JH system(dnsquery -h domain.net);
JH exec(dnsquery -h domain.net);

JH There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP
JH 4.04

JH Does anyone have an idea how I can get this work?



[EMAIL PROTECTED]

BcnInédita
EURO RSCG INTERACTION
www.bcninedita.com
Planella, 39
08017 Barcelona
Tel.34 932 531 950 (directo 93 253 19 53)
Fax. 34 932 114 546 


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




[PHP] Meaningful URL Validator

2001-08-17 Thread Stig-Ørjan Smelror

Hi all,

I'm trying to make an URL validator, but I'm kind of stuck now.

What I awnt it to do is as follows:

It first checks to see if the server is up or down by doing a general 
fopen() on the URL.

It then opens the URL in some way, checks the HTTP response code and 
spews out a meaningful message to the user.
E.g. if it's a 404, the user will get a message saying the the page was 
not found.

Has anybody done this before and have the kind heart to share it with me? ;)


TIA

-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/


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




Re: [PHP] MySQL Error.

2001-08-17 Thread David Robley

On Fri, 17 Aug 2001 16:49, ERISEN, Mehmet Kamil wrote:
 Hello All,
 I receive the following warning message. When I reload the page, the
 message is the error message does not show up again. Funny thing is,
 that there are other parts of the page generated from the same database
 using the same mysql_pconnect and they are fine. I am using a standard
 $sql mysql_query($sql) mysql_fetch_array($result) kind of command,
 nothing too fancy. Did anybody have a similar experince?

 Warning: Supplied argument is not a valid MySQL result resource in
 /xxx/xxx//index.php on line 45


 thanks.

Use mysql_error() after your call to mysql to give you the error that is 
causing your query to fail.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Dislexics of the world, UNTIE!

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




Re: [PHP] Meaningful URL Validator

2001-08-17 Thread ReDucTor

?php
$url = http://url;;
if($file = @file($url))
die(Invalid);
for($i=0;$isizeof($file);$i++)
{
if(eregi(b404/b, $file[$i]))
  die(Invalid);
if(eregi(404 , $file[$i]))
  die(Invalid);
if(eregi(404 Error, $file[$i]))
   die(Invalid);
if(eregi(not exist, $file[$i]))
   die(Invalid);
}
echo $url. is Valid;
?
- Original Message -
From: Stig-Ørjan Smelror [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 6:59 PM
Subject: [PHP] Meaningful URL Validator


 Hi all,

 I'm trying to make an URL validator, but I'm kind of stuck now.

 What I awnt it to do is as follows:

 It first checks to see if the server is up or down by doing a general
 fopen() on the URL.

 It then opens the URL in some way, checks the HTTP response code and
 spews out a meaningful message to the user.
 E.g. if it's a 404, the user will get a message saying the the page was
 not found.

 Has anybody done this before and have the kind heart to share it with me?
;)


 TIA

 --
 Stig-Ørjan Smelror
 Systemutvikler

 Linux Communications AS
 Sandakerveien 48b
 Box 1801 - Vika
 N-0123 Oslo, Norway

 tel. +47 22 09 28 80
 fax. +47 22 09 28 81
 http://www.lincom.no/


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



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




[PHP] GD - ttf without anti-aliasing

2001-08-17 Thread Tobias Strauß

What's a negative color index and how can I use it?
My code so far is:

header (Content-type: image/png);
$img = imagecreate (200, 200);
$fontcolor = imagecolorallocate ($img, 0, 0, 0);
$text = This is a test!;
imagegetttftext ($img, 12, 0, 0, 0, $fontcolor, $text);
ImagePng ($img);
ImageDestroy ($img);




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




Re: [PHP] GD - ttf without anti-aliasing

2001-08-17 Thread Rasmus Lerdorf

Read the documentation: http://php.net/imagettftext
This stuff is not a secret.

-Rasmus

On Fri, 17 Aug 2001, Tobias Strauß wrote:

 What's a negative color index and how can I use it?
 My code so far is:

 header (Content-type: image/png);
 $img = imagecreate (200, 200);
 $fontcolor = imagecolorallocate ($img, 0, 0, 0);
 $text = This is a test!;
 imagegetttftext ($img, 12, 0, 0, 0, $fontcolor, $text);
 ImagePng ($img);
 ImageDestroy ($img);







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




[PHP] MySQL Queries - Which to Use?

2001-08-17 Thread Kevin

I have been coding php for a while now but can't seem to get a grasp on
which type of query I should use for a given situation.

mysql_fetch_array
mysql_fetch_object
mysql_fetch_row

Perhaps there is no right answer or perhaps the answer comes with
experience.  In any case, I would love to get some pointers.


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




RE: [PHP] hacks we should know about

2001-08-17 Thread Dave Freeman

On 17 Aug 01, at 0:08, [EMAIL PROTECTED] wrote:

Not that I particularly want to turn this thread into a debate about unix 
security, but...

 Anyone with a clue doesn't use /etc/passwd anymore *shadow password file*,
 so thats kind of depreciated...

While this is true a great deal of damage can still be started with access 
to your passwd file - gaining access to this file will, at the very least, 
disclose a list of valid system users, their home directory and default 
shell.  This sort of information is useful when it comes to compromising a 
system - just imagine the circumstance where someone has development 
work sitting in their home directory - you now know the home directory.

Of course, security through obscurity is never a valid approach but it's 
also worth trying to avoid the more obvious stuff if you can.

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[EMAIL PROTECTED]
---

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




[PHP] Re: File uploads in PHP

2001-08-17 Thread James Holloway

Hi there,

I haven't tested any of this, and there are probably some things that need
adding, but it'll give you an idea at least.

Form element:

input type=file name=thefile

// What files do we want?
$types_we_want = array(image/gif, image/jpeg, image/pjpeg); // allows
jpegs and gifs
// What is the max size we want (in bytes)?
$size_we_want = (50 * 1024); // 50Kb

// function to test whether or not the file is an image, and whether it is
in the correct
// size restriction
function CheckImage($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want) {
if (!in_array($thefile_type, $types_we_want)) {
// the file is of invalid type
return false;
} else
if ($thefile_size  $size_we_want) {
// too big
return false;
}
return true;
}

// function to explain what's wrong with the file
function AnImageError($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want) {
if (!in_array($thefile_type, $types_we_want)) {
// the file is of invalid type
echo $thefile_name .  is not a jpeg or gif!;
} else
if ($thefile_size  $size_we_want) {
// too big
echo $thefile_name . is bigger than the allowed file size of   .
($size_we_want / 1024) . Kb;
}
}

// function to change the name of the image (if you don't do this, and one
person
// uploads a file named name.jpg and then another person uploads a file
with
// the same name, the second will overwrite the original

function NewImageName($thefile_name, $thefile_type) {

$timestamp = time(); // use a timestamp
$prefix = substr($thefile_name, 0, 2); // get two characters from the
beginning of the filename
// for a bit of randomness (use another function like mtsrand() (see
manual))
// for something better

if ($thefile_type == image/jpeg || $thefile_type == image/pjpeg) {
// file is a jpeg
$ext = .jpg;
} else {
// file is a gif
$ext = .gif;
}

$newfilename = $prefix . $timestamp . $ext;

return $newfilename;
}

// function to upload the file.
function DoUploadFile($thefile, $thefile_name, $thefile_type, $thefile_size)
{
global $connection; // this contains details of your mysql connection

$size = @GetImageSize($thefile);
list($ignoreme,$width,$ignoremeagain,$height) = explode(\,$size[3]);
// gets the width and height of the file

// rename the image with the function we defined above
$newfilename = NewImageName($thefile_name, $thefile_type);

// specify a directory to copy the temp file to in the following line
// eg /home/mysite/web/images

if (!@copy($thefile, /path/to/store/files . $newfilename)) {
echo Sorry, something's gone wrong here.;
} else {
// insert the data into your table.  the columns are the unique id
of the file,
// the date the file is uploaded in datetime format,
// the name of the file (varchar, 50), its size in bytes( int), its
width(int) and height(int).
 $insert_data = INSERT INTO mysql_table
(picid, picorigin, picname, picsize,
picwidth, picheight)
VALUES
('', NOW(), '$newfilename', '$thefile_size',
'$width', '$height');
$do_upload = @mysql_query($insert_data, $connection);

if (!$do_upload) { // query failed
echo There was an error with the database.;
} else {
echo Thanks.   . $thefile_name .  has been uploaded.;
}
}
}

// Put it all together in your form handling
if ($thefile_name != ) {
if (!CheckImage($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want)) {
AnImageError($thefile, $thefile_name, $thefile_type, $thefile_size,
$types_we_want, $size_we_want);
} else {
DoUploadFile($thefile, $thefile_name, $thefile_type, $thefile_size);
}
}

Hope that helps,

James.


Dr. Evil [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 My PHP script needs to receive some files.  I've seen sites which
 accept them; they have a Browse button which lets the user select a
 file to send.  That's what I want to do.

 I have a few questions about this.  First of all, this is with
 php4.06.  Secondly, the files are all going to be images, and not very
 large: no more than 50k.

 What's the best way to do this?  I notice that PHP can store these
 files on disk, but I'm going to be storing them in a DB.  I would
 rather receive them directly into a PHP variable.  Is this possible?
 Or should I take them in a file, and then read them back in to a
 variable?

 Also, if they need to go into a file, which directory is safest for
 this?  /tmp contains some important files.  And finally, how do I
 limit the maximum file size that PHP will accept?

 Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL 

Re: [PHP] hacks we should know about

2001-08-17 Thread Bob

just found this article and the author recommends the following for secure php
scripting.  what do the expects think?

 - Set register_globals off
This option will stop PHP creating global variables for user input. That is,
if a user submits the form variable 'hello' PHP won't set $hello, only
HTTP_GET/POST_VARS['hello']. This is the mother of all other options and is
best single option for PHP security, it will also kill basically every third
party application available and makes programming PHP a whole lot less
convenient.

*** - Set safe_mode on
I'd love to describe exactly what safe_mode does but it isn't documented
completely. It introduces a large variety of restrictions including:
 - The ability to restrict which commands can be executed (by exec() etc)
 - The ability to restrict which functions can be used
 - Restricts file access based on ownership of script and target file
 - Kills file upload completely
This is a great option for ISP environments (for which it is designed) but
it can also greatly improve the security of normal PHP environments given
proper configuration. It can also be a complete pain in the neck.

** - Set open_basedir
This option prevents any file operations on files outside specified
directories. This can effectively kill a variety of local include() and
remote file attacks. Caution is still required in regards to file upload and
session files.

** - Set display_errors off, log_errors on
This prevents PHP error messages being displayed in the returned web page.
This can effectively limit an attackers exploration of the function of the
script they are attacking. It can also make debugging very frustrating.

* - Set allow_url_fopen off
This stops remote files functionality. Very few sites really need this
functionality, I absolutely recommend every site set this option.


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Q: tutor about PHP

2001-08-17 Thread Ivo Stoykov

Hello

I wonder whether there is any tutor about PHP objects. Could you help me
with a URL?

Thank you

Ivo



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




[PHP] HTTPS w/ header() ?

2001-08-17 Thread _lallous

Hello,
Is there is a way with PHP (most probably headers) to go HTTPS mode?
I don't want to specify https://www.myserver.com/secured_page.php
I just want it normal but in it's header to tell the browser to initiate an
HTTPS mode.

Thanks



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




[PHP] Re: MySQL Queries - Which to Use?

2001-08-17 Thread _lallous

It all depends on you, I basically get used on using mysql_fetch_array which
returns an associative array.
example:
$result = mysql_query(SELECT name, lastname, age FROM table);
$ra = mysql_fetch_array($result);
or
$ro = mysql_fetch_object($result);
or
$rr = mysql_fetch_row($result);

now:
echo name is : . $ra[name]; // array
(same as: echo name is: . $ra[0];
or
echo name is: . $ro-name; // object
or
echo name is: .$rr[0];

.
.
.
just like the mysql_fetch_array() cause it returns both enumarated and
associative array.

Kevin [EMAIL PROTECTED] wrote in message
001001c12700$255cb340$503ffea9@kl">news:001001c12700$255cb340$503ffea9@kl...
 I have been coding php for a while now but can't seem to get a grasp on
 which type of query I should use for a given situation.

 mysql_fetch_array
 mysql_fetch_object
 mysql_fetch_row

 Perhaps there is no right answer or perhaps the answer comes with
 experience.  In any case, I would love to get some pointers.




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




[PHP] Auth atalk and samba

2001-08-17 Thread Knut Sætre

Hi
Is there a way to authenticate users who are connected to the linux-box with
samba or the AppleTalk protocol (Netatalk)?

I don't need strong security, this is on the Intranett behind a firewall. I
only want to recognise the users, and give them a personalised WebPage. 

It's simple to get the users ID address with php, but I need the
corresponding usernames from the smb or netatalk users. 

I'm running php 4.06, netatalk 1.5pre6 and smb 2.2.1a on RH 7.1 


Knut G. Sætre
Harstad Tidende Gruppen AS

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




[PHP] Reload - erase ------------- please help!

2001-08-17 Thread Alex Sofronie

Hi all!

Please help me with this problem:

SHORT: how can I erase the content of a page currently displayed in client's
browser? Or other solutions (see LONG)


LONG:
I have a form generated with a php script that looks like:
?
if(!isset($submit)) {
do_form(0);
}
if($real_name==  isset($submit)) {
do_form(1);
}
...

function do_form($err_msg) {
.
if($err_msg==1) {
printf(font color=red);
printf(Real name (*) :);
printf(/font);
}
else {
printf(Real name:);
}
.
}

The script keeps writing forms each time something is wrong... Should I send
a header? With what? Or please tell me where I can find what headers can I
send from inside my php script?


Thanks all,
[EMAIL PROTECTED]



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




[PHP] input type=select MULTIPLE?????

2001-08-17 Thread Tamas Bucsu

Hi guys,

Is there any restriction on a multiple selectás name in an HTML file? Cos' If I give a 
name like 'msel' and not 'msel[]' I don't get an array named $msel just a simple 
string type variable.

Thanks in advance



Re: [PHP] input type=select MULTIPLE?????

2001-08-17 Thread Daniel Rezny

Hello Tamas,

Friday, August 17, 2001, 3:03:31 PM, you wrote:

TB Hi guys,

TB Is there any restriction on a multiple selectás name in an HTML file? Cos' If I 
give a name like 'msel' and not 'msel[]' I don't get an array named $msel just a 
simple string type variable.

TB Thanks in advance

If you want to have more than one value in one variable it must be
array.

That's a explaining of naming convention for eg.select boxes.

I hope it helps

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]


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




[PHP] unlink(), safe mode, and other woes

2001-08-17 Thread Jan De Luyck

Hello all,

I've ran across a little problem.

I've created a site for our gameing group, and added a section to upload
screenshots.
The webhost where I've put it is F2S, which have PHP support and also the
php_safe restrictions active. This gave me a little problem in fixing the
uploading, but that was done in no-time using the move_uploaded_file and the
like.

Now I'm having another problem: I would like to offer the ability to remove
these files, using unlink(). Now, when issueing an unlink() on a file
uploaded by another script, I get this error:

Warning:  SAFE MODE Restriction in effect.  The script whose uid is 97613 is
not allowed to access testscreen.jpg owned by uid 1001 in
/path/to/script.php on line 3

The offending line is

unlink(shots/testscreen.jpg);

After doing a bit of checking, I've found out that the webserver process
seems to be running
on user www/www - thus the uploaded files are also owned by that user.

Anyone got a clue?

Thanks,

Jan De Luyck


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




RE: [PHP] PHP and Perl script in same file?

2001-08-17 Thread billfarr

Not any convenient or secure way I've yet found.  But I do have PHP pages
that slip out and exec() a Perl script to grab specific results that I need.

Anyone else?

B

-Original Message-
From: Tom Beidler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 16, 2001 4:46 PM
To: php list
Subject: [PHP] PHP and Perl script in same file?


Can php and perl code reside in the same file? When the document is served
up it parses the PHP and then the Perl?


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



RE: [PHP] Dnsquery

2001-08-17 Thread Tom Malone

I don't know if this will be helpful or not - I found it in the manual:

[EMAIL PROTECTED]
25-Oct-2000 03:16

system() function doesn't return a string value, if you want to assign the
output of a system command, try using:
$a = `/bin/ls -a`;
note the ` is a backtick, not a single quote

Tom Malone
Web Designer
http://www.tom-malone.com

-Original Message-
From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:29 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Dnsquery


Hello,

I've tried to execute the system function dnsquery, which works fine
from a shell:

% dnsquery -h domain.net
;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;;  domain.net, type = ANY, class = IN
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
domain.net. 2D IN NSNS2.domain.net.
domain.net. 2D IN NSNS1.domain.net.
NS2.domain.net. 2D IN A 198.182.225.2
NS1.domain.net. 2D IN A 204.107.140.2

but not with PHP-functions, e.g.

system(dnsquery -h domain.net);
exec(dnsquery -h domain.net);

There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP
4.04

Does anyone have an idea how I can get this work?

Thanks very much.

Juergen



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


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




Re: [PHP] Help.

2001-08-17 Thread Hugh Bothwell

From: rajarajeswari balasubramanian
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 12:09 PM
Subject: [PHP] Help.

 I have a program whihc will take that coordinate file
 as the input and it will convert that file into a 3D
 structure, i have the exe file of that program.

 so the data is retrived it has to automatically invoke
 the ./xxx file and it will give the 3D rendering of
 that data which is in the form of coordinate file.

I see a couple of approaches to this...

1. Run the .exe as a server-side CGI, returning an
image or movie of the molecule.  (Simple and widely
compatible, but not interactive.)

2. Associate the file extension with your specialized
viewer program on the client side.  You send the
data and it fires up the viewer prog automatically.
(Reasonably simple but not very cross-compatible
unless you feel like writing viewers for each different
platform.  Also could introduce security holes.)

3.  Render to some generic format like VRML,
which is already supported by the browser.
(Reasonably simple and very compatible, if it
does everything you want.)

4.  Write a Java applet to do the rendering.
(A bit more complicated, slower, but very
cross-compatible and flexible.  The Java SDK
includes a sample molecule-viewer applet.)


... other suggestions?  Personally, I think standards
are a wonderful thing, so I would write a PHP
library to convert from your raw format to VRML.
(Alternately, you could store the VRML model
in your database and just dump it directly.)



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




RE: Re[2]: [PHP] Dnsquery

2001-08-17 Thread Jon Haworth

 I think you need to assign it to a variable and then echo that:
 $dnsquery = exec(dnsquery -h domain.net);
 echo $dnsquery;

 This is from the manual:
 exec() executes the given command, however it does not output
 anything
 Use system instead.

Well, don't trust everything you read :-)

These lines:

$httpd = exec(ps -e | grep -c httpd);
$mysqld = exec(ps -e | grep -c mysqld);

fill $httpd and $mysqld with the current number of daemons running. Works
fine on my Slackware box with PHP 4.0.6.

Cheers
Jon

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




[PHP] What is wrong ????

2001-08-17 Thread Dennis van Zanten

I wanna do this Insert:

INSERT INTO sysdba_product_link VALUES ('','Y4DHVA0Q','CV/ 
Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000 
12:52:25','ADMIN','Solo + 
CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR 24');

In the following database structure what is wrong because it gives a errorand 
I don't see a problem in the insert line...???
And already thanks for the help!!

grtz,
Dennis
(dz-web.com)

  Field Type Attributes Null Default Extra 
  PRODUCT_link  int(11)Noauto_increment  
  PRODUCTID  textNo  
  NAME  textNo  
  DESCRIPTION  longtextNo  
  ACTUALID  textNo  
  FAMILY  textNo  
  PRICE  doubleNo  0
  CREATEDATE  textNo  
  CREATEUSER  textNo  
  MODIFYDATE  textNo  
  MODIFYUSER  textNo  
  PRODUCTGROUP  textNo  
  STATUS  textNo  
  UNIT  textNo  
  STOCKVOLUME  int(11)No  0
  STOCKWEIGHT  int(11)No  0
  STOCKITEM  textNo  
  PROGRAM  textNo  
  SUPPLIER  textNo  
  VENDOR  textNo  
  SITEID  textNo  
  WAREHOUSELOCATION  textNo  
  COMMISSIONABLE  textNo  
  TAXABLE  textNo  
  ACCOUNTINGPERIOD  textNo  
  GLACCOUNTNUMBER  textNo  
  GLSUBACCOUNTNUMBER  textNo  
  DATAOWNER  textNo  
  TYPE  textNo  





Re: [PHP] What is wrong ????

2001-08-17 Thread Tyler Longren

Well, what's the error?

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 17 Aug 2001 15:57:13 +0200
Dennis van Zanten [EMAIL PROTECTED] wrote:

 I wanna do this Insert:
 
 INSERT INTO sysdba_product_link VALUES ('','Y4DHVA0Q','CV/
 Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000
 12:52:25','ADMIN','Solo +
 CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR
 24');
 
 In the following database structure what is wrong because it gives a
 errorand I don't see a problem in the insert line...???
 And already thanks for the help!!
 
 grtz,
 Dennis
 (dz-web.com)
 
   Field Type Attributes Null Default Extra 
   PRODUCT_link  int(11)Noauto_increment  
   PRODUCTID  textNo  
   NAME  textNo  
   DESCRIPTION  longtextNo  
   ACTUALID  textNo  
   FAMILY  textNo  
   PRICE  doubleNo  0
   CREATEDATE  textNo  
   CREATEUSER  textNo  
   MODIFYDATE  textNo  
   MODIFYUSER  textNo  
   PRODUCTGROUP  textNo  
   STATUS  textNo  
   UNIT  textNo  
   STOCKVOLUME  int(11)No  0
   STOCKWEIGHT  int(11)No  0
   STOCKITEM  textNo  
   PROGRAM  textNo  
   SUPPLIER  textNo  
   VENDOR  textNo  
   SITEID  textNo  
   WAREHOUSELOCATION  textNo  
   COMMISSIONABLE  textNo  
   TAXABLE  textNo  
   ACCOUNTINGPERIOD  textNo  
   GLACCOUNTNUMBER  textNo  
   GLSUBACCOUNTNUMBER  textNo  
   DATAOWNER  textNo  
   TYPE  textNo  
 
 
 

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




Re: [PHP] What is wrong ????

2001-08-17 Thread Dennis van Zanten

Ofcourse sorry:

You have an error in your SQL syntax near '','','010','CVs','','7-12-2000
12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27

The Insert below is line 27 and I see no errors in the line maybe you guys
do!!

thanxs,
Dennis



- Original Message -
From: Tyler Longren [EMAIL PROTECTED]
To: Dennis van Zanten [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 4:06 PM
Subject: Re: [PHP] What is wrong 


 Well, what's the error?

 Tyler Longren
 Captain Jack Communications
 [EMAIL PROTECTED]
 www.captainjack.com



 On Fri, 17 Aug 2001 15:57:13 +0200
 Dennis van Zanten [EMAIL PROTECTED] wrote:

  I wanna do this Insert:
 
  INSERT INTO sysdba_product_link VALUES ('','Y4DHVA0Q','CV/
  Boiler','','010','CVs','','7-12-2000 12:52:25','ADMIN','7-12-2000
  12:52:25','ADMIN','Solo +
  CV-Boiler','','','','','','','','Feenstra','','','','','','','','','S-HR
  24');
 
  In the following database structure what is wrong because it gives a
  errorand I don't see a problem in the insert line...???
  And already thanks for the help!!
 
  grtz,
  Dennis
  (dz-web.com)
 
Field Type Attributes Null Default Extra
PRODUCT_link  int(11)Noauto_increment
PRODUCTID  textNo
NAME  textNo
DESCRIPTION  longtextNo
ACTUALID  textNo
FAMILY  textNo
PRICE  doubleNo  0
CREATEDATE  textNo
CREATEUSER  textNo
MODIFYDATE  textNo
MODIFYUSER  textNo
PRODUCTGROUP  textNo
STATUS  textNo
UNIT  textNo
STOCKVOLUME  int(11)No  0
STOCKWEIGHT  int(11)No  0
STOCKITEM  textNo
PROGRAM  textNo
SUPPLIER  textNo
VENDOR  textNo
SITEID  textNo
WAREHOUSELOCATION  textNo
COMMISSIONABLE  textNo
TAXABLE  textNo
ACCOUNTINGPERIOD  textNo
GLACCOUNTNUMBER  textNo
GLSUBACCOUNTNUMBER  textNo
DATAOWNER  textNo
TYPE  textNo
 
 
 



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




[PHP] Invoking PHP scripts from a redirect location

2001-08-17 Thread Neil Freeman

Hi,

I am having trouble getting a redirected file's php section activating.
Some info to help you understand:

1) Within Apache's httpd.conf file I have the following set:
DocumentRoot D:/Program Files/Apache Group/Apache/realdocs
Directory D:/Program Files/Apache Group/Apache/realdocs
RedirectMatch permanent ^/$ P:/Main Projects/Test/index.php
ScriptAlias /php/ d:/php/
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php /php/php.exe

2)Within IE I enter:
http://localhost

which calls my index.php file:


html
head
titlePHP Test/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

/head

body bgcolor=#FF text=#00

script
document.write(And the line is...);
/script

?php
print please let me be seen;
?

/body
/html


This only prints out the javascript section though and doesn't appear to
call the php section. If I copy this file to my DocumentRoot directory
and then call it via:

http://localhost/index.php

all is well and both the javascript and php sections are displayed. Do I
need to somehow configure Apache to run php scripts from other locations
or am I doing something stupid?

Hope you can help,

Neil

 Email:  [EMAIL PROTECTED]
 [EMAIL PROTECTED]




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




Re: [PHP] What is wrong ????

2001-08-17 Thread J Smith


It might also help to know what database you're using, as the syntax 
between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres?

J


Dennis Van Zanten wrote:

 Ofcourse sorry:
 
 You have an error in your SQL syntax near '','','010','CVs','','7-12-2000
 12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27
 
 The Insert below is line 27 and I see no errors in the line maybe you guys
 do!!
 
 thanxs,
 Dennis
 
 
 
 - Original Message -
 From: Tyler Longren [EMAIL PROTECTED]
 To: Dennis van Zanten [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 4:06 PM
 Subject: Re: [PHP] What is wrong 
 
 
 Well, what's the error?

 Tyler Longren
 Captain Jack Communications
 [EMAIL PROTECTED]
 www.captainjack.com




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




[PHP] new IDE for PHP

2001-08-17 Thread Sandy Meier

Hi!

At the moment I am writing the PHP support for KDevelop3.0 
(http://www.kdevelop.org). The IDE ist modular and it is very easy to write 
plugins, so it is possible to implement support for all languages, make 
tools, GUI builders and so on. Actually there are plugins for C/C++, Java, 
Python, Perl and PHP. 
The complete program ist opensource and was developed by some people in their 
sparetime. 

At the moment there are following features in the PHP mode.

-modern editor with syntaxhighlighting (other editors are partly supported, 
for instance Nedit)
-class and function parser including different views (treeview, graphical 
view)
-intelligent Code Completion and argument help
-executing php scripts with shell or webserver (no finished yet)
-debugingtool for POSIX regular expressions
-project generation (application wizard) and projectmanagment
-documentation browser for the php documentation
-nice grep frontend
-classtools (generate new class..)
and so on.
Please look at a current screenshot to get a preview:
ftp://fara.cs.uni-potsdam.de/stud/smeier/shot1.png

Following features are planed
-debugger and profiler support (http:((dd.cron.ru/dbg)
-support for PHPDOC and similar tools
-support for  phpgtk (generation of framework...)
-better support for HTML (table generation, tags ...)
-code assistent (generate small codeparts from template)
and so on.

OK, now to the intentation of my email :-)

At the moment I'm the only one who implement the PHP support, so maybe 
someone want to help? It is more fun and we will get faster a first 
release.:-)  The IDE is written in C++, but the plugins can written in Java 
too, if someone want to do this. 
If you have some ideas or want to help please contact me. Thanks!

Ciao!
Sandy
--
ICQ: 27681958
for sending encryted emails please use:
ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key

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




Re: [PHP] new IDE for PHP

2001-08-17 Thread Nick Davies


Is there a alpha/beta of this available now :)

On Fri, 17 Aug 2001, Sandy Meier wrote:

 Hi!
 
 At the moment I am writing the PHP support for KDevelop3.0 
 (http://www.kdevelop.org). The IDE ist modular and it is very easy to write 
 plugins, so it is possible to implement support for all languages, make 
 tools, GUI builders and so on. Actually there are plugins for C/C++, Java, 
 Python, Perl and PHP. 
 The complete program ist opensource and was developed by some people in their 
 sparetime. 
 
 At the moment there are following features in the PHP mode.
 
 -modern editor with syntaxhighlighting (other editors are partly supported, 
 for instance Nedit)
 -class and function parser including different views (treeview, graphical 
 view)
 -intelligent Code Completion and argument help
 -executing php scripts with shell or webserver (no finished yet)
 -debugingtool for POSIX regular expressions
 -project generation (application wizard) and projectmanagment
 -documentation browser for the php documentation
 -nice grep frontend
 -classtools (generate new class..)
 and so on.
 Please look at a current screenshot to get a preview:
 ftp://fara.cs.uni-potsdam.de/stud/smeier/shot1.png
 
 Following features are planed
 -debugger and profiler support (http:((dd.cron.ru/dbg)
 -support for PHPDOC and similar tools
 -support for  phpgtk (generation of framework...)
 -better support for HTML (table generation, tags ...)
 -code assistent (generate small codeparts from template)
 and so on.
 
 OK, now to the intentation of my email :-)
 
 At the moment I'm the only one who implement the PHP support, so maybe 
 someone want to help? It is more fun and we will get faster a first 
 release.:-)  The IDE is written in C++, but the plugins can written in Java 
 too, if someone want to do this. 
 If you have some ideas or want to help please contact me. Thanks!
 
 Ciao!
 Sandy
 --
 ICQ: 27681958
 for sending encryted emails please use:
 ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key
 
 


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




Re: [PHP] new IDE for PHP

2001-08-17 Thread Sandy Meier

Am Freitag, 17. August 2001 17:14 schrieben Sie:
 Is there a alpha/beta of this available now :)
No, there isn't a release yet, but you can get the CVS version from the KDE 
CVS server.
see http://www.kde.org/anoncvs.html or by using cvsup
http://www.kde.org/cvsup.html

Ciao!
Sandy
-- 
for sending encryted emails please use:
ftp://fara.cs.uni-potsdam.de/stud/smeier/public_key

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




Re: [PHP] What is wrong ????

2001-08-17 Thread Dennis van Zanten

It's MYSQL I allready have located the problem but I still doesn't have a
sollution?
The problems are cost by slashes back slashes and ( ) signs in the fields
because I put the insert query into a string it doens't work out

Is there a function that solves this problem?
thanks,

Dennis


- Original Message -
From: J Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 10:33 AM
Subject: Re: [PHP] What is wrong 



 It might also help to know what database you're using, as the syntax
 between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres?

 J


 Dennis Van Zanten wrote:

  Ofcourse sorry:
 
  You have an error in your SQL syntax near
'','','010','CVs','','7-12-2000
  12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27
 
  The Insert below is line 27 and I see no errors in the line maybe you
guys
  do!!
 
  thanxs,
  Dennis
 
 
 
  - Original Message -
  From: Tyler Longren [EMAIL PROTECTED]
  To: Dennis van Zanten [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Friday, August 17, 2001 4:06 PM
  Subject: Re: [PHP] What is wrong 
 
 
  Well, what's the error?
 
  Tyler Longren
  Captain Jack Communications
  [EMAIL PROTECTED]
  www.captainjack.com
 



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




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




Re: [PHP] What is wrong ????

2001-08-17 Thread Tyler Longren

addslashes() might help you.

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 17 Aug 2001 17:16:18 +0200
Dennis van Zanten [EMAIL PROTECTED] wrote:

 It's MYSQL I allready have located the problem but I still doesn't have
 a
 sollution?
 The problems are cost by slashes back slashes and ( ) signs in the
 fields
 because I put the insert query into a string it doens't work out
 
 Is there a function that solves this problem?
 thanks,
 
 Dennis
 
 
 - Original Message -
 From: J Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 10:33 AM
 Subject: Re: [PHP] What is wrong 
 
 
 
  It might also help to know what database you're using, as the syntax
  between them all can vary slightly. PostgreSQL? MySQL? Oracle? Ingres?
 
  J
 
 
  Dennis Van Zanten wrote:
 
   Ofcourse sorry:
  
   You have an error in your SQL syntax near
 '','','010','CVs','','7-12-2000
   12:52:25','ADMIN','7-12-2000 12:52:25','ADMIN','S' at line 27
  
   The Insert below is line 27 and I see no errors in the line maybe
 you
 guys
   do!!
  
   thanxs,
   Dennis
  
  
  
   - Original Message -
   From: Tyler Longren [EMAIL PROTECTED]
   To: Dennis van Zanten [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Friday, August 17, 2001 4:06 PM
   Subject: Re: [PHP] What is wrong 
  
  
   Well, what's the error?
  
   Tyler Longren
   Captain Jack Communications
   [EMAIL PROTECTED]
   www.captainjack.com
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] XHTML compatible error messages

2001-08-17 Thread Jan

Hi out there!

I have got a problem with PHP's standard way of reporting errors.
The br in the error messages are making the XML invalid (should be br/). Is there 
an easy way to do this?

Jan.



Re: [PHP] XHTML compatible error messages

2001-08-17 Thread Tyler Longren

$string = Hello everyone!brHow are you today?;
$result = str_replace(br, br/, $string);

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 17 Aug 2001 17:40:07 +0200
Jan [EMAIL PROTECTED] wrote:

 Hi out there!
 
 I have got a problem with PHP's standard way of reporting errors.
 The br in the error messages are making the XML invalid (should be
 br/). Is there an easy way to do this?
 
 Jan.
 

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




RE: [PHP] XHTML compatible error messages

2001-08-17 Thread Jon Haworth

I think Jan meant that when PHP spits out Error in line x, it has a br
in there which causes the page to be invalid.

My question would be why are you trying to validate pages with errors in
anyway?

Cheers
Jon


-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: 17 August 2001 16:44
To: Jan
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] XHTML compatible error messages


$string = Hello everyone!brHow are you today?;
$result = str_replace(br, br/, $string);

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 17 Aug 2001 17:40:07 +0200
Jan [EMAIL PROTECTED] wrote:

 Hi out there!
 
 I have got a problem with PHP's standard way of reporting errors.
 The br in the error messages are making the XML invalid (should be
 br/). Is there an easy way to do this?
 
 Jan.
 

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




[PHP] stuck

2001-08-17 Thread Jeremy Morano

Hi,

Can someone please tell me what is wrong with this page. The problem is that
my option block is always stuck on the last record in the table. No matter
what option I choose, the information, address, city, state...etc, that is
passed is always the one of the last record in the table...Help!





?
session_start();
session_register(address);
session_register(city);
session_register(state);
session_register(zip_code);
session_register(country);
session_register(company);
session_register(occupation);
session_register(telephone);
session_register(fax);

$db_name = contact;
$table_name = company;

$connection = @mysql_connect(l, c, c) or die(Couldn't connect.);

$db = @mysql_select_db($db_name, $connection) or die(Couldn't select
database.);

$sql = SELECT *
FROM $table_name
;

$result = @mysql_query($sql,$connection) or die(Couldn't execute query.);


while ($row = mysql_fetch_array($result)) {
$uid = $row['uid'];
$address = $row['address'];
$city = $row['city'];
$state = $row['state'];
$zip_code = $row['zip_code'];
$country = $row['country'];
$company = $row['company'];
$occupation = $row['occupation'];
$telephone = $row['telephone'];
$fax = $row['fax'];

$option_block .= option value=\$uid\$company/option;
}



$display_block = 

FORM METHOD=post ACTION=show_adduserbycompany.php


PstrongCompany:/strong
select name=\uid\
$option_block
/select

INPUT TYPE=\SUBMIT\ NAME=\submit\ VALUE=\Select this Company\/P
/form

;

?


HTML
HEAD
TITLEUser Information: Add a User/TITLE
/HEAD
BODY
h1 User Information/h1
h2emAdd a User/em/h2
PSelect a company from the list below, to continue to the user
addition./p

? echo $display_block; ?

pa href=contact_menu.phpReturn to Main Menu/a/p

/BODY
/HTML


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




RE: [PHP] stuck

2001-08-17 Thread Jan De Luyck

You need to put the info in an array for all record to be available, like
this:

 while ($row = mysql_fetch_array($result)) {
$uid[] = $row['uid'];
$address[] = $row['address'];
$city[] = $row['city'];
$state[] = $row['state'];
$zip_code[] = $row['zip_code'];
$country[] = $row['country'];
$company[] = $row['company'];
$occupation[] = $row['occupation'];
$telephone[] = $row['telephone'];
$fax[] = $row['fax'];

and to get it out again, you need to use a for loop

for ($i = 0; $i  count($uid); $i++)
{
echo $uid[$i];
...
}

Hope this helps,

Jan De Luyck


 -Original Message-
 From: Jeremy Morano [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 6:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] stuck


 Hi,

 Can someone please tell me what is wrong with this page. The
 problem is that
 my option block is always stuck on the last record in the table. No matter
 what option I choose, the information, address, city, state...etc, that is
 passed is always the one of the last record in the table...Help!





 ?
 session_start();
 session_register(address);
 session_register(city);
 session_register(state);
 session_register(zip_code);
 session_register(country);
 session_register(company);
 session_register(occupation);
 session_register(telephone);
 session_register(fax);

 $db_name = contact;
 $table_name = company;

 $connection = @mysql_connect(l, c, c) or die(Couldn't connect.);

 $db = @mysql_select_db($db_name, $connection) or die(Couldn't select
 database.);

 $sql = SELECT *
   FROM $table_name
   ;

 $result = @mysql_query($sql,$connection) or die(Couldn't execute
 query.);


 while ($row = mysql_fetch_array($result)) {
   $uid = $row['uid'];
   $address = $row['address'];
   $city = $row['city'];
   $state = $row['state'];
   $zip_code = $row['zip_code'];
   $country = $row['country'];
   $company = $row['company'];
   $occupation = $row['occupation'];
   $telephone = $row['telephone'];
   $fax = $row['fax'];

   $option_block .= option value=\$uid\$company/option;
 }



 $display_block = 

 FORM METHOD=post ACTION=show_adduserbycompany.php


 PstrongCompany:/strong
 select name=\uid\
 $option_block
 /select

 INPUT TYPE=\SUBMIT\ NAME=\submit\ VALUE=\Select this Company\/P
 /form

 ;

 ?


 HTML
 HEAD
 TITLEUser Information: Add a User/TITLE
 /HEAD
 BODY
 h1 User Information/h1
 h2emAdd a User/em/h2
 PSelect a company from the list below, to continue to the user
 addition./p

 ? echo $display_block; ?

 pa href=contact_menu.phpReturn to Main Menu/a/p

 /BODY
 /HTML


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




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




Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Nick Davies


like 

if ($HTTP_REFERER == certain host) {
do finalise code
}




On Fri, 17 Aug 2001, Erich Zigler wrote:

 I am working on the last half of an Online Signup page for an ISP.
 
 There is a local .php page on the webserver that actually finalizes the
 addition of the user, but ONLY if $HTTP_REFERER is from a certain host. 
 
 I was wondering what you guys think of doing it this way? 
 
 Any advice would be appreciated. Thank you.
 
 


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




Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Nick Davies


Sorry missed a bit you'll just need to ereg out the hostname from
HTTP_REFERER - take everything after http:// and before /...

Nick.

On Fri, 17 Aug 2001, Erich Zigler wrote:

 I am working on the last half of an Online Signup page for an ISP.
 
 There is a local .php page on the webserver that actually finalizes the
 addition of the user, but ONLY if $HTTP_REFERER is from a certain host. 
 
 I was wondering what you guys think of doing it this way? 
 
 Any advice would be appreciated. Thank you.
 
 


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




Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Nick Davies


Probably best to read stuff first ;)

try preg_match

preg_match(/^(http:\/\/)?([\/]+)/i, $HTTP_REFERER, $hostname);

the hostname will be in $hostname[2]

Hope it helps.

On Fri, 17 Aug 2001, Nick Davies wrote:

 
 Sorry missed a bit you'll just need to ereg out the hostname from
 HTTP_REFERER - take everything after http:// and before /...
 
 Nick.
 
 On Fri, 17 Aug 2001, Erich Zigler wrote:
 
  I am working on the last half of an Online Signup page for an ISP.
  
  There is a local .php page on the webserver that actually finalizes the
  addition of the user, but ONLY if $HTTP_REFERER is from a certain host. 
  
  I was wondering what you guys think of doing it this way? 
  
  Any advice would be appreciated. Thank you.
  
  
 
 
 


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




Re: [PHP] stuck

2001-08-17 Thread Rob Hardowa

I'm not 100% sure what you want to accomplish here, or why it is stuck 
on the last row, but I've made some observations.

On Friday 17 August 2001 09:05 am, you wrote:
?
 session_start();
 session_register(address);
 session_register(city);
 session_register(state);
 session_register(zip_code);
 session_register(country);
 session_register(company);
 session_register(occupation);
 session_register(telephone);
 session_register(fax);

-Session register variables that were supposed to have been passed by a form.
For a piece of test code you may want to execute this to see what variables and
values were passed.  I think only UID and company have been passed via the uid select.

echo 'preFrom variables were:BR', print_r($HTTP_POST_VARS), '/pre';



 while ($row = mysql_fetch_array($result)) {
   $uid = $row['uid'];
   $address = $row['address'];
   $city = $row['city'];
   $state = $row['state'];
   $zip_code = $row['zip_code'];
   $country = $row['country'];
   $company = $row['company'];
   $occupation = $row['occupation'];
   $telephone = $row['telephone'];
   $fax = $row['fax'];

   $option_block .= option value=\$uid\$company/option;
 }

-Here you've requested a bunch of info back from your query, but you only use uid
and company in the option form, so you never actually pass the other info back to be
registered by the session in your first lines.  You could simplify with:

$option_block = NULL;
while ($row = mysql_fetch_array($result)) {
  $option_block .= 'option value='.$row['uid'].''.$row['company']. '/option';
}

you may also want to do an echo in this block, or examine your html source 
to make sure you are getting back the values you request, and make sure that uid
is unique to each row.

...if you need the other info you may want to do a query for it after the
UID and company have been passed via the form on the second iteration,
and then sess register them.


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




Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Erich Zigler

On Fri 17 Aug 2001, Nick Davies wrote:

 Probably best to read stuff first ;)
 try preg_match
 preg_match(/^(http:\/\/)?([\/]+)/i, $HTTP_REFERER, $hostname);
 the hostname will be in $hostname[2]
 Hope it helps.

Thanks. But is using $HTTP_REFERER the most secure way of doing it? Or can
the $HTTP_REFERER be forged and thus gaining unauthorized access to the
forms?

-- 
Erich Zigler

A sick mind is not necessarily the sign of a neat desk.

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




[PHP] Apache alias to a specific .htm file

2001-08-17 Thread Neil Freeman

Hi there,

In an ideal world I would like to be able to type http://localhost into
my browser and for Apache server to throw up a specific .htm file on my
hard drive. At the moment I have an Apache Alias set up as follows:

Alias /ife P:/My Projects/Storyboard

and you need to enter:

http://localhost/ife/index.htm

to get to this .htm file. How can I setup Apache to automatically 'pick
up' a set .htm file (ie, http://localhost equals P:/My
Projects/Storyboard/ife/index.htm).

Any help would be greatly appreciated.

Neil

 Email:  [EMAIL PROTECTED]
 [EMAIL PROTECTED]




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




[PHP] Attempt At Prev/Next Links

2001-08-17 Thread Gerard Samuel

Hey all.  Im trying to setup a page where it has prev/next links.  I 
have included a snip of the code.  On the first page everything is cool, 
but on subsequent pages, the count get out of control.  I was testing 
with displaying 5 entries at a time.  The first page is good, the next 
displays 7 and so on.  If you see anything in there, please let me know, 
its probably crude to what others are using but I wanted to give it a 
shot instead of coping someone elses work.
Thanks


$max_row = 5;
if ($op == next) {
$low = $low + $max_row;
$high = $low + $max_row;
$result = mysql_query(SELECT * FROM TABLENAME where Post='yes' LIMIT $low, 
$high);
while($row = mysql_fetch_row($result)) {
echo b$row[1] writes/b:br\n;
echo nbsp nbsp i$row[2]/ibr\n;
echo bAskLee writes/b:br\n;
echo nbsp nbsp i$row[3]/ibr\n;
echo hr\n;
 }
}
elseif ($op == prev) {
$low = $low - $max_row;
$high = $high - $max_row;
$result = mysql_query(SELECT * FROM TABLENAME where Post='yes' LIMIT $low, 
$high);
while($row = mysql_fetch_row($result)) {
echo b$row[1] writes/b:br\n;
echo nbsp nbsp i$row[2]/ibr\n;
echo bAskLee writes/b:br\n;
echo nbsp nbsp i$row[3]/ibr\n;
echo hr\n;
 }
} else {
$low = 0;
$high = $low + $max_row;
$result = mysql_query(SELECT * FROM TABLENAME where Post='yes' LIMIT $low, 
$high);
while($row = mysql_fetch_row($result)) {
echo b$row[1] writes/b:br\n;
echo nbsp nbsp i$row[2]/ibr\n;
echo bAskLee writes/b:br\n;
echo nbsp nbsp i$row[3]/ibr\n;
echo hr\n;
}
}
$result = mysql_query(SELECT * FROM mpn_asklee where Post='yes');
$num_rows = mysql_num_rows($result);
if ($num_rows  $max_row) {
echo table width=\100%\ cellspacing=\0\ border=\0\ 
cellpadding=\0\\n;
echo trtd align =\left\\n;
if ($low  $max_row) {
echo a href=\$PHP_SELF?op=prevlow=$lowhigh=$high\Previous/a;
}
echo /tdtd align =\right\\n;
if ($num_rows  $high) {
echo a href=\$PHP_SELF?op=nextlow=$lowhigh=$high\Next/a;
echo /td/tr/table\n
}
}
?



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


Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Rob Hardowa


According to the spec:
$HTTP_REFERER
The address of the page (if any) which referred the browser to the 
current page. This is set by the user's browser; not all browsers will set 
this. 

So if it is set by the user's browser, it can be changed, or shut off. 
I believe there are programs out there that block that env var so people do 
not leave tracks within a site as well. Look at tucows.com for such programs.

Typically, if a user went through 5 pages to sign up and is on the sixth 
page, I wouldn't worry about someone forging that too much.  I'd be more 
worried about referrer not being set and then not allowing them to signup 
because of that.  You can always set a variable like $PAGENUM in your code on 
the second last page and session register it, then check for it on the last 
page.  If it exists, do your thing and destroy the session.  If it does not 
exist, you can take the desired action.  Combine this with the HTTP_REFERER 
and I would think you should be fairly safebut remember, the HTTP_REFERER 
could be empty, whereas the session var should be trusted as it is coming 
from your own site.  

On Friday 17 August 2001 09:34 am, you wrote:

 Thanks. But is using $HTTP_REFERER the most secure way of doing it? Or can
 the $HTTP_REFERER be forged and thus gaining unauthorized access to the
 forms?

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




Re: [PHP] Apache alias to a specific .htm file

2001-08-17 Thread Jeffrey A Schoolcraft

if you have DirectoryIndex support you can specify what file it will use
as an index page.

for most unix type os's this seems to be index.php[ 3] index.htm[ l]
for IIS it's default.asp or something

Jeff

 In an ideal world I would like to be able to type http://localhost into
 my browser and for Apache server to throw up a specific .htm file on my

 to get to this .htm file. How can I setup Apache to automatically 'pick
 up' a set .htm file (ie, http://localhost equals P:/My
 Projects/Storyboard/ife/index.htm).

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




Re: [PHP] XHTML compatible error messages

2001-08-17 Thread Jan

Hi Jon,

If the execution of a script is not stopped (when a parse error occures
e.g.) then I could formate the error message within my generated XML with
XSLT. My browser does not show the page if it is not valid XML so I have to
use lynx in a putty telnet to look up my error messages which I would
prefere to do not. So my question is: How can I alter the PHP built in error
messaging format?

Thanks in advance,
Jan

 I think Jan meant that when PHP spits out Error in line x, it has a br
 in there which causes the page to be invalid.

 My question would be why are you trying to validate pages with errors in
 anyway?

 Cheers
 Jon


 -Original Message-
 From: Tyler Longren [mailto:[EMAIL PROTECTED]]
 Sent: 17 August 2001 16:44
 To: Jan
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] XHTML compatible error messages


 $string = Hello everyone!brHow are you today?;
 $result = str_replace(br, br/, $string);

 --
 Tyler Longren
 Captain Jack Communications
 [EMAIL PROTECTED]
 www.captainjack.com



 On Fri, 17 Aug 2001 17:40:07 +0200
 Jan [EMAIL PROTECTED] wrote:

  Hi out there!
 
  I have got a problem with PHP's standard way of reporting errors.
  The br in the error messages are making the XML invalid (should be
  br/). Is there an easy way to do this?
 
  Jan.
 

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




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




[PHP] merging arrays quickly

2001-08-17 Thread Michael

say I have
$array1 = array(name=NULL,thread=NULL,id=NULL);
$array2 = array(0=fred,1=3,2=);

I want $array1 to have the values of array2 - or $array2 to hve the keys
of $array1
A foreach loop works fine to do this - but I was wondering if there is a
quicker way to merge the values of one array to another array.

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




[PHP] File Open and Writes..

2001-08-17 Thread Ashwin Kutty

Hi,

I have a little function in my script that used to work until a little while
back and for some reason it has decided to act up.. It is a basic function that
reads a number from a file and then processes it, but increments it by 1,
writes it back to the file and closes it.. now it used to work ok, but somehow,
suddenly..

The function looks something along the lines of..

 $filename ='/path/to/my/file/filet';
 $fd = fopen( $filename,r);
 $prev_ord_id = fread ($fd, filesize ($filename));
 $order_id = $prev_ord_id+1;
 fclose( $fd );
 $ord_id = BW . $order_id;
 $fp = fopen( $filename,w+);
 fwrite( $fp, $order_id, 26);
 fclose( $fp );

The version of PHP on the server is:- 4.0.4pl1 and it sits on a RedHat Linux
7.1 server..

I know there were some questions about file related functions in one of the
versions of PHP but since this was working fine until now, I dont know..?


--
Wise men talk because they have something to say; fools talk
because they have to say something. - Plato

Ashwin Kutty
Systems Administrator
Dalhousie University Libraries
(902) 494-2694




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




[PHP] Using cURL on windows?

2001-08-17 Thread Brandon Orther

Hello,
 
How would I go about installing cURL for PHP on  windows box? 
 



[PHP] sessions

2001-08-17 Thread Jeremy Morano

Hi there, I was wondering if a function such as session_close() or
session_stop() existed. You see, i've been using session_destroy and/or
session_unregister but the problem is that they unregister and/or destroy
ALL my sessions in my server folder. What I am trying to do is just stop the
session that is going on in that particular page? How can I do this?


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




[PHP] Re: tutor about PHP

2001-08-17 Thread Ivo Stoykov

Thanks.


_lallous [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 zend.com
 php.net

 and lots more..





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




[PHP] Connecting to a MSSQL2000 database with a Linux box and PHP

2001-08-17 Thread Brandon Orther

Hello,
 
Does anyone know of a tutorial on how to get PHP to connect to a MSSQL
database from a Linux box? 
 



Re: [PHP] $HTTP_REFERER

2001-08-17 Thread Jesse Arnett

Hello,

i'm not sure i would worry too much about the referrer.. if your 'add
account' script has decent error checking, it shouldn't matter if the user
creates their own form.

-jesse
--
Jesse Arnett [EMAIL PROTECTED]
SISCOM Inc http://www.siscom.net/
Southern Ohio's Superior Internet Service Provider
Ph: 937.222.8150.413


- Original Message -
From: Erich Zigler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 12:13 PM
Subject: [PHP] $HTTP_REFERER


 I am working on the last half of an Online Signup page for an ISP.

 There is a local .php page on the webserver that actually finalizes the
 addition of the user, but ONLY if $HTTP_REFERER is from a certain host.

 I was wondering what you guys think of doing it this way?

 Any advice would be appreciated. Thank you.

 --
 Erich Zigler

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




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




Re: [PHP] sessions

2001-08-17 Thread Rob Hardowa

Hi Jeremy,

session_destroy() should not destroy all your sessions.  As per the manual:

session_destroy() destroys all of the data associated with the current 
session. 

If you are having trouble with all your sessions being deleted in each run, 
it may be a problem with these php.ini file settings:

session.gc_probability specifies the probability that the gc (garbage 
collection) routine is started on each request in percent. Defaults to 1. 

session.gc_maxlifetime specifies the number of seconds after which data will 
be seen as 'garbage' and cleaned up. 

You can find all the php session info at:
http://php.net/manual/en/html/ref.session.html


On Friday 17 August 2001 11:29 am, you wrote:
 Hi there, I was wondering if a function such as session_close() or
 session_stop() existed. You see, i've been using session_destroy and/or
 session_unregister but the problem is that they unregister and/or destroy
 ALL my sessions in my server folder. What I am trying to do is just stop
 the session that is going on in that particular page? How can I do this?

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




Re: [PHP] Connecting to a MSSQL2000 database with a Linux box and PHP

2001-08-17 Thread Michael Stearne

This should be in the manual or in the archives of the list.  I believe 
you have to use the Sybase drivers for Linux in order to conntect to the 
database.

Michael


Brandon Orther wrote:

Hello,
 
Does anyone know of a tutorial on how to get PHP to connect to a MSSQL
database from a Linux box? 
 




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




[PHP] Printf fails on large files

2001-08-17 Thread Inércia Sensorial Trabalhando

  Hi All,

  A friend of mine said his printf is failing when he parses a variable from
a 4.5 mega file. On smaller files, it works fine.

  There's a limit on the printf or somewhere else?

  Thanks.

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net



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




Re: [PHP] Printf fails on large files

2001-08-17 Thread John Meyer

At 05:14 PM 8/17/01 -0300, Inércia Sensorial Trabalhando wrote:
   Hi All,

   A friend of mine said his printf is failing when he parses a variable from
a 4.5 mega file. On smaller files, it works fine.

   There's a limit on the printf or somewhere else?

   Thanks.


Is he throwing the _entire_ 4.5 MB file into that variable and trying to 
print that?


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




[PHP] xslt extension and encodings

2001-08-17 Thread Adam Rambousek

hi,
I hope I'm asking on right place :)

I'm using xslt functions to transform xml document to html
it works perfectly, but I need to transform xml written in iso8859-2 to html
output also in iso8859-2

if I add ?xml encoding=iso-8859-2? at the beginning of xml, sablotron tells
me syntax error

I have sablotron 0.60; iconv is installed

could anyone help me please?

-- 
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber: [EMAIL PROTECTED]
* Linux is like teepee - no windows, no gates, Apache inside...


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




[PHP] Re: cgi timeout

2001-08-17 Thread Raymond Siow

I have just tried the set_time_limit() function and it still doesn't work

Ray

Raymond Siow wrote:

 Hi:

 I am trying to run a script and it supposed to take a lot of time... so
 I set the max_execution_time in the config file to 0...  (i think that's
 wat it's for no time limit) but after exactly 5 mins it gives me a
 cgi error saying that the cgi application exceeded the allowed time for
 processing so i changed the number to 1800 it still gets killed
 in 5 mins I have my php installed on a win2k system with IIS 5 under
 the dir c:\php and the file php.ini has been edited and put into
 c:\winnt\  What am I supposed to do in order to allow my script to run
 more than 5 mins??

 yours,
 Ray


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




RE: [PHP] cgi timeout

2001-08-17 Thread Erik H. Mathy

I haven't had to use IIS5 yet, but you might want to check in the IIS
setting for a max cgi execution time.

- Erik

 -Original Message-
 From: Raymond Siow [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 17, 2001 4:00 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] cgi timeout


 Hi:

 I am trying to run a script and it supposed to take a lot of time... so
 I set the max_execution_time in the config file to 0...  (i think that's
 wat it's for no time limit) but after exactly 5 mins it gives me a
 cgi error saying that the cgi application exceeded the allowed time for
 processing so i changed the number to 1800 it still gets killed
 in 5 mins I have my php installed on a win2k system with IIS 5 under
 the dir c:\php and the file php.ini has been edited and put into
 c:\winnt\  What am I supposed to do in order to allow my script to run
 more than 5 mins??

 yours,
 Ray


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



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




[PHP] Browser Detection Redirection -- PHP or Apache ???

2001-08-17 Thread Christopher Raymond


PHP Folks:

Does PHP provide some mechanism for browser detection  redirection or is
this something that Apache Directives can handle?

For example: I don't want users with browsers less than 4.0 to actually load
a page on our site. Instead, I want them redirected to a page that let's
them know their browser is in-compatible.

I know this is something JavaScript can do, but again that relies on the
browser.


Thanks for any help,

Christopher Raymond


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




Re: [PHP] Browser Detection Redirection -- PHP or Apache ???

2001-08-17 Thread Tyler Longren

the $HTTP_USER_AGENT variable will be of some use to you.

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com



On Fri, 17 Aug 2001 16:14:40 -0500
Christopher Raymond [EMAIL PROTECTED] wrote:

 
 PHP Folks:
 
 Does PHP provide some mechanism for browser detection  redirection or
 is
 this something that Apache Directives can handle?
 
 For example: I don't want users with browsers less than 4.0 to actually
 load
 a page on our site. Instead, I want them redirected to a page that let's
 them know their browser is in-compatible.
 
 I know this is something JavaScript can do, but again that relies on the
 browser.
 
 
 Thanks for any help,
 
 Christopher Raymond
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] Segmentation fault (core dumped)

2001-08-17 Thread Evan Nemerson

I am trying to run a repetitive script. Basically, one function over and 
over. Every time I run it from the command line I get Segmentation fault 
(core dumped). If I run it with the PHP module for apache, Segmentation 
fault (core dumped) appears in the error log.

It seems to be a memory issue. If I run it via the command line I can get 
through the function 1426 times, while the apache module only allows 1371 
(both are consistent).

If I reduce the output to the screen, the number of times the function runs 
increases.

I can't just minimize the output to the screen, I have to go through 62^12 
repetitions.

Does anyone have any ideas on how to fix this???


Thanks in advance,
Evan Nemerson

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




Re: [PHP] cgi timeout

2001-08-17 Thread Raymond Siow

ummm I tried look at the IIS setting... but couldn't find anything related
to CGI execution time do you know how to change that if I were to do it?

Ray

Erik H. Mathy wrote:

 I haven't had to use IIS5 yet, but you might want to check in the IIS
 setting for a max cgi execution time.

 - Erik

  -Original Message-
  From: Raymond Siow [mailto:[EMAIL PROTECTED]]
  Sent: Friday, August 17, 2001 4:00 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] cgi timeout
 
 
  Hi:
 
  I am trying to run a script and it supposed to take a lot of time... so
  I set the max_execution_time in the config file to 0...  (i think that's
  wat it's for no time limit) but after exactly 5 mins it gives me a
  cgi error saying that the cgi application exceeded the allowed time for
  processing so i changed the number to 1800 it still gets killed
  in 5 mins I have my php installed on a win2k system with IIS 5 under
  the dir c:\php and the file php.ini has been edited and put into
  c:\winnt\  What am I supposed to do in order to allow my script to run
  more than 5 mins??
 
  yours,
  Ray
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




[PHP] Can I turn this error off?

2001-08-17 Thread Rene Fournier

Just started learning PHP/MySQL a couple days ago, and would like to know if
I can somehow suppress the following error:

Warning: Undefined variable: submit in c:\Program Files\Apache
Group\Apache\htdocs/smartslitters/invoices.php on line 22

Is it just a server or PHP setting or something?  Any suggestions are much
appreciated. Thanks.

(I hope no minds if I attach the source files...)

...Rene

---
Rene Fournier,
[EMAIL PROTECTED]



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


Re: [PHP] cgi timeout

2001-08-17 Thread Raymond Siow

Seems like I've just found it if you look at how to config cgi setting in the
IIS help file... it will tell you about it...

yours,
Ray

Raymond Siow wrote:

 ummm I tried look at the IIS setting... but couldn't find anything related
 to CGI execution time do you know how to change that if I were to do it?

 Ray

 Erik H. Mathy wrote:

  I haven't had to use IIS5 yet, but you might want to check in the IIS
  setting for a max cgi execution time.
 
  - Erik
 
   -Original Message-
   From: Raymond Siow [mailto:[EMAIL PROTECTED]]
   Sent: Friday, August 17, 2001 4:00 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] cgi timeout
  
  
   Hi:
  
   I am trying to run a script and it supposed to take a lot of time... so
   I set the max_execution_time in the config file to 0...  (i think that's
   wat it's for no time limit) but after exactly 5 mins it gives me a
   cgi error saying that the cgi application exceeded the allowed time for
   processing so i changed the number to 1800 it still gets killed
   in 5 mins I have my php installed on a win2k system with IIS 5 under
   the dir c:\php and the file php.ini has been edited and put into
   c:\winnt\  What am I supposed to do in order to allow my script to run
   more than 5 mins??
  
   yours,
   Ray
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  


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




[PHP] Design Help: Tracking Users

2001-08-17 Thread Alnisa Allgood

Hi all:

I'm in the design stage of creating a client-account management 
system. We provide an array of support services to nonprofits, and I 
wish to develop a system that is more than just a basic service 
request system. I've been reading up on sessions management, as well 
as cookies. I've also been combing through a number of similar 
systems (either service request systems, or accounts management 
systems).

My question is this: is there a specific reason to use a tracking 
table in conjunction with session ids, other than knowing how often a 
user logs in?

I ask, because a few of the systems I've examined have tracking 
tables. But they all seem very brief just basically a trackid, 
sessionid, userid, datetime, with one or two other fields.

I don't need to keep track of what each user is doing per say, but 
I'm wondering if there have been other innovative uses of tracking 
user sessions, that maybe I should consider. What types of things 
would you use tracking for? and why?

Any comments would be appreciated.

Alnisa
-- 
   .
Alnisa  Allgood
Executive Director
Nonprofit Tech
(ph) 415.337.7412  (fx) 415.337.7927
(url)  http://www.nonprofit-techworld.org
(url)  http://www.nonprofit-tech.org
(url)  http://www.tech-library.org
   .
Nonprofit Tech E-Update
mailto:[EMAIL PROTECTED]
   .
applying technology to transform
   .

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




[PHP] Adding records to a MySql database

2001-08-17 Thread Dave.O

I am new to MySql but wanting to use PHP to update and maintain a database.
I thought I might use MySql.

I have installed MySql, and in PHP have created a database called 'mydir'. I
am trying to find php functions to add new records/fields to the database,
but all I can find are functions to query and get information from a
database.

Can anyone help or point me into the direction.

Thanks

Dave



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




[PHP] Help with linux / apache / php

2001-08-17 Thread James, Yz

Hi all,

I'll apologise right away - this is more or less completely off topic,
though it is remotely connected with PHP (so that's my excuse).

At the moment, the company I work for is hosted on a co-located server.  We
have one main domain and many sub domains.  Here's how they are (roughly set
up):

www.mainsite.com
www.sub1.mainsite.com
www.sub2.mainsite.com
www.sub3.mainsite.com
www.subn.mainsite.com

The document trees are like this:

/home/mainsite/www // main dir
/home/mainsite/www/sub1 //sub 1
/home/mainsite/www/sub2 // sub2
(etc)

We have just (in the last month or so) leased a cobalt raq all for our own
use.  Great.  However, the sites using this box are setup and maintained
using a web interface that comes as default with the box.  when setting up
sites (subs or otherwise), it adds sites (and you have to specify users for
those sites) with directory trees like this:

/home/sites/site1/web
/home/sites/site2/web
(etc)

Obviously, this causes problems (like for the php scripts that are running
on the current setup, where files are included / required as a part of the
main directory, and out of the document root (/home/mainsite/includes might
be an example)).

So, I'd like to learn how to use linux (bearing in mind that I have very
limited experience of unix based systems).  I can perform the very basic
commands, but would like to learn how to use / mainpulate the box through
shell access rather than over a web interface (which ultimately, I'm
assuming, will give me more flexibility - for example, I'd rather know how
to install the latest version of php onto the server following the
installation instructions than to attempt to do it through another medium).

I've bought a couple of books and hope to delve into them in the course of
the weekend and the next few weeks to come.  I'm assuming that one of the
first steps would be to install linux on my home machine and get a feel for
it (currently I'm running windows ouch).

So, here come the questions.
Where can I find the latest version of linux?  I have had a brief look at
freshmeat.net and linux.com, but didn't find any download sections (I didn't
look too hard, for reasons soon to be explained).

If I install linux, can I still use windows as a secondary OS (perhaps
running over the top of linux?)

If I can run windows as well as linux, am I best formatting my main drive,
installing linux, then windows?

Is the httpdconf file one of the main files i need to confifure for sites,
or are there many others (I've read a little about setting users up in vi
and will read more on that, but are there mounds of files that you need to
configure when setting up a new virtual site?)

I'm sorry about asking what's probably obvious to most of you, but that's
part of my reasoning behind asking on here - most of you will probably be
familiar with this stuff.  Another reason for asking here is that I don't
know of any other relevant alt groups.

I'm sure these questions have been asked many times before, but it really
has been one of those weeks, and I'm about fit to drop dead of exhaustion
(not your problem, I know, but the sympathy vote might work ;)) - I've had a
quick look through the archives and other sources, but the mounds of text
that surround the basic questions I'm asking are (in my dazed state) making
me even more dizzy.

Lastly, thanks for reading.  Any advice any of you can give, or any basic
pointers you might have, are greatly appreciated. Please cc any replies.

Thanks and goodnight,
James



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




[PHP] Re: Segmentation fault (core dumped)

2001-08-17 Thread Hugh Bothwell

Evan Nemerson [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I can't just minimize the output to the screen, I have to go through 62^12
 repetitions.

Uh, I hope you mean 6 * 2^12 (24576), not 62^12 (3226266762397899821056).
... assuming 10,000 reps per second, that would take a little over 10
billion years to
complete.

In either case, this really doesn't sound like something PHP is well-suited
for.

What is it you're trying to accomplish?  Maybe we can suggest a better
solution...



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




Re: [PHP] Adding records to a MySql database

2001-08-17 Thread ERISEN, Mehmet Kamil

In adition to that, you may want to check out the online
documentation on the www.php.net website. Find the section
under mySQL.
If you know how to manipulate data using SQL, php apis are
very easy to use ..
www.mysql.com could be good resource for you as well. 
if you have a specific question in mind, fire it away!!!

Erisen

--- Martín Marqués [EMAIL PROTECTED] wrote:
 On Vie 17 Ago 2001 19:17, you wrote:
  I am new to MySql but wanting to use PHP to update and
 maintain a database.
  I thought I might use MySql.
 
  I have installed MySql, and in PHP have created a
 database called 'mydir'.
  I am trying to find php functions to add new
 records/fields to the
  database, but all I can find are functions to query and
 get information
  from a database.
 
 You should first learn howto use an SQL database, and
 after that think about 
 using it. Read the MySQL tutorial. It's somewhrere in
 there web site.
 
 Saludos... :-)
 
 -- 
 Porqué usar una base de datos relacional cualquiera,
 si podés usar PostgreSQL?

-
 Martín Marqués  |   
 [EMAIL PROTECTED]
 Programador, Administrador, DBA |   Centro de
 Telematica
Universidad Nacional
 del Litoral

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


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




[PHP] SESSION question.

2001-08-17 Thread ERISEN, Mehmet Kamil

Hello,
I have implemented a user login with PHP Session functions.
THe problem I have is that if the user is logged in the
site using 
http://mysite.com/login.php and starts a session, the
session is not recognized when user is trying to utilize
the site with
http://www.mysite.com/dosomething.php

any suggestions?

thanks,
erisen.
ultrAslan.

=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




[PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY

There's gotta be an easier way to get create a date
properly formatted for MySQL's standard -MM-DD
DATE field format.  Any suggestions,
smacks-upside-the-head, etc. on how to reduce this
would be greatly appreciated.

Here's my code:

?php

$today = getdate();
$year = $today['year'];
$month = $today['mon'];
$mday = $today['mday'];

if ($month  10) {
// $month = join(0,$today['mon']);
$month = 0;
$month .= $today['mon'];
}

$printtoday = $year;
$printtoday .= -;
$printtoday .= $month;
$printtoday .= -;
$printtoday .= $mday;

print($printtoday);

?

It works, but sheesh...

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




[PHP] History of the browser

2001-08-17 Thread Ing. Raul Glez Rdguez

Hi Php Users.

How can I get the items of a browser's history?

Thank you.



Re: [PHP] looong date formatting for MySQL

2001-08-17 Thread Adam Rambousek

date(Y-m-d) should do the job

 There's gotta be an easier way to get create a date
 properly formatted for MySQL's standard -MM-DD
 DATE field format.  Any suggestions,
 smacks-upside-the-head, etc. on how to reduce this
 would be greatly appreciated.



-- 
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber: [EMAIL PROTECTED]
www: http://adamovy.cestiny.czhttp://hemzeni.poda.cz/matrix
* I'll save you from yourself, From those demons of the night
  They promise fame and fortune, All that you eagerly desire.  - Era


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




Re: [PHP] Can I turn this error off?

2001-08-17 Thread Rasmus Lerdorf

Turn off E_NOTICE in your php.ini file.

On Fri, 17 Aug 2001, Rene Fournier wrote:

 Just started learning PHP/MySQL a couple days ago, and would like to know if
 I can somehow suppress the following error:

 Warning: Undefined variable: submit in c:\Program Files\Apache
 Group\Apache\htdocs/smartslitters/invoices.php on line 22

 Is it just a server or PHP setting or something?  Any suggestions are much
 appreciated. Thanks.

 (I hope no minds if I attach the source files...)

 ...Rene

 ---
 Rene Fournier,
 [EMAIL PROTECTED]




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


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


RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread mike

?php
$a = date( Y\-m\-d );
print( $a );
?

should do the job... 

there is lot's of things that you can incorporate in the date
function... look it up at www.php.net/date

-Original Message-
From: CGI GUY [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] looong date formatting for MySQL


There's gotta be an easier way to get create a date
properly formatted for MySQL's standard -MM-DD
DATE field format.  Any suggestions,
smacks-upside-the-head, etc. on how to reduce this
would be greatly appreciated.

Here's my code:

?php

$today = getdate();
$year = $today['year'];
$month = $today['mon'];
$mday = $today['mday'];

if ($month  10) {
// $month = join(0,$today['mon']);
$month = 0;
$month .= $today['mon'];
}

$printtoday = $year;
$printtoday .= -;
$printtoday .= $month;
$printtoday .= -;
$printtoday .= $mday;

print($printtoday);

?

It works, but sheesh...

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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


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




RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread Jerry Lake

NOW()

Jerry Lake
Interface Engineering Technician



-Original Message-
From: Adam Rambousek [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:20 PM
To: CGI GUY; [EMAIL PROTECTED]
Subject: Re: [PHP] looong date formatting for MySQL


date(Y-m-d) should do the job

 There's gotta be an easier way to get create a date
 properly formatted for MySQL's standard -MM-DD
 DATE field format.  Any suggestions,
 smacks-upside-the-head, etc. on how to reduce this
 would be greatly appreciated.



--
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber:
[EMAIL PROTECTED]
www: http://adamovy.cestiny.czhttp://hemzeni.poda.cz/matrix
* I'll save you from yourself, From those demons of the night
  They promise fame and fortune, All that you eagerly desire.  - Era


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



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




Re: [PHP] looong date formatting for MySQL

2001-08-17 Thread CGI GUY

Thanks for the reply, however, that function call
doesn't zero-substitute (i.e., 07 for 7, 03 for
3, etc.); that's why I've added this:

if ($month  10) {
$month = 0;
$month .= $today['mon'];
}

By default, MySQL only accepts dates as -MM-DD;
PHP's getdate(Y-m-d) prints out -M-DD or
-MM-DD IF AND ONLY IF the month is two-digit.


--- Adam Rambousek [EMAIL PROTECTED] wrote:
 date(Y-m-d) should do the job
 
  There's gotta be an easier way to get create a
 date
  properly formatted for MySQL's standard -MM-DD
  DATE field format.  Any suggestions,
  smacks-upside-the-head, etc. on how to reduce this
  would be greatly appreciated.
 
 
 
 -- 
 Adam Rambousek
 email: [EMAIL PROTECTED] ICQ: 47596279
 Jabber: [EMAIL PROTECTED]
 www: http://adamovy.cestiny.cz   
 http://hemzeni.poda.cz/matrix
 * I'll save you from yourself, From those demons of
 the night
   They promise fame and fortune, All that you
 eagerly desire.  - Era
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




RE: [PHP] looong date formatting for MySQL

2001-08-17 Thread Jerry Lake

(regarding my previous post)

although, it probably doesn't apply
to what your doing.

Jerry Lake 
Interface Engineering Technician



-Original Message-
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:28 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] looong date formatting for MySQL


NOW()

Jerry Lake
Interface Engineering Technician



-Original Message-
From: Adam Rambousek [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 4:20 PM
To: CGI GUY; [EMAIL PROTECTED]
Subject: Re: [PHP] looong date formatting for MySQL


date(Y-m-d) should do the job

 There's gotta be an easier way to get create a date
 properly formatted for MySQL's standard -MM-DD
 DATE field format.  Any suggestions,
 smacks-upside-the-head, etc. on how to reduce this
 would be greatly appreciated.



--
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber:
[EMAIL PROTECTED]
www: http://adamovy.cestiny.czhttp://hemzeni.poda.cz/matrix
* I'll save you from yourself, From those demons of the night
  They promise fame and fortune, All that you eagerly desire.  - Era


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



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



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




Re[2]: [PHP] looong date formatting for MySQL

2001-08-17 Thread Adam Rambousek

look into the docs, there's possibility to display zeros (but I don't remeber
exact letter)

 Thanks for the reply, however, that function call
 doesn't zero-substitute (i.e., 07 for 7, 03 for
 3, etc.); that's why I've added this:


-- 
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber: [EMAIL PROTECTED]
www: http://adamovy.cestiny.czhttp://hemzeni.poda.cz/matrix
* Antivirus alert: file .signature infected by signature virus.
  Hi! I'm a signature virus! Copy me into your signature file to help me spread!


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




Re: [PHP] Adding records to a MySql database

2001-08-17 Thread ERISEN, Mehmet Kamil

Hello,
I am using the PHPMyAdmin for that. There is a website
www.phpwizard.net that you can download phpMyAdmin.
Hope this helps.
Mehmet.
--- Dave.O [EMAIL PROTECTED] wrote:
 I have read the documentation already.
 
 I am trying to create a directory, which information can
 be added and
 maintained through a the web browser.  I thought that
 using a MySql database
 would be a good idea rather than writing it all to a
 file.  You saying that
 MySql is a waste of time for this ?
 
 I thought that PHP can be used to add records etc and
 query databases for
 this
 
 
 
 Dave
 
 - Original Message -
 From: Martín Marqués [EMAIL PROTECTED]
 To: Dave.O [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, August 17, 2001 11:28 PM
 Subject: Re: [PHP] Adding records to a MySql database
 
 
  On Vie 17 Ago 2001 19:17, you wrote:
   I am new to MySql but wanting to use PHP to update
 and maintain a
 database.
   I thought I might use MySql.
  
   I have installed MySql, and in PHP have created a
 database called
 'mydir'.
   I am trying to find php functions to add new
 records/fields to the
   database, but all I can find are functions to query
 and get information
   from a database.
 
  You should first learn howto use an SQL database, and
 after that think
 about
  using it. Read the MySQL tutorial. It's somewhrere in
 there web site.
 
  Saludos... :-)
 
  --
  Porqué usar una base de datos relacional cualquiera,
  si podés usar PostgreSQL?
 

-
  Martín Marqués  |   
 [EMAIL PROTECTED]
  Programador, Administrador, DBA |   Centro de
 Telematica
 Universidad Nacional
  del Litoral
 

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


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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




Re[2]: [PHP] Adding records to a MySql database

2001-08-17 Thread Adam Rambousek

mysql_query() is universal for any SQL query
so mysql_query(INSERT INTO table () values ()) is what you're looking for

 I was looking for the command something like mysql_insert or something, just
 found dba_insert() is this it ?!?
-- 
Adam Rambousek
email: [EMAIL PROTECTED] ICQ: 47596279 Jabber: [EMAIL PROTECTED]
www: http://adamovy.cestiny.czhttp://hemzeni.poda.cz/matrix
* United we stand, divided we fall.  - Elminster


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




[PHP] debugger_on() undefined?

2001-08-17 Thread Jeffery Cann

Greetings.

I am running php 4.0.6, which I built as an apache module on Linux 2.2.14.  
I am trying to get debug information, using the 'debugger_on()' function.

My compilation line (from phpinfo()) is:

 './configure' '--prefix=/usr/local/php' '--with-config-file-path=/etc' 
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-track-vars' 
'--enable-magic-quotes' '--enable-debugger' '--with-mysql=/usr/local/mysql' 
'--with-interbase=/opt/interbase'

However, when I execute a php script that includes the 'debugger_on()' 
function, I get:

Fatal error: Call to undefined function: debugger_on()

This would seem that although I said '--enable-debugger' in the 
configuration, my debugger is either:  a) not working in php 4.0.6 or b) 
not compiled into my code.

I appreciate any hints, suggestions, etc.  The docs on php.net are rather 
weak on using the debugger_on() function.

Thanks
Jeff

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




Re: [PHP] merging arrays quickly

2001-08-17 Thread Reuben D Budiardja

Take a look at the function array_merge
http://www.php.net/array_merge

Reuben D. B

On Friday 17 August 2001 08:46 am, you wrote:
 say I have
 $array1 = array(name=NULL,thread=NULL,id=NULL);
 $array2 = array(0=fred,1=3,2=);

 I want $array1 to have the values of array2 - or $array2 to hve the keys
 of $array1
 A foreach loop works fine to do this - but I was wondering if there is a
 quicker way to merge the values of one array to another array.


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




Re: [PHP] merging arrays quickly

2001-08-17 Thread Michael

Reuben D Budiardja wrote:
 
 Take a look at the function array_merge
 http://www.php.net/array_merge
 
 Reuben D. B
 

I have - it's no use unfortuntely  - The array with the values has
numeric keys so they just get appended - would have been okay if they
had string keys though.


 On Friday 17 August 2001 08:46 am, you wrote:
  say I have
  $array1 = array(name=NULL,thread=NULL,id=NULL);
  $array2 = array(0=fred,1=3,2=);
 
  I want $array1 to have the values of array2 - or $array2 to hve the keys
  of $array1
  A foreach loop works fine to do this - but I was wondering if there is a
  quicker way to merge the values of one array to another array.

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




[PHP] Re: Errcode: 2 when running LOAD DATA LOCAL INFILE on server

2001-08-17 Thread Yeong CN

thank for reply me. But i think the problem is not in the .csv file because today when 
 I test it with netscape..it ok...

it return the message like that :



LOAD DATA LOCAL INFILE '/TEMP/phpB080AVGU' INTO TABLE
purchase FIELDS TERMINATED BY ','
 
(purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)

Successful.





but when I test with IE,it fail and return the message like that,



Error : LOAD DATA LOCAL INFILE 'C:\prchase3.csv' INTO TABLE
purchase FIELDS TERMINATED BY ','
 
(purchase_order,job_no,username,model,quantity,due_date,sent_date,courier_service,remark)

File 'c:purchase3.csv' not found (Errcode: 2) 




the difererent is between the file reading by IE 5.5 and Netscape 4.7 there...seem 
like IE reading file in C:\purchase3.csv and netscape reading file in 
/temp/phpB080AVGU 

but the true path of file is locate in c:\purchase3.csv...why this will happen?

So I think the problem is occur on the variable $textfile that I defined...can some 
body help me..thanks...


Post a couple of lines from your data file.  Does .csv insist on all
values single quoted?



On Thu, Aug 16, 2001 at 09:03:36PM -0700, Yeong CN wrote:
 Hi.
 This is the script I write to upload a .csv file into my online mysql database :
 
 $sql_query=LOAD DATA LOCAL INFILE '$textfile'  INTO TABLE purchase FIELDS 
 TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, 
 courier_service,remark); 
 $sql_query=($sql_query);
 $result=mysql_query($sql_query);
 $error_message=mysql_error();
   if(!$result)
   {
  echoError : $sql_querybrp;
  echo$error_message;
   }
  else if($result)
   {
 echo$sql_querybrp;
  echosuccessful;
   }
 
 When I try to run the script in localhost, it is work.But when I try in the \
 server,it can't work and return the error message like that : 
 Error : LOAD DATA LOCAL INFILE 'C:\\purchase3.csv' INTO TABLE purchase FIELDS \
 TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, 
 courier_service,remark) 
 File 'C:\purchase3.csv' not found (Errcode: 2) 
 
 
 I think it maybe the backsplashes that make the error occur..
 
 so I change the script like that :
 
 $sql_query=stripslashes($sql_query);
 
 But it still return the error message like that :
 
 Error : LOAD DATA LOCAL INFILE 'C:\purchase3.csv' INTO TABLE purchase FIELDS 
 TERMINATED BY ',' (purchase_order,job_no,username,model,quantity,due_date,sent_date, 
 courier_service,remark) 
 File 'C:purchase3.csv' not found (Errcode: 2) 
 
 
 What happen actually...hope that somebody can help me. Thanks.



Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

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




[PHP] question from a php newbie

2001-08-17 Thread 602e23



I'm so new to this, in fact, that I may not be able to
even frame my question correctly.  Please bear with me.

Suppose that I had a list in a data base of, say, countries
and that I built an array as

$states = array (
array(abbr=MA, name=Massachusetts),
array(abbr=NY, name=New York),
array(abbr=CA, name=California),
   [. . .]
)

is there a way to dump this array in a form which would allow
it to be written to an 'include' file.  I tried both var_dump
and print_r but neither method seems to have worked correctly.
The actual array which I have in mind is much more complicated
structurally than the states array shown above, but it is
unlikely to change more than once a day so it seems wastefull
to probe the database each time a copy is needed.

av0-


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




  1   2   >