[PHP] off-list topic: Debian vs. Redhat

2003-10-10 Thread Wang Feng
Greetings,

Have been working with Windows for many years, I'm planning to *migrate* to
Linux.

Googled Debian vs. Redhat. Found that more commercial software vendors
support Redhat rather than Debian. Why does this happen?

Also, Debian contains more than 8000 packages, which is much more than the
number of packages Redhat has, buy why the Redhat needs more than 600MBs
harddisk space while Debian needs less than 200?


Which one are you using or prefer? Why? Which one should I use? Suggestions?



Thanks for your time.


cheers,

feng

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



Re: [PHP] Oracle - Win32

2003-10-10 Thread imran
-Edit the php.ini file

GET THE DLLs:

The Dlls for mssql and others (oracle, sybase, etc.) are NOT included in the
installation (Install Shield Wizard) in the root folder.

Get the other package for windows systems (NO Install shield!).  Just plain
files.  After unzipping the file, look for the subdirectory called
extensions.  NOT the dlls folder! You'll find a bunch of dlls with the name
format like such: php_xxx. For Oracle DD, you'll need php_oracle.dll.  Take
the oracle dll.

PLACE THE DLL(s):
Place the dll you want in the root folder where you installed php locally.

EDITING THE PHP.INI:
Your php.ini SHOULD be in the Windows System Root (commonly C:\WINNT).
Ok, in the php.ini file, look for the Paths and Directories section.
Your extension_dir path should look like a DOS path like this:
extension_dir = C:/php/   ; Point the directory where you installed php
; inside the root should be the dll you placed!
If the default value of extension_dir is = ./ REMOVE IT!  This path should
be identical to a DOS path!
Ok, this is just a side note:

If you find a comment section for Windows Extensions inside another section
called Dynamic Extensions that has a bunch of lines like this:
;extension=php_xxx1.dll
;extension=php_xxx2.dll

un-comment this line for oracle dll...

THAT's it!
Save the php.ini.

Now you can call Oracle functions

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 11, 2003 10:29 AM
Subject: [PHP] Oracle - Win32


>
> > > Hello mailing list, I want to use Oracle function in PHP parser in
Win32
> > OS,
> > > but I don't know how to install it, in the official documentation tell
> > this:
> > >
> > > Installation
> > > You have to compile PHP with the option --with-oracle[=DIR], where DIR
> > > defaults to your environmment variable ORACLE_HOME.
> > >
> > >
> > >
> > > I think that this steps is by Linux user, any help, I will appreciate,
> > > 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



Re: [PHP] Oracle - Win32

2003-10-10 Thread John Nichel
[EMAIL PROTECTED] wrote:
Hello mailing list, I want to use Oracle function in PHP parser in Win32
OS,

but I don't know how to install it, in the official documentation tell
this:

Installation
You have to compile PHP with the option --with-oracle[=DIR], where DIR
defaults to your environmment variable ORACLE_HOME.


I think that this steps is by Linux user, any help, I will appreciate,
thanks.


http://www.php.net/manual/en/install.windows.php

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] XML / XLS application

2003-10-10 Thread Curt Zirzow
* Thus wrote Ray Hunter ([EMAIL PROTECTED]):
> So what is your questions concerning php?

I think he's lost.


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



[PHP] ldap authentication to win2k domain controller

2003-10-10 Thread Redmond Militante
hi all

i've been given the task of writing an app with a login mechanism that authenticates 
against the active directory users list on a windows 2000 domain controller.

i have an apache 1.3.28 webserver running on FreeBSD 4.8-RELEASE, with php4.3.1 
nstalled

i don't have openldap support compiled into php, nor do i have mod_auth_ldap installed 
as an apache module.  i've read two different sources that tell me i may need at least 
one of these, but i'm not sure exactly how to get started.  

can anyone tell me what i need to install/compile to get ldap authentication against 
my win2k domain controller going?  if anyone knows of any good tutorials, i'd be 
really interested as well...


thanks

redmond

-- 
FreeBSD 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #0: Fri Oct 3 21:30:51 CDT 2003
12:15AM  up 5 days, 14:31, 3 users, load averages: 2.51, 2.40, 1.79
 
From too much love of living,
From hope and fear set free,
We thank with brief thanksgiving,
Whatever gods may be,
That no life lives forever,
That dead men rise up never,
That even the weariest river winds somewhere safe to sea.
-- Swinburne
 


pgp0.pgp
Description: PGP signature


Re: [PHP] XML / XLS application

2003-10-10 Thread Ray Hunter
So what is your questions concerning php?

---
BigDog


On Fri, 2003-10-10 at 23:28, [EMAIL PROTECTED] wrote:
> 
> > Hello mailing list, I have a question about the use of XML / XLS
> > application, I am introducing myself in this technology, What is useful
> XML
> > / XLS for? , I need a basic example, basic application of it, because I
> > don't find the use of it. I know that XML is used to interchange data
> > between every system in standard way (Why XML is standard?, because I
> > understand that depend of the client browser they have a particular XML
> > parser to retrieve information of the XML document, if would have only one
> > standard XML parser, could be), and with XLS you transform the XML
> document
> > to HTML format, postscript format, and so on, but in order to transform
> the
> > XML document you need to know the syntax of the XSL and I think that its
> > another language that you need to know. Another doubt is if XML document
> > replace DB, because I read a book that has a methodology to transform DB
> > table into a XML document, and use a XML parser to retrieve the data, I
> read
> > another example that the script use a SQL statement like XML SQL Select,
> you
> > execute it, then the DBMS server give you the XML document, then XSL or
> XLST
> > convert the XML document, and finally you obtain the HTML in the client
> > browser, well, Thanks for any help, bye :).

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



[PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

> > Hello mailing list, I want to use Oracle function in PHP parser in Win32
> OS,
> > but I don't know how to install it, in the official documentation tell
> this:
> >
> > Installation
> > You have to compile PHP with the option --with-oracle[=DIR], where DIR
> > defaults to your environmment variable ORACLE_HOME.
> >
> >
> >
> > I think that this steps is by Linux user, any help, I will appreciate,
> > thanks.
>

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



[PHP] XML / XLS application

2003-10-10 Thread orlandopozo



> Hello mailing list, I have a question about the use of XML / XLS
> application, I am introducing myself in this technology, What is useful
XML
> / XLS for? , I need a basic example, basic application of it, because I
> don't find the use of it. I know that XML is used to interchange data
> between every system in standard way (Why XML is standard?, because I
> understand that depend of the client browser they have a particular XML
> parser to retrieve information of the XML document, if would have only one
> standard XML parser, could be), and with XLS you transform the XML
document
> to HTML format, postscript format, and so on, but in order to transform
the
> XML document you need to know the syntax of the XSL and I think that its
> another language that you need to know. Another doubt is if XML document
> replace DB, because I read a book that has a methodology to transform DB
> table into a XML document, and use a XML parser to retrieve the data, I
read
> another example that the script use a SQL statement like XML SQL Select,
you
> execute it, then the DBMS server give you the XML document, then XSL or
XLST
> convert the XML document, and finally you obtain the HTML in the client
> browser, well, Thanks for any help, bye :).

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



Re: [PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

> Hello mailing list, I want to use Oracle function in PHP parser in Win32
OS,
> but I don't know how to install it, in the official documentation tell
this:
>
> Installation
> You have to compile PHP with the option --with-oracle[=DIR], where DIR
> defaults to your environmment variable ORACLE_HOME.
>
>
>
> I think that this steps is by Linux user, any help, I will appreciate,
> thanks.

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



Re: [PHP] Re: Limits and php...

2003-10-10 Thread Curt Zirzow
* Thus wrote Robert Cummings ([EMAIL PROTECTED]):
> On Fri, 2003-10-10 at 12:12, Jason Wong wrote:
> > On Friday 10 October 2003 22:44, Robert Cummings wrote:
> > 
> > > > *Most* bottom posters are savvy enough to trim posts adequately to ensure
> > > > that there is no crap to wade through whilst maintaining some kind of
> > > > continuity within a thread.
> > >
> > > I'll call this premise one, which is by no means a tautology since it
> > > really depends on the disposition of the poster.
> > 
> > That's why I emphasised the *most*. However my theory is that bottom posters 
> > are most likely to be people who have been using email and mailing lists long 
> > before MS has even heard about the internet. Why bring MS into this? Because 
> > if wasn't for their damned Outlooks then top posting would probably be 
> > unheard of.
> 
> I'm using Evolution under linux :/ nd I've been using email and mailing
> lists (or newsgroups before that on BBSs etc) for about 15 years. I
> havn't seen this as much of an issue until recently.

Thus, i think emphasized, Jason's point, you'll find more knowledged
people in newsgroups and BBSs.

> 
> > > > 1) It is certainly not efficient in bandwidth terms (see above).
> > >
> > > This is based on premise one, which makes it only as valid as the case
> > > where a bottom poster doesn't trim a post.
> > 
> > Like I said above *most* of them do. There is a noticeable exception, a 
> > gentleman who goes by the name of Tom :-)
> 
> I generally trim. But then again, I top post short and quick answers,
> intermingle contextual answer, and bottom post when I feel the need for
> flow.

Perhaps a better term (or usage) is 'context' posts.  Bottom
posts, IMO, can be just as bad as top posts.  Context posts have
the advantage of having one thread but multiple  sub-topics involved
with em :)

> 
> > > Feel free to break the mold and try alternatives ;)
> > 
> > Heck I might even be brave enough to try InterJinn.
> 
> Come on now, there's no need to tease ;)

LOL :)


Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



php-general@lists.php.net

2003-10-10 Thread Curt Zirzow
* Thus wrote Daevid Vincent ([EMAIL PROTECTED]):
> Yeah, that is the 'hack' solution I came up with too. LOL.
> 
> I guess I was hoping for something more elegant...
> 
> Is there a reason that PHP doesn't handle the & properly? I mean, it seems
> as though you'd have to go out of your way to force it NOT to spawn the task
> in the background. If PHP was just executing the command in a shell, it
> seems that the OS would handle the & for you... 

true, but php exec's your program through a pipe.  So because a the
pipe opens bidirectional handles for input and output, I believe the system
can't let the program go into the background because the output
handle cant be released.

Another option, and may be cleaner, is to enable and option to your
C program to daemonize itself. 

