[PHP] addslashes for db search?

2002-06-11 Thread andy

Hi there,

I have some db records starting with a ' E.g:  'Aimburu

Now I am wondering how to retrieve this records. without a addslashes it
returns an error. So I did add a slash, but then it does not find this
record.

I tryed this query:

...like '\'Aimburu %' ...

Do I have to change this db entries, and if how? How should they look like
and is there a good method to change all this thousands of records at once?

Thanx in advance,

Andy



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




RE: [PHP] SMS with PHP

2002-06-11 Thread Brian McGarvie

another solution would be to by a cellular modem, which can be set up on the 
windows/*nix machine and used to relay the message.

If not - depending on where you are based - some mobile providers do let you interface 
with their sms devices.

You could also have a look at - OpenSMS from www.livesoup.com - not tried it 
personally tho!

> -Original Message-
> From: Jared Boelens [mailto:[EMAIL PROTECTED]]
> Sent: 10 June 2002 6:59 PM
> To: Alexandra Aguiar; [EMAIL PROTECTED]
> Subject: RE: [PHP] SMS with PHP
> 
> 
> I had this exact need but I was solved partially by my cell 
> phone provider.
> I have verizon and verizon actaully assigns each phone an 
> email address if
> you have text messenging.
> 
> So all i had to do was send an email to that address and it 
> would go to my
> phone in about 30 seconds or so.
> 
> -Jared
> 
> -Original Message-
> From: Alexandra Aguiar [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 10, 2002 1:47 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] SMS with PHP
> 
> 
> Hello ppl...
> i'd like to know if it's possible that a php script sends  
> message to a cell
> phone... i please anything about it ...
> 
> thnx in advance..
> 
> Alexandra Aguiar
> 
> 

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




[PHP] catching plurals

2002-06-11 Thread Zac Hillier

Hi

I'm trying to write a function to catch and remove plurals from a search
feature, can anyone suggest how I can efficiently remove 'ies' and 's' from
the right hand end of each word within an array?

Thanks,

Zac


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




Re: [PHP] catching plurals

2002-06-11 Thread Dan Hardiker

> I'm trying to write a function to catch and remove plurals from a
> search feature, can anyone suggest how I can efficiently remove 'ies'
> and 's' from the right hand end of each word within an array?

Your best bet is to use a phonetic search (for speed) looking up against a
dictionary file although there are speed impacts.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



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




[PHP] the curse of the period

2002-06-11 Thread hugh danaher

This is certainly not a php question so boil me in oil the next time we meet.

I have a php page which gets a file upload from the user and attempts to put the file 
in a remote directory.  It is failing big time with the following warning:

Warning: Unable to create '../landmark/photos/8000.jpg': No such file or directory in 
/home/www/location/museum/trees/admin/upload2.php on line 27

The directory and file name:
museum/trees/admin/upload2.php

The directory I want to store the uploaded file is:
museum/landmark/photos/

I've tried two dots, three dots and more but have yet to hit upon the combination of 
dots, slashes or phases of the moon to keep the program from puking!

P.S. The page works if the storage directory is closer.

Any help gratefully accepted.
Hugh






php-general@lists.php.net

2002-06-11 Thread Neil Freeman

Hi,

For all you Unix gurus this should be run of the mill stuff but us 
Windows boys tend to get confused easily :)

How can I easily match occurrences of text along the lines of R&B and 
replace it with R&&B ?

The regular expression s/&/&&/g obviously replaces any occurrence of an 
ampersand with a double ampersand but I need to do a match so that it 
only replaces instances which have non whitespace on either side of it, 
ie \S&\S

I think I'm along the right lines but haven't had enough experience with 
regular expressions yet to 'finish the job'.

Hope you can help.

Neil

-- 

Work: [EMAIL PROTECTED]
Home: [EMAIL PROTECTED]

Web:  www.curvedvision.com



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




[PHP] Reading information from images

2002-06-11 Thread Bård Tommy Nilsen



Does anyone know about a script that is easy searches in folders for
In image files for given information:

Excample: I know that a field in a .jpg file is named Author: value

I want to search in the author value for a text.


Bård Tommy Nilsen


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




Re: [PHP] the curse of the period

2002-06-11 Thread Jason Wong

On Tuesday 11 June 2002 17:04, hugh danaher wrote:

> I have a php page which gets a file upload from the user and attempts to
> put the file in a remote directory.  It is failing big time with the
> following warning:
>
> Warning: Unable to create '../landmark/photos/8000.jpg': No such file or
> directory in /home/www/location/museum/trees/admin/upload2.php on line 27
>
> The directory and file name:
> museum/trees/admin/upload2.php
>
> The directory I want to store the uploaded file is:
> museum/landmark/photos/
>
> I've tried two dots, three dots and more but have yet to hit upon the
> combination of dots, slashes or phases of the moon to keep the program from
> puking!
>
> P.S. The page works if the storage directory is closer.

'closer' has nothing to do with it!

Easy way: use absolute directory paths.

Harder way: the path is relative to wherever your script which in this case is 
"museum/trees/admin/", you want to go "museum/landmark/photos/" which is 2 
directories up. Thus "../../landmark/photos/"

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

/*
Growing old isn't bad when you consider the alternatives.
-- Maurice Chevalier
*/


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




Re: [PHP] the curse of the period

2002-06-11 Thread hugh danaher

Thank you Jason,
I'll give it a try.
Hugh

dot dot slash slash Oh what a relief it is!
- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 2:33 AM
Subject: Re: [PHP] the curse of the period


> On Tuesday 11 June 2002 17:04, hugh danaher wrote:
>
> > I have a php page which gets a file upload from the user and attempts to
> > put the file in a remote directory.  It is failing big time with the
> > following warning:
> >
> > Warning: Unable to create '../landmark/photos/8000.jpg': No such file or
> > directory in /home/www/location/museum/trees/admin/upload2.php on line
27
> >
> > The directory and file name:
> > museum/trees/admin/upload2.php
> >
> > The directory I want to store the uploaded file is:
> > museum/landmark/photos/
> >
> > I've tried two dots, three dots and more but have yet to hit upon the
> > combination of dots, slashes or phases of the moon to keep the program
from
> > puking!
> >
> > P.S. The page works if the storage directory is closer.
>
> 'closer' has nothing to do with it!
>
> Easy way: use absolute directory paths.
>
> Harder way: the path is relative to wherever your script which in this
case is
> "museum/trees/admin/", you want to go "museum/landmark/photos/" which is 2
> directories up. Thus "../../landmark/photos/"
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Growing old isn't bad when you consider the alternatives.
> -- Maurice Chevalier
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] '--enable-track-vars' & php.ini file on Mac OS X

2002-06-11 Thread Stefan Rusterholz

Hi

I suppose you mean register_globals is off and should be on, right?
Ok, to make this short, do following: create a file "php.ini" on your 
desktop and write following into it:
register_globals=on

Make sure you have unix-linebreaks (use BBedit for example, or pepper) 
and a linebreak at the end of the line. Save the file and open the 
terminal. Enter
root
cp /Users//Desktop/php.ini /usr/local/lib/
apachectl restart

Now try it again. Register_globals should now be on. As another one has 
written, enable_track_vars is always on. I use the same installation 
(entropy.ch) for php :)

cya
Stefan Rusterholz

Am Dienstag den, 11. Juni 2002, um 09:02, schrieb Mario A. Salinas:

> Hi Folks,
>
> Let me begin with the direct question to save you time.  If you want 
> more info read more about the issue by reading 'The Problem:' below.
>
>
>
> The question:
>
> Is there any way to '--enable-track-vars' in my Macintosh laptop 
> running Mac OS-X 10.1.5 and a version 4.2.1 installation of PHP without 
> creating a php.ini file?  Is there a command I can run to do this?  If 
> so...  What directory do I need to be in when I do this?
>
>
> Configuration Info:
>
> Mac OS X
> PHP Version 4.2.1
>
>
>
> The problem:
>
> I have a PHP application which works fine on a Cobalt server that is 
> running PHP 4.0.2. My problem is that I'm trying to run this 
> application (a set of PHP scripts) on my Macintosh laptop which is 
> running Mac OS X 10.1.5.  I have tested the PHP installation using the 
> phpinfo() function on my laptop and it works fine.  But my scripts 
> require the tracking of variables.
>
> By running the phpinfo() function on both my laptop (PHP v. 4.2.1 this 
> does not run my scripts) and the cobalt server (PHP v. 4.0.2 this does 
> run my scripts) I noticed that there was some difference in the 
> configuration.  I noticed that my laptop configuration does not have 
> '--enable-track-vars' listed under the Configure Command information in 
> the PHP configuration page that results from running the phpinfo() 
> function but the Cobalt PHP installation does have that listed.
>
> The installation of PHP I used was obtained from:
>
> http://www.entropy.ch/software/macosx/php/
>
> This page says that this installation package does not include a 
> php.ini file and it goes on to say that, if I want this file I should 
> just create it.  But it does not say what should go into this php.ini 
> file.  I suppose I could just copy the php.ini file from the Cobalt 
> server running PHP v. 4.0.2 but I think that won't work.
>
> Any ideas?
>
>
> Thanks in advance,
>
>
> Mario Salinas
>
>
>
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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





[PHP] Re: SMS with PHP

2002-06-11 Thread Craig Donnelly

You need to have an SMS gateway..Have a look on hotscripts.com here:
http://www.hotscripts.com/search/?query=sms&category=php

Regards,

Craig

"Alexandra Aguiar" <[EMAIL PROTECTED]> wrote in message
025f01c210a6$d1657ce0$[EMAIL PROTECTED]">news:025f01c210a6$d1657ce0$[EMAIL PROTECTED]...
Hello ppl...
i'd like to know if it's possible that a php script sends  message to a cell
phone... i please anything about it ...

thnx in advance..

Alexandra Aguiar




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




[PHP] Re: Thank you.

2002-06-11 Thread Jason Wong

HI Mario

