RE: [PHP] PHP FAQ (again)

2002-04-03 Thread Hunter, Ray

I am in total agreement with Justin on this one.  Many of the posters use
need help,  newbie needs help , etc.  We need to have some form of FAQ
with detailed instructions on how to post so that I do not have to ask;
What OS are you using, what version of php, which database, etc  This gets
tedious and time consuming.  Not to mention the amount of posts.  

I've been watching Rick Emery give out tons of help, but many of his first
questions are about clarifications on what a users is needing help on.  Some
extra detail will provide faster and reliable help.

Just some extra thoughts here...

I now some mailing lists will not even reply if you do not follow specific
criteria when you post...



Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


 -Original Message-
 From: Justin French [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, April 03, 2002 5:58 AM
 To: php
 Subject: [PHP] PHP FAQ (again)
 
 
 I saw this mentioned a few times recently, but I'd really 
 like to put out the call again.
 
 This group needs an FAQ *specific to this list* which helps 
 new members / posters integrate seamlessly... really, I'm 
 sick of seeing non specific subject lines like please help, 
 and I'm sure we're all sick of typing replies to frequent 
 questions, usually with a response like I think you should 
 check the manual before posting.
 
 I'm sure we're also sick of posts which don't ask specific 
 questions (what's wrong with my 150 lines of code??).
 
 
 When I first joined this group, I too was unaware of what was 
 considered a good post (and perhaps still, I don't know!!), 
 but some form of welcome email when people join the group, or 
 a reminder email sent weekly which keeps the peace on this 
 list will not go astray.
 
 
 Perhaps it could:
 
 - include some information on how to use the online 
 manual/website (and the simplicity of searching)
 
 - cover some frequently asked topics which can be summarised 
 with a link to a few manual pages or external references (how 
 many times do we see user authentication, sessions, mail 
 attachments, html email, header redirect and 
 javascript in the subject line  Usually, the writer 
 asks a very generic question, seeks references and tutorials, 
 or doesn't know what function to search for in the manual, or 
 they're just lazy.  A quick reference to these frequent 
 topics will save a heap of time for all concerned.
 
 - remind people that there is an archive to this list that 
 can be searched (and include the URL)
 
 
 Some of the posts (including OT posts, ones with meaningless 
 subject lines, ones which ask insane questions, etc etc) in 
 this group would be laughed at by members of other 
 programming language groups (Perl for example).
 
 As PHP grows as a language, and as the community of users 
 grows with it, this list is going to become higher volume.  
 The FAQs are going to become more frequent, and the poor use 
 / misuse of this list will grow with it.
 
 I can already see frustration growing in this list.
 
 
 I'd like to think that the list and it's standards can be 
 raised a little, to make it a more valuable resource for all 
 users, without the grief.
 
 I attach as a reference a text file FAQ which is posted 
 frequently to the newsgroup 
 comp.infosystems.www.authoring.stylesheets.  It provided me 
 with an excellent resource when I first joined the group, and 
 does help the list stay somewhat moderated and clean.
 
 I'm not saying it's exactly what we need, but I do feel it's 
 time we do something.
 
 
 Sure, new users *could* find the archive by hunting, the 
 *could* get flammed for a bad post, poor question, or for not 
 checking the manual first, but wouldn't it be a smarter move 
 long term for some sort of guideline/FAQ to be incorporated 
 into the list upon subscription, and perhaps on a weekly basis??
 
 
 I'm happy to help in any way I can, but don't consider myself 
 guru enough to develop this from scratch.
 
 
 Apologies for the long post, especially since this topic has 
 been kicked around before.
 
 
 Regards,
 
 Justin French
 
 Creative Director
 http://Indent.com.au
 
 
 



RE: [PHP] PHP FAQ (again)

2002-04-03 Thread Hunter, Ray

It's not so much the newbish questions but the determination of the part of
the newbie to find an answer.  I have found many of my answers on google or
the web.  Some extra searching is required.  Many of the questions can be
answered if some extra searching where involved.  However, when you ask if
they have researched some of the information and the reply is no...Then I
say RTFM and STFI...

This is a general list and newbie questions should be asked here...However,
newbies need to post adequate information for an adequate response...

Thank you,

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


 -Original Message-
 From: Andrew Brampton [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, April 03, 2002 7:04 AM
 To: php
 Subject: Re: [PHP] PHP FAQ (again)
 
 
 Small flaw in this. The new user would have to actually go 
 and read the FAQ... I'm a member of many lists, and I've 
 never read the FAQ about the list... but I've allways been 
 aware that posting newbish questions is frowned on, so I never did so.
 
 So unless the FAQ was placed infront of them when signing up 
 to this list (if they actually sign up), then it might not 
 get the results you expect.
 
 But if it stops just 1 newbish post a year, then its worth it..
 
 Andrew
 - Original Message -
 From: Justin French [EMAIL PROTECTED]
 To: php [EMAIL PROTECTED]
 Sent: Wednesday, April 03, 2002 1:57 PM
 Subject: [PHP] PHP FAQ (again)
 
 
  I saw this mentioned a few times recently, but I'd really 
 like to put 
  out the call again.
 
  This group needs an FAQ *specific to this list* which helps new 
  members / posters integrate seamlessly... really, I'm sick 
 of seeing 
  non specific subject lines like please help, and I'm sure 
 we're all 
  sick of typing replies to frequent questions, usually with 
 a response 
  like I think you should check the manual before posting.
 
  I'm sure we're also sick of posts which don't ask specific 
 questions 
  (what's wrong with my 150 lines of code??).
 
 
  When I first joined this group, I too was unaware of what was 
  considered a good post (and perhaps still, I don't 
 know!!), but some 
  form of welcome email when people join the group, or a 
 reminder email 
  sent weekly which keeps the peace on this list will not go astray.
 
 
  Perhaps it could:
 
  - include some information on how to use the online manual/website 
  (and
 the
  simplicity of searching)
 
  - cover some frequently asked topics which can be summarised with a 
  link
 to
  a few manual pages or external references (how many times do we see 
  user authentication, sessions, mail attachments, 
 html email, 
  header redirect and javascript in the subject line  
 Usually, 
  the writer
 asks
  a very generic question, seeks references and tutorials, or doesn't 
  know what function to search for in the manual, or they're 
 just lazy.  
  A quick reference to these frequent topics will save a heap of time 
  for all concerned.
 
  - remind people that there is an archive to this list that can be 
  searched (and include the URL)
 
 
  Some of the posts (including OT posts, ones with meaningless subject
 lines,
  ones which ask insane questions, etc etc) in this group would be 
  laughed
 at
  by members of other programming language groups (Perl for example).
 
  As PHP grows as a language, and as the community of users 
 grows with 
  it, this list is going to become higher volume.  The FAQs 
 are going to 
  become more frequent, and the poor use / misuse of this 
 list will grow 
  with it.
 
  I can already see frustration growing in this list.
 
 
  I'd like to think that the list and it's standards can be raised a 
  little, to make it a more valuable resource for all users, 
 without the 
  grief.
 
  I attach as a reference a text file FAQ which is posted 
 frequently to 
  the newsgroup comp.infosystems.www.authoring.stylesheets.  
 It provided 
  me with an excellent resource when I first joined the 
 group, and does 
  help the
 list
  stay somewhat moderated and clean.
 
  I'm not saying it's exactly what we need, but I do feel 
 it's time we 
  do something.
 
 
  Sure, new users *could* find the archive by hunting, the *could* get
 flammed
  for a bad post, poor question, or for not checking the 
 manual first, 
  but wouldn't it be a smarter move long term for some sort of 
  guideline/FAQ to
 be
  incorporated into the list upon subscription, and perhaps 
 on a weekly 
  basis??
 
 
  I'm happy to help in any way I can, but don't consider myself guru
 enough
  to develop this from scratch.
 
 
  Apologies for the long post, especially since this topic has been 
  kicked around before.
 
 
  Regards,
 
  Justin French
  
  Creative Director
  http://Indent.com.au
  
 
 
 
 
 --
 --
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http

RE: [PHP] sablotron XMl XSLT

2002-04-09 Thread Hunter, Ray

You need to check if you have sablotron compiled in with php.  If you need
the rpms you can get them from here:
http://www.gingerall.com/charlie/ga/xml/d_sab.xml
http://www.gingerall.com/charlie/ga/xml/d_sab.xml 
 
Sablotron also needs javascript engine to run, you can get that here: 
http://rpmfind.net/linux/rpm2html/search.php?query=js
http://rpmfind.net/linux/rpm2html/search.php?query=js 
 
 
I am actually installing it now as we speak...
 

RAY HUNTER
Firmware Engineer

ENTERASYS NETWORKS 

-Original Message-
From: Matthew Luchak [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 09, 2002 12:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] sablotron XMl XSLT 


PHP 4.1.2
SunOS web-unix1 5.7 
apache_1.3.22
 
 
I'm trying to parse XML/XSL on a shared  box and I'm using :
 
$xslthandler = xslt_create() or die(Can't create XSLT handle!);
 
to test for sablotron.  Unfortunately I just get a Call to undefined
function error which I guess means no - there's no sablotron installed -
but I was wondering if there is another way to test for Sablotron?  I need a
little quicker turnaround time then passing from voicemail to voicemail at
my ISP ;)
 
thanks,

 
Matthew Luchak 
Webmaster 
Kaydara Inc. 
[EMAIL PROTECTED] 

 




RE: [PHP] php and wml

2002-04-09 Thread Hunter, Ray

You can you just need to have php handle the wml pages and supply the
correct headers...



RAY HUNTER
Firmware Engineer

ENTERASYS NETWORKS 

-Original Message-
From: Starman [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 09, 2002 2:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php and wml


Can anyone tell me if it is possible to write php scripts withing wml pages?

I need to design a wireless site (wap) and the form will be writing to a
mysql db using php.

Is there any difference in doing this than with html?

TIA

Milt Rodriguez
Stellar Design
http://stellardesign.com



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



[PHP] PHP as HTML

2002-06-04 Thread Tom Ray

Hey there-

I'm trying to use an .htaccess file to parse .php files as .html does anyone
know how to do this? It doesn't work with the same structure as parsing the
.shtml files.

any suggestions would be great.




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




Re: [PHP] PHP as HTML

2002-06-04 Thread Tom Ray

I tried this, and it just prompts me to download the file from the server. I
can't see what the issue is.


- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 5:35 PM
Subject: Re: [PHP] PHP as HTML


 AddType application/x-httpd-php .html
 AddType application/x-httpd-php .htm

 - Original Message -
 From: Tom Ray [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 04, 2002 2:41 PM
 Subject: [PHP] PHP as HTML


  Hey there-
 
  I'm trying to use an .htaccess file to parse .php files as .html does
 anyone
  know how to do this? It doesn't work with the same structure as parsing
 the
  .shtml files.
 
  any suggestions would be great.
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 



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




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




Re: [PHP] PHP as HTML

2002-06-04 Thread Tom Ray

you know, that's a good question. How would I determine that on the server?

Peter wrote:

Tom, this does work fine... doing what Kevin says...
ie the

AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm

is PHP installed as a module or cgi ver?

Cheers

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 June 2002 9:49 AM
To: Kevin Stone; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP as HTML


I tried this, and it just prompts me to download the file from the server. I
can't see what the issue is.


- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 5:35 PM
Subject: Re: [PHP] PHP as HTML


  

AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm

- Original Message -
From: Tom Ray [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 2:41 PM
Subject: [PHP] PHP as HTML




Hey there-

I'm trying to use an .htaccess file to parse .php files as .html does
  

anyone


know how to do this? It doesn't work with the same structure as parsing
  

the


.shtml files.

any suggestions would be great.




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


  


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






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



  





Re: [PHP] PHP as HTML

2002-06-04 Thread Tom Ray

Thanks. I got the issue figured out. There was an .htaccess file in the 
root of the website that I had forgotten about, it was affecting 
everything due to it's bad config.

Pushkar Pradhan wrote:

If you do a phpinfo() you get a columen Server API, mine lists CGI as it
is what I installed php as.
  

you know, that's a good question. How would I determine that on the server?

Peter wrote:



Tom, this does work fine... doing what Kevin says...
ie the

AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm

is PHP installed as a module or cgi ver?

Cheers

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 June 2002 9:49 AM
To: Kevin Stone; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP as HTML


I tried this, and it just prompts me to download the file from the server. I
can't see what the issue is.


- Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 5:35 PM
Subject: Re: [PHP] PHP as HTML




  

AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm

- Original Message -
From: Tom Ray [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 04, 2002 2:41 PM
Subject: [PHP] PHP as HTML






Hey there-

I'm trying to use an .htaccess file to parse .php files as .html does


  

anyone




know how to do this? It doesn't work with the same structure as parsing


  

the




.shtml files.

any suggestions would be great.




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




  

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






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





  




-Pushkar S. Pradhan


  





[PHP] Retrieving Info from Cookies

2002-06-04 Thread Tom Ray

I've been playing with cookies, and I've been able to write information 
to a cookie, but now what I want to do is pull that information from the 
cookie. Is there something special I need to do to pull that info or 
should I just be to get that data by delcaring a variable in the php 
script?


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




Re: [PHP] Retrieving Info from Cookies

2002-06-04 Thread Tom Ray

when I do that it comes up with

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or 
`T_NUM_STRING'


Justin French wrote:

you should be able to access it via $_COOKIE['name'], or what I do, $cookie
= $_COOKIE['name'].

Justin French


on 05/06/02 2:19 PM, Tom Ray ([EMAIL PROTECTED]) wrote:

  

I've been playing with cookies, and I've been able to write information
to a cookie, but now what I want to do is pull that information from the
cookie. Is there something special I need to do to pull that info or
should I just be to get that data by delcaring a variable in the php
script?





.

  





RE: [PHP] redirection

2002-06-05 Thread Ray Hunter

You can also set up redirects in your web server as well...


Thank you,

RAY HUNTER



-Original Message-
From: Renaldo De Silva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 12:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] redirection 


is there any way other than

header(Location: http://www.php.net/;);

to redirect to another page.



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



RE: [PHP] PHP Apache Module AND command Line

2002-06-05 Thread Ray Hunter

Or you can run the configuration with the bin dir option so that it places
it where you want:


Example:

./configure --bindir=/usr/bin
make
make install



Thank you,

RAY HUNTER



-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 11:36 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Apache Module AND command Line


On Thursday 06 June 2002 01:26, Steve Buehler wrote:
 Is there doc somewhere to would tell how to install PHP as a command line
 interpreter (like perl) without messing up the installation of PHP that is
 installed as a module in/for Apache?  

Manual - Installation - Servers-CGI/Commandline

 Basically, I want to have both on the
 same server.  Or can this even be done?

Yes.

./configure
make

Then copy the resulting php binary to wherever you like.

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

/*
Isn't it strange that the same people that laugh at gypsy fortune
tellers take economists seriously?
*/


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



RE: [PHP] htaccess

2002-06-05 Thread Ray Hunter

Try checking the apache environment...however that password will not be
there...


Thank you,

RAY HUNTER



-Original Message-
From: Steve Buehler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 05, 2002 3:39 PM
To: PHP
Subject: [PHP] htaccess


I have a php script in an .htaccess protected directory.  Is there a way 
that PHP could find out what login was used?

Steve


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



[PHP] Compiling PHP as static mod

2002-06-05 Thread Ray Hunter

When I try to compile php as a static module in php I get errors that the
mod_php4.c cannot find the header file.

Here is my php configuration:

./configure --build=i386-redhat-linux-gnu --prefix=/usr/local/php
--with-apache=/usr/local/apache --with-sybase-ct=/sybase --with-mysql=/usr
--enable-exif --with-gd --with-jpeg-dir=/usr/lib
--with-png-dir=/usr/local/lib --with-zlib --with-config-file-path=/etc
--with-freetype-dir=/usr/local/lib --with-regex=system --enable-xml
--enable-dbx --enable-bcmath --enable-calendar --enable-magic-quotes
--enable-inline-optimization --enable-trans-sid --oldincludedir=/usr/include
--libdir=/usr/lib


Here is my apache configuration:
./configure --prefix=/usr/local/apache
--activate-module=src/modules/php4/libphp4.a


Basically, apache cannot find PHP's header files.


Any help would be much appreciated.

Thank you,

RAY HUNTER





RE: [PHP] multiple selects and $_POST['vars']

2002-06-06 Thread Ray Hunter

Or you can added the bleh as an array...

example: select multiple name=bleh[]



Thank you,

RAY HUNTER



-Original Message-
From: Chris Knipe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 5:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] multiple selects and $_POST['vars']


Lo all,

How do you manage multiple selects and the data returned by the form?

All my attempts at doing this, only returned one variable from the selected
options, not all of them??

My test...

form method=post action=blah.php
  select multiple name=bleh
option value=11/option
option value=22/option
option value=33/option
option value=44/option
option value=55/option
  /select
/form

blah.php:
echo $_POST['bleh'];


$_POST['bleh'] would only have the value of the last selected option in the
form...

I've tried array_count_values as well to maybe see if PHP didn't save the
multiple selected items into a array, but it only reported back that
$_POST['bleh'] isn't a array.  So, if I select all 5 items in the above
form, why does PHP only return the last option I selected, and how do I get
it to return all the selected values?

Additionally,
if ($_POST['bleh'] == ) {

always fails Regardless if 1, 2, 3 or even all 5 of the options in the
form is selected (highlighted) Which, is *really* strange, seeing that
echo $_POST['bleh'] returns 1 out of the 5 selected values.






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



RE: [PHP] Re: Anyone?

2002-06-06 Thread Ray Hunter

The whole idea is that we offer help after you have exhausted all other
resources...

If security is an issue then I suggest getting on a security mailing list
and post your questions.

Plus, it would be better if you found out how to solve the problems that are
associated with security...

check on ssl and encryption...you could even go with Kerberos or secure ldap
systems.

There are many options open...remember google is your friend


Ray BigDog




-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 11:41 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Anyone?


Ok, so you have pointed out an problem, now that you have been so kind to do
this could please recommend how to resolve this?
Thanks,
Jas

Jay Blanchard [EMAIL PROTECTED] wrote in message
002201c20d80$552be430$8102a8c0@niigziuo4ohhdt">news:002201c20d80$552be430$8102a8c0@niigziuo4ohhdt...
 [snip]
 I cannot believe that no one with alot of PHP and MySQL experience has not
 replied to this post yet.  Is PHP not a secure scripting language?  I
would
 really like a little insight into this question, anyone?
 [/snip]

 [rant warning!]
 I'll bite! ;-(

 A. You gave so much code that those of us on the list who may be working
may
 have not had time to set it all up and test it.
 2. Security from what standpoint? That you can't be hacked? That people
 can't use your CMS without authorization? That your code is complicated
 enough to be impressive? Test your code...if it works you're good, if
 not...fix it.
 III. Your code is somewhat bloated, you don't have to go through
everything
 you go through to assure yourself security. Is this for an Intranet? If so
 is the URL to the CMS accessible through the firewall? If for an Internet
 site have you thought about putting the CMS on an SSL.

 Dang...and D. PHP is secure. You may, to assuage any further fears,
encrypt
 any username password information that gets transmitted from the login to
 the server the first time. That is very insecure. I could port sniff your
 butt to kingdom come and gain usernames and passwords all day long. You
 cannot believe that no one with alot of PHP and MySQL experience has not
 replied to this post yet. I cannot believe that anyone asking about
security
 would transmit the initial login as plain text...so we're even.
 [/rant]

 Jay





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



RE: [PHP] Download Page?

2002-06-06 Thread Ray Hunter

Kevin,

You will need to send the header information for the file...then you can do
a new header so that you show the thank you for downloading page...



Thank you,

RAY HUNTER



-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:49 PM
To: PHP General
Subject: Re: [PHP] Download Page?


Common question becuase of it's somewhat unintuitive nature, but it is very
simple.  Do a search for keywords header and Content-disposition.  That
should reveal what you want.  Good luck.
-Kevin

- Original Message -
From: Nick Richardson [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Thursday, June 06, 2002 12:38 PM
Subject: [PHP] Download Page?


 Hi all,

 I was wondering how i could make a download 'landing' page, that once a
user
 has filled out the download form and submitted it, it will send the file
 they are requesting as a download (not display a link to it, or display it
 in the browser) and also render a page that says something like thanks
for
 downloading blah blah... behind it at the same time.

 I would assume i would have to use header() to do this, but i dont know
 where i should start, a/o what headers to send.

 Any help would be appreciated.

 Thanks!

 //Nick Richardson ([EMAIL PROTECTED])
 //SiteCommand LLC
 ---=---
 --]  SiteCommand Control Panel:  Coming June 1st, 2002  [--
 --] 'The Secure Solution To Easy Enterprise Management' [--
 ---=---
 --]  Visit http://www.sitecommand.com to PreOrder Now   [--
 ---=---


 --
 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] Quick Question about Classes

2002-06-06 Thread Ray Hunter

You need to call new operator to create the object.


Thank you,

RAY HUNTER



-Original Message-
From: Jay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:22 PM
To: Php-General (E-mail)
Subject: [PHP] Quick Question about Classes


When you define a new class can you do the following?

$className = Parent;

class $className {

};

Thanks!




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



RE: [PHP] Can't get PHP running with apache

2002-06-07 Thread Ray Hunter

When you use the --with then you need to specify a directory...

Read up on the configuration of php on php.net

Thank you,

RAY HUNTER



-Original Message-
From: Don [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 1:47 PM
To: php list
Subject: [PHP] Can't get PHP running with apache


Hi,

Compiled and installed Apache 1.3.24 with mod_ssl and mod_perl.  Compiled
and installed PHP 4.2.1 with the following:

'./configure' '--with-mysql' '--with-apxs' '--enable-dbase' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-track-vars'
'--enable-force-cgi-redirect' '--with-gettext'

When I attempt to start apache, I get the following error message:

Cannot add module via name 'mod_php4.c'. not in list of loaded modules.

I've sourced the net but could not find a resolution.  Does this have
anything to do with /etc/ld.so.conf ?

Help!

Don



RE: [PHP] Can't get PHP running with apache

2002-06-07 Thread Ray Hunter

Did you add the module info to your httpd.conf file?
 

Thank you, 

RAY HUNTER 

-Original Message-
From: Don [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 1:56 PM
To: Ray Hunter; 'php list'
Subject: Re: [PHP] Can't get PHP running with apache


Oops.  Sorry.  my PHP configure actually has the folowing:
 
./configure --with-mysql --with-apxs=/usr/sbin/bin/apxs --enable-dbase
--with-im
ap  --with-kerberos --with-imap-ssl --enable-track-vars
--enable-force-cgi-redir
ect --with-gettext
 
which states the full path to apxs so I still don't get it?

When you use the --with then you need to specify a directory... 

Read up on the configuration of php on php.net 

Thank you, 

RAY HUNTER 

-Original Message- 
From: Don [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] 
Sent: Friday, June 07, 2002 1:47 PM 
To: php list 
Subject: [PHP] Can't get PHP running with apache 


Hi, 

Compiled and installed Apache 1.3.24 with mod_ssl and mod_perl.  Compiled
and installed PHP 4.2.1 with the following: 

'./configure' '--with-mysql' '--with-apxs' '--enable-dbase' '--with-imap'
'--with-kerberos' '--with-imap-ssl' '--enable-track-vars'
'--enable-force-cgi-redirect' '--with-gettext'

When I attempt to start apache, I get the following error message: 

Cannot add module via name 'mod_php4.c'. not in list of loaded modules. 

I've sourced the net but could not find a resolution.  Does this have
anything to do with /etc/ld.so.conf ? 

Help! 

Don 




[PHP] Search a flat file.

2002-06-07 Thread Tom Ray

I want to be able to search a flat file line by line looking for data 
such as a username then display all the information in that line. Is 
there some way to search the following format:

record1:username:info:info:info
record2:username:info:info:info
record3:username:info:info:info


So if someone submits the username in record two for the search I want 
it to stop at record two and then display that information...

any suggestions?


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




Re: [PHP] Re: Search a flat file.

2002-06-07 Thread Tom Ray

ok I believe I follow you on that, I will give that a try. But the 
question I have now is how do I loop that request?

Gaylen Fraley wrote:

Use the explode() function based on the colon.  Then parse the 2nd array
element for the username that you want.  If matched, display all elements in
that array row.  Conversely you could use the implode() to reassemble the
array row.

(Assume $file_row is the row name that you have assigned)

/* your code to loop through the file goes here */
$your_array = explode(:,$file_row);
/* remember that arrays start with element 0 */
if ($your_array[1]) == some name {
/* routine to display entire row */
}
/* continue processing loop */

--
Gaylen
PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/

Tom Ray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  

I want to be able to search a flat file line by line looking for data
such as a username then display all the information in that line. Is
there some way to search the following format:

record1:username:info:info:info
record2:username:info:info:info
record3:username:info:info:info


So if someone submits the username in record two for the search I want
it to stop at record two and then display that information...

any suggestions?






  




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




[PHP] Getting users monitor size

2002-06-09 Thread Tom Ray

Is there a way to do this with PHP? I couldn't find it in the online 
docs and the archive search is offline :(

thanks!


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




[PHP] Another Flat File question.

2002-06-09 Thread Tom Ray

I know I've asked this before but I don't believe I asked the question 
correctly.

I have a flat file database that is delimited with colons. This file 
will have new records added to it on a regular basis. What I want to do 
is be able to search that file based on a keyword that is inputted by a 
user, then it will search that database comparing each record for that 
value, if that value returns true, I want it to display the results of 
that record.

How would I do this when I don't know the number of records that will be 
searched (since it will rise and fall almost daily)? Also, how would I 
create a dynamic array?

I hope this makes sense to someone, I've been pulling my hair out on this.


Thanks!


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




RE: [PHP] FUDforum 2.0 Stable Released

2002-06-10 Thread Ray Hunter

Try using a different database and it might be worth while...

Thank you,

RAY HUNTER



-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 11:51 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] FUDforum 2.0 Stable Released


Is it just me or the forum area totally overflowing with choices? I often
wonder why people don't pool talents and work on really great products,
instead people break off and make their own system - quite unusual...


Jeff

- Original Message -
From: Ilia A. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, June 10, 2002 1:54 PM
Subject: [PHP] FUDforum 2.0 Stable Released


 FUDforum 2.0 is a web forum released under the GPL license, written in
PHP4
 utilizing a MySQL database backend.
 The forum is completely customizable via a templating system, which is
 compiled for optimal performance. The templating
 system also has integrated i18n support, which allows the forum to be used
in
 other languages, at this time there are 5
 different languages to, which translations are available in the standard
 distribution and more will be available soon.
 The spell checker integrated into the forum, which utilizes pspell library
 also has multi-lingual support,
 thus permitting even the non English speakers to spell check their
messages.
 FUDforum 2.0 also includes a powerful user group management system, that
 allows fine grained control over the users of the forum,
 for the administrator as well as the group manager(s) assigned by the
 administrator.
 In addition to these features, the forum contains all the other features
you
 may have come to expect from a web forum, such as the
 ability to attach files to messages, include polls, private messaging
system,
 FUDcode, which allows the user to style their text
 without the need for HTML, thread  forum subscriptions with both e-mail 
ICQ
 notification, buddy and ignore lists, a full text search
 and many more.
 Despite all these features, FUDforum is extremely fast and scales
extremely
 well, by using MySQL indexes and table views implemented in PHP
 to retrieve the data in the most expedient manner possible. The result, is
 that most forum pages take ~0.01-0.02 seconds to generate on
 most computers, even while the forum is under a heavy load.
 The forum, by default is setup with very secure file permissions, that are
 designed in such a way that given a reasonably well setup web
 server, your forum's data will be safe against hackers.

 You can download FUDforum from http://fud.prohost.org/download.php and if
you
 have any questions, there is a support forum at
 http://fud.prohost.org/forum/, where you can get answers to your questions
and
 concerns about the forum.

 Ilia Alshanetsky
 [EMAIL PROTECTED]
 FUDforum Core Developer




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



RE: [PHP] Formatting XML Data

2002-06-10 Thread Ray Hunter

Also checkout phpbeginner.com it has an article about xslt, xml and php...

www.phpbeginner.com



Thank you,

RAY HUNTER



-Original Message-
From: Sebastian A. [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 09, 2002 9:21 AM
To: PHP General List (PHP.NET)
Subject: [PHP] Formatting XML Data


Hello,

I have been working with XML in the recent weeks and I have recently come
across the need to format some of the data in my XML. For example I might
have a large XML file and I would like some of the text to be bold, or maybe
I would like to insert a hyper-link. Unfortunately it does not seem I can do
this with ordinary HTML tags because they will be interpreted as XML tags. I
am sure, however that there is another way of doing this. Does anyone know
how?

Thanks



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



[PHP] Include question

2002-06-11 Thread Tom Ray

I'm trying to use the include function in some PHP scripts, but when I do

include 'config.inc'; or include 'config.php;

It returns all the information in the file when I look at my test php 
file (which calls the include) Anyone know why this is?


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




Re: [PHP] Include question

2002-06-11 Thread Tom Ray

Yes, but according to http://www.php.net/manual/en/function.include.php 
I should be able to delcare the include and then pull the information 
out normally. So by what the manual says I can do this

somefile.php
?
$apple = 'green';
$pear = 'yellow';
?

callfile.php
?
include 'somefile.php';
echo Apples are $apple and Pears are $pear; \\ which would return the 
line with green and yellow in the correct spots.
?

But when I just do

?
include 'somefile.php';
?

It prints:
$apple = 'green'; $pear = 'yellow':


Why is that?


John Holmes wrote:

Umm...that's what it's supposed to do...it's including it...

---John Holmes...

  

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Include question

I'm trying to use the include function in some PHP scripts, but when I


do
  

include 'config.inc'; or include 'config.php;

It returns all the information in the file when I look at my test php
file (which calls the include) Anyone know why this is?


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




.

  




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




Re: [PHP] Include question

2002-06-11 Thread Tom Ray

Well I got it solved. It would help if I formatted my files correctly.

Sorry about that, i've been messing with PHP for about a year now, but 
am now really diving into it so I may have stupid questions here and 
there :)

TIA to all for help.

John Holmes wrote:

Umm...that's what it's supposed to do...it's including it...

---John Holmes...

  

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 9:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Include question

I'm trying to use the include function in some PHP scripts, but when I


do
  

include 'config.inc'; or include 'config.php;

It returns all the information in the file when I look at my test php
file (which calls the include) Anyone know why this is?


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




  





[PHP] Unlink question more or less

2002-06-11 Thread Tom Ray

I want to use unlink() to delete a wildcard, but at the moment I keep 
getting parse errors. Here's what happening:

I'm mucking around with some login stuff, when a user logs in it writes 
a flat file that collects some information about them, the flat file is 
created with the name username.dateyeartime Now each time they log in I 
want to delete that file and replace it with the new file that has the 
latest dateyeartime ending on it. I've tried unlink (username.*); but 
that returns an error. Is there a way for unlink() to recongize 
wildcards? If not how would I do this?


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




Re: [PHP] Unlink question more or less

2002-06-11 Thread Tom Ray

Yeah they are,  actaully I switched it to a static name and then added 
the time stamp as part of the information I'm gathering. Now I just 
re-write the file on each log in.

John Holmes wrote:

You can't use wildcards. Use a system() or exec() call to do it.

Why use the datetime part at all? The usernames are unique, right?

---John Holmes...

  

-Original Message-
From: Tom Ray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 11, 2002 11:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Unlink question more or less

I want to use unlink() to delete a wildcard, but at the moment I keep
getting parse errors. Here's what happening:

I'm mucking around with some login stuff, when a user logs in it


writes
  

a flat file that collects some information about them, the flat file


is
  

created with the name username.dateyeartime Now each time they log in


I
  

want to delete that file and replace it with the new file that has the
latest dateyeartime ending on it. I've tried unlink (username.*); but
that returns an error. Is there a way for unlink() to recongize
wildcards? If not how would I do this?


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




.

  





Re: [PHP] Unlink question more or less

2002-06-12 Thread Tom Ray

Any word on when glob() will be in the production version?

thanks for the help Miquel.


- Original Message -
From: Miguel Cruz [EMAIL PROTECTED]
To: Tom Ray [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, June 12, 2002 2:01 AM
Subject: Re: [PHP] Unlink question more or less


 On Tue, 11 Jun 2002, Tom Ray wrote:
  I want to use unlink() to delete a wildcard, but at the moment I keep
  getting parse errors. Here's what happening:
 
  I'm mucking around with some login stuff, when a user logs in it writes
  a flat file that collects some information about them, the flat file is
  created with the name username.dateyeartime Now each time they log in I
  want to delete that file and replace it with the new file that has the
  latest dateyeartime ending on it. I've tried unlink (username.*); but
  that returns an error. Is there a way for unlink() to recongize
  wildcards? If not how would I do this?

 Once glob() makes it into the production version,

   foreach(glob('*') as $f) unlink($f);

 Until then, use system('rm *'); or a readdir loop.

 unlink() is not the rm command. It's a system call that deletes a specific
 named file.

 miguel




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




[PHP] Dynamic Arrays

2002-06-12 Thread Tom Ray

I have an array question. I want to use a dynamic array but I don't know 
how to do this. What I want to do is this, I want to write a form script 
that takes the elements of the form and submits them in the array then I 
want to do a loop and check to see if each element in the array has a 
value and then if it does bullocks for them, but if it doesn't then I 
want it to come to a screeching halt and tell them what dolts they are 
for missing a field. So basically I want to have a Required field option 
for the form. I'm still learning arrays and dynamic arrays are just 
throwing me and I can't find a good code example to work from.

TIA.


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




Re: [PHP] beginner in PHP

2002-06-12 Thread Tom Ray

Try this:

echo $catalog[unitprice];


in my experience I've only been able to use the echo() without the 
quotation marks if I'm calling a function, for variables you need the 
quotation marks.

Hope this helps.


Phillip Perry wrote:

Can someone tell me why this doesn't work?
The $mycart array is fine and the $catalog array is also fine but nothing
inside the if statement prints. I've tried other echo statements but nothing
prints at all.

while (list($key,$value) = each($mycart))
   {
if ($value == $catalog[itemcd])
   {

   echo $catalog[unitprice];

   }
   }


Thanks

Phil


  




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




Re: [PHP] Editor

2002-06-13 Thread Ray Hunter

Actually it is macromedia now.  And it is windows based, what about us linux
or unix or xbsd guys.

Ray Hunter



- Original Message -
From: Kurth Bemis (List Monkey) [EMAIL PROTECTED]
To: Daniele Baroncelli [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 1:24 PM
Subject: Re: [PHP] Editor


 At 09:18 PM 6/13/2002 +0200, Daniele Baroncelli wrote:

 allaire homesite hands down

 ~kurth

 Hi guys,
 
 Although any editor should be fine when coding PHP, I find that the
standard
 Notepad it's a real pain in the ass. Especially when the script gives you
an
 error at line 222 ! Each time I have to scroll and count each single
line!
 
 Can anyone suggest me a different editor ?
 
 
 Cheers
 
 Daniele
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer

 Jedi business, Go back to your drinks - Anakin Skywalker, AOTC

 [EMAIL PROTECTED] | http://kurth.hardcrypto.com
 PGP key available - http://kurth.hardcrypto.com/pgp



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

2002-06-13 Thread Ray Hunter

If color is all you want then try using vim.


Ray Hunter

- Original Message -
From: Kurth Bemis (List Monkey) [EMAIL PROTECTED]
To: Ray Hunter [EMAIL PROTECTED]
Cc: Daniele Baroncelli [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, June 13, 2002 1:29 PM
Subject: Re: [PHP] Editor


 At 01:23 PM 6/13/2002 -0600, Ray Hunter wrote:

 emacs with phpmode.lisp (do a google search for it)

 and on apple - pre os X we like bbedit and on X we like emacs :-)

 ~kurth

 Actually it is macromedia now.  And it is windows based, what about us
linux
 or unix or xbsd guys.
 
 Ray Hunter
 
 
 
 - Original Message -
 From: Kurth Bemis (List Monkey) [EMAIL PROTECTED]
 To: Daniele Baroncelli [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, June 13, 2002 1:24 PM
 Subject: Re: [PHP] Editor
 
 
   At 09:18 PM 6/13/2002 +0200, Daniele Baroncelli wrote:
  
   allaire homesite hands down
  
   ~kurth
  
   Hi guys,
   
   Although any editor should be fine when coding PHP, I find that the
 standard
   Notepad it's a real pain in the ass. Especially when the script gives
you
 an
   error at line 222 ! Each time I have to scroll and count each single
 line!
   
   Can anyone suggest me a different editor ?
   
   
   Cheers
   
   Daniele
   
   
   
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
   Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone
Computer
  
   Jedi business, Go back to your drinks - Anakin Skywalker, AOTC
  
   [EMAIL PROTECTED] | http://kurth.hardcrypto.com
   PGP key available - http://kurth.hardcrypto.com/pgp
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php


 Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer

 Jedi business, Go back to your drinks - Anakin Skywalker, AOTC

 [EMAIL PROTECTED] | http://kurth.hardcrypto.com
 PGP key available - http://kurth.hardcrypto.com/pgp



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




Re: [PHP] server problems

2002-06-18 Thread Tom Ray

And what are the directory/file permissions where you are writing the
archive files?


- Original Message -
From: 1LT John W. Holmes [EMAIL PROTECTED]
To: Kris Vose [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, June 18, 2002 11:54 AM
Subject: Re: [PHP] server problems


 Are you sure display_errors is turned ON in php.ini on the new server? Do
 the two servers have different settings for register_globals in php.ini?

 ---John Holmes...

 - Original Message -
 From: Kris Vose [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, June 18, 2002 11:12 AM
 Subject: [PHP] server problems


 I just uploaded a php driven web site that use text files to archive data
to
 a unix server.  When I went to try and add another archive the script
fails
 without a warning.  It does not store the data in the text file and it
does
 not add another archive.  I wrote this application about 4 months ago when
I
 was just learning php and I have found since then that mysql is the best
way
 to store data! duh...  Anyway I was wondering if my permissions are
screwed
 up on the unix server, or if there is something that I am overlooking
here!
 I do not really want to rewrite the code!  I spoke with the administrator
of
 the server and he has no idea.  They are using PHP 4.0.2B and we are using
 PHP 4.1.2  Anyway...thanks in advance.

 Kris

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



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




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




Re: [PHP] display_error=Off in php.ini

2002-06-21 Thread Ray Hunter

Also make sure that your webserver has write privileges to the file...



RAY HUNTER



- Original Message - 
From: Anil Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 10:57 AM
Subject: [PHP] display_error=Off in php.ini


 Hi,
 
 In php.ini file i have set:
 display_errors = Off
 log_errors = /var/log/php-errors.log
 
 but i cant see anything coming in to php-errors.log file.
 I have tried to change the query in my php code...but it dispays error on
 the gui( the display errors doesnt seem to get off).
 
 I hope someone can help me with this.
 
 thanx
 anil
 
 
 -- 
 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] php.ini not creating logs

2002-06-21 Thread Ray Hunter

Like i said make sure the webserver has the privilege to write to the log
file...




S RAY HUNTER
email: [EMAIL PROTECTED]
www: http://www.venticon.com
aim: spinebl8d3



- Original Message -
From: Anil Garg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 11:40 AM
Subject: [PHP] php.ini not creating logs



  Hi,

  sorry i forgot to mention that.
  yes i restarted my webserver.

  In fact the error  messages are getting hidden(on setting display_errors
=
  Off) but the logs are not getting created:(log_errors =
  /var/log/php-errors.log ) in php.ini file.

  thanx
  anil





 --
 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] php.ini not creating logs

2002-06-21 Thread Ray Hunter

Do this, set log_errors = on in your php.ini file.  Do not set the
error_log = file comment that line out and all other error_log ones as
well.  This will then log all errors to apache's log files and you can view
the errors there.


RAY HUNTER


- Original Message -
From: Anil Garg [EMAIL PROTECTED]
To: Ray Hunter [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 12:00 PM
Subject: Re: [PHP] php.ini not creating logs


 ya i have tried that too..
 wot else can be the problem.
 my php.ini looks like this:
 
 ; Print out errors (as a part of the output).  For production web sites,
 ; you're strongly encouraged to turn this feature off, and use error
logging
 ; instead (see below).  Keeping display_errors enabled on a production web
 site
 ; may reveal security information to end users, such as file paths on your
 Web
 ; server, your database schema or other information.
 display_errors = Off

 ; Even when display_errors is on, errors that occur during PHP's startup
 ; sequence are not displayed.  It's strongly recommended to keep
 ; display_startup_errors off, except for when debugging.
 display_startup_errors = Off

 ; Log errors into a log file (server-specific log, stderr, or error_log
 (below))
 ; As stated above, you're strongly advised to use error logging in place
of
 ; error displaying on production web sites.
 log_errors = /var/log/php-errors.log

 ; Store the last error/warning message in $php_errormsg (boolean).
 track_errors = On

 ; Disable the inclusion of HTML tags in error messages.
 ;html_errors = Off

 ; String to output before an error message.
 ;error_prepend_string = font color=ff

 ; String to output after an error message.
 ;error_append_string = /font

 ; Log errors to specified file.
 ;error_log = Off
 ---


 - Original Message -
 From: Ray Hunter [EMAIL PROTECTED]
 To: Anil Garg [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, June 21, 2002 1:53 PM
 Subject: Re: [PHP] php.ini not creating logs


  Like i said make sure the webserver has the privilege to write to the
log
  file...
 
 
 
 
  S RAY HUNTER
  email: [EMAIL PROTECTED]
  www: http://www.venticon.com
  aim: spinebl8d3
 
 
 
  - Original Message -
  From: Anil Garg [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Friday, June 21, 2002 11:40 AM
  Subject: [PHP] php.ini not creating logs
 
 
  
Hi,
  
sorry i forgot to mention that.
yes i restarted my webserver.
  
In fact the error  messages are getting hidden(on setting
 display_errors
  =
Off) but the logs are not getting created:(log_errors =
/var/log/php-errors.log ) in php.ini file.
  
thanx
anil
  
  
  
  
  
   --
   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] some one PLEASE help me!

2002-06-21 Thread Ray Hunter

Why don't you try using mm for the sessions...then you do not have to write
to disk, it is all in memory...



RAY HUNTER



- Original Message -
From: Rick Kukiela [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 12:09 PM
Subject: [PHP] some one PLEASE help me!


 Ok, I have never, in my entire life, have such a persistant little freakin
 problem with a programming language... It started out while i was running
 4.1.2 where sessions would not write to the disk properly. I researched
and
 found a bug. I couldnt get php properly upgraded... dont know why so i had
 to whip out the whole system and start from scratch. After doing this I am
 now running Apache 1.3.26, php 4.2.1 and the os is Freebsd 4.6-Release,
 platform i386.

 I just want to do some simple authentication with sessions so this is the
 session code in the script:

   $start_time = mktime();
   error_reporting(2047);
   session_start();
   session_register(encrypted);
   session_register(user);
   session_register(start_time);
   session_register(cdomain);
   session_write_close();
   header(Location: blalbalballafdskljf);

 i even tried that same code but instead of using session_register i
assigned
 the vars manually by doing like $_SESSION['encrypted'] = $encrypted; but
 that produced the same errors as using session_register.

 I tried with reg_globals on and off. no difference.

 Its set to write in the /tmp directory which has the following
permissions.

 drwxrwxrwt   3 root wheel 512 Jun 21 13:00 tmp

 I also tried changing it to /usr/local/apache/sessions which has the
 permissions:

 drwxrwxrwx   3 nobody  nobody 512 Jun 21 12:36 sessions

 Nothing works NOTHING AT ALL, i cant get this shit to work for the life of
 me and its really irritating. apache error_logs report NOTHING at all and
if
 php has its own log i have no idea where it is.

 Even if you cant directly tell me what the problem is, if there is a way
to
 even find out what could be causeing it please let me know, this is
killing
 me.

 Oh and here is the output i get when i run the script.

 
 Warning: Failed to write session data (files). Please verify that the
 current setting of session.save_path is correct (/tmp) in
 /usr/local/apache/htdocs/cp/login.php on line 43

 Warning: Cannot add header information - headers already sent by (output
 started at /usr/local/apache/htdocs/cp/login.php:43) in
 /usr/local/apache/htdocs/cp/login.php on line 45

 -
 Thanks
 Rick


 --
 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] some one PLEASE help me!

2002-06-21 Thread Ray Hunter

you need to compile php with-mm and then you need to edit your php.ini file
to use mm instead of files.  this increases your php performance for
sessions.

Check you phpinfo() to see if you have mm compiled in and then edit your
php.ini file like this:

session.save_handler = mm


S RAY HUNTER
email: [EMAIL PROTECTED]
www: http://www.venticon.com
aim: spinebl8d3



- Original Message -
From: Rick Kukiela [EMAIL PROTECTED]
To: Ray Hunter [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 12:25 PM
Subject: Re: [PHP] some one PLEASE help me!


 how do u do that?
 - Original Message -
 From: Ray Hunter [EMAIL PROTECTED]
 To: Rick Kukiela [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, June 21, 2002 1:16 PM
 Subject: Re: [PHP] some one PLEASE help me!


  Why don't you try using mm for the sessions...then you do not have to
 write
  to disk, it is all in memory...
 
 
 
  RAY HUNTER
 
 
 
  - Original Message -
  From: Rick Kukiela [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, June 21, 2002 12:09 PM
  Subject: [PHP] some one PLEASE help me!
 
 
   Ok, I have never, in my entire life, have such a persistant little
 freakin
   problem with a programming language... It started out while i was
 running
   4.1.2 where sessions would not write to the disk properly. I
researched
  and
   found a bug. I couldnt get php properly upgraded... dont know why so i
 had
   to whip out the whole system and start from scratch. After doing this
I
 am
   now running Apache 1.3.26, php 4.2.1 and the os is Freebsd
4.6-Release,
   platform i386.
  
   I just want to do some simple authentication with sessions so this is
 the
   session code in the script:
  
 $start_time = mktime();
 error_reporting(2047);
 session_start();
 session_register(encrypted);
 session_register(user);
 session_register(start_time);
 session_register(cdomain);
 session_write_close();
 header(Location: blalbalballafdskljf);
  
   i even tried that same code but instead of using session_register i
  assigned
   the vars manually by doing like $_SESSION['encrypted'] = $encrypted;
but
   that produced the same errors as using session_register.
  
   I tried with reg_globals on and off. no difference.
  
   Its set to write in the /tmp directory which has the following
  permissions.
  
   drwxrwxrwt   3 root wheel 512 Jun 21 13:00 tmp
  
   I also tried changing it to /usr/local/apache/sessions which has the
   permissions:
  
   drwxrwxrwx   3 nobody  nobody 512 Jun 21 12:36 sessions
  
   Nothing works NOTHING AT ALL, i cant get this shit to work for the
life
 of
   me and its really irritating. apache error_logs report NOTHING at all
 and
  if
   php has its own log i have no idea where it is.
  
   Even if you cant directly tell me what the problem is, if there is a
way
  to
   even find out what could be causeing it please let me know, this is
  killing
   me.
  
   Oh and here is the output i get when i run the script.
  
   
   Warning: Failed to write session data (files). Please verify that the
   current setting of session.save_path is correct (/tmp) in
   /usr/local/apache/htdocs/cp/login.php on line 43
  
   Warning: Cannot add header information - headers already sent by
(output
   started at /usr/local/apache/htdocs/cp/login.php:43) in
   /usr/local/apache/htdocs/cp/login.php on line 45
  
   -
   Thanks
   Rick
  
  
   --
   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] mod_mm problems now....

2002-06-21 Thread Ray Hunter

Find out where you bsd has all the mm header files and add that to your php
configuration...

Example:

--with-mm=/usr/include

RAY HUNTER



- Original Message -
From: Rick Kukiela [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 21, 2002 1:45 PM
Subject: [PHP] mod_mm problems now


 Nothing is ever easy... I now accept this fact

 I cant get sessions files handler to work so now im trying to
 compile --with-mm, php compiles fine but when i compile apache this
happens:

 === src/modules/php4
 === src/modules

c -c -I. -I/usr/libdata/perl/5.00503/mach/CORE -I./os/unix -I./include   -

unsigned-char -DMOD_SSL=208109 -DMOD_PERL -DUSE_PERL_SSI  -I/usr/local/src/

php-4.2.1 -I/usr/local/src/php-4.2.1/main -I/usr/local/src/php-4.2.1/main -I

/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend -I/usr/local/s

rc/php-4.2.1/TSRM -I/usr/local/src/php-4.2.1/TSRM -I/usr/local/src/php-4.2.1
  -DEAPI -DUSE_EXPAT -I./lib/expat-lite `./apaci` modules.c

c -c -I. -I/usr/libdata/perl/5.00503/mach/CORE -I./os/unix -I./include   -

unsigned-char -DMOD_SSL=208109 -DMOD_PERL -DUSE_PERL_SSI  -I/usr/local/src/

php-4.2.1 -I/usr/local/src/php-4.2.1/main -I/usr/local/src/php-4.2.1/main -I

/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend -I/usr/local/s

rc/php-4.2.1/TSRM -I/usr/local/src/php-4.2.1/TSRM -I/usr/local/src/php-4.2.1
  -DEAPI -DUSE_EXPAT -I./lib/expat-lite `./apaci` buildmark.c

cc  -funsigned-char -DMOD_SSL=208109 -DMOD_PERL -DUSE_PERL_SSI  -I/usr/loca

l/src/php-4.2.1 -I/usr/local/src/php-4.2.1/main -I/usr/local/src/php-4.2.1/m

ain -I/usr/local/src/php-4.2.1/Zend -I/usr/local/src/php-4.2.1/Zend -I/usr/l

ocal/src/php-4.2.1/TSRM -I/usr/local/src/php-4.2.1/TSRM -I/usr/local/src/php
 -4.2.1 -DEAPI -DUSE_EXPAT -I./lib/expat-lite
 ./apaci` -L/usr/lib  -Wl,-E  -o httpd buildmark.o modules.o
 modules/php4/libphp4.a  modules/standard/libstandard.a
modules/ssl/libssl.a
 modules/perl/libperl.a  main/libmain.a  ./os/unix/libos.a  ap/libap.a

lib/expat-lite/libexpat.a  -R/usr/local/lib  -rdynamic -L/usr/local/lib -Lmo

dules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4  -lpam -lc-clien

4  -lcrypt -lpam -lcrypt -lm  -lcrypt   -lcrypt   -lssl -lcrypto  -Wl,-R/us
 r/lib -Wl,-E -lperl -lm

/usr/libdata/perl/5.00503/mach/auto/DynaLoader/DynaLoader.a -L/usr/libdata/p
 erl/5.00503/mach/CORE -lperl -lm -lc -lcrypt -lperl -lm
 modules/php4/libphp4.a(mod_mm.o): In function `hash_split':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c:96: undefined reference to
 `mm_calloc'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c:111: undefined reference to
 `mm_free'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_sd_new':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0xc2): undefined
 reference to `mm_malloc'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0xd0): undefined
 reference to `mm_error'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0xde): undefined
 reference to `mm_available'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_sd_destroy':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x23b): undefined
 reference to `mm_free'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x24c): undefined
 reference to `mm_free'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_mm_initialize':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x331): undefined
 reference to `mm_create'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x358): undefined
 reference to `mm_calloc'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x372): undefined
 reference to `mm_destroy'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_mm_destroy':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x3dc): undefined
 reference to `mm_free'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x3e6): undefined
 reference to `mm_destroy'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_read_mm':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x5b2): undefined
 reference to `mm_lock'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x60b): undefined
 reference to `mm_unlock'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_write_mm':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x635): undefined
 reference to `mm_lock'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x67a): undefined
 reference to `mm_free'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x68e): undefined
 reference to `mm_malloc'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x6e5): undefined
 reference to `mm_unlock'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_delete_mm':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x714): undefined
 reference to `mm_lock'
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x73e): undefined
 reference to `mm_unlock'
 modules/php4/libphp4.a(mod_mm.o): In function `ps_gc_mm':
 /usr/local/src/php-4.2.1/ext/session/mod_mm.c(.text+0x77d): undefined
 reference to `mm_lock'
 /usr/local/src/php-4.2.1/ext/session

Re: [PHP] Dealing with XML charsets

2002-07-02 Thread Ray Hunter

Check here:

http://www.chilkatsoft.com/ChilkatXml.asp

Google search:
http://www.google.com/search?sourceid=navclientq=convert+xml+charset

B i g D o g


- Original Message -
From: Peter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 02, 2002 3:05 PM
Subject: [PHP] Dealing with XML charsets


 Hi,

 Has anyone any advice as to how to deal with XML documents encoded in
windows-1252: a character set that PHP's XML extension won't process?  I've
 got a large number of such documents, and using xml_parse_into_struct()
would be the easiest way to handle them - but because of the encoding
 problem I keep on ending up with ? instead of characters in the document
in certain places.  Is there any way I could convert the charset?

 Thanks
 Peter



 --
 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] V basic newbie problem

2002-07-03 Thread Ray Hunter

try something like this


echo 'table';

while( $result = mysql_fetch_array( $q ) )
{
output here...
}

echo '/table';


S RAY HUNTER
email: [EMAIL PROTECTED]
www: http://www.venticon.com
aim: spinebl8d3



- Original Message -
From: Duncan Ellwood [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 8:43 AM
Subject: [PHP] V basic newbie problem


 I'm not sure if this is the right place for this but I'm just starting out
 with php and MySQL

 I have succesfully got a database up and I have managed to populate the
 first row of the html table with the first  row of  dynamic content
without
 too
 much problem. I have used the visual enviroment of DW Mx for this and it
was
 staightforward enough

 My problem arises when I want to fill in the subsequent rows of the table
 with the subesquent rows from the database. How do I create the recordset
 that will pull the info from the relevant subsequent rows for my columns?

 The code for the first row and first column entry is:

 ?php echo $row_RsSingStanDailybb['DailyBB']; ?

 but in the row below in the html table I want to refer to the second row
DB
 entry for DailyBB but I cant see how to go about this:( The Repeat server
 behaviour in DW Mx simply puts all the values in one html cell which is
not
 what I wish to achieve. Basically I want the html table to match the
 database but have only succeeded in getting the first row to display so
 far:(

 I'm sure this is simple but its my first time at all this and any help
would
 be appreciated:)

 TIA




 --
 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] Survey: MySQL vs PostgreSQL for PHP

2002-07-05 Thread Ray Hunter

I wrote a small article for builder.com discussing MySQL vs PostgreSQL.
There is a great dicussion happening on that article.  Many are voicing
their opinions for mysql.

Here is the url:
http://builder.com.com/article.jhtml?id=u00320020624gcn01.htm

In short PostgreSQL offers many advanced features like triggers and views.

Check it out and see what you think...

B i g D o g


- Original Message -
From: Lazor, Ed [EMAIL PROTECTED]
To: 'Scott Fletcher' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 05, 2002 3:07 PM
Subject: RE: [PHP] Survey: MySQL vs PostgreSQL for PHP


 I've always used MySQL, I don't know either.  I suspect they are equal in
 ease of use.

 -Original Message-
 I dunno!  Never tried it!  I wonder which one is easier to work with?



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

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


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




Re: [PHP] Postal / Zip Code Proximity Search

2002-07-09 Thread Ray Hunter

One suggestion is to use the geo functionality of Postgres

We use postgres to calculate city, state, and/or country by using the geo
functions in postgresql.

I would really suggest using postgres for your calculations.

You can pass the lat and long and have postgres give you the intersection of
these and reference a table that has the zip codes

B i g D o g




- Original Message -
From: Brandon Pearcy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 04, 2002 9:33 AM
Subject: [PHP] Postal / Zip Code Proximity Search


 Hello,
I have a couple of questions with respect to creating a postal /
 zip code proximity search that is remotely accurate. The system I am
 using now is OK for small distances, but is terrible at calculating
 large distances.

What I have is a database of establishments and their corresponding
 latitudes and longitudes, and I need to have users enter their own
 postal / zip code, and have the system calculate which establishments
 fall into a set range ($range) from their location. Not only does it
 need to find the establishments, it needs to calculate the distances
 (straight line, of course).

Now, I have dug through the PHP archives, but there is no single
 clear explanation of how to do this, from beginning to end. I will
 start by putting down what I need, and then maybe other people can
 contribute to this and in the end we will have the solution, nice and
 tidy, in one place.

 *** NOTE: I know doing this in PHP will be SLOW, but I do not want to
 write a MySQL user-defined function and recompile it and blah, blah,
 blah... (unless someone wants to cover that aspect!!! :D)

Step 1: Take the postal / zip code that the user entered, and
 search the national postal / zip code database (which I already have)
 and return its corresponding latitude and longitude ($userLat and
 $userLong).

Step 2: ???

Step 3: Return the establishments information to the user, complete
 with the distances to them, ordered by smallest distance to largest.



 If you can't help me out, maybe you can direct me to some online
 tutorials on this topic!

 Thanks in Advance!
 --
 --
 Brandon Pearcy
Internet Technician

 Bowes Online
 --
   phone: 1-780-532-1110 ext. 265
   fax:   1-780-532-2120
   [EMAIL PROTECTED]

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


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




Re: [PHP] ErrorDocument 404 Form

2002-07-17 Thread Tom Ray

Actaully, neither Apache or PHP is at fault. The ErrorDocument (either in
httpd.conf or an .htaccess file) follows absolute paths, so you are calling
your engine.php out of the root directory of the machine. So the question
is, do you have engine.php in the / folder? If not you can put it there or
just adjust your ErrorDocument command to point to the path of the file.

Hope this helps.


- Original Message -
From: Fabien Penso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 17, 2002 1:21 PM
Subject: [PHP] ErrorDocument 404  Form


 Hi.

 I got a trouble I don't know if Apache or PHP is in fault. Let's say I
 got something like :

 ErrorDocument 404 /engine.php

 If I make a form which use POST and redirect to something which doesn't
 exist, then a phpinfo() in engine.php won't show the variables. Am I
 wrong thinking it should ? Is there a way to make this work ?

 Thanks.

 --
 Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
 http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/

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




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




Re: Re[2]: [PHP] Submitting to cgi script

2002-07-21 Thread Ray Hunter

Instead of doing it as a command, try it through the webserver

?php

header( Location:
http://localhost/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwar
daddraliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsgn
ame=$namegroup=$grouppage=$page );

?


Or you can use something else...but send it to the web server...



.: B i g D o g :.


- Original Message -
From: [EMAIL PROTECTED]
To: B i g D o g [EMAIL PROTECTED]; php-general
[EMAIL PROTECTED]
Sent: Sunday, July 21, 2002 6:15 PM
Subject: Re[2]: [PHP] Submitting to cgi script


 Hello B,
 I just submitted directly to the cgi script and did it with a GET and
 it worked so that is not the problem. Any other suggestions

 Sunday, July 21, 2002, 4:52:09 PM, you wrote:


 BigDog In your example you are using the method of POST to pass the form
data to
 BigDog the cgi script.  However, when you pass the data to the cgi script
from the
 BigDog php script you are using the GET method to pass the data.

 BigDog Check and see if the cgi can accept with METHOD=GET

 BigDog .: B i g D o g :.


 BigDog - Original Message -
 BigDog From: [EMAIL PROTECTED]
 BigDog To: php-general [EMAIL PROTECTED]
 BigDog Sent: Sunday, July 21, 2002 5:46 PM
 BigDog Subject: [PHP] Submitting to cgi script


  How can I do this
 
  I have a form that I want to submit to a second php script that in turn
  submits to a cgi script but I can not get it to work. If I submit
  from the form to the cgi script it works just fine. But there are
  something that I need to do with the data besides submitting to the
  cgi script. Could you look at the sample code below and see if I am
  doing something wrong. I hope this makes sense I am not quit sure how
  to ask what I want to know
  If I was submitting directly to the cgi script the form action would
  look like this
   FORM ACTION=/cgi-bin/siteUserEmail/siteUserEmail.cgi METHOD=POST
 
 
 
  FORM ACTION=siteUserEmail.php METHOD=POST
  INPUT TYPE=TEXT NAME=forwardaddr SIZE=32 VALUE=
  TEXTAREA NAME=aliases ROWS=5 COLS=32/TEXTAREA
  INPUT TYPE=CHECKBOX NAME=vacationmode VALUE=on 
  TEXTAREA NAME=vacationmsg ROWS=5 COLS=32/TEXTAREA
  INPUT TYPE=HIDDEN NAME=name SIZE=-1 VALUE=tester54321
  INPUT TYPE=HIDDEN NAME=group SIZE=-1 VALUE=site53
  INPUT TYPE=HIDDEN NAME=page SIZE=-1 VALUE=siteuseremail
  input type=submit name=Submit value=submit
  /FORM
 
  The siteUserEmail.php file
  ?
  $cmd=/cgi-bin/siteUserEmail/siteUserEmail.cgi?forwardaddr=$forwardaddr
  aliases=$aliasesvacationmode=$vacationmodevacationmsg=$vacationmsg
  name=$namegroup=$grouppage=$page;
  exec($cmd);
  ?
  --
  Best regards,
   rdkurth  mailto:[EMAIL PROTECTED]
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Best regards,
  rdkurthmailto:[EMAIL PROTECTED]


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


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




[PHP] Re: how to give vars to a php(shell env) script?

2002-04-23 Thread Ray Hunter

Pass the variables at the command line...

$ARGV[i]

and

$ARGC deteremines the number of variables passed...

Try it and see what happens


Hermann Bier [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi NG!

 how could i give some vars to a php script, that is directly executed by
 php-parser. for instance:

 #!/usr/bin/php -q
 ?
 echo $SOME_VAR;
 ?

 is it possible at all?

 thanx for advance.

 Hermann Bier




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




Re: [PHP] Re: Display large text fields in html

2002-04-23 Thread Ray Hunter

What type of database are you using?

You might want to look into the creating temp tables and accessing them...

Jan Peuker [EMAIL PROTECTED] wrote in message
00e101c1eb0a$9a50c730$7ca990d4@toshiba">news:00e101c1eb0a$9a50c730$7ca990d4@toshiba...
 Ok, but true frames load very slow - not on an intra, but on internet.
 The select is not the problem, I use cursors to output every line. At
first
 I did an implementation like yours but users said it's to uncomfortable
 (they like static VB-Tools). Then I asked JS to reload a frameset using a
 LIMIT-query from 50 +/- of selectedIndex and then just reload if a new
index
 is out of this range, but for me there is no ability to hide/show these
 fields from JS. So i think i would have to use an Applett?

 Jan

 - Original Message -
 From: Julio Nobrega Trabalhando [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 11:05 PM
 Subject: [PHP] Re: Display large text fields in html


If you have over 1000 entries, each one with ~10 lines of text, I
would
 go
  with frames. Not inline-frames, but a true frames. So each change can
load
  the frame and show the information.
 
Also, a select with 1000 entries? Break it apart. For example make
one
  with (imagine this is a select in your browser):
 
  /--\
  Abba  Bee Gees|V|
  Beethoven  Coolio|
  ManyOptions  ZillionOptions |
  \---/
 
It's an interval of choices, first the user selects the interval,
which
  loads another select with only these in between entries.
 
 
 
  --
 
  Julio Nobrega.
 
  Um dia eu chego lá:
  http://sourceforge.net/projects/toca
 
  Ajudei? Salvei? Que tal um presentinho?
  http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884
 
 
  Jan Peuker [EMAIL PROTECTED] wrote in message
  006c01c1eb07$28d79500$7ca990d4@toshiba">news:006c01c1eb07$28d79500$7ca990d4@toshiba...
   Hi List,
  
   I want to display large text fields if a user changes wants to, like a
   dictionary. for example, a php-database generated page hosts a
combobox
   filled with ids, if a user changes it, a text otherwhere changes.
Simple
   Javascript would you say, but what's if this combobox has about 1000
   entries(every entry about 10lines of text)? The page loads and runs
very
   slow. But I don't want to reload the page everytime the user changes
the
   field. Do you know any solution?
   I know a few: a) As is said, a 2nd textbox filled with value coming
from
   array.
   b) The box is filled by a set of textfiles which are generated before
   c) above but w/ layer
   d) no box but an image, b/w-gif generated by php
   e) inline-frameset which is reloaded
   f) an applett which get its resource by getURL
   g) ...
   As I said, do you know which would be the best?
   Thanks a lot,
  
   Jan
  
   PS. Yes, I think this is rather a PHP question.
  
 
 
 
  --
  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: How to connect to mysql through JAVA?

2002-04-24 Thread Ray Hunter

Try checking the sun documentation...java.sun.com
or the mysql documentation...

Ray Hunter


Balaji Ankem [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
   What is the command to connect to mysql through java.

 Thanks and Regards
 Balaji





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




[PHP] Re: is their a way to run a command as root ???

2002-04-24 Thread Ray Hunter

check your manpages on chroot and sticky bits...

This should help you out...

Ray Hunter


Scott Baer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is their a way to run a command as root..or another user..

 I know their are a log of security issues with allowing this.. I will
 tighten down security after I get it to work.

 He is what I am trying to do.
 I have squid  squid guard set up..

 in squids redirect url.. (on the same box).. I would like to modify a
 checked/domain list (I'm currently doing this manually...  though I think
I
 know how to do this ..or at least the book I have does.)  after it is
 modified I need to run the fallowing...

 --update--
 #!/bin/sh
 ./squidguard -C all#or a specific db.. but all covers... all
 /etc/init.d/squid restart

 I can run this as root or as squid..

 I did create a test script which just copied some files in the /tmp dir..
 --test--
 #!/bin/sh
 echo this is a test
 cp /usr/local/httpd/htdocs/Block.html /tmp/Block.html

 I can run this.. and it works with the fallowing

 ?php
 $command=./test;
 system($command);
 ?







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




RE: [PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread Ray Hunter

Show some code...

Thanks,

Ray BigDog Hunter



-Original Message-
From: kras [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 19, 2002 9:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] regex: string begins with NEITER http NOR cid NOR mailto


Hello!

I have got a big problem:

I have html content in $html variable, which contains href, src and
background tags. Those tags may contain relative adressess and absolute
addressess which begin with http(s): or cid: (mail inline attachements)
and
mailto:

I have also variable $basewwwservername, which contains servername of
current server. I have to insert this $basewwwservername into all
href,src and background tags which are relative and NOT into absolute.
In other words I must preg_replace with some pattern that match for
example (src)=(\|)..and not following WORDS: http|cid|mailto and
correct rest of string.

Does anybody relief my pain?;-)
I've lost at least 3 days (almost 3x24hrs;-)

Regards
Konrad

--
e-mail: [EMAIL PROTECTED]




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


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




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

MD5 is not that secure compared to blowfish or twofish or the other
types of encryption available with mcrypt...

Thanks,

Ray Hunter



-Original Message-
From: Javier [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

What about MD5?

Jimmy Lantz wrote:
| Hi,
| started playing with Mcrypt and just wanted to ask which encryption 
| method makes the stronger encryption? (I can supply the necesary 
| keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no 
| fish at all :)
|
| So what do I need it for? I'm going to use it encrypting files, sizes 
| varies between some 100 k's and 4-5 mb's. / Jim
|
| Paranoia + A system w/o users = Safe system :)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (MingW32)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
=c0Rt
-END PGP SIGNATURE-


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


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




RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

It is a one way hash that many people use for simple
encryption...however, it should not be used for encrypting sensitive
information...some people have used it for encrypting data contained in
files...

For example do a md5 hash then encrypt the hash

Thanks,

Ray Hunter



-Original Message-
From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 2:47 PM
To: Ray Hunter
Cc: 'Javier'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?


On Tue, 21 May 2002, Ray Hunter wrote:

 MD5 is not that secure compared to blowfish or twofish or the other 
 types of encryption available with mcrypt...
 
 Thanks,
 
 Ray Hunter

How does MD5 relate to encrypting the file? It's just used as a hash
function.

--thalis

 
 
 
 -Original Message-
 From: Javier [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 21, 2002 2:43 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?
 
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 What about MD5?
 
 Jimmy Lantz wrote:
 | Hi,
 | started playing with Mcrypt and just wanted to ask which encryption
 | method makes the stronger encryption? (I can supply the necesary 
 | keylength). Should I go for MCRYPT_BLOWFISH or MCRYPT_TWOFISH? Or no

 | fish at all :)
 |
 | So what do I need it for? I'm going to use it encrypting files, 
 | sizes
 | varies between some 100 k's and 4-5 mb's. / Jim
 |
 | Paranoia + A system w/o users = Safe system :)
 
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (MingW32)
 Comment: For info see http://www.gnupg.org
 
 iEYEARECAAYFAjzqsWUACgkQNcG5oyVditt1ZgCdHrRHjk/Pvb8xfJFZyXBa2/SR
 rGUAn3+5uV6YdDDWGmtz4ZxEYlYJV/57
 =c0Rt
 -END PGP SIGNATURE-
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
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: Mcrypt: Blowfish or Twofish or no fish?

2002-05-21 Thread Ray Hunter

And yes...md5 is a message digest hashing utility for compact digital
signatures for an arbitrarily long stream of binary data.

MD5 website...

Thanks,

Ray Hunter



-Original Message-
From: Sqlcoders.com Programming Dept [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 12:47 AM
To: php general
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Mcrypt: Blowfish or Twofish or no fish?



 What about MD5?


MD5 is a message digest I believe,
something akin to the oldstyle CRC32.

Then again I haven't used it much (just to verify a client's credit card
number without revealing the CC number).

HTH,
Dw.


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




RE: [PHP] Mcrypt: Blowfish or Twofish or no fish? Part 2

2002-05-22 Thread Ray Hunter

Jimmy,

You could md5 something and send it encrypted and then verify the md5,
something similar to sharing keys...md5 is similar to a key...i use it
as something similar to kerberos...

And yes, MD5 is a one-way hash...which comes in handy...

Just remember that bigger is almost always better.  I would suggest
trying all three (blocksize, keylength, and both) and see which one
works best for you.  You should see how your system deals with it and
then decide...I like to have bigger keylenghts personally...




Thanks,

Ray Hunter



-Original Message-
From: Jimmy Lantz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 12:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Mcrypt: Blowfish or Twofish or no fish? Part 2


Thanx for the suggestions!
Someone mentioned that I could use MD5 and then encrypt the hash, how
would I ever decrypt that? Is'nt MD5 a 1-way thing only?

Another question?
Should I go for bigger keylength or bigger blocksize or both? What makes

for the best encryption?

/ Jim

(and before someone suggest that I read the book Applied cryptography
it's 
already orderd and on it's way :-) )


-- 
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] Servers, servers and more servers

2002-05-22 Thread Ray Hunter

When referring to an application server many times people are refereeing
to a server that is running something like J2EE or EJBs or .NET with
XML.  They are actual applications running behind a web server.  Some
examples are BEA, WebSphere, or Jonas for Java apps.  I have no idea
about .net, not into that...
 
If you are looking for a good Java one I suggest Jonas which is open
source (free) and is fairly decent.  I have used it for running
applications with apache and tomcat running together...
 
The Java apps with Jonas need to have something handle the web front-end
which is Tomcat for apache
 

Thanks, 

Ray Hunter 

-Original Message-
From: Stephen Tredrea [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 22, 2002 1:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Servers, servers and more servers


I'm trying to put together an architecture for a web environment and
have a newbie question regarding PHP and application servers...
 
I have decided to use Apache and MySQL running on Linux, using PHP for
server side scripting. Were does an application server fit into this and
is it necessary? I know that if I had chosen to use ColdFusion for my
scripting environment that this is an application server but I don't
know where one fits in with PHP, Apache and Linux.
 
Thnx, Stephen




RE: [PHP] php apache log analysers/website stats

2002-05-24 Thread Ray Hunter

Do a search on google and you will find plenty to keep you busy with...

Thanks,

Ray Hunter



-Original Message-
From: John Ngo [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 24, 2002 8:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php apache log analysers/website stats


hey does anybody know of any good apache log analyser or website
statistics php projects?



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

2002-05-26 Thread Ray Hunter

Why don't you try something like this...do a system call to pwd and
strip out the portion of the url that you know is the upper directory.
Then you can exchange that for the http://www.site.com/  and then add
the additional directories to the end and call the script name...there
might not be a function that does all this, however, you can try to work
around it

Thanks,

Ray Hunter



-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 25, 2002 11:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] inspirational


I want to detect the url my .php lies in.

This is over kill and BS:

$myurlvar = http://.$SERVER_NAME.parse($SCRIPT_NAME);

How do I get http://foo.com/dir1/dir2/dir3/;.

There seems to be nothing in phpinfo() that will give me a full url to
play with.

Flame me if you will, but I browsed TFM and found nothing inspirational.

Looked at phpinfo() too and got discouraged.

I need a full url.

John



-- 
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] Parsing PHP output

2002-05-26 Thread Ray Hunter

The problem is that you are sending this output to the browser and not
the server.  You can do this with XML because IE and Netscape have XML
parsers built-in.  You should create a form that will catch the data
from CGI then handle it on the server.  There might be other work
arounds as well...however, I have only played with the XML stuff...

Thanks,

Ray Hunter



-Original Message-
From: Mark [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, May 26, 2002 12:07 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing PHP output


Dear folks,

Has anyone ever been able to get a CGI to produce valid PHP output??

Whatever I do, my browser ALWAYS wants to open or save the non-parsed
PHP text produced by the CGI file. And yes, I have set the proper
ExecCGI and PHP entries in my vhosts.conf; and yes, I restarted the
server.

Basically, I open an existing php file (in a Perl CGI), and output its
contents again to the Apache server. The CGI starts with sending this
header:

print Content-type: application/x-httpd-php\n\n;

Then I output the text. But, no matter what I do, it will not parse the
PHP code. I do not understand this. Regular PHP files in that dir work
fine. There is, as far as I can see, no reason why this should not work.

And the PHP file really needs to be generated from the CGI, as it needs
to run as a specific user.

Anyway, any help would be much appreciated,

- Mark



-- 
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] Mcrypt Function - New to it

2002-05-30 Thread Tom Ray

Hi there..some what a new programmer when it comes to all this. I'm 
trying to encrypt some data and then decrypt it. It doesn't have to be 
high bit encryption just something simple like 3DES. But I keep getting 
it wrong. Any help would be greatful. Here's the piece of code:

$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_3DES, 
MCRYPT_MODE_ECB), MCRYPT_RAND);  

$key = md5(Secret Key);
$sample2 = Hello;

$lockdata = mcrypt_encrypt (MCRYPT_3DES, $key, $sample2, 
MCRYPT_MODE_ECB, $iv);

echo $lockdata\n;

$text = mcrypt_decrypt (MCRYPT_3DES, $key, $lockdata, MCRPYT_MODE_ECB, 
$iv);  

echo $text\n;





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




Re: [PHP] Mcrypt Function - New to it

2002-05-30 Thread Tom Ray

Well now I have the Encryption problem figured out but when I try to 
decrypt the information, I'm getting this error:

Warning: mcrypt module initialization failed in test.php on line 11

Here's Line 11:

$text = mcrypt_decrypt (MCRYPT_TripleDES, $key, $lockdata, 
MCRPYT_MODE_ECB, $iv);

again any help would be appreciated.

Tom Rogers wrote:

 Hi
 Here are a couple of functions that should help to get you started, iv 
 is set to all 0's so it does not have to be passed around or stored in 
 sessions. It is base64 encoded so it can be stored or passed to the 
 browser.

 Function Code_id($id,$password){
 $eid = 0;
 $td = mcrypt_module_open (MCRYPT_TripleDES, , 
 MCRYPT_MODE_ECB, );
 $iv = pack(a.mcrypt_enc_get_iv_size($td),$iv);
 mcrypt_generic_init ($td, $password, $iv);
 $eid = base64_encode(mcrypt_generic ($td, $id));
 mcrypt_generic_end ($td);
   return $eid;
 }
 Function Get_id($eid,$password){
 $id = 0;
 $td = mcrypt_module_open (MCRYPT_TripleDES, , 
 MCRYPT_MODE_ECB, );
 $iv = pack(a.mcrypt_enc_get_iv_size($td),$iv);
 mcrypt_generic_init ($td, $password, $iv);
 $id = mdecrypt_generic ($td, base64_decode($eid));
 mcrypt_generic_end ($td);
 return $id;
 }
 Tom


 At 11:07 PM 30/05/2002 -0400, Tom Ray wrote:

 Hi there..some what a new programmer when it comes to all this. I'm 
 trying to encrypt some data and then decrypt it. It doesn't have to 
 be high bit encryption just something simple like 3DES. But I keep 
 getting it wrong. Any help would be greatful. Here's the piece of code:

 $iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_3DES, 
 MCRYPT_MODE_ECB), MCRYPT_RAND);

 $key = md5(Secret Key);
 $sample2 = Hello;

 $lockdata = mcrypt_encrypt (MCRYPT_3DES, $key, $sample2, 
 MCRYPT_MODE_ECB, $iv);

 echo $lockdata\n;

 $text = mcrypt_decrypt (MCRYPT_3DES, $key, $lockdata, 
 MCRPYT_MODE_ECB, $iv);

 echo $text\n;





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







RE: [PHP] mail () will send to everyone except my own domain

2002-07-31 Thread Tom Ray

Gareth-

This sounds more like a sendmail issue to me. I've run into this a few times myself. 

What's happening is simple, sendmail has a file that it reads generally called 
domains this file tells sendmail what domains it should be handling mail for. When 
you submit your form the first thing sendmail is doing is checking that domains file, 
and if your domain is listed in that file sendmail will then handle the mail locally. 
So basically the server is sending mail to itself. You need to edit that domains file 
and remove the domain name in question. Once that's done sendmail will look outside 
the server for answers on what it needs to do with the mail delievery.

I can't remember the exact path off the top of my head because we use EXIM here (and 
it has the same issue) I would try either /etc/sendmail or /etc/mail or you can always 
do a find or whereis for domains



Hello all,

Having a real problem. Have written a very simple php email script that I'm
testing on our server. The script works fine if I set the 'to' field as any
email address but our own - i.e. [EMAIL PROTECTED] This works fine, however as
soon as I set the script to email me at the domain to which the server
resolves too it fails. I do not get a error message, it says that the mail
has been sent. The server runs Apache 1.3 and Php 4.1.2 (I will update to
4.2.2 once I have resolved this). The error logs on the server give no
indication of any problem. I cannot work this out at all - it simply will
not email to the same address as the DNS resolves its own IP address too.
Our mx records are held elsewhere.

I'm at complete loss on this one - I've been checking php.ini, httpd.conf
etc etc and cannot work out why this is happening. Php.ini is set too:

sendmail_from
 [EMAIL PROTECTED]
sendmail_path
 /usr/sbin/sendmail -t -i
smtp localhost


do I need to set the smtp to point to the server that holds the mx records?

any help/advice much appreciated,

thanks,

Gareth


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 24/07/2002



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





Re: [PHP] File Question

2002-08-08 Thread Ray Hunter

I guess my question is does PHP support additional macros like this?


.: B i g D o g :.


- Original Message -
From: B i g D o g [EMAIL PROTECTED]
To: PHP GEN [EMAIL PROTECTED]
Sent: Thursday, August 08, 2002 2:23 PM
Subject: [PHP] File Question


 I have been looking all over the manual and I have not found anything for

 __FILE__  does anyone know where I can get more info on its use in PHP?


 .: B i g D o g :.


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

2002-08-21 Thread Ray Hunter

Basically,

That is your problem here:

 [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable to
connect to PostgreSQL server: PQconnec
 tPoll() -- connect() failed: Connection refused
 Is the postmaster running (with -i) at '127.0.0.1'
 and accepting connections on TCP/IP port '5901'?

Postgresql needs the postmaster started with the '-i' option...meaning that
it can allow access from TCP/IP connections.  Also you need to verify if
postgresql is listening on port 5901, because its default port is 5432...

I would check both of those and then verify that you can connect from your
ip-address (or network) to the postmaster in the pg_hba.conf file.


--
.: B i g D o g :.


- Original Message -
From: [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 12:33 PM
Subject: [PHP] problem with PostgreSQL


 Can somebody tell me what this mines in my error log
  I have PostgreSQL compiled in to php so that should not be the problem
 PHP Warning:  Function registration failed - duplicate name - pg_connect
in Unknown on line 0
 PHP Warning:  Function registration failed - duplicate name - pg_pconnect
in Unknown on line 0
 PHP Warning:  Function registration failed - duplicate name - pg_close in
Unknown on line 0
 PHP Warning:  Function registration failed - duplicate name -
pg_connection_status in Unknown on line 0
 PHP Warning:  Function registration failed - duplicate name -
pg_connection_busy in Unknown on line 0
 PHP Warning:  Function registration failed - duplicate name -
pg_connection_reset in Unknown on line
 I am also getting this error
 [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable to
connect to PostgreSQL server: PQconnec
 tPoll() -- connect() failed: Connection refused
 Is the postmaster running (with -i) at '127.0.0.1'
 and accepting connections on TCP/IP port '5901'?
  in /home/sites/site61/web/util/session_management.phps on line 69


 --
 Best regards,
  rdkurth  mailto:[EMAIL PROTECTED]


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


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




Re: [PHP] problem with PostgreSQL

2002-08-21 Thread Ray Hunter

Good call on that Adam...

One thing to note is that when you call the postmaster here you are calling
it with the pg_ctl command...so it is beneficial to pass the postmaster
options to the pg_ctl command...like so...

su -l postgres -s /bin/sh -c /usr/bin/pg_ctl -o '-i'  -D $PGDATA -p
/usr/bin/postmaster start  /var/log/pgsql 21  /dev/null


And for debugging purposes I like to add a file to log all errors and
notices...which has saved me tons of time...I am logging to /var/log/pgsql
file...

Also you can edit the pg_hba.conf file that is located in
/var/lib/pgsql/data/pg_hba.conf for network and ip access...if redhat rpm
installed...



.: B i g D o g :.



- Original Message -
From: Adam Williams [EMAIL PROTECTED]
To: Ray Hunter [EMAIL PROTECTED]
Cc: PHP GEN [EMAIL PROTECTED]; Richard Kurth
[EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 12:55 PM
Subject: Re: [PHP] problem with PostgreSQL


 Just to throw my $.02 in, if you are running an RPM based linux
 distribution on your server (such as RedHat), edit your
 /etc/rc.d/init.d/postgresql file and look for the code in it:

 # Check for postmaster already running...
 pid=`pidof -s postmaster`
 if [ $pid ]
 then
 echo $Postmaster already running.
 else
 #all systems go -- remove any stale lock files
 rm -f /tmp/.s.PGSQL.*  /dev/null
 echo -n $PSQL_START

 If you find that (its under the start section), then immidately after the
 echo -n $PSQL_START change the next line to:

 su -l postgres -s /bin/sh -c /usr/bin/pg_ctl  -D $PGDATA -p
/usr/bin/postmaster -o -i start   /dev/null 21  /dev/null

 Adam

 On Wed, 21 Aug 2002, Ray Hunter wrote:

  Basically,
 
  That is your problem here:
 
   [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable
to
  connect to PostgreSQL server: PQconnec
   tPoll() -- connect() failed: Connection refused
   Is the postmaster running (with -i) at '127.0.0.1'
   and accepting connections on TCP/IP port '5901'?
 
  Postgresql needs the postmaster started with the '-i' option...meaning
that
  it can allow access from TCP/IP connections.  Also you need to verify if
  postgresql is listening on port 5901, because its default port is
5432...
 
  I would check both of those and then verify that you can connect from
your
  ip-address (or network) to the postmaster in the pg_hba.conf file.
 
 
  --
  .: B i g D o g :.
 
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: php-general [EMAIL PROTECTED]
  Sent: Wednesday, August 21, 2002 12:33 PM
  Subject: [PHP] problem with PostgreSQL
 
 
   Can somebody tell me what this mines in my error log
I have PostgreSQL compiled in to php so that should not be the
problem
   PHP Warning:  Function registration failed - duplicate name -
pg_connect
  in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
pg_pconnect
  in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name - pg_close
in
  Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_status in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_busy in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_reset in Unknown on line
   I am also getting this error
   [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable
to
  connect to PostgreSQL server: PQconnec
   tPoll() -- connect() failed: Connection refused
   Is the postmaster running (with -i) at '127.0.0.1'
   and accepting connections on TCP/IP port '5901'?
in /home/sites/site61/web/util/session_management.phps on line 69
  
  
   --
   Best regards,
rdkurth  mailto:[EMAIL PROTECTED]
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


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




Re: [PHP] problem with PostgreSQL

2002-08-21 Thread Ray Hunter

Sorry Adam,

I just realized that you are totally correct...damn brain farts or
something...

excuses my stupidity


--
RAY HUNTER



- Original Message -
From: Adam Williams [EMAIL PROTECTED]
To: Ray Hunter [EMAIL PROTECTED]
Cc: PHP GEN [EMAIL PROTECTED]; Richard Kurth
[EMAIL PROTECTED]
Sent: Wednesday, August 21, 2002 12:55 PM
Subject: Re: [PHP] problem with PostgreSQL


 Just to throw my $.02 in, if you are running an RPM based linux
 distribution on your server (such as RedHat), edit your
 /etc/rc.d/init.d/postgresql file and look for the code in it:

 # Check for postmaster already running...
 pid=`pidof -s postmaster`
 if [ $pid ]
 then
 echo $Postmaster already running.
 else
 #all systems go -- remove any stale lock files
 rm -f /tmp/.s.PGSQL.*  /dev/null
 echo -n $PSQL_START

 If you find that (its under the start section), then immidately after the
 echo -n $PSQL_START change the next line to:

 su -l postgres -s /bin/sh -c /usr/bin/pg_ctl  -D $PGDATA -p
/usr/bin/postmaster -o -i start   /dev/null 21  /dev/null

 Adam

 On Wed, 21 Aug 2002, Ray Hunter wrote:

  Basically,
 
  That is your problem here:
 
   [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable
to
  connect to PostgreSQL server: PQconnec
   tPoll() -- connect() failed: Connection refused
   Is the postmaster running (with -i) at '127.0.0.1'
   and accepting connections on TCP/IP port '5901'?
 
  Postgresql needs the postmaster started with the '-i' option...meaning
that
  it can allow access from TCP/IP connections.  Also you need to verify if
  postgresql is listening on port 5901, because its default port is
5432...
 
  I would check both of those and then verify that you can connect from
your
  ip-address (or network) to the postmaster in the pg_hba.conf file.
 
 
  --
  .: B i g D o g :.
 
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: php-general [EMAIL PROTECTED]
  Sent: Wednesday, August 21, 2002 12:33 PM
  Subject: [PHP] problem with PostgreSQL
 
 
   Can somebody tell me what this mines in my error log
I have PostgreSQL compiled in to php so that should not be the
problem
   PHP Warning:  Function registration failed - duplicate name -
pg_connect
  in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
pg_pconnect
  in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name - pg_close
in
  Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_status in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_busy in Unknown on line 0
   PHP Warning:  Function registration failed - duplicate name -
  pg_connection_reset in Unknown on line
   I am also getting this error
   [Wed Aug 21 11:06:56 2002] [error] PHP Warning:  pg_pconnect() unable
to
  connect to PostgreSQL server: PQconnec
   tPoll() -- connect() failed: Connection refused
   Is the postmaster running (with -i) at '127.0.0.1'
   and accepting connections on TCP/IP port '5901'?
in /home/sites/site61/web/util/session_management.phps on line 69
  
  
   --
   Best regards,
rdkurth  mailto:[EMAIL PROTECTED]
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 


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




Re: [PHP] whois query

2002-09-12 Thread Tom Ray

Yes, but how do you format the information that comes back out of the 
whois? I'm doing this:

?

$whois = system(whois [EMAIL PROTECTED]);

print pre$whois/pre;

?

But all the information is shown as one big line, no breaks or anything. 
How would I do this so it showed properly formatted output?

Adam Williams wrote:

Have a php page that runs exec() or system() and does a whois query on the
domain you want and then have it output the text to a page.  Very simple
to do, less then 2 minutes of coding.

   Adam

On Thu, 12 Sep 2002, yasin inat wrote:

  

please  anyone  can  help  me   about  querying  a  domain  
like   whois  queries ?

if  someone  has   got   a   script  ,  it's   acceptable 










  





Re: [PHP] whois query

2002-09-12 Thread Tom Ray

Nope still comes up with everything in one big line. I'm running through 
different options right now..but I'm tired and my brain is starting to 
hurt :)

Adam Williams wrote:

try with p /p and see if that works.

   Adam

On Thu, 12 Sep 2002, Tom Ray wrote:

  

Yes, but how do you format the information that comes back out of the
whois? I'm doing this:

?

$whois = system(whois [EMAIL PROTECTED]);

print pre$whois/pre;

?

But all the information is shown as one big line, no breaks or anything.
How would I do this so it showed properly formatted output?

Adam Williams wrote:



Have a php page that runs exec() or system() and does a whois query on the
domain you want and then have it output the text to a page.  Very simple
to do, less then 2 minutes of coding.

 Adam

On Thu, 12 Sep 2002, yasin inat wrote:



  

please  anyone  can  help  me   about  querying  a  domain  
like   whois  queries ?

if  someone  has   got   a   script  ,  it's   acceptable 












  





  





Re: [PHP] Re: whois query

2002-09-12 Thread Tom Ray

A working solution to the whois question
?
$whois = `whois [EMAIL PROTECTED]`;

print pre$whois/pre;
?

Notice those are back ticks, not single quotes. This will give youthe 
information you need, and the pre tag puts it out in the proper format 
for you.

yasin inat wrote:

Thanx   friends 




  




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




[PHP] COOKIE Question.

2002-09-17 Thread Tom Ray

I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't 
seem to retrieve data from them.

First I set the cookie like so:
setcookie (Access, Test_Value,time()+31536000);

Then I check my Cookies in Netscape and I can see that I have the cookie 
stored. But when I go to the page that has

print $HTTP_COOKIE_VARS[Access];
print $_COOKIE[$Access];
and even
print $Access;

I don't get the value set in the cookie, and I don't know why...any 
help, please?


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




Re: [PHP] COOKIE Question.

2002-09-17 Thread Tom Ray

I do the print $_COOKIE[Acccess]; and I still don't see any data print.

Leif K-Brooks wrote:

 First of all, the second try should be print $_COOKIE[Access]; with 
 no second $.  But, more importantly, I would reccomend you change the 
 cookie name to access.  This may not be the problem, but case in names 
 seems to generally cause problems.

 Tom Ray wrote:

 I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't 
 seem to retrieve data from them.

 First I set the cookie like so:
 setcookie (Access, Test_Value,time()+31536000);

 Then I check my Cookies in Netscape and I can see that I have the 
 cookie stored. But when I go to the page that has

 print $HTTP_COOKIE_VARS[Access];
 print $_COOKIE[$Access];
 and even
 print $Access;

 I don't get the value set in the cookie, and I don't know why...any 
 help, please?








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




[PHP] Test

2002-09-17 Thread Tom Ray

Test message

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




Re: [PHP] COOKIE Question.

2002-09-18 Thread Tom Ray

Discovered my cookie issue. I wasn't setting the path in setcookie() so 
it defaulted to what ever directory the script ran in.  I set it so it 
loads from the root of the website now, and it's working like a charm.

Thanks to all that helped!

John Holmes wrote:

I do the print $_COOKIE[Acccess]; and I still don't see any data


print.

Did you typo in your code like you did here??

Try to dump the whole $_COOKIE[] array and see what's in it. 

print_r($_COOKIE);

Did you mention what version of PHP you were using?

---John Holmes...


  





[PHP] Calling on functions in a url

2002-09-19 Thread Tom Ray

I have a question that I have yet to figure out. Let's say I have a PHP 
script with multiple fuctions, how do I call on the script to perfom 
specific functions through a url? Ex: 
http://www.sample.com/script.php?fucntion1

TIA


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




[PHP] Script Modificaton question

2002-09-19 Thread Tom Ray

I have a chat script that I downloaded and according to the license I 
can modify it as much as I want, and I'm a little stuck on a simple 
modification I want to make. When you type in a message it stores in in 
a file called text.php and then the chat page does an include call for 
the text.php file.  Currently, the writer of this script has it setup so 
all new text added is placed at the begining of the file using the w+ 
command, according to php.net with fopen if I switch the w+ to a+ it 
shoudl place the new data at the end of the file. However, when I make 
this switch,  the data is still being placed at the begining of the 
text.php file. I've including the portion of the script that writes to 
text.php can someone help me find what I'm not seeing?

$filename = text.php;
$fileAr= file($filename);
exec(cat /dev/null  '$filename');
$fd = fopen( $filename, w+ );
$filemessage = a 
 href=\javascript:launcher('profile.php?username=$username');\B$username/B/a: 
;
$filemessage .=font color=\$fcolor\$chat/fontBR\n;
fputs($fd,$filemessage);
   
$numLines = 20;
for ($i=0;$i$numLines;$i++) {
fputs($fd,$fileAr[$i]);
}
fclose( $fd );

TIA!


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




Re: [PHP] Script Modificaton question

2002-09-19 Thread Tom Ray

Ahah! That's what I was thinking, thatnks for helping me clear that up!

John Holmes wrote:

I have a chat script that I downloaded and according to the license I
can modify it as much as I want, and I'm a little stuck on a simple
modification I want to make. When you type in a message it stores in


in
  

a file called text.php and then the chat page does an include call for
the text.php file.  Currently, the writer of this script has it setup


so
  

all new text added is placed at the begining of the file using the


w+
  

command, according to php.net with fopen if I switch the w+ to a+


it
  

shoudl place the new data at the end of the file. However, when I make
this switch,  the data is still being placed at the begining of the
text.php file. I've including the portion of the script that writes to
text.php can someone help me find what I'm not seeing?

$filename = text.php;
$fileAr= file($filename);



It's reading the whole file into an array here. The newest lines will
still be first.

  

exec(cat /dev/null  '$filename');
$fd = fopen( $filename, w+ );



This opens the file and truncates it to zero length.

  

$filemessage = a




href=\javascript:launcher('profile.php?username=$username');\B$user
na
  

me/B/a:
;
$filemessage .=font
color=\$fcolor\$chat/fontBR\n;
fputs($fd,$filemessage);



This write the new, formatted message.
 
  

$numLines = 20;
for ($i=0;$i$numLines;$i++) {
fputs($fd,$fileAr[$i]);



And then write the first 20 lines of the file.

  

}
fclose( $fd );



So, if you want it in the new format of newest chat last in the file,
then use the same script, but fputs() the 20 old lines first, then the
new line. Just change the order.

This would work for you:

$numLines = 20;
$filename = text.php;
//read whole file
$fileArr = file($filename);
//open file and truncate to zero
$fp = fopen($filename,w+);
//write 20 lines of old file to new file
fputs($fp,array_slice($fileArr,0,$numLines);
//format $message
//write message to file
fputs($fp,$message);
//close file
fclose($fp);

Adapt to your needs...

---John Holmes...


  





[PHP] Encryption Question

2002-09-23 Thread Tom Ray

I want to compare a password to a encrypted password stored in my mySQL 
database using password('password'), what's the best way to compare the two?

Encrypted the password sent by the user and compare or pull the password 
from the database based on username, decrypt it and then compare?




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




[PHP] Another Encryption question

2002-09-23 Thread Tom Ray

I dipped into mcrypt about a month or so, and did this script back then. 
I had it working, it would kick out the encrypted data for me but today 
when I test it I get a Fatal error: Call to undefined function: 
mcrypt_create_iv() in test2.php on line 3.
And I don't understand why...any help would be great...thanks!

?

$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_TripleDES, 
MCRYPT_MODE_CFB), MCRYPT_RAND);

$key = Secret;
$sample2 = Hello;
$sample3 = Hello There;

$lockdata = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample2, 
MCRYPT_MODE_CFB, $iv);
$test = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample3, 
MCRYPT_MODE_CFB, $iv);
echo $lockdatabr\n;
echo $test\n;

?



Re: [PHP] Another Encryption question

2002-09-23 Thread Tom Ray

also if I comment out $iv, I get the error  Call to undefined function 
mcrypt_encrypt() on that line.. I just don't understand why it keeps 
doing this.

I'm running 4.2.2

Tom Ray wrote:

 I dipped into mcrypt about a month or so, and did this script back 
 then. I had it working, it would kick out the encrypted data for me 
 but today when I test it I get a Fatal error: Call to undefined 
 function: mcrypt_create_iv() in test2.php on line 3.
 And I don't understand why...any help would be great...thanks!

 ?

 $iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_TripleDES, 
 MCRYPT_MODE_CFB), MCRYPT_RAND);

 $key = Secret;
 $sample2 = Hello;
 $sample3 = Hello There;

 $lockdata = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample2, 
 MCRYPT_MODE_CFB, $iv);
 $test = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample3, 
 MCRYPT_MODE_CFB, $iv);
 echo $lockdatabr\n;
 echo $test\n;

 ?




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




[PHP] PHP Form and Arrays help

2002-09-24 Thread Tom Ray

I'm having a small problem with a form I'm designing and I hope someone can
point me in the right direction here. The form's function is rather simple
actaully. It's supposed to take the information, run through it to make sure
all the required fields have data in them, if there is a blank required field
it is supposed to redraw the form showing the field missed but also store the
data that was already submitted so you don't have to fill the form out all over
again. Now I have it so it stores the values of text boxes, drop down menus and
radio buttons but I'm having a real tough time with the check box values.
Example of what I'm doing: (Gender Selection with Radio Buttons). 

I declare an array in my PHP by doing 
$genderarray=array();

Then I store the value of the form for the redraw like so:
$mygender=$HTTP_POST_VARS[gender];
$genderarray[$mygender]=checked;

In the actaul form I decalre a global:
global genderarray();

And under the gender selection I have:
input name=gender type=radio value=Male ?= $genderarray[Male] ? 
(works the same for the Female)


Now my question is how can I do this with check boxes. I thought I could
through them all into a single array, then pull out the ones who have values to
them, but that's not working the way I thought.

Any thoughts or suggestions?


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




[PHP] Calling Function Identity

2001-10-03 Thread Ray Hilton

Is it possible to discover any sort of details about the function/script
that is calling a piece of code?  Ie, Passively

If not, does anyone have a good design pattern of how a debugger for php
should work?  At the moment I am using a class which formats the data
and dumps it to a log file, then just using a function as a wrapper so
that set_error_handler uses it.

I'm thinking there must be a better way of doing this, anyone have any
ideas?

Ray Hilton


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




Re: [PHP] Searching for a new provider

2001-12-12 Thread Tom Ray

Hey Andy-

I work with a hosting company that I believe has everything you're 
looking for in your wish list. They're a small company that's been 
around for about 10 years (started as an ISP). If you can get me more 
information on the type of hosting you're looking to do and what other 
specifics you might need for your sites, I can get you a ball park 
figure on what it will cost.

Andy wrote:

Hi there, I am searching for a provider who fullfills those criterias and
does not cost a fortune:

- PHP = 4.06 bzw. PHP 4.x mit GDLibrary ab 2.0


- GDLibrary = 2.0


  - PHP installed as module

- mind 5 Subdomains


- mind 100 MB Speicherplatz


- evtl. Java VM


- MySQL




Thanx andy








[PHP] Simple Question

2001-12-12 Thread Tom Ray

I have a quick question that I haven't been able to find the answer to 
yet. I've made a couple of guest books via PHP but the biggest problem 
I'm having is if any one inputs a ' or  or anything like that, the 
output in the book shows the stupid \ for the escape. So the word 
Tom's looks like Tom\'s Is there anyway for me to handle those 
characters so the backslash doesn't appear in the output?

Thanks,
Tom


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




Re: [PHP] Re: Simple Question

2001-12-12 Thread Tom Ray

oh no, Iv'e gotten two answers...

stripslashes() and strip_slashes()

which one? which one?! G

Gaylen Fraley wrote:

strip_slashes()

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite

Tom Ray [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

I have a quick question that I haven't been able to find the answer to
yet. I've made a couple of guest books via PHP but the biggest problem
I'm having is if any one inputs a ' or  or anything like that, the
output in the book shows the stupid \ for the escape. So the word
Tom's looks like Tom\'s Is there anyway for me to handle those
characters so the backslash doesn't appear in the output?

Thanks,
Tom








[PHP] Need Working... pop up dialog (repost)

2001-08-20 Thread Ray Clouse

I'm trying to get a working... informational dialog or window going
with my PHP page but I'm not getting anywhere.  Here's the situation:

When the user clicks on a link that has to gunzip a very large file, I
want a popup to say Working... while the file is uncompressing.
Then, when the file is uncompressed, I want the Working... popup to
close itself and then the parent window to load a new URL (where it
will use the uncompressed file).

I've tried doing this with Javascript and window.open(), but I'm having
no luck. Any ideas?

-- 
-
Ray Clouse | Don't fear the penguins.
Engineer Scientist/Specialist  |  
Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
Huntington Beach, CA   |  clouse AT rayclouse.org




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




Re: [PHP] Need Working... pop up dialog (repost)

2001-08-21 Thread Ray Clouse

It's due to space restrictions on the server.  We have 300GB available 
on the server, but the compressed data takes up 200GB, and we're adding 
new data (several GB) every month or so.

So we need to keep as much compressed as possible, but we have to 
uncompress the data for the webpages to use it.  The PHP webpages on the 
server use the uncompressed data to generate plots.  The data is never 
sent to the user, just the plots.

The main problem I'm having is with page resolution.  If I say:

  print(SCRIPTjsPopupWindow('Starting UNZIP');/SCRIPT\n);

  $gunzipcmdline = gunzip /PATHTO/MYDATA;
  $result = exec($gunzipcmdline, $execout, $execretval);

  print(SCRIPTjsPopupWindow('Finished UNZIP');/SCRIPT\n);

the 'Starting UNZIP' popup appears at the same time as the 'Finished 
UNZIP' one.  The page hasn't resolved until after the gunzip is done, so 
it doesn't execute the Javascript the way I want it to.  I've tried 
popping up a window, getting the handle, passing the handle to the 
gunzip code, then closing the handle when the gunzip is done, but that 
hasn't worked either.

Justin French wrote:

Ray Clouse wrote:

When the user clicks on a link that has to gunzip a very large file, I
want a popup to say Working... while the file is uncompressing.
Then, when the file is uncompressed, I want the Working... popup to
close itself and then the parent window to load a new URL (where it
will use the uncompressed file).

I've tried doing this with Javascript and window.open(), but I'm having
no luck. Any ideas?


Is the uncompressing taking place on the server?  or on the local (user)
machine?  Sounds like it's on the server.

The problem is, you have no *real* way of knowing how long the de-comp
will take (due to other factors, like server/client load, etc etc), so
how do you know when to go from working to done.


So, i'm trying to figure out WHY you're uncompressing a file on the
server that will be used by visitors over http.

Seems wrong to me.  Increased server load, more programs, more problems,
slower server response time, increased user anger, etc etc.


Enlighten me as to why, because I may be missing something.


Justin French


-- 
-
Ray Clouse | Don't fear the penguins.
Engineer Scientist/Specialist  |  
Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
Huntington Beach, CA   |  clouse AT rayclouse.org





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




Re: [PHP] Need Working... pop up dialog (repost)

2001-08-21 Thread Ray Clouse

Another part of this is an external program on the server that can't 
read from the gzipped file.  The file has to be uncompressed, 
unfortunately.  The resulting uncompressed file is recompressed through 
a cron job after 30 days if it hasn't been used for 30 days.

I came up with something that appears to work WRT the pop up dialog 
problem.  In my main browser window, from Javascript, I pop up an alert 
telling the luser the unzip is beginning.  Then in the gunzip code, in 
the BODY, I do this:


  print(BODY);
  print( onUnload=\alert('Finished uncompressing $datafile... please  .
  refresh main window.')\\n);

And I use Javascript to close the window.  Now I just need a way to 
automatically refresh the main browser window and I'm happy.

Thanks for the help!

Christian Reiniger wrote:

On Tuesday 21 August 2001 17:10, Ray Clouse wrote:

So we need to keep as much compressed as possible, but we have to
uncompress the data for the webpages to use it.  The PHP webpages on
the server use the uncompressed data to generate plots.  The data is
never sent to the user, just the plots.

The main problem I'm having is with page resolution.  If I say:

  print(SCRIPTjsPopupWindow('Starting UNZIP');/SCRIPT\n);

  $gunzipcmdline = gunzip /PATHTO/MYDATA;
  $result = exec($gunzipcmdline, $execout, $execretval);


Uncompressing should not take that much time. And you can speed it up by 
using the zlib functions instead of a exec (gunzip ...)
http://php.net/gzopen

Also, if the file to be uncompressed is very large, you should cache the 
results  (the generated plots).


-- 
-
Ray Clouse | Don't fear the penguins.
Engineer Scientist/Specialist  |  
Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
Huntington Beach, CA   |  clouse AT rayclouse.org





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




Re: [PHP] Need Working... pop up dialog (repost)

2001-08-22 Thread Ray Clouse

That's exactly what I needed!  Thanks!

Richard Lynch wrote:

You may just need a flush() call after the Starting UNZIP.

http://php.net/flush

PHP (Apache, actually) sends data to the browser when there's enough to
send, not right away.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Ray Clouse [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, August 21, 2001 10:10 AM
Subject: Re: [PHP] Need Working... pop up dialog (repost)


It's due to space restrictions on the server.  We have 300GB available
on the server, but the compressed data takes up 200GB, and we're adding
new data (several GB) every month or so.

So we need to keep as much compressed as possible, but we have to
uncompress the data for the webpages to use it.  The PHP webpages on the
server use the uncompressed data to generate plots.  The data is never
sent to the user, just the plots.

The main problem I'm having is with page resolution.  If I say:

  print(SCRIPTjsPopupWindow('Starting UNZIP');/SCRIPT\n);

  $gunzipcmdline = gunzip /PATHTO/MYDATA;
  $result = exec($gunzipcmdline, $execout, $execretval);

  print(SCRIPTjsPopupWindow('Finished UNZIP');/SCRIPT\n);

the 'Starting UNZIP' popup appears at the same time as the 'Finished
UNZIP' one.  The page hasn't resolved until after the gunzip is done, so
it doesn't execute the Javascript the way I want it to.  I've tried
popping up a window, getting the handle, passing the handle to the
gunzip code, then closing the handle when the gunzip is done, but that
hasn't worked either.

-- 
-
Ray Clouse | Don't fear the penguins.
Engineer Scientist/Specialist  |  
Boeing Expendable Launch Vehicles  |  Ray.Clouse AT boeing.com
Huntington Beach, CA   |  clouse AT rayclouse.org





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




[PHP] - Hard return in readfile

2001-05-16 Thread Ray Iftikhar

I have many text files stored on my server. I call them use using the 
readfile function. While that works great, it seems to over-write the hard 
returns. This has hurt the format and readability of my information.

ie.
text file:
This is
a

test

output:
This is a test

is there someway to get readfile to recognize returns in the file?
Thanks in Advance..
Ray
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




RE: [PHP] image retrival from db?

2001-06-19 Thread Ray Hilton

I thought this one was quite good to get you up to speed:

http://www.phpbuilder.net/columns/florian19991014.php3

Thing is, although very technically nice, it isnt really very practical,
as your database increases in size rapidly, and data retrival takes
longer and longer. I would recommend you still do stuff like thumbnail
generation on the upload and then store the paths to the file in the
database.

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Steve [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 00:57
To: [EMAIL PROTECTED]
Subject: [PHP] image retrival from db?


Anyone have a pointer to a script or documentation on how to retrieve an
image that is stored in a database?

I can insert the image, but unable to display the image once retieved, i
apparently am missing something.


Thanks

Steve






RE: [PHP] What is the deal with cookies

2001-06-19 Thread Ray Hilton

Well, when you set a cookie, it is sent in the headers, so the browser
isnt going to send the cookie back to the server until a refresh, the
best way is to either cash the userlog on details in the log in
function, so you need not refresh, or simply use a header(Location:
/); or something to force the browser to reload the page.

-Original Message-
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: 18 June 2001 23:28
To: [EMAIL PROTECTED]
Subject: [PHP] What is the deal with cookies


I have a script that authorizes the user and sets a cookie but when I
run the script it takes the username and password sets the cookie.
Verifies the cookie is set and then runs the rest of the code on the
page. except it does not pass on the user name. I have to do a manual
refresh to get it to pull the data from the database using the username
furnished by the cookie. Look at the code below. how can I overcome this
refresh problem.

 This is the script that calls the userauth.php file look at the
userauth.php file below

include(../inc/dataconf.inc);
include(userauth.php);
include(../inc/function.inc);
conf();
 $username =  $user_name;
$db = MYSQL_CONNECT($roothostname,$rootusername, $rootpassword) OR
DIE(Unable to connect to database);
$query = Select * from customers,datsubd,plans where datsubd.id =
customers.id and customers.cusername='$username'and
plans.planno=customers.plan; $result=mysql_db_query($dbName,$query);
$row = mysql_fetch_array($result);

?
? include(top.inc);?
table width=100% border=0 cellspacing=0 cellpadding=0
align=center tr
td colspan=3/td
/tr
tr
td width=25% align=left valign=top?php
include(left.inc);? /td


td width=100% align=center valign=top

 #
Userauth.php

 function query($query)
 {
   Global $roothostname,$rootusername, $rootpassword,$dbName;
   // Connect to DB
if (!$link = @MYSQL_CONNECT($roothostname,$rootusername,
$rootpassword))
{
$result = 0;
die(db connect error);
}
else
{
// Select DB
if (!@mysql_select_db($dbName, $link))
{
$result = 0;
die(db select error);
}
else
{
// Execute query
if (!$result = @mysql_query($query, $link))
{
$result = 0;
die(db query error);
}
}
}
 @mysql_close($link);
return $result;
  }
  function login_user($user_name, $password)


// Form our sql query
   $result = query(SELECT * FROM customers WHERE cusername
='$user_name');
   $row = mysql_fetch_array($result);
  if (($row[cusername] == $user_name) AND ($row[cpassword] ==
$password) AND ($user_name != ))


// User has been authenticated, send a cookie
$user_id = $row[cusername];
$encryptedpassword = md5($password);
SetCookie(LoginCookie, $user_id-$encryptedpassword, time()+50);
// 3600 expires one hour from now you can increse this if you what it to
last longer
$success = 1;
} else

  $success = 0;
   }
  return $success;
 }
  function verify_auth($cookie)


   // Split the cookie up into userid and password
   $auth = explode(-, $cookie);
   $query = query(SELECT * FROM customers WHERE cusername =
'$auth[0]');
   $row = mysql_fetch_array($query);
   $encryptedpassword = md5($row[cpassword]);
   if (($row[cusername] == $auth[0]) AND ($encryptedpassword ==
$auth[1]) AND ($auth[0] != ))


 $success = 1;
   } else

$success = 0;
   }
  return $success;
}
 function display_loginform()
 {
   global $SCRIPT_URL,$user_name;
   ?
  table width=400 border=1 align=center
form name=login action=?$SCRIPT_URL? method=post
trtd bgcolor=blackfont face=Arial color=white
size=2bLoginb/font/td/tr
trtdfont face=Arial color=black size=2Name input
name=user_name value= size=10 Password input name=password
type=password value= size=10/font/td/tr trtdfont
face=Arial color=black size=2 input type=submit value=Login
input type=reset value=Clear/font/td/tr /form /table  ?
   exit;
 }
 script entry point here
$SCRIPT_URL=getenv(SCRIPT_NAME);
 if($LoginCookie) // if cookie exists, check authenticity
 {
  $authenticated=verify_auth($LoginCookie);
  if($authenticated==0) display_loginform();
 } else {
$login=login_user($user_name,$password);
if($login==0) display_loginform();
}
 // if user has logged in, the script carries on here $cookie_var =
split(-, $LoginCookie); // this variable contains who the user is
logged in as!
   $username = $cookie_var[0];












Best regards,
 Richard
mailto:[EMAIL PROTECTED]






RE: [PHP] send data to a file composed of frames

2001-06-19 Thread Ray Hilton

The only real way I see you maintaining a session like that is to use
cookies or some sort of client identifier so you can keep trak of that
user and if ther are logged in or not.  Then you just have some sort of
flag that determines the course of action for your site.

I am not entirely sure what you mean by not being able to go back to the
previous page, this is perfectly possible, unless im missing the point

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: kaab kaoutar [mailto:[EMAIL PROTECTED]]
Sent: 15 June 2001 12:25
To: [EMAIL PROTECTED]
Subject: [PHP] send data to a file composed of frames


Hi guys!
I have a login in my site, some pictures and links are differents
depending
on being logged or not!
I thought of using sessions in the whole site, but the disadvantage is
that,
we can never go back in a the previous page, when using sessions. i
thought of using a hidden input in each page but some or rather almost
all
my pages are composed of frames and therefore the frames don't receive
the
login status!
Can u please help ?
THanks

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.






RE: [PHP] Multipe Tables, Single Query Problem

2001-06-19 Thread Ray Hilton

Something like:

SELECT name, title, description from videos, actors, links where
actors.ID = links.ID and videos.ID=videoID, and videos.ID = 20; ?

But in just want one row?  You could return all the names in one row (I
think) using MySQL (I assume?) string functions...  I have a funny
feeling you need a sub select, which mysql doesn’t support...

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Simon Kimber [mailto:[EMAIL PROTECTED]]
Sent: 06 June 2001 14:57
To: [EMAIL PROTECTED]
Subject: [PHP] Multipe Tables, Single Query Problem


Hi all,

I have three tables in my (mysql) database:

videos - ID, title, description, etc..
links - ID, videoID, actorID
actors - ID, name, dateofbirth, gender, etc...

what i need to do is return a particular video and all it's staring
actors with just one query returning just one row, ie. with all the
actor names in one field... is this possible? or do i have to get the
video data first and then the actors separately?

Simon Kimber
Funny.co.uk - The Comedy Portal
http://www.funny.co.uk/

Now Incorporating: The UK Live Comedy Directory
FREE promotion for UK Comedy Acts and Venues
http://www.funny.co.uk/uklive/

eml. [EMAIL PROTECTED]
icq. 16156911







RE: [PHP] [php]using sendmail with php

2001-06-19 Thread Ray Hilton

I assume you could do it like in perl:

Open(MAIL, |/usr/lib/sendmail);
Print MAIL OUTPUT;
To: ray [EMAIL PROTECTED]
From: someone [EMAIL PROTECTED]
Subject: blah blah

Note the line break before the body, blah blah blah
OUTPUT
Close(MAIL)

I have no idea how you would do this in php, but I hope its at least
points you in the right direction...  Im not sure if php allows you to
open a pipe to another program.

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 06:04
To: PHP General List (E-mail)
Subject: [PHP] [php]using sendmail with php


hey-
i noticed a recent post about the weird email that someone was getting
from a script that emails form data. I was curious on whether or not I
could use sendmail with php, to possibly get around this problem(I've
run into it myself). How might i do this?...

chris






RE: [PHP] Turning Off Headers

2001-06-20 Thread Ray Hilton

If your using the standalone binary, I /think/ its something like php -q

If it's the module in apache, you will have a problem as apache itself
will add a certain degree of header information.

-Original Message-
From: Meles Meles [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 14:03
To: [EMAIL PROTECTED]
Subject: [PHP] Turning Off Headers


Is there any way to tell PHP to NOT produce a Mime Header?

None, none at all... Not a Content-type:, nothing...

Badger
[EMAIL PROTECTED]

---








RE: [PHP] HELP problems running PHP4 script in CRON

2001-06-20 Thread Ray Hilton

At the top, put:

#!/path/to/php -q
?
...code...
?

The reason itsgiving you those errors is because it doesn’t no what
interpreter to use for the script.  Of course, your going to have to
have the standalone binary of php built, not the apache module.

On a side note, does anyone know if you can get php to build both at the
same time?  The binary and the .so module?  At the moment, I just have
to compile twice.

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Splashy [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 15:29
To: [EMAIL PROTECTED]
Subject: [PHP] HELP problems running PHP4 script in CRON


Hi,

Please find script below and hopefully tell me why when I run it over
the web it works perfectly but when I run it using cron or in a telnet
session it errors saying no such file or directory.

THIS IS THE ERROR
/*
./fetch_news.php: ?: No such file or directory
./fetch_news.php: syntax error near unexpected token
`fetchnews($mysourcefile,$m youtputfile,$myflashvar)' */

THIS IS THE SCRIPT
?
#Requires 3 Params
#$mysourcefile = path to content source html file #$myoutputfile = path
to content output html file #$myflashvar  = Flash variable you wish to
assign the content to eg:mynews, mytechnology

function fetchnews($mysourcefile,$myoutputfile,$myflashvar)
{
 $mysource=fopen($mysourcefile,r) or die (Couldn't open the
Source file);
 $myoutput=fopen($myoutputfile,w) or die (Couldn't open the
Output file);;
 fwrite($myoutput,$myflashvar);
 while (!feof($mysource))
  {
   $myline=fgets($mysource, 1024);
   $stripquotes=eregi_replace(#039,`,$myline);
   $stripcolors=eregi_replace(COLOR=\#.*\,,$myline);
   if (eregi('^a.*\/abr',$stripcolors))

{
 $newanchor=eregi_replace(br,,$stripcolors);
 fwrite($myoutput,$newanchorbr);
}
  }
 fclose($myoutput);
 fclose($mysource);
}
?
?
fetchnews(http://www.moreover.com/cgi-local/page?c=Graphics%20industry%
20ne
wso=html,graphicsnews.php,mynews=);
?

All help and advise is as always gratefully received!
Splashy.







RE: [PHP] SetCookie weirdness

2001-06-20 Thread Ray Hilton

This is actually a security feature of cookies, so that domains that
don’t match your cookie cannot read personal details set by another
site.  Don't worry, its all in order ;)

Ray Hilton
-
[EMAIL PROTECTED]
http://rayh.co.uk

-Original Message-
From: Tomaz Kovacic [mailto:[EMAIL PROTECTED]]
Sent: 19 June 2001 12:36
To: [EMAIL PROTECTED]
Subject: [PHP] SetCookie weirdness


Hi!

Last night I've found some interesting cookie behavior. I was testing
some script on my local server, so I used short version of domain (
http://www ) to reach local webserver. My script stopped working, so I
started to investigate a little bit what's goin on..

I've managed to get my script working only when i user SetCookie command
with only 3 parameters:

SetCookie (mycookie, $cookie, time()+1200);

My usual form of setting cookie is with all 6 arguments like:
SetCookie(mycookie, $cookie, time()+1200, /, .domain.com, 0);

But if I use longer form if domain: www.local (same as
www.somedomaing.com) my longer form of  setting cookie started to work
again.

Weird.

Anyone experianced similar problems?

Tomaz






<    1   2   3   4   5   6   7   8   9   >