HTH,

Curt
-- 
"My PHP key is worn out"

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

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



RE: [PHP] Encryption question

2003-10-10 Thread Mike Brum
I think it all falls under the "cryptography" category, but you're right -
it doesn't fall into the encryption/decryption scheme since it is only
one-way.

-M

-Original Message-
From: Brad Pauly [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 10:43 PM
To: php-gen
Subject: Re: [PHP] Encryption question


md5 is a one-way hash function. It is great for passwords. (I'm not sure if
that technically qualifies as encryption because it is nearly impossible to
decrypt..hmm) Anyway, I would recommend using it.

- Brad

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



Re: [PHP] Encryption question

2003-10-10 Thread Brad Pauly
On Fri, 2003-10-10 at 20:31, Ryan Thompson wrote:
> I know this is an opinion thing but what's the best functions or function set 
> for password encryption?
> 
> Currently my project uses md5 but I thinks it's more for checksums isn't it?
> Also, is mcrypt used for passwords? I looks like it's a two-way encryption.

md5 is a one-way hash function. It is great for passwords. (I'm not sure
if that technically qualifies as encryption because it is nearly
impossible to decrypt..hmm) Anyway, I would recommend using it.

- Brad

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



Re: [PHP] Encryption question

2003-10-10 Thread Ryan Thompson

Sorry. Just stumbled on crypt()


On Friday 10 October 2003 22:31, Ryan Thompson wrote:
> I know this is an opinion thing but what's the best functions or function
> set for password encryption?
>
> Currently my project uses md5 but I thinks it's more for checksums isn't
> it? Also, is mcrypt used for passwords? I looks like it's a two-way
> encryption.

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

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



[PHP] Encryption question

2003-10-10 Thread Ryan Thompson
I know this is an opinion thing but what's the best functions or function set 
for password encryption?

Currently my project uses md5 but I thinks it's more for checksums isn't it?
Also, is mcrypt used for passwords? I looks like it's a two-way encryption.

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

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



Re: [PHP] Echoing string with single quote from $_POST

2003-10-10 Thread Becoming Digital
stripslashes();

Edward Dudlik
Becoming Digital
www.becomingdigital.com



- Original Message - 
From: "James Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, 10 October, 2003 13:07
Subject: [PHP] Echoing string with single quote from $_POST


Hi,

I'm building a form where a user can enter text. When the form is submitted
I'm doing some validation before continuing. If the form isn't filled
correctly, then the user has to correct it before continuing. However, I
want to save the data that has been entered (some of it may be lengthy), so
I'm doing this:



If the $_POSTed string has quotes in it, the output contains a slash

"It's great" becomes "It\'s great" on the page.

I've tried echo addslashes($_POST['adTitle']);} and that doesn't work. Is
there another function that will output the string just as it was input?

I've searched through the manual and haven't found anything yet. Just
thought you all would know off the top of your head(s). :)

Thanks,

James

-- 
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] [xml] character data

2003-10-10 Thread Tom Rogers
Hi,

Saturday, October 11, 2003, 6:26:01 AM, you wrote:
DA> I do not understand why this line does not work :
DA> $info[$element] = $content;

DA> but yet this works: echo $content;

DA> why? what is the trick?

DA> -- 

DA> $xml_comment_file = basename($svg_file, '.svg.xml') .'.info.xml';

DA> if (file_exists($xml_comment_file)) {
DA> $file = $xml_comment_file;

DA> $info = array();
DA> $element = null;

DA> function startElement($parser, $name, $attrs) {
DA> global $element;
DA> $element = $name;
DA> }
DA> function endElement($parser, $name) {
DA> print "";
DA> }
DA> function characterData($parser, $content) {
DA> global $info;
DA> global $element;
DA> $info[$element] = $content;
DA> //$info[$element] = sprintf("%s", $content);
DA> }

DA> $xml_parser = xml_parser_create();
DA> xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, FALSE);
DA> xml_set_element_handler($xml_parser, "startElement", "endElement");
DA> xml_set_character_data_handler($xml_parser, "characterData");

DA> if (!($fp = fopen($file, 'r')))
DA> die("could not open XML input\n");

DA> while ($data = fread($fp, 4096))
DA> if (!xml_parse($xml_parser, $data, feof($fp)))
DA> die(sprintf("XML error: %s at line %d",
DA>xml_error_string(xml_get_error_code($xml_parser)),
DA>xml_get_current_line_number($xml_parser)));

DA> xml_parser_free($xml_parser);

DA> print_r($info);
DA> }
DA> /*
DA> # the output is without $content :
DA> Array
DA> (
DA> [info] =>
DA> [file] =>
DA> [orig-file] =>
DA> [orig-author] =>
DA> [bitmap-src] =>
DA> [orig-date] =>
DA> [svg-date] =>

DA> )
DA> */


the function characterData can be called with whitespace which is probably
overwriting your content
try this

$content = trim($content);
if(!empty($content)) $info[$element] = $content;

-- 
regards,
Tom

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



Re: [PHP] Re: Did anyone have success with the require() function??

2003-10-10 Thread Tom Rogers
Hi,

Saturday, October 11, 2003, 3:33:05 AM, you wrote:
CZ> On Fri, 10 Oct 2003 13:09:16 -0400, Scott Fletcher <[EMAIL PROTECTED]> wrote:

>> Hi Fellas!
>>
>> Did anyone have success with making the required function work if using
>> this sample code.  It didn't work for me.
>>
>> --snip--
>> require("$_REQUEST['PDF_LIB_PATH']");
>> --snip--

CZ> When you access an array inside of a string you half to tell php that it
CZ> is a variable by enclosing it with curly brackets:

CZ>   require("{$_REQUEST['PDF_LIB_PATH']}");


CZ> Now the question is, what happens if I access your site like so:

CZ>   http://yoursite.com/yourfile.php?PDF_LIB_PATH=%2fetc%2fpasswd


CZ> Always verify your data that is passed in by the user, you might
CZ> want to read:

CZ>   http://php.net/manual/en/security.filesystem.php

CZ> HTH,

CZ> Curt
CZ> --


Or drop the quotes they are not needed if there are only variables involved

-- 
regards,
Tom

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



Re: [PHP] Sessions

2003-10-10 Thread Lowell Allen
> I'm trying to track down some issues with my site, and am trying to decide
> if it's a session variable issue. On a random basis, it appears that session
> vars are being dumped, deleted, or unset, as the site will break. Queries
> based on session vars don't work, session vars not being displayed, etc.
> This seems to happen most often after a page has been idle for a couple of
> minutes and a refresh is done on the page.
> 
> This is on a hosted site. I have checked the configuration settings with
> phpinfo(); and session support is enabled.
> 
> On all pages where I use $_SESSION[], I have  session_start();?>. This has been double checked.
> 
> 1) Do session vars timeout, or can they be set to timeout after a certain
> length of time?
> 2) Is there anything other than session_start(); that needs to be done when
> using session vars?
> 3) What other things can I check for?

Most things are explained well by the online manual, and you should read and
re-read the session documentation. That said, I'll also say that the
documentation on sessions is not as informative as I'd like it to be, and I
still get reports of sessions expiring before they should.

Look at the output from echo phpinfo() and check these session configuration
options:

session.cookie_lifetime -- should be 0, lasts until quitting the browser
session.use_cookies -- should be on
session.use_trans_sid -- should be on

Some things aren't explained very well, like what does
"session.gc_maxlifetime" mean? The maximum time before garbage collection to
remove session data that hasn't been used? But to minimize the chance of
garbage collection on a shared server wrecking your sessions, you can
specify a directory for saving session data. Create a directory (on the same
level as your directory of publicly-viewable files if you can) and before
the 'session_start();' line, do 'session_save_path("../my_sessions_dir");'.

Also be aware that circumstances on the client side can mess with session
cookies and cause the session to be lost, like using Internet Explorer with
Entourage in Mac OS X.

--
Lowell Allen

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



php-general@lists.php.net

2003-10-10 Thread Daevid Vincent
Yeah, that is the 'hack' solution I came up with too. LOL.

I guess I was hoping for something more elegant...

Is there a reason that PHP doesn't handle the & properly? I mean, it seems
as though you'd have to go out of your way to force it NOT to spawn the task
in the background. If PHP was just executing the command in a shell, it
seems that the OS would handle the & for you... 
  
d

> -Original Message-
> From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 10, 2003 4:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: How to fire off a unix command WITHOUT 
> waiting for it to return (I want to use &)
> 
> On Fri, 10 Oct 2003 16:07:54 -0700, Daevid Vincent 
> <[EMAIL PROTECTED]> 
> wrote:
> 
> > How can I cause PHP to fire off a unix program and NOT wait 
> for a reply.
> > Basically I want to use the "&" love the unix provides, but 
> it seems that
> > exec, passthrough, system and even ` ` all wait for a 
> return despite my
> > putting something like exec("/bin/scan &"); or `/bin/scan &`
> >
> > *sigh*
> 
> write simple shell script wrapper that does it for you:
> 
> #!/bin/sh
> /bin/scan &
> 
> 
> Then call the wrapper.
> 
> 
> HTH, Curt.
> 
> -- 
> 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: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
err... sorry, the second line should be

$array =  explode(':', $string);

Cristian


Cristian Lavaque wrote:
> yup
>
> you could do something like this
>
> $string = 'field_value1:field_value2:field_value3';
> $array =  explode(':', $str);
> foreach($array as $substring){
> list($field, $value) = explode('_', $substr);
> $$field = $value;
> }
>
> hope this helps
>
> Cristian

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



Re: [PHP] Am I asking too much?

2003-10-10 Thread John Taylor-Johnston
So I should break it up my two queries?

$sql = 'insert into '.$db2.'.'.$table2.'(KW,AUS,GEO,AN,RB,CO,RR)
select KW,AUS,GEO,AN,RB,CO,RR FROM '.$db.'.'.$table.'
WHERE id='.$id.';';

 mysql_query($sql);

$sql = 'DELETE FROM '.$db.'.'.$table.' WHERE id='.$id.' LIMIT 1;';
mysql_query($sql);

Any suggestions how I could prompt in between to ask yes or no? PhpMyAdmin does it 
with a javascript alert(). An easy answer? Maybe I'm being lazy?

John