On Tuesday 11 June 2002 15:32, you wrote:
> Jason,
>
> Thank you for the information.  I'm not sure how I sent this posting
> incorrectly. I thought I had cleared the subject and the body of the
> first posting.  Regardless...  Thank you for the suggestion.

To cut a long story, if you are starting a new topic, start a new post.

Replying to an existing post and changing the subject and body does not change 
the headers. The headers are usually hidden and hold information on whether 
the post is new or is in reply to an existing one.

> Is session_start(); handled differently or supposed to be declared
> since version 4.0.2?

I don't know the answer to this so I'm putting it back onto the list.

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

/*
Remember to say hello to your bank teller.
*/


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




[PHP] apache/oracle/php

2002-06-11 Thread Michael P. Carel

Hi to all,

Is there anyone who could give me some reasons why does my php script with
oracle function does'nt work if i run apache as nobody/nobody?

My script only work if i run apache as oracle/dba.




Regards,

Mike


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




[PHP] Name of script

2002-06-11 Thread Christoph Starkmann

Hi there!

I don't find the function or variable
returning/containing the name of the
script itself;

like:

echo "Hi, my name is " . $SCRIPT_NAME;

Anyone can help?

(I did RTFM...)

Kiko

-- 
It's not a bug, it's a feature.

[.nfq]

christoph starkmann

tel.: 0821 / 56 97 94 34
fax.: 0821 / 56 97 94 38

http://www.gruppe-69.com/

ICQ: 100601600
-- 

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




[PHP] Name of file

2002-06-11 Thread Christoph Starkmann

I found the __FILE__ now, but this is not exactly what I want:
I would like to have one script generating links to itself,
only with different variables sent via GET like this:

http://www.mydomain.tld/myscript.php?request=showcontent

But __FILE__ gives me a file://-path... Do you have a smart 
idea how to avoid this? Of course I can strip simply everything
to [...]/htdocs/, but isn't there a smarter way?

Cheers,

Kiko

-- 
It's not a bug, it's a feature.

[.nfq]

christoph starkmann

tel.: 0821 / 56 97 94 34
fax.: 0821 / 56 97 94 38

http://www.gruppe-69.com/

ICQ: 100601600
-- 

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




Re: [PHP] Name of script

2002-06-11 Thread Liam MacKenzie

$PHP_SELF


- Original Message - 
From: "Christoph Starkmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 8:00 PM
Subject: [PHP] Name of script


> Hi there!
> 
> I don't find the function or variable
> returning/containing the name of the
> script itself;
> 
> like:
> 
> echo "Hi, my name is " . $SCRIPT_NAME;
> 
> Anyone can help?
> 
> (I did RTFM...)
> 
> Kiko
> 
> -- 
> It's not a bug, it's a feature.
> 
> [.nfq]
> 
> christoph starkmann
> 
> tel.: 0821 / 56 97 94 34
> fax.: 0821 / 56 97 94 38
> 
> http://www.gruppe-69.com/
> 
> ICQ: 100601600
> -- 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 




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




Re: [PHP] Name of script

2002-06-11 Thread René Moonen

Christoph Starkmann wrote:

>Hi there!
>
>I don't find the function or variable
>returning/containing the name of the
>script itself;
>
>like:
>
>echo "Hi, my name is " . $SCRIPT_NAME;
>
>Anyone can help?
>
>(I did RTFM...)
>
>Kiko
>
>  
>
$PHP_SELF

see Language Reference chapter 7 Variables

René


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




RE: [PHP] Name of script

2002-06-11 Thread Christoph Starkmann

Hi Liam, hi René!

Great, thanx alot, this gets me rid of all thinking ;)
At least concerning this... ;)

> $PHP_SELF
> see Language Reference chapter 7 Variables

Cheers,

Kiko

-- 
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.gruppe-69.com/
ICQ: 100601600
-- 

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




php-general@lists.php.net

2002-06-11 Thread Michael Weinberger


$x = preg_replace( "/([^\s&])&([^\s&])/", "$1&&$2", $x );
should do the job.
Michael

Neil Freeman <[EMAIL PROTECTED]> schrieb:

> Hi,
>
> For all you Unix gurus this should be run of the mill stuff but us
> Windows boys tend to get confused easily :)
>
> How can I easily match occurrences of text along the lines of R&B and
> replace it with R&&B ?
>
> The regular expression s/&/&&/g obviously replaces any occurrence of an
> ampersand with a double ampersand but I need to do a match so that it
> only replaces instances which have non whitespace on either side of it,
> ie \S&\S
>
> I think I'm along the right lines but haven't had enough experience with
> regular expressions yet to 'finish the job'.
>
> Hope you can help.
>
> Neil
>
> --
> 
> Work: [EMAIL PROTECTED]
> Home: [EMAIL PROTECTED]
>
> Web:  www.curvedvision.com
> 
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




RE: [PHP] the curse of the period

2002-06-11 Thread David Freeman


 > The directory and file name:
 > museum/trees/admin/upload2.php
 > 
 > The directory I want to store the uploaded file is:
 > museum/landmark/photos/

I've found that if you need more control over directory paths than
something fairly simple then you're often best off just declaring a set
of full paths and using them.  For example, I often use a config.php to
setup database connections and the like.  If I know I'm going to need to
access files in different directories from different parts of a site
I'll usually add something like:

$server_root = "/home/www/some/web/site";
$web_root= "http://www.some.server";;

Then if you need to do an include somewhere you can be sure that
something like this:

Include("$server_root/museum/trees/someinclude.php");

Will work.  Equally, referring to a default images directory can be
reliable also by using $web_root.

CYA, Dave



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




[PHP] Possible MSSQL error PHP4.2.0?

2002-06-11 Thread Jeremy Coates

Hi All,

I'm not sure if this is a bug or not:

Using MSSQL Server 2000 on WinNT (fully patched).
PHP 4.2.0 using ini_set('mssql.datetimeconvert',0)

Date fields get returned with an extra character on the end output from
var_dump:

string(20) "2002-08-06 11:45:02---^ Extra character seems 
to be ASCII 00

This is obviously mucking about with other date related functions.

Any ideas?

Regards,
Jeremy Coates
-- 

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




php-general@lists.php.net

2002-06-11 Thread Neil Freeman

That's perfect Michael. Thanks a lot for your help :)

Neil

Michael Weinberger wrote:
> **
> This Message Was Virus Checked With : SAVI 3.58 May 2002 
> Last Updated 11th June 2002
> **
> 
> 
> $x = preg_replace( "/([^\s&])&([^\s&])/", "$1&&$2", $x );
> should do the job.
> Michael
> 
> Neil Freeman <[EMAIL PROTECTED]> schrieb:
> 
> 
>>Hi,
>>
>>For all you Unix gurus this should be run of the mill stuff but us
>>Windows boys tend to get confused easily :)
>>
>>How can I easily match occurrences of text along the lines of R&B and
>>replace it with R&&B ?
>>
>>The regular expression s/&/&&/g obviously replaces any occurrence of an
>>ampersand with a double ampersand but I need to do a match so that it
>>only replaces instances which have non whitespace on either side of it,
>>ie \S&\S
>>
>>I think I'm along the right lines but haven't had enough experience with
>>regular expressions yet to 'finish the job'.
>>
>>Hope you can help.
>>
>>Neil
>>
>>--
>>
>>Work: [EMAIL PROTECTED]
>>Home: [EMAIL PROTECTED]
>>
>>Web:  www.curvedvision.com
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> 
> 


-- 

Work: [EMAIL PROTECTED]
Home: [EMAIL PROTECTED]

Web:  www.curvedvision.com



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




[PHP] Installation and/or configuration problems w 4.2.1 on NT

2002-06-11 Thread George Pitcher

Hi all,

I have PHP running happily on three of my servers (NT/2000/Linux) and need
to set it up on NT on a server 400 miles away. I have remote access to the
server.

I have followed the instructions for both the ISAPI version and the CGI
version with no success.

This is the error message I get when I try to call phpinfo.php:

HTTP Error 401
401.3 Unauthorized: Unauthorized due to ACL on resource

I'm now just about to start pulling my hair out, so can someone help before
I'm totally bald.



I did try the PHP-Win list but no response there.



Regards

George



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




[PHP] Re: apache/oracle/php

2002-06-11 Thread David Robley

In article <00cb01c2112c$a1530140$[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Hi to all,
> 
> Is there anyone who could give me some reasons why does my php script with
> oracle function does'nt work if i run apache as nobody/nobody?
> 
> My script only work if i run apache as oracle/dba.

Does oracle not require you to pass appropriate user/pass when you accces 
it?

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry

My web hosting company is running  php 4.0.4pl1

Why should it be that these are different



and



When I say different I mean;

1) global variable are not avaiable in the second version
2) functions defined in the included file are not accessable in the
including file.
3) in both examples the file is included, its just the scope that seem shot

Any answers?

Henry




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




RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg

Out of curiosity, try



& see if it behaves differently (i.e., no parens around the
include file name).

> -Original Message-
> From: Henry [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 8:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] include_once("blah"); vs $blah="blah";
> include($blah);
>
>
> My web hosting company is running  php 4.0.4pl1
>
> Why should it be that these are different
>
> 
> global $root;
> include_once("include\blah.php");
>
> ?>
>
> and
>
> 
> global $root;
> $blah="include\blah.php";
> include_once($blah);
>
> ?>
>
> When I say different I mean;
>
> 1) global variable are not avaiable in the second version
> 2) functions defined in the included file are not
> accessable in the
> including file.
> 3) in both examples the file is included, its just the
> scope that seem shot
>
> Any answers?
>
> Henry
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




[PHP] Question about tag

2002-06-11 Thread Nightshade

Hi there, I'm working with PHP since 3 weeks, so I'm newbie and maybe I
could say some bull  :-)
That's my question:
Let's suppose that I make a ...mmm...forum. Now, in a Textbox i write my
comment and I add also this

So I post all I wrote to db.
Ok, when I gonna read this record from database with the other comments,
is here the possibility that piece of code, is executed, making some
"disaster" into my directory?
I hope you understand my question,and sorry x my english... :) 
tia, jonny

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




[PHP] mysql problems, need help quick

2002-06-11 Thread Hawk

I'm filling a database with info, and I'm using id as identifiers in the
list, the id is auto increment, and I deleted one entry, now I have a hole
in the database, is there any way to fix this?
lets say I have
1
2
3
4
5
6
And I deleted 6
Now it looks like
1
2
3
4
5
7
8
9 and so on

is there somewhere the "next" number is located ?




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




RE: [PHP] mysql problems, need help quick

2002-06-11 Thread Jon Haworth

Hi Hawk,

(snip auto-incrementing PKs)

> is there somewhere the "next" number is located ?

No. Why would you care, anyway? The thing about PKs is that they have to be
unique, not sequential.

If you're *really* bothered by it, you'll have to dump the contents of the
table to a file, drop the table, recreate it, and import the contents into
the new table. I'd also suggest, if these numbers have to be sequential,
that you look hard at your db design to see if this is the right column to
use as a PK.

Incidentally, this is a PHP list. If you need to ask MySQL questions, please
join one of the lists at http://mysql.com/.

Cheers
Jon

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




[PHP] Newbie needs some help picking a php editor.

2002-06-11 Thread Al

I spent a good bit of time looking at editors to help me prepare and 
modify php scripts.  I've found it very time consuming to evaluate them.

In general, I've found you have to download, install and play with them 
some just to determine if they fit your needs.  And I know from 
experience, often programs only show their deficiencies after you've 
used them a bit.

And, I've found many that claim "php" editing; but they really aren't 
anything but a simple plain text editor.

My needs are modest.  I'm well versed with HTML, css, etc.  And have 
done a bit of customizing scripts.

For now, I mostly need an editor that will:
  Help me keep the syntax correct.
  Provide a list of functions, etc. to pick from.
  Upload my script files via ftp.
  Have the usual search/replace across files

Would be nice if it:
  Had a project feature
  Could run a script I'm working on locally with its includes, etc. on 
my remote host.

Right now I'm looking at "php Coder Pro"; "phpEdit" and "UltraEdit".

Can anyone comment on these?  And please suggest any others.

Thanks.


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




[PHP] comparing strings does not work

2002-06-11 Thread andy

Hi there,

I would like to compare 2 strings.

I do always get a 0 return (not equal) but they are difinatelly equal,  I
double checked it. They are just in two different vars.

Here is how I did it:

 if (strcmp($city, $city_new) != 0) $error = true;

Does anybody see the error? Or am I going the wrong way?

Andy



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




[PHP] Converting binary data

2002-06-11 Thread Lucijan

Hi

I'm retriving some binary data from a Interbase blob field (a custom format
to do some drawing) into a php variable like this:

$blh = ibase_blob_open($row[4]);
while ($blob = ibase_blob_get($blh, 400))
  $Objects .= $blob;
ibase_blob_close($blh);

Now I want to tell php to get first 4 bytes (btw, is there something that
returns size of integer - sizeof seems to work on arrays only), and convert
them to integer

Thanks

Lucijan



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




[PHP] Determine if variable is set

2002-06-11 Thread J. Anderson Scarbrough

This is probably an easy answer, but I cannot seem to find it.  Is it 
possible to determine whether a variable is set with either $_POST or $GET 
without having to do:

if(isset($_POST['foo']) || isset($_GET['foo']))
 //do something



_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] Help with header function

2002-06-11 Thread Shane Kelly

LOL...thanks ed...figured it out last night...
don't need to do a file_exists

since i capture file_name in my db...I do a query before the insert to see
if the file_name entered in the form, matches any of the file_names stored
in mySQL.  if the count of the record set > 0 then the file exists, and
redirect using header: Location...etc,etc.

If count=0 then insert form contents into docuemnt and copy file to folder.

Thanks

Shane
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> LOL  Yea, it's always much easier if we have actual code to work from
rather
> than taking guesses in the dark.
>
> -Original Message-
> Why do I get the feeling I'm playing that "mind bender" game where you
have
> to guess the right combination within so many turns?  LOL
>
>

> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.
>



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




Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry

I did as you suggest with an interesting result:

include_once "blah.php";

worked

var $blah="blah.php";
include_once $blah;

gave the following error:

Parse error: parse error in  on line 


Where the  is the file that was doing the include!



Previously include_once($blah) just messed up the scoping and global vars!

Henry

"Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Out of curiosity, try
>
>  global $root;
> $blah="include\blah.php";
> include_once $blah;
> ?>
>
> & see if it behaves differently (i.e., no parens around the
> include file name).
>
> > -Original Message-
> > From: Henry [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 11, 2002 8:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] include_once("blah"); vs $blah="blah";
> > include($blah);
> >
> >
> > My web hosting company is running  php 4.0.4pl1
> >
> > Why should it be that these are different
> >
> >  >
> > global $root;
> > include_once("include\blah.php");
> >
> > ?>
> >
> > and
> >
> >  >
> > global $root;
> > $blah="include\blah.php";
> > include_once($blah);
> >
> > ?>
> >
> > When I say different I mean;
> >
> > 1) global variable are not avaiable in the second version
> > 2) functions defined in the included file are not
> > accessable in the
> > including file.
> > 3) in both examples the file is included, its just the
> > scope that seem shot
> >
> > Any answers?
> >
> > Henry
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



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




RE: [PHP] comparing strings does not work

2002-06-11 Thread Jonathan Rosenberg

strcmp returns 0 if the two strings are equal.

In any case, why not just do

if ($city == $city_new) $error = true;

> -Original Message-
> From: andy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 9:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] comparing strings does not work 
> 
> 
> Hi there,
> 
> I would like to compare 2 strings.
> 
> I do always get a 0 return (not equal) but they are 
> difinatelly equal,  I
> double checked it. They are just in two different vars.
> 
> Here is how I did it:
> 
>  if (strcmp($city, $city_new) != 0) $error = true;
> 
> Does anybody see the error? Or am I going the wrong way?
> 
> Andy
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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




[PHP] Re: Possible MSSQL error PHP4.2.0?

2002-06-11 Thread Jeremy Coates

In message <[EMAIL PROTECTED]>
  [EMAIL PROTECTED] (Jeremy Coates) wrote:
> 
> string(20) "2002-08-06 11:45:02@"
> ---^ Extra character seems to be ASCII 00

Forgot that would screw up in an email! I've placed an @ sign where the ASCII
00 is appearing.

Ideas?

Regards,
Jeremy
-- 

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




RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg

Hmmm ... does the line number in the error message point to
something in the includeD file?  I.e., might you have some error
in the file you are including?

> -Original Message-
> From: Henry [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 9:11 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] include_once("blah"); vs $blah="blah";
> include($blah);
>
>
> I did as you suggest with an interesting result:
>
> include_once "blah.php";
>
> worked
>
> var $blah="blah.php";
> include_once $blah;
>
> gave the following error:
>
> Parse error: parse error in  on line
> 
>
>
> Where the  is the file that was doing
> the include!
>
>
>
> Previously include_once($blah) just messed up the
> scoping and global vars!
>
> Henry
>
> "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Out of curiosity, try
> >
> >  > global $root;
> > $blah="include\blah.php";
> > include_once $blah;
> > ?>
> >
> > & see if it behaves differently (i.e., no parens around the
> > include file name).
> >
> > > -Original Message-
> > > From: Henry [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 11, 2002 8:15 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] include_once("blah"); vs $blah="blah";
> > > include($blah);
> > >
> > >
> > > My web hosting company is running  php 4.0.4pl1
> > >
> > > Why should it be that these are different
> > >
> > >  > >
> > > global $root;
> > > include_once("include\blah.php");
> > >
> > > ?>
> > >
> > > and
> > >
> > >  > >
> > > global $root;
> > > $blah="include\blah.php";
> > > include_once($blah);
> > >
> > > ?>
> > >
> > > When I say different I mean;
> > >
> > > 1) global variable are not avaiable in the second version
> > > 2) functions defined in the included file are not
> > > accessable in the
> > > including file.
> > > 3) in both examples the file is included, its just the
> > > scope that seem shot
> > >
> > > Any answers?
> > >
> > > Henry
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry

No, the line number is just of the line in the includING file of the
include_once statement.

It's very odd, is this a known limitation of PHP i..e. includes cannot have
variable or functional file names.

i.e.

It's ok to do
include_once("include/reallyimportantstuff.php");

But it's not ok to do any of the following:

1)
$filename="include/reallyimportantstuff.php";
include_once($filename);

2)
include_once("include"."/reallyimportantstuff.php");

3)
$root="include";
include_once($root."/reallyimportantstuff.php");

?


Henry


"Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hmmm ... does the line number in the error message point to
> something in the includeD file?  I.e., might you have some error
> in the file you are including?
>
> > -Original Message-
> > From: Henry [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 11, 2002 9:11 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] include_once("blah"); vs $blah="blah";
> > include($blah);
> >
> >
> > I did as you suggest with an interesting result:
> >
> > include_once "blah.php";
> >
> > worked
> >
> > var $blah="blah.php";
> > include_once $blah;
> >
> > gave the following error:
> >
> > Parse error: parse error in  on line
> > 
> >
> >
> > Where the  is the file that was doing
> > the include!
> >
> >
> >
> > Previously include_once($blah) just messed up the
> > scoping and global vars!
> >
> > Henry
> >
> > "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Out of curiosity, try
> > >
> > >  > > global $root;
> > > $blah="include\blah.php";
> > > include_once $blah;
> > > ?>
> > >
> > > & see if it behaves differently (i.e., no parens around the
> > > include file name).
> > >
> > > > -Original Message-
> > > > From: Henry [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, June 11, 2002 8:15 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] include_once("blah"); vs $blah="blah";
> > > > include($blah);
> > > >
> > > >
> > > > My web hosting company is running  php 4.0.4pl1
> > > >
> > > > Why should it be that these are different
> > > >
> > > >  > > >
> > > > global $root;
> > > > include_once("include\blah.php");
> > > >
> > > > ?>
> > > >
> > > > and
> > > >
> > > >  > > >
> > > > global $root;
> > > > $blah="include\blah.php";
> > > > include_once($blah);
> > > >
> > > > ?>
> > > >
> > > > When I say different I mean;
> > > >
> > > > 1) global variable are not avaiable in the second version
> > > > 2) functions defined in the included file are not
> > > > accessable in the
> > > > including file.
> > > > 3) in both examples the file is included, its just the
> > > > scope that seem shot
> > > >
> > > > Any answers?
> > > >
> > > > Henry
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>



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




[PHP] Re: mysql problems, need help quick

2002-06-11 Thread Shane Kelly

not on auto increment...thats the point!
why would you need to get the #6 back anyway...

this is the fundementals of database theory... chances are the database is
using this autoincrement field as the PRIMARY KEY...in which case no
duplicates are allowed..

In terms of records...your id#7 has become record #6.

I can't think of any reason why loosing the #6 should affect anything you
want to do.

XXx
"Hawk" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm filling a database with info, and I'm using id as identifiers in the
> list, the id is auto increment, and I deleted one entry, now I have a hole
> in the database, is there any way to fix this?
> lets say I have
> 1
> 2
> 3
> 4
> 5
> 6
> And I deleted 6
> Now it looks like
> 1
> 2
> 3
> 4
> 5
> 7
> 8
> 9 and so on
>
> is there somewhere the "next" number is located ?
>
>
>



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




[PHP] Re: Newbie needs some help picking a php editor.

2002-06-11 Thread Shane Kelly

Hi Al...

I use Macromedia Dreamweaver UltraDev with PHAkt plugin (you'll have to add
it from the dreamweaver ultradev extensions @ www.macromedia.com/exchange

Macromedia UltraDev is available for 30 day free trial at their site

it has brilliant php support..you barely have to know a stitch of code, but
it helps.

There are also other PHP extensions available at macromedia exchange.

check out www.php.net
they talk about other possible resources...but I love ultradev.





"Al" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I spent a good bit of time looking at editors to help me prepare and
> modify php scripts.  I've found it very time consuming to evaluate them.
>
> In general, I've found you have to download, install and play with them
> some just to determine if they fit your needs.  And I know from
> experience, often programs only show their deficiencies after you've
> used them a bit.
>
> And, I've found many that claim "php" editing; but they really aren't
> anything but a simple plain text editor.
>
> My needs are modest.  I'm well versed with HTML, css, etc.  And have
> done a bit of customizing scripts.
>
> For now, I mostly need an editor that will:
>   Help me keep the syntax correct.
>   Provide a list of functions, etc. to pick from.
>   Upload my script files via ftp.
>   Have the usual search/replace across files
>
> Would be nice if it:
>   Had a project feature
>   Could run a script I'm working on locally with its includes, etc. on
> my remote host.
>
> Right now I'm looking at "php Coder Pro"; "phpEdit" and "UltraEdit".
>
> Can anyone comment on these?  And please suggest any others.
>
> Thanks.
>



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




Re: [PHP] mysql problems, need quick help

2002-06-11 Thread Adam Voigt

Primary Key's, by nature, are designed to always be uniqiue, which
means that even if you delete row 6, the next row you insert will be
10 because there is no id 10. If you simply need to get the list of
items in a query, in the order they were inserted, I would suggest using
something like: SELECT * FROM table_name ORDER BY id ASC;
Which will select everything from table_name (with no criteria such as a
WHERE clause) and order it by the id in ascending order (ie,
1,2,3,4,etc.). Avid SQL users will be quick to point out that ASC is not
required as ascending is the default pattern in an order by, but I still
like to specify. =) Let me know if you have any other questions.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-06-11 at 08:52, Hawk wrote:
> I'm filling a database with info, and I'm using id as identifiers in
the
> list, the id is auto increment, and I deleted one entry, now I have a
hole
> in the database, is there any way to fix this?
> lets say I have
> 1
> 2
> 3
> 4
> 5
> 6
> And I deleted 6
> Now it looks like
> 1
> 2
> 3
> 4
> 5
> 7
> 8
> 9 and so on
> 
> is there somewhere the "next" number is located ?
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] hi

2002-06-11 Thread Bjorn Abt

unsubscribe



RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg

The examples in the online manual indicate that it is ok to use
the value of a variable for the file name:

http://www.php.net/manual/en/function.include.php

it also shows examples without the parentheses.

Looks like (yet another) PHP bug to me.

Maybe someone more knowledgeable can comment.

> -Original Message-
> From: Henry [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 9:45 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] include_once("blah"); vs $blah="blah";
> include($blah);
>
>
> No, the line number is just of the line in the
> includING file of the
> include_once statement.
>
> It's very odd, is this a known limitation of PHP i..e.
> includes cannot have
> variable or functional file names.
>
> i.e.
>
> It's ok to do
> include_once("include/reallyimportantstuff.php");
>
> But it's not ok to do any of the following:
>
> 1)
> $filename="include/reallyimportantstuff.php";
> include_once($filename);
>
> 2)
> include_once("include"."/reallyimportantstuff.php");
>
> 3)
> $root="include";
> include_once($root."/reallyimportantstuff.php");
>
> ?
>
>
> Henry
>
>
> "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hmmm ... does the line number in the error message point to
> > something in the includeD file?  I.e., might you
> have some error
> > in the file you are including?
> >
> > > -Original Message-
> > > From: Henry [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 11, 2002 9:11 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [PHP] include_once("blah"); vs $blah="blah";
> > > include($blah);
> > >
> > >
> > > I did as you suggest with an interesting result:
> > >
> > > include_once "blah.php";
> > >
> > > worked
> > >
> > > var $blah="blah.php";
> > > include_once $blah;
> > >
> > > gave the following error:
> > >
> > > Parse error: parse error in  on line
> > > 
> > >
> > >
> > > Where the  is the file that was doing
> > > the include!
> > >
> > >
> > >
> > > Previously include_once($blah) just messed up the
> > > scoping and global vars!
> > >
> > > Henry
> > >
> > > "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Out of curiosity, try
> > > >
> > > >  > > > global $root;
> > > > $blah="include\blah.php";
> > > > include_once $blah;
> > > > ?>
> > > >
> > > > & see if it behaves differently (i.e., no parens
> around the
> > > > include file name).
> > > >
> > > > > -Original Message-
> > > > > From: Henry [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Tuesday, June 11, 2002 8:15 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: [PHP] include_once("blah"); vs $blah="blah";
> > > > > include($blah);
> > > > >
> > > > >
> > > > > My web hosting company is running  php 4.0.4pl1
> > > > >
> > > > > Why should it be that these are different
> > > > >
> > > > >  > > > >
> > > > > global $root;
> > > > > include_once("include\blah.php");
> > > > >
> > > > > ?>
> > > > >
> > > > > and
> > > > >
> > > > >  > > > >
> > > > > global $root;
> > > > > $blah="include\blah.php";
> > > > > include_once($blah);
> > > > >
> > > > > ?>
> > > > >
> > > > > When I say different I mean;
> > > > >
> > > > > 1) global variable are not avaiable in the
> second version
> > > > > 2) functions defined in the included file are not
> > > > > accessable in the
> > > > > including file.
> > > > > 3) in both examples the file is included, its just the
> > > > > scope that seem shot
> > > > >
> > > > > Any answers?
> > > > >
> > > > > Henry
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




[PHP] Re: Converting binary data

2002-06-11 Thread l0t3k

you may want to look at

http://www.php.net/manual/en/function.unpack.php


"Lucijan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I'm retriving some binary data from a Interbase blob field (a custom
format
> to do some drawing) into a php variable like this:
>
> $blh = ibase_blob_open($row[4]);
> while ($blob = ibase_blob_get($blh, 400))
>   $Objects .= $blob;
> ibase_blob_close($blh);
>
> Now I want to tell php to get first 4 bytes (btw, is there something that
> returns size of integer - sizeof seems to work on arrays only), and
convert
> them to integer
>
> Thanks
>
> Lucijan
>
>



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




Re: [PHP] Determine if variable is set

2002-06-11 Thread Analysis & Solutions

On Tue, Jun 11, 2002 at 09:06:34AM -0400, J. Anderson Scarbrough wrote:
> possible to determine whether a variable is set with either $_POST or $GET 
> without having to do:
> 
> if(isset($_POST['foo']) || isset($_GET['foo']))

if ( isset($_REQUEST['foo']) ) {

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] Re: capturing bouncers.

2002-06-11 Thread Analysis & Solutions

On Tue, Jun 11, 2002 at 01:40:04AM -0400, Analysis & Solutions wrote:
> 
> On Tue, Jun 11, 2002 at 02:07:38AM -0300, Manuel Lemos wrote:
> > On 06/10/2002 02:08 PM, Subhendu Mohapatra wrote:
> > 
> > The bounce address can't be set with headers.
> 
> Please elaborate.  I've successfully used the From: header to handle 
> returned mail.

Hmmm...  After I posted that, I thought better of what I said and went to 
bed.  Now I've had some rest and did a test.  I was wrong.  On my Win32 
system, setting the From or Return-Path headers didn't change where 
bounces go to.  The sendmail_from setting in php.ini did.

Pardon me,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Setting Cookies

2002-06-11 Thread Ford, Mike [LSS]

> -Original Message-
> From: Scott 'INtense!' Reismanis [mailto:[EMAIL PROTECTED]]
> Sent: 08 June 2002 04:52
>  
 
> Anyhow basically what is happening, is that cookies are been set fine,
> however say I try to set two cookies in the one script
>  
> i.e.
> setcookie("username", $HTTP_POST_VARS['username'], time()+31536000);
> setcookie("password", $HTTP_POST_VARS['password'], time()+31536000);
>  
> only the cookie that was called last, i.e. 'password' will be set. I
> only started noticing this problem since I installed php4.2 and
> apache2.0, is that the cause?

Yes.

(There are several bug reports at http://bugs.php.net/ about this -- I *think* it's 
been fixed in the development version of PHP 4.3)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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




[PHP] download

2002-06-11 Thread Kris Vose

are there any php functions that handle downloads.  For Instance I want to create a 
link that contains a url string.  In this string a variable is defined as a file.  
This file will be downloaded when the user clicks on the link.  How do you handle this 
file in php?  Is there a function that will do this.  I have tried the copy function 
but it does not seems to work.

Kris

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




Re: [PHP] Re: Newbie needs some help picking a php editor.

2002-06-11 Thread Lewis Watson

DreamWeaver MX, it has php support built in...

- Original Message -
From: "Shane Kelly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 8:52 AM
Subject: [PHP] Re: Newbie needs some help picking a php editor.


> Hi Al...
>
> I use Macromedia Dreamweaver UltraDev with PHAkt plugin (you'll have to
add
> it from the dreamweaver ultradev extensions @ www.macromedia.com/exchange
>
> Macromedia UltraDev is available for 30 day free trial at their site
>
> it has brilliant php support..you barely have to know a stitch of code,
but
> it helps.
>
> There are also other PHP extensions available at macromedia exchange.
>
> check out www.php.net
> they talk about other possible resources...but I love ultradev.
>
>
>
>
>
> "Al" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I spent a good bit of time looking at editors to help me prepare and
> > modify php scripts.  I've found it very time consuming to evaluate them.
> >
> > In general, I've found you have to download, install and play with them
> > some just to determine if they fit your needs.  And I know from
> > experience, often programs only show their deficiencies after you've
> > used them a bit.
> >
> > And, I've found many that claim "php" editing; but they really aren't
> > anything but a simple plain text editor.
> >
> > My needs are modest.  I'm well versed with HTML, css, etc.  And have
> > done a bit of customizing scripts.
> >
> > For now, I mostly need an editor that will:
> >   Help me keep the syntax correct.
> >   Provide a list of functions, etc. to pick from.
> >   Upload my script files via ftp.
> >   Have the usual search/replace across files
> >
> > Would be nice if it:
> >   Had a project feature
> >   Could run a script I'm working on locally with its includes, etc. on
> > my remote host.
> >
> > Right now I'm looking at "php Coder Pro"; "phpEdit" and "UltraEdit".
> >
> > Can anyone comment on these?  And please suggest any others.
> >
> > Thanks.
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] limit to number of mail function headers?

2002-06-11 Thread SCOTT . NOVINGER

is there a limit to the number of headers you can use in the mail ( )
function?  it seems as though the data is not being passed from the form
fields to the variables in the headers.  for instance $contact does display in
the resulting html.

see code below.

also, just upgraded to apache 1.3.24, php 4.2.1.  could this be affecting the
results?  thanks.




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




[PHP] download link

2002-06-11 Thread Kris Vose

are there any php functions that handle downloads?  For Instance I want to create a 
link that contains a url string.  In this string a variable is defined as a file.  
This file will be downloaded when the user clicks on the link.  How do you handle this 
file in php?  Is there a function that will do this.  I have tried the copy function 
but it does not seems to work.

Kris

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




Re: [PHP] download link

2002-06-11 Thread Adam Voigt

You mean like:
Get This File";

?>

Which would make a download link for "downloads/whatever.exe" in HTML?

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-06-11 at 11:43, Kris Vose wrote:
> are there any php functions that handle downloads?  For Instance I want to create a 
>link that contains a url string.  In this string a variable is defined as a file.  
>This file will be downloaded when the user clicks on the link.  How do you handle 
>this file in php?  Is there a function that will do this.  I have tried the copy 
>function but it does not seems to work.
> 
> Kris
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



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




[PHP] Passing a Variable to PHP Via the URL

2002-06-11 Thread jsegovia

My understanding is that when passing a querystring to PHP via the URL with the GET 
method, PHP will automatically create a variable with the name and value from the 
querystring.  I'm trying to do this and it's not working.

Here's my code from an online tutorial (angle braces replaced with curlies):

printf("{a href=\"%s?id=%s\"}%s %s{/a}{br}\n", $PHP_SELF, $myrow["id"], 
$myrow["first"], $myrow["last"]);

Everything here works - I've already loaded the $myrow with the appropriate data and 
so this printf builds a URL with a valid '?id=' querystring.

But when I click on the URL, the variable is not created.  I've tried renaming the 
variable, querying $HTTP_GET_VARS to see what's coming in, and looking at all 
available online documentation, but nothing helpful.  There doesn't seem to be 
anything in php.ini I need to set to enable this functionality.

Can anyone help?  Thanks very much in advance.

Jesse

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




[PHP] dbugging via DBG

2002-06-11 Thread Philipp Melab

Das anybody know a good tutorial which tells me how to install and use the 
DBG php-debugger?

yours   Philipp

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




Re: [PHP] hi

2002-06-11 Thread Liam MacKenzie

Err, that's not going to unsubscribe you mate...

Follow the directions at the bottom of the email.



- Original Message - 
From: "Bjorn Abt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 12:07 AM
Subject: [PHP] hi


> unsubscribe
> 




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




Re: [PHP] Passing a Variable to PHP Via the URL

2002-06-11 Thread Philip Olson


> My understanding is that when passing a querystring to PHP via the URL
> with the GET method, PHP will automatically create a variable with the
> name and value from the querystring.  I'm trying to do this and it's
> not working.

Yes, if you have:

  example.com/foo.php?id=33

In the old days, people used to rely on register_globals 
($id to exist) but times have recently changed, people are 
encouraged to move away from this potential security gotcha.
Some options within foo.php are:

  // As of PHP 3 (forever)*
  print $HTTP_GET_VARS['id'];

  // As of PHP 4.1.0 (superglobals)
  print $_GET['id'];
  print $_REQUEST['id'];

  // As of PHP 4.1.0, see also extract()
  import_request_variables('gpc', 'r_');
  print $r_id;

  // If you have the PHP directive register_globals 
  // enabled.  This defaults to off as of 4.2.0.
  print $id;


Many options, choose for your needs.  Read more here:

  http://www.php.net/manual/en/language.variables.predefined.php

> Everything here works - I've already loaded the $myrow with the
> appropriate data and so this printf builds a URL with a valid '?id='
> querystring.
> 
> But when I click on the URL, the variable is not created.  I've tried
> renaming the variable, querying $HTTP_GET_VARS to see what's coming
> in, and looking at all available online documentation, but nothing
> helpful.  There doesn't seem to be anything in php.ini I need to set
> to enable this functionality.

A simple way to test what information is available is to 
use phpinfo() or simply print_r($_GET) for GET.  Regarding 
your specific question, see the above words and:

  http://www.php.net/manual/en/security.registerglobals.php

Regards,
Philip Olson

* Assumes the PHP directive track_vars = on, which it always 
  is past 4.0.2.


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




[PHP] Different Problem [Re: Passing a Variable to PHP Via the URL]

2002-06-11 Thread jsegovia

I found out that in fact PHP is creating a variable with the name and value I'm 
passing through a URL from the querystring.  But it's still not working as planned.

The url server/test.php?id=1 creates the following results in my code:

printf("Variables:  %s\n", $HTTP_GET_VARS["id"]);

This line works - there IS a variable named 'id' in my page and it has the correct 
value, 1.

if ($id) {}

This fails.  If I test 'id' instead of '$id' then it works but my page doesn't seem to 
equate 'id=1' with the presence of $id.

$result = mysql_query("SELECT * FROM employees WHERE id=$id",$db);

This doesn't work - again it seems $id isn't being treated properly.  I get this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

If I hardwire my page with the line '$id=1;' before the if statement and the query 
everything works.

So why isn't the variable from my URL being treated properly?

Jesse

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




Re: [PHP] download

2002-06-11 Thread Chris Hewitt

Kris,

If I understand what you mean correctly, this is just an ordinary anchor 
(nothing to do with php). For example,
http://mybox.domain.com/myfile.xls";>Click to download
When clicked, if ".xls" is in /etc/mime.types as 
"application/vnd.ms-excel.xls" then it will either download or start 
up the Excel application, depending upon the setting of the user's 
browser. If not in /etc/mime.types, it will probably try to display the 
file in the browser, depending upon the setting of DefaultType in 
httpd.conf.

Hope this helps.

Chris

Kris Vose wrote:

>are there any php functions that handle downloads.  For Instance I want to create a 
>link that contains a url string.  In this string a variable is defined as a file.  
>This file will be downloaded when the user clicks on the link.  How do you handle 
>this file in php?  Is there a function that will do this.  I have tried the copy 
>function but it does not seems to work.
>
>Kris
>



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




[PHP] Re: Different Problem [Re: Passing a Variable to PHP Via the URL]

2002-06-11 Thread jsegovia

Sorry - I solved my own problem.  I had to set register_globals = On in php.ini.  The 
ini file says this is not the best practice for security reasons so maybe I'll turn it 
off after doing these test scripts.

Jesse

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




Re: [PHP] Question about tag

2002-06-11 Thread Kevin Stone

The only way to execute code stored in a varaible (string) is to send it to
the eval() function.  Assuming you're not doing this then you're perfectly
safe.  Learn more about the eval function..
http://www.php.net/manual/en/function.eval.php

-Kevin

- Original Message -
From: "Nightshade" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 6:39 AM
Subject: [PHP] Question about tag 


> Hi there, I'm working with PHP since 3 weeks, so I'm newbie and maybe I
> could say some bull  :-)
> That's my question:
> Let's suppose that I make a ...mmm...forum. Now, in a Textbox i write my
> comment and I add also this
>  //some instruction to erase my site's root directory
> ?>
> So I post all I wrote to db.
> Ok, when I gonna read this record from database with the other comments,
> is here the possibility that piece of code, is executed, making some
> "disaster" into my directory?
> I hope you understand my question,and sorry x my english... :)
> tia, jonny
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




Re: [PHP] Different Problem [Re: Passing a Variable to PHP Viathe URL]

2002-06-11 Thread Jason Soza

Rather than just setting globals on in php.ini, try this:

Your printf() line is:
printf("Variables:  %s\n", $HTTP_GET_VARS["id"]);

And your if() statement is:
if($id) {}

Where is $id set? It's probably not. $HTTP_GET_VARS["id"] doesn't set 
$id. If you want the "id" variable in your if(), you need:
if($HTTP_GET_VARS["id"]) {}

Or alternately do:
$id = $HTTP_GET_VARS["id"]
if($id) {}

Although that's not necessary. Also, try using $_GET["id"], as 
$HTTP_GET_VARS[] has been deprecated in newer versions.

HTH,

Jason Soza

- Original Message -
From: <[EMAIL PROTECTED]>
Date: Tuesday, June 11, 2002 8:16 am
Subject: [PHP] Different Problem [Re: Passing a Variable to PHP Via the 
URL]

> I found out that in fact PHP is creating a variable with the name 
> and value I'm passing through a URL from the querystring.  But 
> it's still not working as planned.
> 
> The url server/test.php?id=1 creates the following results in my code:
> 
> printf("Variables:  %s\n", $HTTP_GET_VARS["id"]);
> 
> This line works - there IS a variable named 'id' in my page and it 
> has the correct value, 1.
> 
> if ($id) {}
> 
> This fails.  If I test 'id' instead of '$id' then it works but my 
> page doesn't seem to equate 'id=1' with the presence of $id.
> 
> $result = mysql_query("SELECT * FROM employees WHERE id=$id",$db);
> 
> This doesn't work - again it seems $id isn't being treated 
> properly.  I get this error:
> 
> Warning: mysql_fetch_array(): supplied argument is not a valid 
> MySQL result resource
> 
> If I hardwire my page with the line '$id=1;' before the if 
> statement and the query everything works.
> 
> So why isn't the variable from my URL being treated properly?
> 
> Jesse
> 


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




[PHP] subscription problem

2002-06-11 Thread Doug DeVries

Why am I getting all the messages from this newsgroup delivered to my
mailbox?

I subscribed to the newsgroup -- or at least that is all I wanted.

Thanks.

-Doug

- Original Message -
From: "Jason Soza" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 9:36 AM
Subject: Re: [PHP] Different Problem [Re: Passing a Variable to PHP Via the
URL]


> Rather than just setting globals on in php.ini, try this:
>
> Your printf() line is:
> printf("Variables:  %s\n", $HTTP_GET_VARS["id"]);
>
> And your if() statement is:
> if($id) {}
>
> Where is $id set? It's probably not. $HTTP_GET_VARS["id"] doesn't set
> $id. If you want the "id" variable in your if(), you need:
> if($HTTP_GET_VARS["id"]) {}
>
> Or alternately do:
> $id = $HTTP_GET_VARS["id"]
> if($id) {}
>
> Although that's not necessary. Also, try using $_GET["id"], as
> $HTTP_GET_VARS[] has been deprecated in newer versions.
>
> HTH,
>
> Jason Soza
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> Date: Tuesday, June 11, 2002 8:16 am
> Subject: [PHP] Different Problem [Re: Passing a Variable to PHP Via the
> URL]
>
> > I found out that in fact PHP is creating a variable with the name
> > and value I'm passing through a URL from the querystring.  But
> > it's still not working as planned.
> >
> > The url server/test.php?id=1 creates the following results in my code:
> >
> > printf("Variables:  %s\n", $HTTP_GET_VARS["id"]);
> >
> > This line works - there IS a variable named 'id' in my page and it
> > has the correct value, 1.
> >
> > if ($id) {}
> >
> > This fails.  If I test 'id' instead of '$id' then it works but my
> > page doesn't seem to equate 'id=1' with the presence of $id.
> >
> > $result = mysql_query("SELECT * FROM employees WHERE id=$id",$db);
> >
> > This doesn't work - again it seems $id isn't being treated
> > properly.  I get this error:
> >
> > Warning: mysql_fetch_array(): supplied argument is not a valid
> > MySQL result resource
> >
> > If I hardwire my page with the line '$id=1;' before the if
> > statement and the query everything works.
> >
> > So why isn't the variable from my URL being treated properly?
> >
> > Jesse
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




Re: [PHP] download

2002-06-11 Thread Rodolfo Gonzalez

On Tue, 11 Jun 2002, Kris Vose wrote:
> are there any php functions that handle downloads.  For Instance I want to create a 
>link that contains a url string.  In this string a variable is defined as a file.  
>This file will be downloaded when the user clicks on the link.  How do you handle 
>this file in php?  Is there a function that will do this.  I have tried the copy 
>function but it does not seems to work.

There are some scripts @ hotscripts.com

Basically you use http://www.php.net/header to do the trick (but I have
found some little problems with MSIE).

Good luck.



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




[PHP] Error Loading File

2002-06-11 Thread Bryan Gintz

I am getting this error with a new install of PHP4.2.1 and Zend 
Optimizer 1.3.1:

The file '/tmp/phpr4WYQY' must be in the database directory or be 
readable by all

I just updated PHP and the Zend Optimizer, and it had worked previously 
with PHP4.1.2,

Any ideas??

Thanks


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




RE: [PHP] the ?PHPSESSID=spoofme 'bug'

2002-06-11 Thread Johnson, Kirk

OK, I have questions.

A session *file* is created, but it is empty. I know of only one way to get
data into it, that is through a session variable. Session variables are
controlled by the programmer, so unless the programmer is careless with
their validation or register_globals setting, I don't see how anything
harmful can get into the empty session file.

The empty file will get cleaned up by garbage collection, like any other
session file.

I guess this could be a DOS attack, by filling up the inode space in /tmp,
or making a really big table if the sessions are stored in the database.

Anyone can easily get the name of a legitimate session file, so I don't see
how things are worse off by creating a session file with a certain name.

So, yes, I guess I do need more! :)

Kirk

> -Original Message-
> From: Giancarlo Pinerolo [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 1:44 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] the ?PHPSESSID=spoofme 'bug'
> 
> 
> Can I tell you more than what the subject says?
> proceeding:
> Close the browser, clean all your cookies, and open any page with that
> ?PHPSESSID=spoofme appended.
> And see what  happens.
> 
> 1) No cookies are left
> 2) a session 'spoofme' is created
> 
> Do you need more? Javascript url injection ad cross site scripting
> become obsolete with this 'feature'.
> 
> PLS!
> 
> I mean, as the zend site doesn't quite work like this (do the 
> same test
> proceeding as described above...) 
> Their session to append to your cookie-enabled browser location are
> Zend_Session_DB=whatever and Zend_Session_DB_SECURE=whatever2 on their
> login page.
> 
> I don't know if this is related to the free downloadable version, and
> the one they sell and adopt is more 'fortified'... they should clearly
> state it then!
> 
> 
> Gian

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




[PHP] register_globals flag in some directories

2002-06-11 Thread Ahmed Abdalla

I am sorry if this is asked before, but I have apache 2.0.36 with php 4.2.1
in the php.ini file register_globals is set off, but i want to turn it on in
some directories

I tried to create .htaccess file in that directory and put in it
php_flag register_globals on

but its not working, so did i do anything wrong or should I do anything else
?

Thanks for your help



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




[PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Doug DeVries

Subject: include() statement goofing me up - help


> Can anyone let me know what I am doing incorrectly on the following page:
>
> http://www.solomonsporch.org/test.php
>
> The news clips that should appear are a service from another site and I
> simply want to include them on my page, but I am getting an error.
>
> The include() statement or link
> http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4
works
> when typed as a regular URL so I figure it must be my issue.
>
> Thanks.
>
> -Doug
>
>



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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Jay Blanchard

[snip]
> Can anyone let me know what I am doing incorrectly on the following page:
>
> http://www.solomonsporch.org/test.php
>
> The news clips that should appear are a service from another site and I
> simply want to include them on my page, but I am getting an error.
>
[/snip]

Without the code from the area around line 9 of your test.php we cannot give
you any answers.

Jay

"Wouldn't it be great if lists were like the Magic 8 Ball or a Quija board?"



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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Jay Blanchard

you are getting the error

Fatal error: Call to undefined function: show() in
e:\solomonsporch.org\test.php on line 9

show() is not a function, try include()


Jay

"Wouldn't it be great if lists were like the Magic 8 Ball or a Quija board?"



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





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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

That may be the case, but I had assumed the show() was a function in the
file that should be included.

When I include files and it doesn't work (I've only started trying today and
discovered the beauties of the include_path) it says:
Fatal error: Failed opening required 'includeFile.inc'
(include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line 4

So I would guess that his include() is working and there either is no show()
in the file or he isn't actually including it, which goes back to your idea.
Hopefully he'll give us more info :-)

-Natalie

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:27 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Fw: include() statement goofing me up - help


you are getting the error

Fatal error: Call to undefined function: show() in
e:\solomonsporch.org\test.php on line 9

show() is not a function, try include()


Jay

"Wouldn't it be great if lists were like the Magic 8 Ball or a Quija board?"



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





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

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




[PHP] 405 Method Not Allowed with Post Request on PWS

2002-06-11 Thread jsegovia

I'm running PHP 4.2.1 and PWS on my Windows98 system and I think I'm configured 
correctly, but the first time I tried to submit a Post request I got a '405 Method Not 
Allowed' error (full error at the bottom of this email).

I've searched and found lots of similar posts but so far nothing that solves my 
problem. Can anyone help? 

Thanks in advance.

Jesse

HTTP Error 405
405 Method Not Allowed

The method specified in the Request Line is not allowed for the resource identified by 
the request. Please ensure that you have the proper MIME type set up for the resource 
you are requesting.

Please contact the server's administrator if this problem persists.

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




Re: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Doug DeVries

I've changed the source file on this issue. Slightly different error, but
still no joy. Thanks for taking the time with this.





test area should show 4 lines of news


http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
?>






- Original Message -
From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
To: "'Jay Blanchard'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 10:30 AM
Subject: RE: [PHP] Fw: include() statement goofing me up - help


> That may be the case, but I had assumed the show() was a function in the
> file that should be included.
>
> When I include files and it doesn't work (I've only started trying today
and
> discovered the beauties of the include_path) it says:
> Fatal error: Failed opening required 'includeFile.inc'
> (include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line
4
>
> So I would guess that his include() is working and there either is no
show()
> in the file or he isn't actually including it, which goes back to your
idea.
> Hopefully he'll give us more info :-)
>
> -Natalie
>
> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 1:27 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Fw: include() statement goofing me up - help
>
>
> you are getting the error
>
> Fatal error: Call to undefined function: show() in
> e:\solomonsporch.org\test.php on line 9
>
> show() is not a function, try include()
>
>
> Jay
>
> "Wouldn't it be great if lists were like the Magic 8 Ball or a Quija
board?"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

At least it makes more sense now that you're getting the failed to open
error.  I'd try putting a small file in the php4/pear directory and see if
you can include that.  If so, then it's still a path problem - like maybe
it's looking to php4/pear/http://

Since I don't have anything including successfully, this is all the help I
can be :-)

Good luck!

-Natalie

-Original Message-
From: Doug DeVries [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:36 PM
To: Leotta, Natalie (NCI/IMS)
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Fw: include() statement goofing me up - help


I've changed the source file on this issue. Slightly different error, but
still no joy. Thanks for taking the time with this.





test area should show 4 lines of news


http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
?>






- Original Message -
From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
To: "'Jay Blanchard'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 10:30 AM
Subject: RE: [PHP] Fw: include() statement goofing me up - help


> That may be the case, but I had assumed the show() was a function in 
> the file that should be included.
>
> When I include files and it doesn't work (I've only started trying 
> today
and
> discovered the beauties of the include_path) it says:
> Fatal error: Failed opening required 'includeFile.inc'
> (include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on 
> line
4
>
> So I would guess that his include() is working and there either is no
show()
> in the file or he isn't actually including it, which goes back to your
idea.
> Hopefully he'll give us more info :-)
>
> -Natalie
>
> -Original Message-
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 11, 2002 1:27 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Fw: include() statement goofing me up - help
>
>
> you are getting the error
>
> Fatal error: Call to undefined function: show() in 
> e:\solomonsporch.org\test.php on line 9
>
> show() is not a function, try include()
>
>
> Jay
>
> "Wouldn't it be great if lists were like the Magic 8 Ball or a Quija
board?"
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] Different Problem [Re: Passing a Variable to PHP Via the URL]

2002-06-11 Thread jsegovia

Jason Soza <[EMAIL PROTECTED]> wrote:

> Rather than just setting globals on in php.ini, try this:

Thanks a lot.  Your and Philip Olson's responses have got me thinking in the direction 
of better security and code.

I am going to turn register_globals off and rewrite the code.

Now if only I can get my POST requests working with Personal Web Server.  8-(

Jesse

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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Jay Blanchard

[snip]
http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
?>
[/snip]

Where is your semi-colon?
http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit
=4");
?>

Jay



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




[PHP] get pwd on windows

2002-06-11 Thread Shane Wright

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

Ok, I need to write this little script to run on a Windows box (don't ask...), 
but I'm getting completely shafted by the inconsistent use of long filenames.

I need to get the current directory, but it must have long filenames and not 
be chopped to xxx~1 or anything.   $SCRIPT_FILENAME is not set, there is no 
pwd utility, nothing is set in the environment and realpath('./') returns 
cropped firectory names.

Is there a way to do this or am I condemned to bang my head against a wall and 
swear some more?

Cheers

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B
44Qwj0u6jdfNpGtf+LTEX+w=
=HgUp
-END PGP SIGNATURE-


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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Jay Blanchard

[snip]
When I include files and it doesn't work (I've only started trying today and
discovered the beauties of the include_path) it says:
Fatal error: Failed opening required 'includeFile.inc'
(include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line 4
[/snip]

Send some of your code and I'll have a look...

Jay



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




[PHP] Get the part_number of mail attachements?

2002-06-11 Thread Takacs Istvan

Hi,

I have to parse some mails into our DB.
The important part of the mails are in the text
attachements.
I'm afraid I don't understand how can I get the number
of attachements for the particular mail.

I would use imap_fetchbody ( int imap_stream, int msg_number, string
part_number [, flags flags])
to get the data, but I can't use any loop while
I don't know the exact number of attachements in the mail.

Could you advice any simple solution?

Thanks in advance!

Regards;

Istvan

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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Leotta, Natalie (NCI/IMS)

Thanks, but I just figured it out - I stupidly saved the file to be included
up a folder from the one I was working with (my mind must still be reeling
from the horrible defeat of the Canes last night...).  I don't quite
understand why it's not looking at /opt/net/... but it's working so I'm not
going to ask question :-)

Thanks!

-Natalie

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 11, 2002 1:54 PM
To: Leotta, Natalie (NCI/IMS); [EMAIL PROTECTED]
Subject: RE: [PHP] Fw: include() statement goofing me up - help


[snip]
When I include files and it doesn't work (I've only started trying today and
discovered the beauties of the include_path) it says: Fatal error: Failed
opening required 'includeFile.inc'
(include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on line 4
[/snip]

Send some of your code and I'll have a look...

Jay


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




Re: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Kevin Stone

Doug, it seems to work fine here.  So long as the remote server has PHP
installed (which it looks like they do) then include() should work the same
as a local file.  Could it be a configuration issue perhaps?

Test: http://www.helpelf.com/test/test.php
Code: http://www.helpelf.com/test/test.phps

-Kevin

- Original Message -
From: "Doug DeVries" <[EMAIL PROTECTED]>
To: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 11:36 AM
Subject: Re: [PHP] Fw: include() statement goofing me up - help


> I've changed the source file on this issue. Slightly different error, but
> still no joy. Thanks for taking the time with this.
>
> 
> 
> 
> 
> test area should show 4 lines of news
>
>
>  include
> ("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
> ?>
>
>
> 
>
> 
>
> - Original Message -
> From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
> To: "'Jay Blanchard'" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Tuesday, June 11, 2002 10:30 AM
> Subject: RE: [PHP] Fw: include() statement goofing me up - help
>
>
> > That may be the case, but I had assumed the show() was a function in the
> > file that should be included.
> >
> > When I include files and it doesn't work (I've only started trying today
> and
> > discovered the beauties of the include_path) it says:
> > Fatal error: Failed opening required 'includeFile.inc'
> > (include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on
line
> 4
> >
> > So I would guess that his include() is working and there either is no
> show()
> > in the file or he isn't actually including it, which goes back to your
> idea.
> > Hopefully he'll give us more info :-)
> >
> > -Natalie
> >
> > -Original Message-
> > From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 11, 2002 1:27 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Fw: include() statement goofing me up - help
> >
> >
> > you are getting the error
> >
> > Fatal error: Call to undefined function: show() in
> > e:\solomonsporch.org\test.php on line 9
> >
> > show() is not a function, try include()
> >
> >
> > Jay
> >
> > "Wouldn't it be great if lists were like the Magic 8 Ball or a Quija
> board?"
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




Re: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Kevin Stone

Doh! Sorry, Natalie not Doug, and I'm glad to see you got it working.
-Kevin

- Original Message -
From: "Kevin Stone" <[EMAIL PROTECTED]>
To: "Doug DeVries" <[EMAIL PROTECTED]>; "Leotta, Natalie (NCI/IMS)"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 11:59 AM
Subject: Re: [PHP] Fw: include() statement goofing me up - help


> Doug, it seems to work fine here.  So long as the remote server has PHP
> installed (which it looks like they do) then include() should work the
same
> as a local file.  Could it be a configuration issue perhaps?
>
> Test: http://www.helpelf.com/test/test.php
> Code: http://www.helpelf.com/test/test.phps
>
> -Kevin
>
> - Original Message -
> From: "Doug DeVries" <[EMAIL PROTECTED]>
> To: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 11, 2002 11:36 AM
> Subject: Re: [PHP] Fw: include() statement goofing me up - help
>
>
> > I've changed the source file on this issue. Slightly different error,
but
> > still no joy. Thanks for taking the time with this.
> >
> > 
> > 
> > 
> > 
> > test area should show 4 lines of news
> >
> >
> >  > include
> >
("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
> > ?>
> >
> >
> > 
> >
> > 
> >
> > - Original Message -
> > From: "Leotta, Natalie (NCI/IMS)" <[EMAIL PROTECTED]>
> > To: "'Jay Blanchard'" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, June 11, 2002 10:30 AM
> > Subject: RE: [PHP] Fw: include() statement goofing me up - help
> >
> >
> > > That may be the case, but I had assumed the show() was a function in
the
> > > file that should be included.
> > >
> > > When I include files and it doesn't work (I've only started trying
today
> > and
> > > discovered the beauties of the include_path) it says:
> > > Fatal error: Failed opening required 'includeFile.inc'
> > > (include_path='.:/opt/net/utils/lib/php') in /prj/web/.../file.php on
> line
> > 4
> > >
> > > So I would guess that his include() is working and there either is no
> > show()
> > > in the file or he isn't actually including it, which goes back to your
> > idea.
> > > Hopefully he'll give us more info :-)
> > >
> > > -Natalie
> > >
> > > -Original Message-
> > > From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 11, 2002 1:27 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [PHP] Fw: include() statement goofing me up - help
> > >
> > >
> > > you are getting the error
> > >
> > > Fatal error: Call to undefined function: show() in
> > > e:\solomonsporch.org\test.php on line 9
> > >
> > > show() is not a function, try include()
> > >
> > >
> > > Jay
> > >
> > > "Wouldn't it be great if lists were like the Magic 8 Ball or a Quija
> > board?"
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




RE: [PHP] Fw: include() statement goofing me up - help

2002-06-11 Thread Jay Blanchard

No, I created this file as a test file and it works for me. Perhaps you need
to do something on your server for include files. Have you checked your
php.ini to make sure that includes are allowed? In my setup
(/etc/apache/php.ini) there is a line that says "include_path ="

If I can think of anything else I will let you know. Also make sure to
reply-to-all so  that the list can keep up and maybe offer more suggestions.

Jay



-Original Message-
From: Doug DeVries [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 12:57 PM
To: Jay Blanchard
Subject: Re: [PHP] Fw: include() statement goofing me up - help


still no joy. i pasted exactly as you had written with a semi-colon, but
still not working. Is there nothing else I need to include in the header or
prior to the PHP statement?

-Doug

- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 10:48 AM
Subject: RE: [PHP] Fw: include() statement goofing me up - help


> [snip]
>  include
> ("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit=4";)
> ?>
> [/snip]
>
> Where is your semi-colon?
> 
include("http://www.gospelcom.net/mnn/includes/pubNewsTease.php?li=yes&limit
> =4");
> ?>
>
> Jay
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>






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




[PHP] browser timeouts with file upload

2002-06-11 Thread Dave

have created multiple file upload scripts in the past...  all work like a charm,
always used with files less than a meg or two.

have a use for it now where the user requires upload of a 6-10mb file and we are
running into problems with browser timeouts(for obvious reasons).  We have the
following in place
  in php code   - set_time_limit(900)
  in apache conf- php_admin_value upload_max_filesize 2000
- php_admin_value max_execution_time 900

still running into situations where the browser is timing out on files in the
8mb or higher range.  Suspect this is happening on the client site since the
15min mark isn't anywhere close to being hit as the above permitions allow.
browser timing out after 2-5 min.

any solutions to this?  recommendations?

the desire is to avoid having to have the client upload via FTP software
(learning curve issues) and just use the web interface.

thanks

Dave


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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy






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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy








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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy











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




RE: [PHP] dumping only selected records into another table

2002-06-11 Thread Jay Blanchard

[snip]
I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?
[/snip]

RTFMySQLM

http://www.mysql.com/doc/I/N/INSERT_SELECT.html

HTH!

Jay

"It's hip to snip!"
"Give a man a program, frustrate him for a day.
Teach a man to program, frustrate him for a lifetime."




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




Re: [PHP] Determine if variable is set

2002-06-11 Thread 1LT John W. Holmes

Just note that REQUEST accounts for COOKIE, POST, and GET data...the
settings for which overrides which are in php.ini.

---John Holmes...

- Original Message -
From: "Analysis & Solutions" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 10:25 AM
Subject: Re: [PHP] Determine if variable is set


> On Tue, Jun 11, 2002 at 09:06:34AM -0400, J. Anderson Scarbrough wrote:
> > possible to determine whether a variable is set with either $_POST or
$GET
> > without having to do:
> >
> > if(isset($_POST['foo']) || isset($_GET['foo']))
>
> if ( isset($_REQUEST['foo']) ) {
>
> --Dan
>
> --
>PHP classes that make web design easier
> SQL Solution  |   Layout Solution   |  Form Solution
> sqlsolution.info  | layoutsolution.info |  formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] mail() function hangs

2002-06-11 Thread Septic Flesh

Well I get this message

 Fatal error: Maximum execution time of 30 seconds exceeded in
c:\nusphere\apache\htdocs\shop\order_fns.php on line 140

but the message is sent ok..

Windows/nusphere/modem56k.


--


Sapilas@/dev/pinkeye


"Peterhead Info" <[EMAIL PROTECTED]> wrote in message
01f701c21092$e6fff940$73f47ad5@atlantic8ttmbp">news:01f701c21092$e6fff940$73f47ad5@atlantic8ttmbp...
> I have read that the mail function doesn't come back if it fails ... but
> from what you are saying, the function didn't fail ...
>
> - Original Message -
> From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 10, 2002 4:07 PM
> Subject: [PHP] mail() function hangs
>
>
> > Whenever a user runs the mail function, an e-mail messsage is sent
> > properly but the page just hangs.
> >
> > Has anyone else had this problem?
> >
>



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




[PHP] cut text?

2002-06-11 Thread Hawk

I've been looking on the php.net page, but I don't know what to look for..
I found string mb_strcut ( string str, int start [, int length [, string
encoding]])
and it looks like the thing I'm looking for, but I don't know how to use it
:)
can anyone tell me? :P

Håkan





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




[PHP] Store/Retrieve Word Documents in MySQL/PHP?

2002-06-11 Thread Håkan Askengren

Hi
I have managed to load images to database through php, but what about other
file types as MS Word (yes I dare to mention it here...)
What headers etcetera are needed?
Does somebody have any examples?

Håkan Askengren



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




[PHP] Comments / Question about XML?

2002-06-11 Thread Scott Fletcher

Hi!

I'm going to start programming for XML but I have never done it before.
I also found out that I would need to recompile PHP with the "--xml" option.
That's suck!  Will have to do it while the server is on live site.
Hopefully nothing will go wrong.  (Cross my finger!).  By the way, know of
any good documentation about the XML and PHP with XML?  I don't want to do
the XML on the XHTML side.  I want to do it on the PHP side because of
security reason and of the browser's incompatibility.

Thaks,
 Scott



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




Re: [PHP] cut text?

2002-06-11 Thread Chris Hewitt

What exactly are you trying to do? If you tell us more, we can help better.

Chris

Hawk wrote:

>I've been looking on the php.net page, but I don't know what to look for..
>I found string mb_strcut ( string str, int start [, int length [, string
>encoding]])
>and it looks like the thing I'm looking for, but I don't know how to use it
>:)
>can anyone tell me? :P
>
>Hkan
>
>
>
>
>



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




[PHP] Getting info from a realvideo file.

2002-06-11 Thread Rodolfo Gonzalez

Hello list,

I'm wondering if there's any way to get the info of a realvideo file 
(resolution, author, and so on). I know rm is a closed format, but maybe 
you know of something, done either in PHP or in another language.

Thank you,
Rodolfo.




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




Re: [PHP] register_globals flag in some directories

2002-06-11 Thread Chris Hewitt

Ahmed.

If you changed the AllowOverride setting in httpd.conf, you will need to 
restart apache. I tried what I suggested here (on a RedHat 7.3 system) 
so I know its OK. In httpd.conf there can be many instances of 
AllowOverride, one per directory. Are you sure you changed the right one?

Just a thought.

Regards

Chris

Ahmed Farouk wrote:

>Chris,
>Thanks for your response, but I already tried that but still not
>working!
>is there anything I should do let apache recognize that there is .htaccess ?
>permissions for example >
>
>
>- Original Message -
>From: "Chris Hewitt" <[EMAIL PROTECTED]>
>To: "Ahmed Abdalla" <[EMAIL PROTECTED]>
>Sent: Tuesday, June 11, 2002 9:06 PM
>Subject: Re: [PHP] register_globals flag in some directories
>
>
>>Ahmed,
>>
>>The /etc/httpd/conf/httpd.conf file might not allow .htaccess to
>>override the setting. I've just tried this here and if I have
>>"AllowOverride All" then I can change register_globals in a .htaccess
>>file exactly as you have specified. If I have "AllowOverride None" then
>>I can't.
>>
>>I don't know which override allowance is needed for php. I haven't found
>>it in the manual (but then I might not have looked hard enough).
>>
>>Hope this helps.
>>
>>Chris
>>
>>Ahmed Abdalla wrote:
>>
>>>I am sorry if this is asked before, but I have apache 2.0.36 with php
>>>
>4.2.1
>
>>>in the php.ini file register_globals is set off, but i want to turn it on
>>>
>in
>
>>>some directories
>>>
>>>I tried to create .htaccess file in that directory and put in it
>>>php_flag register_globals on
>>>
>>>but its not working, so did i do anything wrong or should I do anything
>>>
>else
>
>>>?
>>>
>>>Thanks for your help
>>>
>>>
>>>
>



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




Re: [PHP] cut text?

2002-06-11 Thread Hawk

Lets say I have a news text, and in a menu, I just want to print the first..
lets say 30 letters, and maybe add a "..." after, and link it to the full
text.




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




Re: [PHP] cut text?

2002-06-11 Thread Jason Wong

On Wednesday 12 June 2002 03:36, Hawk wrote:
> Lets say I have a news text, and in a menu, I just want to print the
> first.. lets say 30 letters, and maybe add a "..." after, and link it to
> the full text.

substr(), wordwrap()

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

/*
If a fool persists in his folly he shall become wise.
-- William Blake
*/


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




[PHP] GOTO command. Doest it exist?

2002-06-11 Thread Carlos U. Cirello Filho

I do beg your pardon... But  does PHP not have GOTO command?

Am I wrong?

Carlos Cirello



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




Re: [PHP] get pwd on windows

2002-06-11 Thread Paul Roberts

just use php to do it

getcwd()

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: "Shane Wright" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 11, 2002 6:45 PM
Subject: [PHP] get pwd on windows


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

Ok, I need to write this little script to run on a Windows box (don't ask...), 
but I'm getting completely shafted by the inconsistent use of long filenames.

I need to get the current directory, but it must have long filenames and not 
be chopped to xxx~1 or anything.   $SCRIPT_FILENAME is not set, there is no 
pwd utility, nothing is set in the environment and realpath('./') returns 
cropped firectory names.

Is there a way to do this or am I condemned to bang my head against a wall and 
swear some more?

Cheers

- -- 
Shane
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Bjcw5DXg6dCMBrQRAjjbAJ4iz2jRJ5rMzkV7Md5GHpTd3YcX1wCfZb6B
44Qwj0u6jdfNpGtf+LTEX+w=
=HgUp
-END PGP SIGNATURE-


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





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




  1   2   >