> For security reasons mysql_query does not support ; to separate queries.
> phpmyadmin splits multiple query strings up (PMA_splitSqlFile())
>
> John Taylor-Johnston wrote:
> > $sql1 works, but $sql2 doesn't. Am I asking too much? :=)
> > $sql2 echoes ok. If I copy it and run it in phpmyadmin, it works, but this way as 
> > php code, it flunks out when I add:
> >
> > DELETE FROM '.$db.'.'.$table.' WHERE id='.$id.' LIMIT 1;
> >
> > Ideas?
> > John
> >
> >  snip -
> > $sql1 = 'insert into '.$db2.'.'.$table2.'
> > (RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR)
> > select
> > RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR
> > FROM '.$db.'.'.$table.'
> > WHERE id='.$id.';';
> >
> >  mysql_query($sql1);
> >
> >  snip -
> > $sql2 = 'insert into '.$db2.'.'.$table2.'
> > (RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR)
> > select
> > RNum,YR,AU,ST,SD,SC,BT,BD,BC,AT,AD,AC,SR,PL,PR,JR,VNum,INum,DT,PG,LG,SF,OL,KW,AUS,GEO,AN,RB,CO,RR
> > FROM '.$db.'.'.$table.'
> > WHERE id='.$id.';
> > DELETE FROM '.$db.'.'.$table.' WHERE id='.$id.' LIMIT 1;';
> >
> > mysql_query($sql2);

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



Re: [PHP] Re: Exec() wont run program

2003-10-10 Thread Mohamed Lrhazi
Where are you expecting gedit to appear? try with -display argument
Also, try other commands, such as ls first.

Mohamed~

On Fri, 2003-10-10 at 17:18, steve wrote:
> Curt Zirzow wrote:
> > What is gedit?  it looks like the gnu text editor command. most X 
> > applications
> > wont run from the webserver in most cases.
> 
> gedit is a simple text editor - I think it stands for Gnome Edit
> 
>

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



Re: [PHP] PHP weirdo bahavior (code mutation)

2003-10-10 Thread Mohamed Lrhazi
Thanks Khalid... but that still does not help :)

The problem does not reproduce systematically, at all.. here is another
example I just found in a new log of my script:

Here is my code first:

$table="client_package";
$sql = "INSERT INTO `$table`
(`cp_id`,`client_id`,`pack_id`,`pack_price`,`parent_cp_id`,`cp_start_stamp`,
 

`cp_renew_stamp`,`cp_billing_cycle`,`cp_status`,`cp_comments`,`cp_renewed_on`,`cp_stamp`,`aff_code`,

`aff_last_paid`,`domain`,`ip`,`server`,`username`,`password`) 

VALUES(NULL,'$client_id','$pack_id','$price',NULL,'$domain_created',

'$domain_expires','$bcycle','$cp_status',NULL,'$domain_created','$cp_stamp',NULL,
NULL,NULL,NULL,NULL,NULL,NULL) ";

$result = $db_mbill->query($sql);
if (DB::isError($result)) {
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:" ."sql was:
$sql ");
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:" .
$result->getMessage());
return false;
}else{
mylog(__FUNCTION__ . ":" ."[MbillClientID: $client_id]:"
."Successfully added pkg Domain Registration [$domain_name]");
}


Now here the log, again this does not happen systematically, often the
code works... but when it does not, it s very weirdo :


__FUNCTION__:[MbillClientID: 4135]:sql was: INSERT INTO `client_package`
(`cp_id`,`client_id`,`pack_id`,`pack_price`,`parent_cp_id`,`cp_start_stamp`,
   
`cp_renew_stamp`,`cp_billing_cycle`,`cp_status`,`cp_comments`,`cp_renewed_on`,`cp_stamp`,`aff_code`,
[EMAIL PROTECTED]@[EMAIL PROTECTED] date or
[EMAIL PROTECTED],`server`,`username`,`password`)
   
VALUES(NULL,'4135','12','0',NULL,'1038200400',
   
'1069736400','12','2','','1038200400','1065728768',NULL,
[EMAIL PROTECTED]@[EMAIL PROTECTED] database [EMAIL 
PROTECTED])
__FUNCTION__:[MbillClientID: 4135]:DB Error: syntax error


Any ideas?
Mohamed~


On Fri, 2003-10-10 at 16:03, Burhan Khalid wrote:
> Mohamed Lrhazi wrote:
> 
> > I am using a PHP application called modernbill, which uses iocube
> > encoder... PHP very frequently dies with SIG fault... 4.3 dies
> > systematically
> > 
> > While working on this problem I stumbled on this behavior :
> > 
> > In my code, I have something like this:
> > 
> > $table_customer="customer";
> > $sql="select * from [$table_customer] where [id] = '$id' ";
> 
> Try $sql = "SELECT * FROM ".$table_customer." WHERE id = '".$id."'";
> and see if you get the same error.  If you are using MSSQL, I think that 
> [ ] are optional, but I could be mistaken.
> 
> [ snip ]
> 
> 
> -- 
> Burhan Khalid
> phplist[at]meidomus[dot]com
> http://www.meidomus.com

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



[PHP] Re: Get fields values from a string.

2003-10-10 Thread Cristian Lavaque
yup

you could do something like this

$string = 'field_value1:field_value2:field_value3';
$array =  explode(':', $str);
foreach($array as $substring){
list($field, $value) = explode('_', $substr);
$$field = $value;
}

hope this helps

Cristian


Mehdi Achour wrote:
> Hi,
>
> Check this : php.net/explode
>
> didou
>
>
> Carles Xavier Munyoz Baldó wrote:
>
>> Hi,
>> I have a string with the format:
>> "field_value1:field_value2:field_value3"
>>
>> Is there any PHP string manipulation function to extract this values
>> from the string ?
>>
>> Greetings.
>> ---
>> Carles Xavier Munyoz Baldó
>> [EMAIL PROTECTED]
>> http://www.unlimitedmail.net/
>> ---

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



Re: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Mike Migurski
>> If you've used it before, I can write more about how it can be used in
>> specific circumstances. I never start a project without starting a
>> repository someplace, and a combination of CVS and Make have really
>> helped me out with a lot of projects.
>
>hmm.. i'm interested in seeing your approach with Make.  I've seen things
>like using make to prepare and install code for a production server or
>set up a site for a staging level.

The main tasks I use it for are preparing directories with files that
shouldn't be included with CVS, rolling out stage and production versions
of sites, keeping log and cache files under control, and pulling in copies
of external resources like libraries of functions or classes.

It's nice to be able to set up your make rules, so that you can type `make
ready`, to have all your temp and log directories created with the proper
write permissions, or `make clean` to flush them out. `make live` or `make
stage` encapsulate the various rsync commands needed to push a site onto a
remote server (or the commands necessary to ssh into that remote server
and call `cvs update` while there), and `make db-clean` flushes out the DB
and recreates all objects from scratch.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



php-general@lists.php.net

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 16:07:54 -0700, Daevid Vincent <[EMAIL PROTECTED]> 
wrote:

How can I cause PHP to fire off a unix program and NOT wait for a reply.
Basically I want to use the "&" love the unix provides, but it seems that
exec, passthrough, system and even ` ` all wait for a return despite my
putting something like exec("/bin/scan &"); or `/bin/scan &`
*sigh*
write simple shell script wrapper that does it for you:

#!/bin/sh
/bin/scan &
Then call the wrapper.

HTH, Curt.

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


[PHP] Re: Echo $PHP_SELF not working

2003-10-10 Thread Al
Put a ";" [no quotes] after  such as:   echo $PHP_SELF;   

Jeff McKeon wrote:

I've just published a new website and something is wrong.  I suspect the
PHP.ini on the server but I can't seem to find anything.
The line:



Doesn't seem to work.  If I look at the "view source" from the web
browser I see this..


On the development server I see this...



On the dev server "ECHO $PHP_SELF" seems to work but not on the
production one.  Any ideas what I've missed?
Thanks,

Jeff
 

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


php-general@lists.php.net

2003-10-10 Thread Daevid Vincent
How can I cause PHP to fire off a unix program and NOT wait for a reply.
Basically I want to use the "&" love the unix provides, but it seems that
exec, passthrough, system and even ` ` all wait for a return despite my
putting something like exec("/bin/scan &"); or `/bin/scan &`

*sigh*

The sitch is that I'm scanning/pinging/nmap a HUGE amount of IP addresses.
Perhaps 254 - 65000 or more individual iP addresses. We have a multithreaded
scanner that we wrote in C that can to this quickly, but it's still a wait.
It pulls from a db the ips to scan and sets their up/down flags. My php
scheduler page queries to get the ones that are up. 

So as you see, I don't want to wait for a return code, I know the status via
the db and how many rows are done/need to be done. 

Daevid Vincent.
http://daevid.com

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



[PHP] Sessions

2003-10-10 Thread James Johnson
Hi,

I'm trying to track down some issues with my site, and am trying to decide
if it's a session variable issue. On a random basis, it appears that session
vars are being dumped, deleted, or unset, as the site will break. Queries
based on session vars don't work, session vars not being displayed, etc.
This seems to happen most often after a page has been idle for a couple of
minutes and a refresh is done on the page.

This is on a hosted site. I have checked the configuration settings with
phpinfo(); and session support is enabled.

On all pages where I use $_SESSION[], I have . This has been double checked.

1) Do session vars timeout, or can they be set to timeout after a certain
length of time?
2) Is there anything other than session_start(); that needs to be done when
using session vars?
3) What other things can I check for?

Thanks,
James

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



[PHP] Re: XML / XLS application

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 18:09:18 -0400, <[EMAIL PROTECTED]> wrote:

Hello mailing list, I have a question about the use of XML / XLS
application, I am introducing myself in this technology, What is useful 
XML
/ XLS for?
XML - data storage
XLS - language to display define how to display XML.
HTML - XML with pre-defined XLST.

Curt.

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


[PHP] controlling cvs from php

2003-10-10 Thread Jeremy Andrews
Hello,

  I'm trying to login to a cvs repository and upload/download files from a
php script utilizing the 'cvs' command.  I'm trying to avoid the use of
external libraries, etc...

  Is it possible to do this with popen, or more likely with proc_open? 
I'd prefer to do it with the former so as to not require PHP 4.3+, but in
my testing I've been unable to do it with either command.

  I've looked through the examples of using proc_open at php.net, but have
been unable to translate these into a script that simply logs into cvs. 
The return code from proc_close is always 1, and the best I've gotten is
an error saying "used empty password; try 'cvs login' with a real
password".

  Any pointers into how I can make this work would be greatly
appreciated!!

Here's roughly what I'm trying to do:

--

  $dspec = array(
0 => array("pipe", "r"), // standard in
1 => array("pipe", "w"), // standard out
  );

  $proc = proc_open("/usr/local/bin/cvs -d pserver:@my.server:/home/cvs
login 2>&1", $dspec, $pipes);

  if(is_resource($proc)) {
$output .= fgets($pipes[1], 1024);
$output .= fgets($pipes[1], 14);
fclose($pipes[1]);

if (!fwrite($pipes[0], "cvspassword")) {
  echo "Error...";
  exit;
} 
fclose($pipes[0]);

echo proc_close($proc);
$output .= "command returned $return_value\n";
  }

--

Thanks,
 -Jeremy

-- 
 Jeremy Andrews
 PGP Key ID: 8F8B617A  http://www.kerneltrap.org/

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



Re: [PHP] CSV file with PHP

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 18:09:14 -0400, Dan Anderson <[EMAIL PROTECTED]> 
wrote:
while ($line = mysql_fetch_array($result))
{
if ($first)
{ foreach ($line as $key => $value)
{ if ($first)
{ fwrite($file_handle, $key); $first = FALSE; }
else
{ fwrite($file_handle, ", $key"); }
}
fwrite ($file_handle, "\n");
}
$number1 = TRUE;
foreach ($line as $value)
{
if ($number1) { fwrite ($file_hande, $value); $number1 = FALSE; } else { 
fwiret ($file_hande, ", {$value}"; };
}
fwrite ($file_handle, "\n");
}
Here is a little more efficient code:

if ($row = mysql_fetch_assoc($result)) {

 $line = '';
 foreach ($row as $key => $value) {
   $line .= "$key,";
 }
 fwrite($file_handle, substr($line, 0, -1)."\n");
 do {

   $line = '';
   foreach ($row as  $value) {
 if (strpos($value, '"') ) {
   $line .= sprintf('"%s",', str_replace('"', '\\"', $value));
 } else {
   $line .= "$value,";
 }
   }
   fwrite($file_handle, substr($line, 0, -1)."\n");
 } while ($line = mysql_fetch_assoc($result));
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Quick question: PHP user?

2003-10-10 Thread Ryan Thompson
As an apache module it runs as the apache user.

On Friday 10 October 2003 17:44, Grant Rutherford wrote:
> Hi,
>
> Just a quick question...  What user does php run as on linux?  Is it the
> Apache user?  Is there some way to tell?  I need to be able to set a
> directory so that only PHP can access it.
>
> Thanks,
> Grant

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

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



[PHP] Re: Quick question: PHP user?

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 16:44:37 -0500, Grant Rutherford <[EMAIL PROTECTED]> 
wrote:

Hi,

Just a quick question...  What user does php run as on linux?  Is it the 
Apache user?  Is there some way to tell?  I need to be able to set a 
directory so that only PHP can access it.
You can figure who apache/php is running as by using shell_exec() on the 
system
command 'whoami':

echo shell_exec('whoami');

HTH,

Curt

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


Re: [PHP] Quick question: PHP user?

2003-10-10 Thread Dan Anderson
> Just a quick question...  What user does php run as on linux?  

It all depends on how PHP is set up.  Do something like:

$fff = fopen ("./temp","w");
fwrite($fff,"testing");
fclose($fff); 

in a directory chmod 777.  Look at the user id.

(For what it's worth on my system its UID 518).

-Dan

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



Re: [PHP] CSV file with PHP

2003-10-10 Thread Dan Anderson
You could do something like:

$result = mysql_query($query) or die(mysql_error());  // don't display
errors on production machines
$first = TRUE;
while ($line = mysql_fetch_array($result))
{
  if ($first)
   { 
 foreach ($line as $key => $value)
 { 
   if ($first)
   { fwrite($file_handle, $key); $first = FALSE; }
   else
   { fwrite($file_handle, ", $key"); }
 }
 fwrite ($file_handle, "\n");
   }
   $number1 = TRUE;
   foreach ($line as $value)
   {
 if ($number1) 
 { fwrite ($file_hande, $value); $number1 = FALSE; } 
 else 
 { fwiret ($file_hande, ", {$value}"; };
   }
   fwrite ($file_handle, "\n");
}

That is pseudo code though.  (i.e. I don't have time to test it and
debug it and make it nice and neat and readable and conform to your
specifications -- but it should give you a good idea of how to start).

-Dan

On Fri, 2003-10-10 at 17:38, Cesar Aracena wrote:
> Hi all,
> 
> Does anybody knows how to make a CSV (comma separated values) file with
> PHP based on results fetched from MySQL? I need it to import it with
> Microsoft Outlook Express.
> 
> Thanks in advanced,
> 
> Cesar Aracena
> www.icaam.com.ar

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



[PHP] Oracle - Win32

2003-10-10 Thread orlandopozo

Hello mailing list, I want to use Oracle function in PHP parser in Win32 OS,
but I don't know how to install it, in the official documentation tell this:

Installation
You have to compile PHP with the option --with-oracle[=DIR], where DIR
defaults to your environmment variable ORACLE_HOME.



I think that this steps is by Linux user, any help, I will appreciate,
thanks.

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



[PHP] Re: CSV file with PHP

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 18:38:04 -0300, Cesar Aracena <[EMAIL PROTECTED]> 
wrote:

Hi all,

Does anybody knows how to make a CSV (comma separated values) file with
PHP based on results fetched from MySQL? I need it to import it with
Microsoft Outlook Express.
csv file format as follows:

 value,"value\" with quotes",value with space,value

with optional column headings on the first line. the  is a actual
carriage return "\n".
I'm not sure what you mean by importing it with OE.

Curt.

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


[PHP] XML / XLS application

2003-10-10 Thread orlandopozo
Hello mailing list, I have a question about the use of XML / XLS
application, I am introducing myself in this technology, What is useful XML
/ XLS for? , I need a basic example, basic application of it, because I
don't find the use of it. I know that XML is used to interchange data
between every system in standard way (Why XML is standard?, because I
understand that depend of the client browser they have a particular XML
parser to retrieve information of the XML document, if would have only one
standard XML parser, could be), and with XLS you transform the XML document
to HTML format, postscript format, and so on, but in order to transform the
XML document you need to know the syntax of the XSL and I think that its
another language that you need to know. Another doubt is if XML document
replace DB, because I read a book that has a methodology to transform DB
table into a XML document, and use a XML parser to retrieve the data, I read
another example that the script use a SQL statement like XML SQL Select, you
execute it, then the DBMS server give you the XML document, then XSL or XLST
convert the XML document, and finally you obtain the HTML in the client
browser, well, Thanks for any help, bye :).

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



RE: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Jeremy Russell
I a newbie to cvs itself.  I'll take a look at the link Thanks!

> -Original Message-
> From: Mike Migurski [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 2:41 PM
> To: Jeremy Russell
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Need advice, hopefully on topic.
> 
> > I got this project, I'm writing it in PHP of course.  What I
would
> >like to do is create a simple an efficient way to work on it from a
> >couple different locations/workstations.  I'm throwing around the
idea of
> >a CVS repository, but am not sure if this is the best way.  Does
anyone
> >have suggestions or advice on how to setup a CVS or RCCS or something
> >like this?  Web based would be even better.  Just need some direction
on
> >this.  Thanks!!
> 
> CVS rocks the house.
> If you're completely new to it, I have a quick introduction to it at
> http://www.evolt.org/article/A_brief_introduction_to_CVS/21/60153/
> 
> If you've used it before, I can write more about how it can be used in
> specific circumstances. I never start a project without starting a
> repository someplace, and a combination of CVS and Make have really
helped
> me out with a lot of projects.
> 
> -mike.
> 
> -
> michal migurski- contact info and pgp key:
> sf/cahttp://mike.teczno.com/contact.html
> 
> --
> 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] Quick question: PHP user?

2003-10-10 Thread Grant Rutherford
Hi,

Just a quick question...  What user does php run as on linux?  Is it the 
Apache user?  Is there some way to tell?  I need to be able to set a 
directory so that only PHP can access it.

Thanks,
Grant
--
Grant Rutherford
Iders Incorporated
600A Clifton Street
Winnipeg, MB
R3G 2X6
http://www.iders.ca
tel: 204-779-5400 ext 36
fax: 204-779-5444

Iders Incorporated: Confidential

Note: This message is intended solely for the use of the designated
recipient(s) and their appointed delegates, and may contain
confidential information.  Any unauthorized disclosure, copying or
distribution of its contents is strictly prohibited.  If you have
received this message in error, please destroy it and advise the sender
immediately by phone, Email or facsimile.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] CSV file with PHP

2003-10-10 Thread Cesar Aracena
Hi all,

Does anybody knows how to make a CSV (comma separated values) file with
PHP based on results fetched from MySQL? I need it to import it with
Microsoft Outlook Express.

Thanks in advanced,

Cesar Aracena
www.icaam.com.ar

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



[PHP] Re: Exec() wont run program

2003-10-10 Thread steve
Curt Zirzow wrote:
What is gedit?  it looks like the gnu text editor command. most X 
applications
wont run from the webserver in most cases.
gedit is a simple text editor - I think it stands for Gnome Edit

echo shell_exec("sudo gedit");

might give some answers,

Curt.
Tried echo shell_exec("sudo gedit"); and still application doesn't run 
and no output is echoed to the web page.

You said most X applications won't run from the webserver.  Is there a 
way to get around that?  Because I tried calling a custom shell script 
which opened those programs for me, which also didn't work.  I've 
created a few applications in Kylix and I want to start them through a 
web browser using PHP.

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


[PHP] Repost: Help needed on PHP+IIS+filesys

2003-10-10 Thread Michael Kochendoerfer
Hi,

does anyone know how to handle file and directory paths on a IIS 5.0 
server? Problem is that the server has multi-domain and each domain has 
an 
associated 'root' dir below e:\webspaces.

So if one uses relative path strings, an opendir() for example will fail. 
One has to use "e:\\webspaces\\root_of_domain_1\\images\\" to access the 
/images folder of the configured domain 1.

I'm sure there are functions and env vars to accomplish this, but I'm 
quite 
new to PHP and didn't find them yet.

Problem is (I didn't describe it in my former post) that I'm unable to 
set 
a global document root that is valid for all domains and subdomains. I 
guess the webserver would assemble the path by itself, uniquely for each 
domain, to get the desired result.

Practical example: On one domain, they mix up FrontPage and PHP. Since 
FrontPage doesn't like PHP, they construct one part of the web using 
FrontPage (and its features like so-called 'designs' - which aren't more 
than stylesheets - and common borders - which are simply files in a 
hidden 
directory '_borders'), and the other part using PHP.
To combine both of them and to make them look almost the same, they could 
include a header and a footer.

Header file/section looks like:

";
  include "./_borders/top.htm";
?>

Footer looks similar except for the filename (which is 'bottom.htm' 
here). 
When included in a .php file at their 'root' level, it works well. But if 
they use a subdir like /scripts, it won't. And changing the include file 
from ./borders/top.htm to /borders/top.htm, PHP puts the complete 
physical 
path to the left of the filename. But this is not relative to their root 
:-
(

To recall: Their root level is (physically mapped):

e:\\webspaces\\root_of_domain_1


Hope this has been clear enough to show my problem.

Thanks in advance!

- Michael

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



[PHP] Re: Exec() wont run program

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 13:24:49 -0700, Steve <[EMAIL PROTECTED]> wrote:

I want to start up a program through a php page.  For example, gedit.

I found that the user is apache by running this:
- passthru('whoami');
since apache might not have access to run a certain command, I'll use 
sudo.  I edited the sudoers file in /etc/sudoers and underneath the line: 
# User privilege specification,  I added:
	apache  ALL=(ALL) NOPASSWD: ALL

which would give apache access to run any command without a password.
So in my php file the line looks like this:
	exec("sudo gedit");
What is gedit?  it looks like the gnu text editor command. most X 
applications
wont run from the webserver in most cases.


And it doesn't do anything.  Any suggestions.
echo shell_exec("sudo gedit");

might give some answers,

Curt.

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


[PHP] Re: Major wierdness - ack!

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 13:27:59 -0700, James Johnson <[EMAIL PROTECTED]> 
wrote:

I have a page that hits the database to display the records. One of the
columns is 'startDate'. I format this for display like this:

The page returns the following error:

[ERROR][8][Undefined index:
startDate][/home/.paco/campuscb/campuscorkboard.com/search_jobs.php:319][ERR 

Whats the sql statement look like?  if you have a function of some sort in 
the select
statement you'll have to give it a name:

 select FUNC_NAME(column), column2 from table

 - change to -

 select FUNC_NAME(column) as column, column2 from table


If I comment out the error_reporting include file, the page renders fine. 
I
have checked the DB and the startDate column has a valid date in it.
Is the startDate the same as the current date?  My bet is that strtotime() 
thinks your first paramater is an empty string, and then applying that 
conversion relative now().

Just to clarify this, strtotime has two ways that it behaves, if the first 
paramater looks
like a date (ie 2003-12-01), then it will return the unix timestamp for 
that.  Other wise it
will treat the string as a modifier to the relative time of the second 
parameter (defaulting to time()).

 http://php.net/strtotime

I hope that clarifies things.

Curt

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


[PHP] Exec() wont run program

2003-10-10 Thread steve
I want to start up a program through a php page.  For example, gedit.

I found that the user is apache by running this:
 - passthru('whoami');
since apache might not have access to run a certain command, I'll use 
sudo.  I edited the sudoers file in /etc/sudoers and underneath the 
line: # User privilege specification,  I added:
	apache  ALL=(ALL) NOPASSWD: ALL

which would give apache access to run any command without a password.
So in my php file the line looks like this:
	exec("sudo gedit");

And it doesn't do anything.  Any suggestions.

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


[PHP] Major wierdness - ack!

2003-10-10 Thread James Johnson
Hi,

I'm getting so frustrated with this.

I have put some error trapping code in my site with the following code (an
included file):



I have a page that hits the database to display the records. One of the
columns is 'startDate'. I format this for display like this:



The page returns the following error:

[ERROR][8][Undefined index:
startDate][/home/.paco/campuscb/campuscorkboard.com/search_jobs.php:319][ERR
OR][8][strtotime() called with empty time
parameter][/home/.paco/campuscb/campuscorkboard.com/search_jobs.php:319]10/1
0/2003

If I comment out the error_reporting include file, the page renders fine. I
have checked the DB and the startDate column has a valid date in it.

Ideas?
Thanks,
James

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



Re: [PHP] Re: RegEx -- help

2003-10-10 Thread Robert Cummings
On Fri, 2003-10-10 at 16:18, Curt Zirzow wrote:
> On Fri, 10 Oct 2003 14:01:00 -0400 (EDT), Lists <[EMAIL PROTECTED]> wrote:
> 
> > I do not know if this is the right list, but if someone could help me 
> > with the following
> 
> Sure, I'll be glad to help.
> 
> 
> > I need a function that does this:
> 
> I'm not sure if you want me to write the code that does this for you, but I 
> know that I wont. I'm just going to give you the tools that are commonly
> used for the tasks your asking for.
> 
> >
> > function phone($num) {
> >
> > take num and remove anything that is not a number
> > ex: () - /
> 
> http://php.net/preg_replace
> 
> >
> >
> > If there is not 1 at the start, add a one to the start of the number.
> 
> http://php.net/substr
> 
> >
> > make sure that the number is 10 digits (if not return -1)
> 
> http://php.net/strlen
> 
> > }
> >
> > Thank you for your help,
> 
> In the future, please at least try and attempt to write the code, most 
> people here arnt here to write code for everyone, but to solve problems 
> people are
> having with their own code.

Incidentally the procedure for correcting the number is flawed. If you
(original poster) have a 9 digit number with an area code beginning with
a 1 then the required additional 1 will never be prepended. Really what
you want is if the sequence of numbers is 9 digits long then precede
with a 1.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 12:40:30 -0700 (PDT), Mike Migurski <[EMAIL PROTECTED]> 
wrote:

	I got this project, I'm writing it in PHP of course.  What I would
like to do is create a simple an efficient way to work on it from a
couple different locations/workstations.  I'm throwing around the idea 
of
a CVS repository, but am not sure if this is the best way.  Does anyone
have suggestions or advice on how to setup a CVS or RCCS or something
like this?  Web based would be even better.  Just need some direction on
If you've used it before, I can write more about how it can be used in
specific circumstances. I never start a project without starting a
repository someplace, and a combination of CVS and Make have really 
helped
me out with a lot of projects.
hmm.. i'm interested in seeing your approach with Make.  I've seen things 
like
using make to prepare and install code for a production server or set up
a site for a staging level.

Curt

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


[PHP] Re: RegEx -- help

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 14:01:00 -0400 (EDT), Lists <[EMAIL PROTECTED]> wrote:

I do not know if this is the right list, but if someone could help me 
with the following
Sure, I'll be glad to help.


I need a function that does this:
I'm not sure if you want me to write the code that does this for you, but I 
know that I wont. I'm just going to give you the tools that are commonly
used for the tasks your asking for.

function phone($num) {

take num and remove anything that is not a number
ex: () - /
http://php.net/preg_replace



If there is not 1 at the start, add a one to the start of the number.
http://php.net/substr

make sure that the number is 10 digits (if not return -1)
http://php.net/strlen

}

Thank you for your help,
In the future, please at least try and attempt to write the code, most 
people here arnt here to write code for everyone, but to solve problems 
people are
having with their own code.

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


[PHP] [xml] character data

2003-10-10 Thread Decapode Azur
I do not understand why this line does not work :
$info[$element] = $content;

but yet this works: echo $content;

why? what is the trick?

-- 

$xml_comment_file = basename($svg_file, '.svg.xml') .'.info.xml';

if (file_exists($xml_comment_file)) {
$file = $xml_comment_file;

$info = array();
$element = null;

function startElement($parser, $name, $attrs) {
global $element;
$element = $name;
}
function endElement($parser, $name) {
print "";
}
function characterData($parser, $content) {
global $info;
global $element;
$info[$element] = $content;
//$info[$element] = sprintf("%s", $content);
}

$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, FALSE);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");

if (!($fp = fopen($file, 'r')))
die("could not open XML input\n");

while ($data = fread($fp, 4096))
if (!xml_parse($xml_parser, $data, feof($fp)))
die(sprintf("XML error: %s at line %d",
   xml_error_string(xml_get_error_code($xml_parser)),
   xml_get_current_line_number($xml_parser)));

xml_parser_free($xml_parser);

print_r($info);
}
/*
# the output is without $content :
Array
(
[info] =>
[file] =>
[orig-file] =>
[orig-author] =>
[bitmap-src] =>
[orig-date] =>
[svg-date] =>

)
*/

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



Re: [PHP] PHP source display

2003-10-10 Thread Ryan Thompson
Try using the function view_source(string filename)
That's off the top of my head. Might be wrong. It's in the documentation

On Friday 10 October 2003 15:41, Lists wrote:
> When I used apache 1.3 I could call a file with an extension of .phps and
> it would display formatted source.
>
> In apache 2.0 it does not do this
>
> Here is my config from apache 2.0
>
>
> LoadModule php4_module modules/libphp4.so
>
> #
> # Cause the PHP interpreter handle files with a .php extension.
> #
> 
> SetOutputFilter PHP
> SetInputFilter PHP
> LimitRequestBody 524288
> 
>
> I have tried doing:
>
> 
> SetOutputFilter PHPS
> SetInputFilter PHPS
> LimitRequestBody 524288
> 
>
>
> However, that does not work!
>
> Any ideas?
>
> Michael

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

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



Re: [PHP] PHP weirdo bahavior (code mutation)

2003-10-10 Thread Burhan Khalid
Mohamed Lrhazi wrote:

I am using a PHP application called modernbill, which uses iocube
encoder... PHP very frequently dies with SIG fault... 4.3 dies
systematically
While working on this problem I stumbled on this behavior :

In my code, I have something like this:

$table_customer="customer";
$sql="select * from [$table_customer] where [id] = '$id' ";
Try $sql = "SELECT * FROM ".$table_customer." WHERE id = '".$id."'";
and see if you get the same error.  If you are using MSSQL, I think that 
[ ] are optional, but I could be mistaken.

[ snip ]

--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP source display

2003-10-10 Thread Lists
When I used apache 1.3 I could call a file with an extension of .phps and 
it would display formatted source.

In apache 2.0 it does not do this

Here is my config from apache 2.0


LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
#

SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288


I have tried doing:


SetOutputFilter PHPS
SetInputFilter PHPS
LimitRequestBody 524288



However, that does not work!

Any ideas?

Michael

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



Re: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Mike Migurski
>   I got this project, I'm writing it in PHP of course.  What I would
>like to do is create a simple an efficient way to work on it from a
>couple different locations/workstations.  I'm throwing around the idea of
>a CVS repository, but am not sure if this is the best way.  Does anyone
>have suggestions or advice on how to setup a CVS or RCCS or something
>like this?  Web based would be even better.  Just need some direction on
>this.  Thanks!!

CVS rocks the house.
If you're completely new to it, I have a quick introduction to it at
http://www.evolt.org/article/A_brief_introduction_to_CVS/21/60153/

If you've used it before, I can write more about how it can be used in
specific circumstances. I never start a project without starting a
repository someplace, and a combination of CVS and Make have really helped
me out with a lot of projects.

-mike.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html

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



[PHP] Need advice, hopefully on topic.

2003-10-10 Thread Jeremy Russell
Hello list,
I got this project, I'm writing it in PHP of course.  What I
would like to do is create a simple an efficient way to work on it from
a couple different locations/workstations.  I'm throwing around the idea
of a CVS repository, but am not sure if this is the best way.  Does
anyone have suggestions or advice on how to setup a CVS or RCCS or
something like this?  Web based would be even better.  Just need some
direction on this.  Thanks!!

Jeremy Russell
Network Administrator, CNI
580.235.2377

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



[PHP] PHP weirdo bahavior (code mutation)

2003-10-10 Thread Mohamed Lrhazi
Hello all,

I am using a PHP application called modernbill, which uses iocube
encoder... PHP very frequently dies with SIG fault... 4.3 dies
systematically

While working on this problem I stumbled on this behavior :

In my code, I have something like this:

$table_customer="customer";
$sql="select * from [$table_customer] where [id] = '$id' ";

$result = $db_plat->query($sql);
if (DB::isError($result)) {
mylog(__FUNCTION__ . ":" . "sql was: $sql "); 
mylog(__FUNCTION__ . ":" . $result->getMessage());
return false;
}else{
$row = $result->fetchRow(DB_FETCHMODE_ASSOC);
}

Well, sometimes, at least twice I noticed it, sometimes I get this in my
log file:

sql was: select * fro?2351ERROR_RETURNd_id] = '2351'
DB Error: Syntax error.

There are binary chars after the "select * fro"

How could that possibly happen? Who changed my code?

Thanks for any input.

Mohamed~

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



[PHP] Re: Display a JPG Image

2003-10-10 Thread Kevin Stone
Delete the line with header("Content-disposition:  ... ").  Just set the content type 
and output the file.
-Kevin


"Pushpinder Singh Garcha" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Hello Everyone,

   I am trying to display a JPG image to a use, who has logged in. Some 
research on google revealed a way to do this. I am using the following 
code to display it.

if (session_is_registered("valid_user")){

if(session_is_registered("cmi")){

header("Content-type: image/jpg");
$file = "docs/picture1.jpg";
   header("Content-disposition: attachment; filename=$file" );
readfile($file);

 } 

My question is that while this approach works fine with Mozilla on the 
MAC and Win platform. it throws up a dialog box asking whether the user 
wants to download  the file or view it. However IE on either platforms 
does not work fine. On the PC it does not recognize the file extension 
correctly. While on the MAC side of things, it just shows the image in 
the same frame.

Any suggestions would be most welcome. !

Thanks in advance
Pushpinder Singh




[PHP] imagepsloadfont returns wrong datatype

2003-10-10 Thread Michael Winston
Hi-

I *finally* got imagepsloadfont() to work on my Mac OS X box (it 
helps if you actually have a .pfb file).  Now I'm having problems 
with another aspect of imagepsloadfont().  The docs say it should 
return an int, however it's returning a resource.

I'm guessing this is why imagestring and imagepstext aren't working - 
because they require an int for the font.

Is this a bug?  Am I doing something wrong?  Am I not understanding the docs?

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


Re: [PHP] RegEx -- help

2003-10-10 Thread Mohamed Lrhazi
Untested:


function fixhisnumber($str){

//remove all but numbers
$str = preg_replace("/[^0-9]/","",$str);

//append 1, unless it's already there
$str = $str[0] == '1'? $str:"1".$str;

if (strlen($str) == 10) return $str;
else return -1;

}

Mohamed~

On Fri, 2003-10-10 at 14:01, Lists wrote:
> I do not know if this is the right list, but if someone could help me with 
> the following
> 
> I need a function that does this:
> 
> function phone($num) {
> 
> take num and remove anything that is not a number
> ex: () - / 
> 
> 
> If there is not 1 at the start, add a one to the start of the number.
> 
> make sure that the number is 10 digits (if not return -1)
> 
> 
> }
> 
> Thank you for your help,
> 
> Michael

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



Re: [PHP] PHP generated AuthUserFiles?

2003-10-10 Thread Mika Tuupola
On Fri, 10 Oct 2003, MIKE YRABEDRA wrote:

> Is there a way to let PHP generate the necessary AuthUserFiles for use with
> .htaccess?

http://pear.php.net/package/File_HtAccess
http://pear.php.net/package/File_Passwd

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/

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



[PHP] RegEx -- help

2003-10-10 Thread Lists
I do not know if this is the right list, but if someone could help me with 
the following

I need a function that does this:

function phone($num) {

take num and remove anything that is not a number
ex: () - / 


If there is not 1 at the start, add a one to the start of the number.

make sure that the number is 10 digits (if not return -1)


}

Thank you for your help,

Michael

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



RE: [PHP] Getting elapsed time

2003-10-10 Thread Jay Blanchard
[snip]
Is there a simple way (a built in function) to get the elapsed time
between two given timestamps (-MM-DD HH:MM:SS)?
[/snip]

http://www.php.net/strtotime

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



[PHP] Re: Did anyone have success with the require() function??

2003-10-10 Thread Curt Zirzow
On Fri, 10 Oct 2003 13:09:16 -0400, Scott Fletcher <[EMAIL PROTECTED]> wrote:

Hi Fellas!

Did anyone have success with making the required function work if using
this sample code.  It didn't work for me.
--snip--
require("$_REQUEST['PDF_LIB_PATH']");
--snip--
When you access an array inside of a string you half to tell php that it
is a variable by enclosing it with curly brackets:
 require("{$_REQUEST['PDF_LIB_PATH']}");

Now the question is, what happens if I access your site like so:

 http://yoursite.com/yourfile.php?PDF_LIB_PATH=%2fetc%2fpasswd

Always verify your data that is passed in by the user, you might
want to read:
 http://php.net/manual/en/security.filesystem.php

HTH,

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


RE: [PHP] Display a JPG Image

2003-10-10 Thread Jon Shoberg
On Fri, 10 Oct 2003, Bertrand Moulard wrote:

> try image/jpeg
> 
> cheers
> 
> .b
> 
> 

-- 
http://jon.shoberg.net

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



[PHP] Getting elapsed time

2003-10-10 Thread Jeff McKeon
Is there a simple way (a built in function) to get the elapsed time
between two given timestamps (-MM-DD HH:MM:SS)?

Thanks,

Jeff

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



[PHP] Formatting text in a

2003-10-10 Thread James Johnson
Hi,

More of a general HTML question, but thought I'd ask here:

I'm doing form validation and if something needs to be corrected, then the
user is informed and allowed to make changes. So, they don't have to retype
what they entered in the , I'm displaying it again with:



But, when the form is redisplayed, it is adding tab chars to the beginning
of the string. Is this a PHP issue or an HTML issue?

Suggestions?
Thanks,
James

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



[PHP] Echoing string with single quote from $_POST

2003-10-10 Thread James Johnson
Hi,

I'm building a form where a user can enter text. When the form is submitted
I'm doing some validation before continuing. If the form isn't filled
correctly, then the user has to correct it before continuing. However, I
want to save the data that has been entered (some of it may be lengthy), so
I'm doing this:



If the $_POSTed string has quotes in it, the output contains a slash

"It's great" becomes "It\'s great" on the page.

I've tried echo addslashes($_POST['adTitle']);} and that doesn't work. Is
there another function that will output the string just as it was input?

I've searched through the manual and haven't found anything yet. Just
thought you all would know off the top of your head(s). :)

Thanks,

James

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



Re: [PHP] preg_match

2003-10-10 Thread Jason Wong
On Friday 10 October 2003 23:16, Omar wrote:

> In this line
> preg_match("/[^a-z0-9'\?!-]", $item)
>
> i cant find de way to add vowels with accent (���,,,� and other
> characters to the preg_match function.
> Can anyone help me?
> The documentation of this function is not very clear (or complete) to me.

Have a look at the use of "\w" which matches "words". Which characters are 
valid for words depends on your locale setting.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
I am the wandering glitch -- catch me if you can.
*/

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



[PHP] Did anyone have success with the require() function??

2003-10-10 Thread Scott Fletcher
Hi Fellas!

Did anyone have success with making the required function work if using
this sample code.  It didn't work for me.

--snip--
require("$_REQUEST['PDF_LIB_PATH']");
--snip--

But I have success if I do this instead...

--snip--
$PDF_LIB_PATH = $_REQUEST['PDF_LIB_PATH'];
require("$PDF_LIB_PATH");
--snip--

Anyone know why is that?

Thanks,
 Scott F.

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



Re: [PHP] Re: Echo $PHP_SELF not working

2003-10-10 Thread Shawn McKenzie
Unless you do an extract($_POST); in a main include somewhere before your
form.

For $PHP_SELF just do $PHP_SELF = $_SERVER['PHP_SELF']; or to get all of the
$_SERVER vars, do extract($_SERVER);

-Shawn


"Jeff McKeon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
So you're saying I had register_globals set to ON on my dev server!?
CRAP!!! I thought I was working with it off!

Now I have to redevelop it all and change all my $variables from forms
to $_POST['variable']? Even when they post to the same page with
"action=''"??

Jeff


> -Original Message-
> From: Paul van Schayck [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 10, 2003 8:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Echo $PHP_SELF not working
>
>
> Hello,
> Here we go again ;)
>
> [EMAIL PROTECTED] (Jeff McKeon) wrote
> > I've just published a new website and something is wrong.
> I suspect
> > the PHP.ini on the server but I can't seem to find anything.
>
> register_globals is on off. Which is a good idea, keep it there!
>
>
> > On the dev server "ECHO $PHP_SELF" seems to work but not on the
> > production one.  Any ideas what I've missed?
>
http://nl2.php.net/manual/en/reserved.variables.php#reserved.variables.s
erv
er

echo $_SERVER['PHP_SELF'];

Paul

-- 
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] ftp_connect() issues

2003-10-10 Thread Jason Wong
On Saturday 11 October 2003 00:01, Phil Ewington - 43 Plc wrote:

> A script that has been running successfully for over 18 months has suddenly
> stopped working due to ftp_connect() failing. I have been assured that
> nothing has changed on the ftp server so now need to try and find out why
> this is happening. 

And have you verified that you can still connect to the ftp server via other 
means?

And have you verified that the script can connect to other ftp servers?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
It is more rational to sacrifice one life than six.
-- Spock, "The Galileo Seven", stardate 2822.3
*/

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



[PHP] Re: pad numbers

2003-10-10 Thread pete M
from php manual str_pad function


pete

Diana Castillo wrote:
is there a function to convert a number that has less than two digits into a
number with a leading zero?
for instance, to convert a "5" to "05" but to leave a "11" as "11"
thanks,
Diana
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Display a JPG Image

2003-10-10 Thread Bertrand Moulard
try image/jpeg

cheers

.b

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



RE: [PHP] Display a JPG Image

2003-10-10 Thread Bertrand Moulard


-Original Message-
From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]
Sent: 10 October 2003 17:06
To: [EMAIL PROTECTED]
Subject: [PHP] Display a JPG Image


Hello Everyone,

   I am trying to display a JPG image to a use, who has logged in. Some 
research on google revealed a way to do this. I am using the following 
code to display it.

if (session_is_registered("valid_user")){

if(session_is_registered("cmi")){

header("Content-type: image/jpg");
$file = "docs/picture1.jpg";
header("Content-disposition: attachment; filename=$file" );
readfile($file);

 } 

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



Re: [PHP] Re: Limits and php...

2003-10-10 Thread Robert Cummings
On Fri, 2003-10-10 at 12:12, Jason Wong wrote:
> On Friday 10 October 2003 22:44, Robert Cummings wrote:
> 
> > > *Most* bottom posters are savvy enough to trim posts adequately to ensure
> > > that there is no crap to wade through whilst maintaining some kind of
> > > continuity within a thread.
> >
> > I'll call this premise one, which is by no means a tautology since it
> > really depends on the disposition of the poster.
> 
> That's why I emphasised the *most*. However my theory is that bottom posters 
> are most likely to be people who have been using email and mailing lists long 
> before MS has even heard about the internet. Why bring MS into this? Because 
> if wasn't for their damned Outlooks then top posting would probably be 
> unheard of.

I'm using Evolution under linux :/ nd I've been using email and mailing
lists (or newsgroups before that on BBSs etc) for about 15 years. I
havn't seen this as much of an issue until recently.

> > > 1) It is certainly not efficient in bandwidth terms (see above).
> >
> > This is based on premise one, which makes it only as valid as the case
> > where a bottom poster doesn't trim a post.
> 
> Like I said above *most* of them do. There is a noticeable exception, a 
> gentleman who goes by the name of Tom :-)

I generally trim. But then again, I top post short and quick answers,
intermingle contextual answer, and bottom post when I feel the need for
flow.

> I'll bet you a beer that bottom posters are more likely to trim their posts 
> than top posters. The very concept of top posting does not encourage people 
> to trim posts, they just add their stuff to the top, probably don't even see 
> or care how much rubbish there is underneath and hit the send button.

Now how am I going to claim my beer unless we can come up with a
rigorous and valid way to determine the correctness of your claim.

> Anyway all that needs to be said about top vs bottom posting can be found in 
> any decent guide to using mailing lists.
> 
> > Nothing stopping them from scrolling to the bottom and reading upward.
> 
> Apart from years of ingrained practice.

That's no excuse.

> > From what I keep hearing about how humans read we scan in parallel
> > anyways and so reading bottom to top should have little difference over
> > reading from top to bottom. And besides, who ever said reading from top
> > to bottom is the "best" way. Heck, some languages read right to left.
> 
> But we're talking about English which usually goes from left to right and from 
> top to bottom (at least does where I come from!)

I dunno, I see banners all the time which have the characters running
vertically and left to right. While this is still left to right, the
orientation is changed, and I've never heard anyone complain about
vertically oriented banners.

> > Feel free to break the mold and try alternatives ;)
> 
> Heck I might even be brave enough to try InterJinn.

Come on now, there's no need to tease ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] Re: ftp_connect() issues

2003-10-10 Thread Paul van Schayck
[EMAIL PROTECTED] (Phil Ewington - 43 Plc) wrote
> A script that has been running successfully for over 18 months has
> suddenly stopped working due to ftp_connect() failing. I have been
> assured that nothing has changed on the ftp server so now need to try
> and find out why this is happening. ftp_connect seems to only return
> true or false, no specific RFC error codes :o( Can anyone suggest
> where I can start looking for a resolution to this matter?

Looking at what you have done in the past few days ;) 

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



Re: [PHP] Re: Limits and php...

2003-10-10 Thread Jason Wong
On Friday 10 October 2003 22:44, Robert Cummings wrote:

> > *Most* bottom posters are savvy enough to trim posts adequately to ensure
> > that there is no crap to wade through whilst maintaining some kind of
> > continuity within a thread.
>
> I'll call this premise one, which is by no means a tautology since it
> really depends on the disposition of the poster.

That's why I emphasised the *most*. However my theory is that bottom posters 
are most likely to be people who have been using email and mailing lists long 
before MS has even heard about the internet. Why bring MS into this? Because 
if wasn't for their damned Outlooks then top posting would probably be 
unheard of.

> > 1) It is certainly not efficient in bandwidth terms (see above).
>
> This is based on premise one, which makes it only as valid as the case
> where a bottom poster doesn't trim a post.

Like I said above *most* of them do. There is a noticeable exception, a 
gentleman who goes by the name of Tom :-)

I'll bet you a beer that bottom posters are more likely to trim their posts 
than top posters. The very concept of top posting does not encourage people 
to trim posts, they just add their stuff to the top, probably don't even see 
or care how much rubbish there is underneath and hit the send button.

Anyway all that needs to be said about top vs bottom posting can be found in 
any decent guide to using mailing lists.

> Nothing stopping them from scrolling to the bottom and reading upward.

Apart from years of ingrained practice.

> From what I keep hearing about how humans read we scan in parallel
> anyways and so reading bottom to top should have little difference over
> reading from top to bottom. And besides, who ever said reading from top
> to bottom is the "best" way. Heck, some languages read right to left.

But we're talking about English which usually goes from left to right and from 
top to bottom (at least does where I come from!)

> Feel free to break the mold and try alternatives ;)

Heck I might even be brave enough to try InterJinn.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Have a nice diurnal anomaly.
*/

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



[PHP] Display a JPG Image

2003-10-10 Thread Pushpinder Singh Garcha
Hello Everyone,

  I am trying to display a JPG image to a use, who has logged in. Some 
research on google revealed a way to do this. I am using the following 
code to display it.

if (session_is_registered("valid_user")){

   if(session_is_registered("cmi")){

header("Content-type: image/jpg");
$file = "docs/picture1.jpg";
header("Content-disposition: attachment; filename=$file" );
readfile($file);
} 

My question is that while this approach works fine with Mozilla on the 
MAC and Win platform. it throws up a dialog box asking whether the user 
wants to download  the file or view it. However IE on either platforms 
does not work fine. On the PC it does not recognize the file extension 
correctly. While on the MAC side of things, it just shows the image in 
the same frame.

Any suggestions would be most welcome. !

Thanks in advance
Pushpinder Singh


[PHP] ftp_connect() issues

2003-10-10 Thread Phil Ewington - 43 Plc
Hi All,

A script that has been running successfully for over 18 months has suddenly
stopped working due to ftp_connect() failing. I have been assured that
nothing has changed on the ftp server so now need to try and find out why
this is happening. ftp_connect seems to only return true or false, no
specific RFC error codes :o( Can anyone suggest where I can start looking
for a resolution to this matter?

Running PHP 4.2.3 on a Cobalt RAQ4.

TIA

Phil.

Phil Ewington - Technical Director
--
43 Plc
35 Broad Street, Wokingham
Berkshire RG40 1AU
T: +44 (0)118 978 9500
F: +44 (0)118 978 4994
E: mailto:[EMAIL PROTECTED]
W: http://www.43plc.com

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



[PHP] Re: displaying var in textarea

2003-10-10 Thread Ben Duffy

"Ben Duffy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I have a var:
> > $test = 'echo \'test\';';
> >
> > If I display this in a textearea like so:
> > echo " > name=\"action\">\n"
> > .$test
> > ."\n";
> >
> > In the browser and in the HTML source I see (no slashes):
> > echo 'test';
> >
> > Even if I do an htmlentities($test); I see no slashes and the
> single-quotes
> > are not shown in the HTML source as "
> >
> > Is this just a behavior of the textarea???
> >
> > Thanks!
> > -Shawn
>
> Shawn,
>
> try $test = 'echo \\'test\\';';


Apologies,

try
$test = 'echo \\\'test\\\';';

escaping the slash itself, and escaping the comma..

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



[PHP] Re: displaying var in textarea

2003-10-10 Thread Ben Duffy

"Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a var:
> $test = 'echo \'test\';';
>
> If I display this in a textearea like so:
> echo " name=\"action\">\n"
> .$test
> ."\n";
>
> In the browser and in the HTML source I see (no slashes):
> echo 'test';
>
> Even if I do an htmlentities($test); I see no slashes and the
single-quotes
> are not shown in the HTML source as "
>
> Is this just a behavior of the textarea???
>
> Thanks!
> -Shawn

Shawn,

try $test = 'echo \\'test\\';';

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



[PHP] displaying var in textarea

2003-10-10 Thread Shawn McKenzie
I have a var:
$test = 'echo \'test\';';

If I display this in a textearea like so:
echo "\n"
.$test
."\n";

In the browser and in the HTML source I see (no slashes):
echo 'test';

Even if I do an htmlentities($test); I see no slashes and the single-quotes
are not shown in the HTML source as "

Is this just a behavior of the textarea???

Thanks!
-Shawn

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



[PHP] preg_match

2003-10-10 Thread Omar
Hello everyone.

In this line
preg_match("/[^a-z0-9'\?!-]", $item)

i can´t find de way to add vowels with accent (á,é,í,ó,ú,ñ,Ñ) and other
characters to the preg_match function.
Can anyone help me?
The documentation of this function is not very clear (or complete) to me.

Thank you.

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



Re: [PHP] pad numbers

2003-10-10 Thread Wang Shengli
Sorry,
it should be
$dd = sprintf("%02d", $d);
will generate $dd = "05";

If you want 005;
use
$dd =sprintf("%03d", $d);

if you want XXX5;
use
$dd = sprintf("%X4d", $d);

- Original Message - 
From: "Diana Castillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 10, 2003 10:44 AM
Subject: [PHP] pad numbers


> is there a function to convert a number that has less than two digits into
a
> number with a leading zero?
> for instance, to convert a "5" to "05" but to leave a "11" as "11"
> thanks,
> Diana
>
> -- 
> 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] pad numbers

2003-10-10 Thread Wang Shengli
$d = 5;
$dd = sprintf("%0d", $d);
will do -- $dd = "05";

- Original Message - 
From: "Diana Castillo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 10, 2003 10:44 AM
Subject: [PHP] pad numbers


> is there a function to convert a number that has less than two digits into
a
> number with a leading zero?
> for instance, to convert a "5" to "05" but to leave a "11" as "11"
> thanks,
> Diana
>
> -- 
> 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] pad numbers

2003-10-10 Thread Marek Kilimajer
str_pad --  Pad a string to a certain length with another string

Diana Castillo wrote:

is there a function to convert a number that has less than two digits into a
number with a leading zero?
for instance, to convert a "5" to "05" but to leave a "11" as "11"
thanks,
Diana
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] pad numbers

2003-10-10 Thread Tom Rogers
Hi,

Saturday, October 11, 2003, 12:44:38 AM, you wrote:
DC> is there a function to convert a number that has less than two digits into a
DC> number with a leading zero?
DC> for instance, to convert a "5" to "05" but to leave a "11" as "11"
DC> thanks,
DC> Diana


$num = sprintf("%02d",$num); is what you need

-- 
regards,
Tom

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



RE: [PHP] pad numbers

2003-10-10 Thread Susan Ator
The way I have done it is to check the length of the number and if it is 1
then add the 0 myself.

my $len = length($mm);
if ($len eq 1) { $mm = "0$mm"; }

Susan

-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2003 10:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] pad numbers


is there a function to convert a number that has less than two digits into a
number with a leading zero?
for instance, to convert a "5" to "05" but to leave a "11" as "11"
thanks,
Diana

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

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



Re: [PHP] Re: Limits and php...

2003-10-10 Thread Robert Cummings
On Fri, 2003-10-10 at 03:43, Jason Wong wrote:
> On Friday 10 October 2003 11:02, Robert Cummings wrote:
> > If you've been following a thread then you'll have read everything
> > anyways. If you bottom post I gotta scan through all the crap I've
> > already read, and that often involves employing the down arrow or mouse.
> 
> One of the bad habits that top posting encourages is that of not trimming the 
> post. That is why there is so much crap to wade through.
> 
> *Most* bottom posters are savvy enough to trim posts adequately to ensure that 
> there is no crap to wade through whilst maintaining some kind of continuity 
> within a thread.

I'll call this premise one, which is by no means a tautology since it
really depends on the disposition of the poster.

> 
> > Top posting is more efficient for those who are following along.
> 
> That is a selfish thought .

During a selfless act of helping for free :)

> 1) It is certainly not efficient in bandwidth terms (see above).

This is based on premise one, which makes it only as valid as the case
where a bottom poster doesn't trim a post.

> 2) It is certainly not efficient for people who are not fully clued up on the 
> thread (or they may have jumped in mid-way), as they have to keep scrolling 
> down to see what the heck the top poster is ranting on about.

Nothing stopping them from scrolling to the bottom and reading upward.
>From what I keep hearing about how humans read we scan in parallel
anyways and so reading bottom to top should have little difference over
reading from top to bottom. And besides, who ever said reading from top
to bottom is the "best" way. Heck, some languages read right to left.
Feel free to break the mold and try alternatives ;)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



[PHP] pad numbers

2003-10-10 Thread Diana Castillo
is there a function to convert a number that has less than two digits into a
number with a leading zero?
for instance, to convert a "5" to "05" but to leave a "11" as "11"
thanks,
Diana

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



RE: [PHP] magic_quotes_gpc and \

2003-10-10 Thread Johnson, Kirk
> If I have a form that POSTS a textarea that contains PHP 
> code.  Say some
> code that contains legitimate escapes \ like:
> 
> echo "http://somewhere.com\";>Click";
> 
> When the data is posted and received in the destination 
> script, additional
> escapes \ are added.  So how do I get to the original code above?
> strip_slashes will strip all slashes, even the original ones that are
> supposed to be there.

How about doing an ereg_replace on '\\' to '\'?

Kirk 

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



Re: [PHP] serialized arrays

2003-10-10 Thread Marek Kilimajer
Gregory Kornblum wrote:
function URLString2Array($url_string_in) {
$ser1 = stripslashes($url_string_in);
  //  $arr1 = urldecode($ser1); 
urldecoding is done by php.

$arr1 = unserialize($arr1); 

return $arr1;
}

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


Re: [PHP] serialized arrays

2003-10-10 Thread Brad Pauly
On Fri, 2003-10-10 at 07:41, Donaldson Sgt Michael J wrote:
> $s_array1 = serialize($results);
> 
> echo "";
> 
> What's the problem with this code? I am trying to pass an array to create
> graph but instead of the pic i get this in my browser. Probably do to bad
> HTML syntax. Can I urlencode in a get or does it have to be a hidden
> variable in a post?
> 
>  "gd_graph.php?h_array=urlencode(a:2:{s:7:"PROGRAM";a:2:{i:0;s:6:"LBIVII";i:1
> ;s:9:"web_count";}s:3:"NUM";a:2:{i:0;s:2:"69";i:1;s:2:"91";}}) " >

You need to either move the urlencode function outside of the quotes

echo "";

Or encode it first:

$s_array1_encoded = urlencode($s_array1);

echo "";

I think the second is easier to understand. 

- Brad

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



RE: [PHP] serialized arrays

2003-10-10 Thread Gregory Kornblum

echo "";

Also here's some functions to help.

function Array2URLString($array_in) {
$ser = serialize($array_in); 
$ser = urlencode($ser);

return $ser;
} 

function URLString2Array($url_string_in) {
$ser1 = stripslashes($url_string_in);
$arr1 = urldecode($ser1); 
$arr1 = unserialize($arr1); 

return $arr1;
}

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



[PHP] serialized arrays

2003-10-10 Thread Donaldson Sgt Michael J
$s_array1 = serialize($results);

echo "";

What's the problem with this code? I am trying to pass an array to create
graph but instead of the pic i get this in my browser. Probably do to bad
HTML syntax. Can I urlencode in a get or does it have to be a hidden
variable in a post?




RE: [PHP] Echo $PHP_SELF not working

2003-10-10 Thread Daniel Perez Clavero
try to use $_SERVER['PHP_SELF'] instead of.


-Original Message-
From: Jeff McKeon [mailto:[EMAIL PROTECTED]
Sent: viernes, 10 de octubre de 2003 14:09
To: php
Subject: [PHP] Echo $PHP_SELF not working


I've just published a new website and something is wrong.  I suspect the
PHP.ini on the server but I can't seem to find anything.

The line:



Doesn't seem to work.  If I look at the "view source" from the web
browser I see this..



On the development server I see this...



On the dev server "ECHO $PHP_SELF" seems to work but not on the
production one.  Any ideas what I've missed?

Thanks,

Jeff

--
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] Problem :file_exists & japanese filename

2003-10-10 Thread Marek Kilimajer
Then you have codepage problem. How did you get the files there in the
(Bfirst place?
(B
(BYou can try to set the codepage of the html page to each possible
(Bjapanese coding and find out which one is used.
(B
(Bumesh wrote:
(B
(B> Hi,
(B> 
(B> If I list out all filkes in the directory using php, it shows garbage
(B> filenames (those which have japanese).
(B> 
(B> Umesh.
(B> 
(B> -Original Message-
(B> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
(B> Sent: Friday, October 10, 2003 6:04 PM
(B> To: umesh
(B> Cc: [EMAIL PROTECTED]
(B> Subject: Re: [PHP] Problem :file_exists & japanese filename
(B> 
(B> 
(B> Is the codepage of filesystem and of the string the same? What do you
(B> see if you list the files in the directory using php?
(B> 
(B> umesh wrote:
(B> 
(B> 
(B>>Hi Gurus,
(B>>
(B>>I am using PHP4 on linux.
(B>>
(B>>I am reading the filename from querystring and display it in the browser.
(B>>Before displaying , I am checking the existance of the file by using
(B>>file_exists.
(B>>If the file name contains japanese characters, such as $BI4?M0l 
(B> $B$9(B
(B> 
(B>>$B$H(B.txt, file_exists returns false, though the
(B>>file exists at that location. Why ?
(B>>
(B>>I have compiled PHP with japanese support.
(B>>
(B>>Can anybody help me ?
(B>>
(B>>Thanking you in anticipation.
(B>>
(B>>Regards,
(B>>
(B>>Umesh.
(B>>
(B> 
(B> 
(B> --
(B> PHP General Mailing List (http://www.php.net/)
(B> To unsubscribe, visit: http://www.php.net/unsub.php
(B> 
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >