Re: [PHP] new line function

2004-09-01 Thread John Holmes
Curt Zirzow wrote:
$fixed = preg_replace("/(\r?\n)|\r/",'',$oldstring);
on retrosopect.. reading into that regex i get:
unix: sets the standard to use \n
windows: can't really decide on \r or \n so just uses them both
mac: goes oposite of everybody and used \r instead.
It seems OS's can simply be described on how they treat EOL, all the
rest of the differences are side effects of this behaviour.
Yeah, of course... Think of how secure windows would be if they just 
used \n! ;)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] new line function

2004-09-01 Thread Curt Zirzow
* Thus wrote Curt Zirzow:
> * Thus wrote John Holmes:
> > Tonny Robertus wrote:
> > 
> > >is there any function to replace \n to  that we can see the results in 
> > >html source code (not in preview)?
> > 
> > $fixed = preg_replace("/(\r?\n)|\r/",'',$oldstring);

on retrosopect.. reading into that regex i get:

unix: sets the standard to use \n
windows: can't really decide on \r or \n so just uses them both
mac: goes oposite of everybody and used \r instead.

It seems OS's can simply be described on how they treat EOL, all the
rest of the differences are side effects of this behaviour.

:)

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



Re: [PHP] new line function

2004-09-01 Thread Curt Zirzow
* Thus wrote John Holmes:
> Tonny Robertus wrote:
> 
> >is there any function to replace \n to  that we can see the results in 
> >html source code (not in preview)?
> 
> $fixed = preg_replace("/(\r?\n)|\r/",'',$oldstring);

again.. your the master of perfection :)

unix, dos, mac.. no matter, it still works!

Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



Re: [PHP] General copyright question

2004-09-01 Thread Curt Zirzow
* Thus wrote Kevin:
> Hi there,
> 
> I have seen some scripts that are copyrighted and one can not modify or use
> it for purpose. There are many variations in the conditions. My questions
> are...
> 
> 1) Are these scripts legally copyrighted. I mean do we need to register the
> script at some office or what?

Any piece work is copyrighted as soon as it is written. Even if no
(c) is attached to it. The best description I find on googles'
'define: copyright' is:

 By law, copyright exists from the time of creation of "an original
 work of authorship fixed in a tangible medium of expression."

It is then up to the author of the copyright to secure their right
of authorship, aka obtaining a registration of copyrightness with
the US government. A notice  of copyright on a document/piece of
work simply is a notice of authorship and when the authorship
occured.

> 
> 2) If yes how can I make my script fall under copyright act.

see above.

see also: http://www.copyright.gov/

> 
> 3) Is it country dependent?

I'm only aware of US copyright's... other contries may/not differ.


(c) Curt Zirzow, Sept 2004
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



Re: [PHP] new line function

2004-09-01 Thread John Holmes
Tonny Robertus wrote:
is there any function to replace \n to  that we can see the results in 
html source code (not in preview)?
$fixed = preg_replace("/(\r?\n)|\r/",'',$oldstring);
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] new line function

2004-09-01 Thread Tonny Robertus
hi,

is there any function to replace \n to  that we can see the results in 
html source code (not in preview)?

i tried nl2br, str_replace, and ereg_replace. but all of them work just in 
page preview. when i looked in page source, the strings remain the same.

here i enclose strings i got in page source...
original:

this is the first line
and this is the second
this is the third


using nl2br function:

this is the first line
and this is the second
this is the third


my expectation:

this is the first lineand this is the secondthis is the third


i need this cause i'll send this string with javascript. if i used nl2br, i 
got message in javascript console like this:

Error: unterminated string literal
update("this is the first line

:-(


thanx


-- 

Dominus Tecum

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



RE: [PHP] General copyright question

2004-09-01 Thread Ed Lazor
Google:  "how to copyright"


> -Original Message-
> From: Kevin [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 01, 2004 8:41 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] General copyright question
> 
> Hi there,
> 
> I have seen some scripts that are copyrighted and one can not modify or
> use
> it for purpose. There are many variations in the conditions. My questions
> are...
> 
> 1) Are these scripts legally copyrighted. I mean do we need to register
> the
> script at some office or what?
> 
> 2) If yes how can I make my script fall under copyright act.
> 
> 3) Is it country dependent?
> 
> Thank a ton for your time.
> --
> Kevin Javia
> 
> --
> 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 copyright question

2004-09-01 Thread Kevin
Hi there,

I have seen some scripts that are copyrighted and one can not modify or use
it for purpose. There are many variations in the conditions. My questions
are...

1) Are these scripts legally copyrighted. I mean do we need to register the
script at some office or what?

2) If yes how can I make my script fall under copyright act.

3) Is it country dependent?

Thank a ton for your time.
-- 
Kevin Javia

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



Re: [PHP] print at a specific time

2004-09-01 Thread Brent Clements
Sorry forgot to enclose the variable values. doh!

I needs more coffee!

-Brent
- Original Message - 
From: "John Holmes" <[EMAIL PROTECTED]>
To: "Brent Clements" <[EMAIL PROTECTED]>
Cc: "devil_online" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 10:12 PM
Subject: Re: [PHP] print at a specific time


> Brent Clements wrote:
>
> > $minute = 01;
>
> Be careful with the leading zeros... that's interpreted as an Octal
> number by PHP, but Octal 1 == Decimal 1 in this case. :)
>
> -- 
>
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] print at a specific time

2004-09-01 Thread John Holmes
Brent Clements wrote:
$minute = 01;
Be careful with the leading zeros... that's interpreted as an Octal 
number by PHP, but Octal 1 == Decimal 1 in this case. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] print at a specific time

2004-09-01 Thread Brent Clements


- Original Message - 
From: "devil_online" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 9:05 PM
Subject: Re: [PHP] print at a specific time


> and to print at minutes too, kije 9h01?
> 
> thanks
> "John Holmes" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > devil_online wrote:
> >
> > > Hi, I want to print or echo something in a specific time like 9.pm.
> > > how can i do it?
> >
> > if(date('H')==21)
> > { echo "'tis 9pm and all is well?"; }
> >
> > -- 
> >
> > ---John Holmes...
> >
> > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> >
> > php|architect: The Magazine for PHP Professionals - www.phparch.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



RE: [PHP] Re: mail() function problem

2004-09-01 Thread Lone Wolf
What you need to do is set your SMTP server inside the php.ini file...


[mail function] 
SMTP = smtp.server.com  ; for win32 only 
sendmail_from = [EMAIL PROTECTED] ; for win32 only 
;sendmail_path = ;for unix only, may supply arguments as well ; (default is
sendmail -t) 

The test string I used to make sure my example worked: 


Robert

> -Original Message-
> From: Dre [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 01, 2004 6:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: mail() function problem
> 
> 
> Sorry .. but I'm really so new at this
> I'm using Apache Server on a MS Windows XP Pro. OS, and I'm 
> trying to send a mail through a form .. what do I need to 
> install or configure to be able to do this.
> 
> thanks in advance
> 
> 
> "Dre" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> > I'm using an Apache server .. doesn't it come with a 
> sendmail program 
> > ?? I really don't know
> >
> > "Jasper Howard" <[EMAIL PROTECTED]> wrote in message 
> > news:[EMAIL PROTECTED]
> > > do you have a sendmail program on your testing server?
> > >
> > > --
> > >
> > >
> > > -->>
> > > Jasper Howard :: Database Administration
> > > Velocity7
> > > 1.530.470.9292
> > > http://www.Velocity7.com/
> > > <<--
> > > "Dre" <[EMAIL PROTECTED]> wrote in message 
> > > news:[EMAIL PROTECTED]
> > > > Hi
> > > > I was trying to use the mail() function, but it did not work, 
> > > > maybe
> > > because
> > > > of some settings problem or something that I can't figure out
> > > >
> > > > I went online and tried to execute the following 
> > > > //===
> > > >> > >  $from = $_POST['from'];
> > > >  $subject = $_POST['subject'];
> > > >  $content = $_POST['content'];
> > > >  $to = "[EMAIL PROTECTED]";
> > > >$headers = "From:".$from;
> > > >  if(mail($to, $subject, $content, "From: $from")) {
> > > > echo"sent";
> > > > }
> > > >  else{ echo "not sent";
> > > >  }
> > > >  ?>
> > > > //===
> > > > the variable values sent from a Form in another and 
> they are sent
> > > correctly
> > > >
> > > > but I keep having this error 
> > > > //===
> > > > Warning: mail(): Failed to connect to mailserver at "localhost" 
> > > > port
> 25,
> > > > verify your "SMTP"
> > > > and "smtp_port" setting in php.ini or use ini_set() in 
> C:\Program 
> > > > Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
> > 194
> > > > //===
> > > >
> > > >
> > > > my php.ini settings for the mail function are
> > > >
> > > > //=
> > > > [mail function]
> > > > ; For Win32 only.
> > > > SMTP = localhost
> > > >
> > > > smtp_port = 25
> > > > sendmail_from = [EMAIL PROTECTED] //=
> > > >
> > > > thanks in advance
> > > > Dre,
> 
> -- 
> 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: mail() function problem

2004-09-01 Thread Pahlevanzadeh Mohsen
If you use Windows as your server,You must install
M$Exchange server.It is a mailserver under Windows.
Of course,If you want to install Linux,I can help u.
It has benefit for u.
Even i made a group on yahoo "phplovers".
You can join to my group & will get help.
It has 56 members.
My email address is 
m_pahlevanzadeh at yahoo dot com
If you have a question on Linux,I can help u.
But it is your chioce...Linux or Windows.
When you develop under windows,You must upload it to
an UNIX box.May be you will have problem.
Please start with Linux as your OS.
Yours,Mohsen
--- Dre <[EMAIL PROTECTED]> wrote:

> Sorry .. but I'm really so new at this
> I'm using Apache Server on a MS Windows XP Pro. OS,
> and I'm trying to send a
> mail through a form ..
> what do I need to install or configure to be able to
> do this.
> 
> thanks in advance
> 
> 
> "Dre" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I'm using an Apache server .. doesn't it come with
> a sendmail program ??
> > I really don't know
> >
> > "Jasper Howard" <[EMAIL PROTECTED]> wrote in
> message
> > news:[EMAIL PROTECTED]
> > > do you have a sendmail program on your testing
> server?
> > >
> > > -- 
> > >
> > >
> > >
>
-->>
> > > Jasper Howard :: Database Administration
> > > Velocity7
> > > 1.530.470.9292
> > > http://www.Velocity7.com/
> > >
>
<<--
> > > "Dre" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > Hi
> > > > I was trying to use the mail() function, but
> it did not work, maybe
> > > because
> > > > of some settings problem or something that I
> can't figure out
> > > >
> > > > I went online and tried to execute the
> following
> > > >
>
//===
> > > >> > >  $from = $_POST['from'];
> > > >  $subject = $_POST['subject'];
> > > >  $content = $_POST['content'];
> > > >  $to = "[EMAIL PROTECTED]";
> > > >$headers = "From:".$from;
> > > >  if(mail($to, $subject, $content, "From:
> $from")) {
> > > > echo"sent";
> > > > }
> > > >  else{ echo "not sent";
> > > >  }
> > > >  ?>
> > > >
> //===
> > > > the variable values sent from a Form in
> another and they are sent
> > > correctly
> > > >
> > > > but I keep having this error
> > > >
> //===
> > > > Warning: mail(): Failed to connect to
> mailserver at "localhost" port
> 25,
> > > > verify your "SMTP"
> > > > and "smtp_port" setting in php.ini or use
> ini_set() in
> > > > C:\Program Files\Apache
> Group\Apache2\htdocs\mysite/myfile.php on line
> > 194
> > > >
> //===
> > > >
> > > >
> > > > my php.ini settings for the mail function are
> > > >
> > > > //=
> > > > [mail function]
> > > > ; For Win32 only.
> > > > SMTP = localhost
> > > >
> > > > smtp_port = 25
> > > > sendmail_from = [EMAIL PROTECTED]
> > > > //=
> > > >
> > > > thanks in advance
> > > > Dre,
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator  & programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: [PHP] print at a specific time

2004-09-01 Thread devil_online
and to print at minutes too, kije 9h01?

thanks
"John Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> devil_online wrote:
>
> > Hi, I want to print or echo something in a specific time like 9.pm.
> > how can i do it?
>
> if(date('H')==21)
> { echo "'tis 9pm and all is well?"; }
>
> -- 
>
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com

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



Re: [PHP] print at a specific time

2004-09-01 Thread John Holmes
devil_online wrote:
Hi, I want to print or echo something in a specific time like 9.pm.
how can i do it?
if(date('H')==21)
{ echo "'tis 9pm and all is well?"; }
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Jason Wong
On Thursday 02 September 2004 08:30, blackwater dev wrote:
> the date is a very good question?  Here is the info from my system
>
> -rwxr-xr-x1 root root  1371932 Sep  1 19:50 /usr/bin/php
>
> Not sure why its showing that date - Apache has been restarted.

But that's probably your php-cli version. Are you using the Apache module 
version of PHP? I didn't see it in the configure command you posted 
previously.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A father doesn't destroy his children.
-- Lt. Carolyn Palamas, "Who Mourns for Adonais?",
   stardate 3468.1.
*/

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



Re: [PHP] PHP Cached Templates

2004-09-01 Thread raditha dissanayake
rogue wrote:
On Sep 1, 2004, at 12:01 AM, raditha dissanayake wrote:
charles kline wrote:
On Aug 31, 2004, at 9:18 PM, raditha dissanayake wrote:
rogue wrote:
Sorry if this is the wrong place for this post. I am having 
problems where PHP templates that I modify via ftp are not showing 
changes for like 1 minute or so. I assume this is some kind of 
server caching but I am not sure how to adjust this (it is my 
development server). Running Apache server.

It could well be a caching issue are you working behind a proxy? 
what are your browser cache settings?


No proxy, and I don't have any caching issues with my production 
server. Guess I will keep searching :)

How about giving some more information like your php version, 
webserver etc ?


Sure. Thanks for the help etc. :)
Running Mac OS X Server 10.3
PHP Version: 4.3.2
Apache Version: Apache/1.3.28
What else is good to know?
There aren't any major problems with that combination AFAIK.  YOu have 
not told us if your server is at a remote location or not - since you 
are using FTP i guess it could be. Did you consider the posibility that 
there may be a transparent proxy somewhere in between you and the 
server? the whole idea of a transparent proxy is that the user's don't 
know about it, so you might need to ask your sysadmin.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Need direction on PHP-CLI MUD Server

2004-09-01 Thread Don Myers
Hello, I have been banging my head trying to figure out how to design a MUD
Server using PHP-CLI as the server and PHP-CLI as the "command" language.
(telnet front end at this point)

I have found the great Pear Net_Server which seems to work really good for
Alpha and the Forking Mode is great to really take advantage of threading
etc... I can of course exec("external.php") to run the external commands

but 

The real problem is full interaction with the user in those external
commands (php-cli scripts) to send and read data.

For example:

The PHP-CLI Server gets the command "bank" so it runs the PHP-CLI shell
script "bank.php" using $r = exec("bank.php"). The "bank.php" shell script
has the following code

#!/usr/local/bin/php -q


A. How do I create a input method to connect the external PHP script to the
Server's Socket?

B. Since the PHP-CLI script never ends how can I send the first echo "You
have..."?

Any Ideas??? Heck I havn't even gotten to ncurses yet!

BTW platform UNIX-OS X+PHP 5 --with-ncurses --enable-pcntl --mysql
Going for 100% PHP-CLI

D Myers

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



Re: [PHP] phpbb multiforums

2004-09-01 Thread raditha dissanayake
Xongoo!com: Central unit wrote:
Holla friends,
I have a code which separates phpBB forums, but
run into problems because of cookies when
*switching between forums*. Should I get rid of
cookies entirely (I am rewriting entire code to
passing $forum variable) or something may be done
(still I am learning php :)
 

Please try the phpBB group
--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Handling XML output in a slim way

2004-09-01 Thread raditha dissanayake
Markus Fischer wrote:
Hi,
up until now, when outputing XML I've been constructing the output as 
a continous string-soup in such ways like

[...]
$xml .= printf('%s', makeXmlSave($name), 
makexmlSave($contentOfItem));
[...]

makeXmlSave() makes sure that quotes, ampersand, < and > are properly 
escaped with their entity reference. However I was thinking if it 
wasn't possible to e.g. generated a a complete DOM tree first and then 
just having this tree being dumped as XML.

If it's not broken don't fix it. If what you are doing right now works 
stick with it because it consumes very little memory or CPU compared to 
DOM functions.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Jennifer Goodie


-- Original message from blackwater dev : -- 

> the date is a very good question? Here is the info from my system 
> 
> -rwxr-xr-x 1 root root 1371932 Sep 1 19:50 /usr/bin/php 
> 
> Not sure why its showing that date - Apache has been restarted. 
> 

Are you sure apache is loading the version you just built and not an old one in some 
other location (possibly /etc)? Did you read the install instructions for PHP with 
Apache 2.0 on a Linux system?  Check step 14 and make sure you are loading the module 
from the correct location.  Just a guess, but since none of your new configure flags 
are showing on the php info page and the build time is old, it looks like you are not 
running from the location you think you are.

http://us3.php.net/manual/en/install.unix.apache2.php   

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



[PHP] print at a specific time

2004-09-01 Thread devil_online
Hi, I want to print or echo something in a specific time like 9.pm.
how can i do it?

thanks

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread blackwater dev
the date is a very good question?  Here is the info from my system

-rwxr-xr-x1 root root  1371932 Sep  1 19:50 /usr/bin/php

Not sure why its showing that date - Apache has been restarted.


On Wed, 01 Sep 2004 22:29:41 +, Jennifer Goodie <[EMAIL PROTECTED]> wrote:
> -- Original message from blackwater dev : --
> 
> > I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds
> > It all appears to compile correctly, except the info page does not
> > reflect the config was done with mssql at all. below is a snippet of
> > the config switches that were used.
> 
> > > http://mwvre.ht-tech.net/info.php
> 
> It also shows a build date in June.  Did you restart apache?
>

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



[PHP] My problem

2004-09-01 Thread Pahlevanzadeh Mohsen
Dears,
My mysqld is up.
I inserted mohsen as username,& md5 of mohsen as
password.
I have mem as bank.usernames as my table.& i have user
& pass as my fields.
i inserted mohsen as user & md5 of it as pass.
It are meaning : mohsen :
80393af8b3d99736c8b0d49d9a9da4ffxxx
But my code isn't work:
";
  echo " ";
  echo " ";
  echo "";
  echo "";
 }
 $username=$_POST['u'];
 $password=$_POST['p'];
$parameterforauth=array("dsn"=>"mysql://$username:[EMAIL PROTECTED]/mem",
 "table"=>"usernames",
 "usernamecol"=>"user",
 "passwordcol"=>"pass");
 $ptr_auth_C=new Auth("DB",$parameterforauth,'Login');
 $ptr_auth_C->start();
 if ($ptr_auth_C->getAuth())
   echo "Successfuly loggined!!!";
?>

I can't see "Successfuly loggined!!!"
Please guide me..
--Mohsen

=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator  & programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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



Re: [PHP] Re: mail() function problem

2004-09-01 Thread Pahlevanzadeh Mohsen
Please switch to a UNIX box.For example Fedora.
Because it has everythings that you need.
--- Dre <[EMAIL PROTECTED]> wrote:

> I'm using an Apache server .. doesn't it come with a
> sendmail program ??
> I really don't know
> 
> "Jasper Howard" <[EMAIL PROTECTED]> wrote in
> message
> news:[EMAIL PROTECTED]
> > do you have a sendmail program on your testing
> server?
> >
> > -- 
> >
> >
> >
>
-->>
> > Jasper Howard :: Database Administration
> > Velocity7
> > 1.530.470.9292
> > http://www.Velocity7.com/
> >
>
<<--
> > "Dre" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi
> > > I was trying to use the mail() function, but it
> did not work, maybe
> > because
> > > of some settings problem or something that I
> can't figure out
> > >
> > > I went online and tried to execute the following
> > >
>
//===
> > >> >  $from = $_POST['from'];
> > >  $subject = $_POST['subject'];
> > >  $content = $_POST['content'];
> > >  $to = "[EMAIL PROTECTED]";
> > >$headers = "From:".$from;
> > >  if(mail($to, $subject, $content, "From:
> $from")) {
> > > echo"sent";
> > > }
> > >  else{ echo "not sent";
> > >  }
> > >  ?>
> > >
> //===
> > > the variable values sent from a Form in another
> and they are sent
> > correctly
> > >
> > > but I keep having this error
> > >
> //===
> > > Warning: mail(): Failed to connect to mailserver
> at "localhost" port 25,
> > > verify your "SMTP"
> > > and "smtp_port" setting in php.ini or use
> ini_set() in
> > > C:\Program Files\Apache
> Group\Apache2\htdocs\mysite/myfile.php on line
> 194
> > >
> //===
> > >
> > >
> > > my php.ini settings for the mail function are
> > >
> > > //=
> > > [mail function]
> > > ; For Win32 only.
> > > SMTP = localhost
> > >
> > > smtp_port = 25
> > > sendmail_from = [EMAIL PROTECTED]
> > > //=
> > >
> > > thanks in advance
> > > Dre,
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator  & programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



Re: [PHP] usmap won't do it, ismap won't do it. What can I do?

2004-09-01 Thread Ben Tew
On Wed, 1 Sep 2004 13:28:24 -0400
 "John Holmes" <[EMAIL PROTECTED]> wrote:
From: "Btew" <[EMAIL PROTECTED]>
I need a php server side image map script.  Or rather a 
script that
will examine x,y coords and determine if they could fall 
within any of a 
number of area polygon or rect tags.

Then you'll have $_REQUEST['myimage_x'] and 
$_REQUEST['myimage_y'] as the coordinates that the user 
clicked.

---John Holmes... 
I tried using form input tags with client side image maps. 
Unfortunately that doesn't work.  The browser only 
returns the x,y coords.  I need a script that can take 
those coords and compare against standard polygon and rect 
 tags.  The rect tags I could write a script to 
parse myself, but the polygon tags are giving me trouble. 
I can't use plain img tags with usmap attributes, because 
the user can't be able to see the final URL.  So what I 
essentially need is a PHP client side image map script, 
because the final data will go to other PHP scripts.

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


Re: [PHP] Function Problem

2004-09-01 Thread Jim Grill
> I'm having a problem with a php application;
>
> I have two files: one is ccadduser wich adds users to a controlcenter
> that I am currently designing for a website.
>
> In that ccaduserfile I call for a function checkpermission(); this
> function is defined in another file called ccfunctions
>
> When a user does not have access to the script it should abort the
> script, this is done using a header("location: ccnopermission.php");
> statement
>
> But now it seems that while executing the function checkpermission()
> the code in ccadduser just keeps running and the database query that
> inserts the new user is executed before the user can be redirected to
> ccnopermission.
>
> Is there a way to make php wait until checkpermission is completely
executed?
>
> I know it is not a simple question, but I really need a solution to
> ensure the safety of my system.
>
> grtz & thanks
>
> DragonEye
>
After calling the header redirect call exit();

example:

header('Location: somewhere.php');
exit();

Jim Grill
Web-1 Hosting, LP
http://www.web-1hosting.net

> -- 
> 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] MSSQL, PHP and Linux

2004-09-01 Thread James Kaufman
On Wed, Sep 01, 2004 at 04:39:51PM -0400, blackwater dev wrote:
> I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds
> It all appears to compile correctly, except the info page does not
> reflect the config was done with mssql at all.  below is a snippet of
> the config switches that were used.
> 
> --enable-ftp \
> --enable-magic-quotes \
> --enable-safe-mode \
> --enable-sockets \
> --enable-sysvsem \
> --enable-sysvshm \
> --enable-discard-path \
> --enable-track-vars \
> --enable-trans-sid \
> --enable-yp \
> --enable-wddx \
> --without-oci8 \
> --with-pear=/usr/share/pear \
> --with-imap=shared \
> --with-imap-ssl \
> --with-kerberos=/usr/kerberos \
> --with-ldap=shared \
> --with-mysql=shared,%{_prefix} \
> --with-sybase=/usr/include/freetds \
> --with-mssql=/usr/include/freetds \
> 
> Any help would be appreciated.
> 
> thanks,
> 
> 

It looks like you compiled it OK. Did you do a 'make install' afterwards? Did
you restart the Apache server? I recently built PHP (4.3.8) with support for MS
SQL and that was all I needed to do.

-- 
Jim Kaufman
Linux Evangelist
public key 0x6D802619

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



Re: [PHP] mail() function problem

2004-09-01 Thread James Kaufman
On Wed, Sep 01, 2004 at 06:09:04PM +0300, Dre wrote:
> Hi
> I was trying to use the mail() function, but it did not work, maybe because
> of some settings problem or something that I can't figure out
> 
> I went online and tried to execute the following
> //===
> $from = $_POST['from'];
>  $subject = $_POST['subject'];
>  $content = $_POST['content'];
>  $to = "[EMAIL PROTECTED]";
>$headers = "From:".$from;
>  if(mail($to, $subject, $content, "From: $from")) {
> echo"sent";
> }
>  else{ echo "not sent";
>  }
>  ?>
> //===
> the variable values sent from a Form in another and they are sent correctly
> 
> but I keep having this error
> //===
> Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
> verify your "SMTP"
> and "smtp_port" setting in php.ini or use ini_set() in
> C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194
> //===
> 
> 
> my php.ini settings for the mail function are
> 
> //=
> [mail function]
> ; For Win32 only.
> SMTP = localhost
> 
> smtp_port = 25
> sendmail_from = [EMAIL PROTECTED]
> //=
> 
> thanks in advance
> Dre,
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Hmm. Your php.ini says that the smtp server is on localhost. The error message
says that the system can't connect to an smtp server on localhost. Perhaps your
smtp server is really at your ISP, say smtp.yourisp.com.

-- 
Jim Kaufman
Linux Evangelist
public key 0x6D802619

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



Re: [PHP] mail() function problem

2004-09-01 Thread Pahlevanzadeh Mohsen
Please install a mailserver until your SMTP server
will be up.
When your SMTP server is down,mail func doesn't work.
My suggesstion:
Please work under UNIX systems.
Yours,Mohsen
--- Dre <[EMAIL PROTECTED]> wrote:

> Hi
> I was trying to use the mail() function, but it did
> not work, maybe because
> of some settings problem or something that I can't
> figure out
> 
> I went online and tried to execute the following
>
//===
> $from = $_POST['from'];
>  $subject = $_POST['subject'];
>  $content = $_POST['content'];
>  $to = "[EMAIL PROTECTED]";
>$headers = "From:".$from;
>  if(mail($to, $subject, $content, "From:
> $from")) {
> echo"sent";
> }
>  else{ echo "not sent";
>  }
>  ?>
> //===
> the variable values sent from a Form in another and
> they are sent correctly
> 
> but I keep having this error
> //===
> Warning: mail(): Failed to connect to mailserver at
> "localhost" port 25,
> verify your "SMTP"
> and "smtp_port" setting in php.ini or use ini_set()
> in
> C:\Program Files\Apache
> Group\Apache2\htdocs\mysite/myfile.php on line 194
> //===
> 
> 
> my php.ini settings for the mail function are
> 
> //=
> [mail function]
> ; For Win32 only.
> SMTP = localhost
> 
> smtp_port = 25
> sendmail_from = [EMAIL PROTECTED]
> //=
> 
> thanks in advance
> Dre,
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator  & programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



[PHP] Re: mail() function problem

2004-09-01 Thread Jasper Howard
i use apache on my windows xp machine and have never gotten around to
settings up any kind of sendmail program, I'm pretty sure you have to
download one or atleast its some extra configuration.

-- 


-->>
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
<<--
"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using an Apache server .. doesn't it come with a sendmail program ??
> I really don't know
>
> "Jasper Howard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > do you have a sendmail program on your testing server?
> >
> > -- 
> >
> >
> > -->>
> > Jasper Howard :: Database Administration
> > Velocity7
> > 1.530.470.9292
> > http://www.Velocity7.com/
> > <<--
> > "Dre" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi
> > > I was trying to use the mail() function, but it did not work, maybe
> > because
> > > of some settings problem or something that I can't figure out
> > >
> > > I went online and tried to execute the following
> > > //===
> > >> >  $from = $_POST['from'];
> > >  $subject = $_POST['subject'];
> > >  $content = $_POST['content'];
> > >  $to = "[EMAIL PROTECTED]";
> > >$headers = "From:".$from;
> > >  if(mail($to, $subject, $content, "From: $from")) {
> > > echo"sent";
> > > }
> > >  else{ echo "not sent";
> > >  }
> > >  ?>
> > > //===
> > > the variable values sent from a Form in another and they are sent
> > correctly
> > >
> > > but I keep having this error
> > > //===
> > > Warning: mail(): Failed to connect to mailserver at "localhost" port
25,
> > > verify your "SMTP"
> > > and "smtp_port" setting in php.ini or use ini_set() in
> > > C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
> 194
> > > //===
> > >
> > >
> > > my php.ini settings for the mail function are
> > >
> > > //=
> > > [mail function]
> > > ; For Win32 only.
> > > SMTP = localhost
> > >
> > > smtp_port = 25
> > > sendmail_from = [EMAIL PROTECTED]
> > > //=
> > >
> > > thanks in advance
> > > Dre,

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



Re: [PHP] importing DBF data into mysql

2004-09-01 Thread Thornton
This is probably what your looking for

http://www.coolnet.cz/miro/dbf2mysql/dbf2mysql.tar.bz2

It should handle your needs

On Wed, 2004-09-01 at 14:08, PHP Junkie wrote:
> Ave,
> 
> Is there a PHP script that is able to import or convert DBF data into mySQL
> tables? 
> 
> I need to get my DBF data into mySQL and PHPMyAdmin couldn't handle it.
> Another problem I have is I'm running a MAC OS X... There is a very simple
> and efficient DBF2MYSQL program for windows but not for MAC.
> 
> I did see somewhere a PHP script that could do it, but I don't know where.
> 
> Thanks.
--
- Thornton  [EMAIL PROTECTED] -
- Cierra Grouphttp://www.cierragroup.com -
--

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



[PHP] Re: mail() function problem

2004-09-01 Thread Dre
Sorry .. but I'm really so new at this
I'm using Apache Server on a MS Windows XP Pro. OS, and I'm trying to send a
mail through a form ..
what do I need to install or configure to be able to do this.

thanks in advance


"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using an Apache server .. doesn't it come with a sendmail program ??
> I really don't know
>
> "Jasper Howard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > do you have a sendmail program on your testing server?
> >
> > -- 
> >
> >
> > -->>
> > Jasper Howard :: Database Administration
> > Velocity7
> > 1.530.470.9292
> > http://www.Velocity7.com/
> > <<--
> > "Dre" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Hi
> > > I was trying to use the mail() function, but it did not work, maybe
> > because
> > > of some settings problem or something that I can't figure out
> > >
> > > I went online and tried to execute the following
> > > //===
> > >> >  $from = $_POST['from'];
> > >  $subject = $_POST['subject'];
> > >  $content = $_POST['content'];
> > >  $to = "[EMAIL PROTECTED]";
> > >$headers = "From:".$from;
> > >  if(mail($to, $subject, $content, "From: $from")) {
> > > echo"sent";
> > > }
> > >  else{ echo "not sent";
> > >  }
> > >  ?>
> > > //===
> > > the variable values sent from a Form in another and they are sent
> > correctly
> > >
> > > but I keep having this error
> > > //===
> > > Warning: mail(): Failed to connect to mailserver at "localhost" port
25,
> > > verify your "SMTP"
> > > and "smtp_port" setting in php.ini or use ini_set() in
> > > C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
> 194
> > > //===
> > >
> > >
> > > my php.ini settings for the mail function are
> > >
> > > //=
> > > [mail function]
> > > ; For Win32 only.
> > > SMTP = localhost
> > >
> > > smtp_port = 25
> > > sendmail_from = [EMAIL PROTECTED]
> > > //=
> > >
> > > thanks in advance
> > > Dre,

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Jennifer Goodie
-- Original message from blackwater dev : -- 

> I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds 
> It all appears to compile correctly, except the info page does not 
> reflect the config was done with mssql at all. below is a snippet of 
> the config switches that were used. 

> > http://mwvre.ht-tech.net/info.php 

It also shows a build date in June.  Did you restart apache?

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



[PHP] Re: mail() function problem

2004-09-01 Thread Dre
I'm using an Apache server .. doesn't it come with a sendmail program ??
I really don't know

"Jasper Howard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> do you have a sendmail program on your testing server?
>
> -- 
>
>
> -->>
> Jasper Howard :: Database Administration
> Velocity7
> 1.530.470.9292
> http://www.Velocity7.com/
> <<--
> "Dre" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi
> > I was trying to use the mail() function, but it did not work, maybe
> because
> > of some settings problem or something that I can't figure out
> >
> > I went online and tried to execute the following
> > //===
> >>  $from = $_POST['from'];
> >  $subject = $_POST['subject'];
> >  $content = $_POST['content'];
> >  $to = "[EMAIL PROTECTED]";
> >$headers = "From:".$from;
> >  if(mail($to, $subject, $content, "From: $from")) {
> > echo"sent";
> > }
> >  else{ echo "not sent";
> >  }
> >  ?>
> > //===
> > the variable values sent from a Form in another and they are sent
> correctly
> >
> > but I keep having this error
> > //===
> > Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
> > verify your "SMTP"
> > and "smtp_port" setting in php.ini or use ini_set() in
> > C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line
194
> > //===
> >
> >
> > my php.ini settings for the mail function are
> >
> > //=
> > [mail function]
> > ; For Win32 only.
> > SMTP = localhost
> >
> > smtp_port = 25
> > sendmail_from = [EMAIL PROTECTED]
> > //=
> >
> > thanks in advance
> > Dre,

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



[PHP] Re: Function Problem

2004-09-01 Thread Jasper Howard
the checkpermission(); function should be run before php can pharse anything
farther down the script, try putting an exit; after the header() statement.

-- 


-->>
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
<<--
"Matthias Bauw" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm having a problem with a php application;
>
> I have two files: one is ccadduser wich adds users to a controlcenter
> that I am currently designing for a website.
>
> In that ccaduserfile I call for a function checkpermission(); this
> function is defined in another file called ccfunctions
>
> When a user does not have access to the script it should abort the
> script, this is done using a header("location: ccnopermission.php");
> statement
>
> But now it seems that while executing the function checkpermission()
> the code in ccadduser just keeps running and the database query that
> inserts the new user is executed before the user can be redirected to
> ccnopermission.
>
> Is there a way to make php wait until checkpermission is completely
executed?
>
> I know it is not a simple question, but I really need a solution to
> ensure the safety of my system.
>
> grtz & thanks
>
> DragonEye

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



[PHP] Re: mail() function problem

2004-09-01 Thread Jasper Howard
do you have a sendmail program on your testing server?

-- 


-->>
Jasper Howard :: Database Administration
Velocity7
1.530.470.9292
http://www.Velocity7.com/
<<--
"Dre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
> I was trying to use the mail() function, but it did not work, maybe
because
> of some settings problem or something that I can't figure out
>
> I went online and tried to execute the following
> //===
> $from = $_POST['from'];
>  $subject = $_POST['subject'];
>  $content = $_POST['content'];
>  $to = "[EMAIL PROTECTED]";
>$headers = "From:".$from;
>  if(mail($to, $subject, $content, "From: $from")) {
> echo"sent";
> }
>  else{ echo "not sent";
>  }
>  ?>
> //===
> the variable values sent from a Form in another and they are sent
correctly
>
> but I keep having this error
> //===
> Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
> verify your "SMTP"
> and "smtp_port" setting in php.ini or use ini_set() in
> C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194
> //===
>
>
> my php.ini settings for the mail function are
>
> //=
> [mail function]
> ; For Win32 only.
> SMTP = localhost
>
> smtp_port = 25
> sendmail_from = [EMAIL PROTECTED]
> //=
>
> thanks in advance
> Dre,

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



[PHP] Function Problem

2004-09-01 Thread Matthias Bauw
I'm having a problem with a php application;

I have two files: one is ccadduser wich adds users to a controlcenter
that I am currently designing for a website.

In that ccaduserfile I call for a function checkpermission(); this
function is defined in another file called ccfunctions

When a user does not have access to the script it should abort the
script, this is done using a header("location: ccnopermission.php");
statement

But now it seems that while executing the function checkpermission()
the code in ccadduser just keeps running and the database query that
inserts the new user is executed before the user can be redirected to
ccnopermission.

Is there a way to make php wait until checkpermission is completely executed?

I know it is not a simple question, but I really need a solution to
ensure the safety of my system.

grtz & thanks

DragonEye

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



RE: [PHP] xml tags interfere with php tags

2004-09-01 Thread Justin Palmer
Hi,

print '';

Regards,

Justin

-Original Message-
From: Josh Close [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 01, 2004 11:08 AM
To: PHP
Subject: [PHP] xml tags interfere with php tags


How do I get an xml tag to work with a php script?



php is trying to parse that.

-Josh

-- 
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] importing DBF data into mysql

2004-09-01 Thread PHP Junkie
Ave,

Is there a PHP script that is able to import or convert DBF data into mySQL
tables? 

I need to get my DBF data into mySQL and PHPMyAdmin couldn't handle it.
Another problem I have is I'm running a MAC OS X... There is a very simple
and efficient DBF2MYSQL program for windows but not for MAC.

I did see somewhere a PHP script that could do it, but I don't know where.

Thanks.

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



[PHP] mail() function problem

2004-09-01 Thread Dre
Hi
I was trying to use the mail() function, but it did not work, maybe because
of some settings problem or something that I can't figure out

I went online and tried to execute the following
//===
  
//===
the variable values sent from a Form in another and they are sent correctly

but I keep having this error
//===
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP"
and "smtp_port" setting in php.ini or use ini_set() in
C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194
//===


my php.ini settings for the mail function are

//=
[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25
sendmail_from = [EMAIL PROTECTED]
//=

thanks in advance
Dre,

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



[PHP] mail() function problem

2004-09-01 Thread Dre
Hi
I was trying to use the mail() function, but it did not work, maybe because
of some settings problem or something that I can't figure out

I went online and tried to execute the following
//===
  
//===
the variable values sent from a Form in another and they are sent correctly

but I keep having this error
//===
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP"
and "smtp_port" setting in php.ini or use ini_set() in
C:\Program Files\Apache Group\Apache2\htdocs\mysite/myfile.php on line 194
//===


my php.ini settings for the mail function are

//=
[mail function]
; For Win32 only.
SMTP = localhost

smtp_port = 25
sendmail_from = [EMAIL PROTECTED]
//=

thanks in advance
Dre,

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Ben Ramsey
Just try --with-mssql=/usr/include instead. Is that where freetds is 
installed for you? I think it's in /usr/local for me, so I use 
--with-mssql=/usr/local.

Blackwater Dev wrote:
I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds
It all appears to compile correctly, except the info page does not
reflect the config was done with mssql at all.  below is a snippet of
the config switches that were used.
--enable-ftp \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-discard-path \
--enable-track-vars \
--enable-trans-sid \
--enable-yp \
--enable-wddx \
--without-oci8 \
--with-pear=/usr/share/pear \
--with-imap=shared \
--with-imap-ssl \
--with-kerberos=/usr/kerberos \
--with-ldap=shared \
--with-mysql=shared,%{_prefix} \
--with-sybase=/usr/include/freetds \
--with-mssql=/usr/include/freetds \
Any help would be appreciated.
thanks,
On Wed, 1 Sep 2004 08:29:55 -1200, blackwater dev
<[EMAIL PROTECTED]> wrote:
We just tried again with the -mssql switch but it still doesn't seem
to be therethe -mssql isn't on the info page...I don't have a
clue...
http://mwvre.ht-tech.net/info.php

On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey <[EMAIL PROTECTED]> wrote:
Like I and others have said, you need to compile PHP --with-mssql

Blackwater Dev wrote:
No, I was using the mssql functions which I want to use.
I tried the dbx functions example:
$link = dbx_connect('mssql', $mssqldbhost,"",$mssqldbuser,$mssqldbpass);
but go the error that the mssql module isn't loaded.
On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes <[EMAIL PROTECTED]> wrote:

From: "blackwater dev" <[EMAIL PROTECTED]>
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?
Are you using the dbx functions and not mssql_connect/pconnect()??
http://www.php.net/manual/en/ref.dbx.php
---John Holmes...
--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE

--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] stream wrappers

2004-09-01 Thread jarell
I do check it for a limit, there's lots of other code that doesn't 
really involve checking to see whether a file was completely downloaded 
by a client. This doesn't too because the $location in one of the funcs. 
would be empty, but I think the main part is there.
Is there some way to control when the stream gets written to the output 
buffer? Maybe with Apache?

Jarell
John Holmes wrote:
I don't really understand why you're using a custom stream here or 
what you're hoping to accomplish. you're incrementing the download 
count, but not really checking it for any limit. It wouldn't really 
make sense to put the checks in the stream. Check them outside of it 
and either show an error message in HTML or send the file headers and 
the data with readfile() and the normal file:// stream.

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


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread blackwater dev
I have tried recompiling with --with-mssql and --with-mssql=/usr/include/freetds
It all appears to compile correctly, except the info page does not
reflect the config was done with mssql at all.  below is a snippet of
the config switches that were used.

--enable-ftp \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-discard-path \
--enable-track-vars \
--enable-trans-sid \
--enable-yp \
--enable-wddx \
--without-oci8 \
--with-pear=/usr/share/pear \
--with-imap=shared \
--with-imap-ssl \
--with-kerberos=/usr/kerberos \
--with-ldap=shared \
--with-mysql=shared,%{_prefix} \
--with-sybase=/usr/include/freetds \
--with-mssql=/usr/include/freetds \

Any help would be appreciated.

thanks,


On Wed, 1 Sep 2004 08:29:55 -1200, blackwater dev
<[EMAIL PROTECTED]> wrote:
> We just tried again with the -mssql switch but it still doesn't seem
> to be therethe -mssql isn't on the info page...I don't have a
> clue...
> 
> http://mwvre.ht-tech.net/info.php
> 
> 
> 
> On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey <[EMAIL PROTECTED]> wrote:
> > Like I and others have said, you need to compile PHP --with-mssql
> >
> >
> >
> >
> > Blackwater Dev wrote:
> > > No, I was using the mssql functions which I want to use.
> > >
> > > I tried the dbx functions example:
> > > $link = dbx_connect('mssql', $mssqldbhost,"",$mssqldbuser,$mssqldbpass);
> > >
> > > but go the error that the mssql module isn't loaded.
> > >
> > > On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes <[EMAIL PROTECTED]> wrote:
> > >
> > >>From: "blackwater dev" <[EMAIL PROTECTED]>
> > >>
> > >>>I need some help...I am helping a local business with a site which
> > >>>needs to connect to a mssql db, my webhost uses linux and compiled php
> > >>>with the freetds library and when I go to the info page..it does show
> > >>>Microsoft SQL Server under dbx yet I still get the errors "called to
> > >>>undefined function mssql_pconnect()"...what can I try next?
> > >>
> > >>Are you using the dbx functions and not mssql_connect/pconnect()??
> > >>
> > >>http://www.php.net/manual/en/ref.dbx.php
> > >>
> > >>---John Holmes...
> > >>
> >
> > --
> > Regards,
> > Ben Ramsey
> > http://benramsey.com
> >
> > ---
> > http://www.phpcommunity.org/
> > Open Source, Open Community
> > Visit for more information or to join the movement.
> > ---
> >
> > PGP Key ID: 0x3968B5EE
> >
>

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



Re: [PHP] Re: register global off

2004-09-01 Thread Marek Kilimajer
$_POST, not $POST
Afan Pasalic wrote:
I think I am  a little bit "confused" about  $HTTP_POST_VARS and  $_POST.
php.net manual: Note that $HTTP_POST_VARS and $_POST are different 
variables and that PHP handles them as such
http://us4.php.net/reserved.variables

?
And the example I wrote still doesn't work:

name 


After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and  
$POST['SubmitForm'] is empty.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Matt M.
On Wed, 1 Sep 2004 13:08:11 -0500, Josh Close <[EMAIL PROTECTED]> wrote:
> How do I get an xml tag to work with a php script?
> 
> 
> 
> php is trying to parse that.

you could just echo it at the top

';?>

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



Re: [PHP] Re: register global off

2004-09-01 Thread John Nichel
Afan Pasalic wrote:
I think I am  a little bit "confused" about  $HTTP_POST_VARS and  $_POST.
php.net manual: Note that $HTTP_POST_VARS and $_POST are different 
variables and that PHP handles them as such
http://us4.php.net/reserved.variables

?
And the example I wrote still doesn't work:

name 


After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and  
$POST['SubmitForm'] is empty.
It's $_POST
You're missing the underscore.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] stream wrappers

2004-09-01 Thread John Holmes
From: "jarell" <[EMAIL PROTECTED]>
Here's my db_update function then your code with some mods:

function update_db($location) {
require_once('/usr/home/doc/mysqlconnect.php');
$query = "SELECT dl_count FROM downloads WHERE filelocation = 
'$location'";
$result = mysql_query($query);
$dl_count = mysql_result($result, 0, "dl_count");
$dl_count++;
$update = "UPDATE downloads SET dl_count = '$dl_count' WHERE filelocation 
= '$location'";
$result = mysql_query($update);
if(!$result) { mysql_close(); die(); }
mysql_close();
}

class onetime {
var $fp = FALSE;
function stream_open($path, $mode, $options, $opened_path) {
[snip]
stream_wrapper_register("one","onetime") or die();
readfile("one://$filelocation");
I don't really understand why you're using a custom stream here or what 
you're hoping to accomplish. you're incrementing the download count, but not 
really checking it for any limit. It wouldn't really make sense to put the 
checks in the stream. Check them outside of it and either show an error 
message in HTML or send the file headers and the data with readfile() and 
the normal file:// stream.

---John Holmes... 

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


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread blackwater dev
We just tried again with the -mssql switch but it still doesn't seem
to be therethe -mssql isn't on the info page...I don't have a
clue...

http://mwvre.ht-tech.net/info.php

On Wed, 01 Sep 2004 15:08:41 -0400, Ben Ramsey <[EMAIL PROTECTED]> wrote:
> Like I and others have said, you need to compile PHP --with-mssql
> 
> 
> 
> 
> Blackwater Dev wrote:
> > No, I was using the mssql functions which I want to use.
> >
> > I tried the dbx functions example:
> > $link = dbx_connect('mssql', $mssqldbhost,"",$mssqldbuser,$mssqldbpass);
> >
> > but go the error that the mssql module isn't loaded.
> >
> > On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes <[EMAIL PROTECTED]> wrote:
> >
> >>From: "blackwater dev" <[EMAIL PROTECTED]>
> >>
> >>>I need some help...I am helping a local business with a site which
> >>>needs to connect to a mssql db, my webhost uses linux and compiled php
> >>>with the freetds library and when I go to the info page..it does show
> >>>Microsoft SQL Server under dbx yet I still get the errors "called to
> >>>undefined function mssql_pconnect()"...what can I try next?
> >>
> >>Are you using the dbx functions and not mssql_connect/pconnect()??
> >>
> >>http://www.php.net/manual/en/ref.dbx.php
> >>
> >>---John Holmes...
> >>
> 
> --
> Regards,
> Ben Ramsey
> http://benramsey.com
> 
> ---
> http://www.phpcommunity.org/
> Open Source, Open Community
> Visit for more information or to join the movement.
> ---
> 
> PGP Key ID: 0x3968B5EE
>

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



Re: [PHP] usmap won't do it, ismap won't do it. What can I do?

2004-09-01 Thread John Holmes
From: "Ben Tew" <[EMAIL PROTECTED]>
So what I essentially need is a PHP client side image map script, because 
the final data will go to other PHP scripts.
No, what you need is a client side image map which is unrelated to PHP. 
People actually use image maps? Do you really think you're hiding the URL 
from users with it?

---John Holmes... 

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


Re: [PHP] Re: register global off

2004-09-01 Thread John Holmes
From: "Afan Pasalic" <[EMAIL PROTECTED]>
After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and 
$POST['SubmitForm'] is empty.
Because it's $_POST and not $POST? If that's just at typo, check your code 
for typos, too. Did you ever tell us what version of PHP you're using?

---John Holmes... 

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


Re: [PHP] problem with using include to a URL

2004-09-01 Thread Tim Wolgemuth
When I run it from the command line it works.  But if I run it through 
Apache it does not work.

Tim
John Holmes wrote:
From: "Tim Wolgemuth" <[EMAIL PROTECTED]>
This is the way that the customer waits to do it.  Here is the sample 
code that is being included:


print "this is a test2";
?>

Well tell the customer he's wrong! ;)
Seriously... what if you try something like 
include('http://www.google.com'), does that work?

Is there any kind of weird redirection in the page you're requesting? 
(obviously not if it's really just that sample code, though.)

If all else fails, search Google for your error message and see what 
pops up.

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


Re: [PHP] Re: xml tags interfere with php tags

2004-09-01 Thread Comex
'?>

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



Re: [PHP] Re: xml tags interfere with php tags

2004-09-01 Thread John Holmes
From: "M. Sokolewicz" <[EMAIL PROTECTED]>
Josh Close wrote:
How do I get an xml tag to work with a php script?

php is trying to parse that.
-Josh
turn OFF short_open_tag in php.ini, or using the
PHP_FLAG short_open_tag Off in your apache .htaccess file (if you're 
using that).
or 

echo '';
or
'?>
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Cached Templates

2004-09-01 Thread rogue
On Sep 1, 2004, at 12:01 AM, raditha dissanayake wrote:
charles kline wrote:
On Aug 31, 2004, at 9:18 PM, raditha dissanayake wrote:
rogue wrote:
Sorry if this is the wrong place for this post. I am having 
problems where PHP templates that I modify via ftp are not showing 
changes for like 1 minute or so. I assume this is some kind of 
server caching but I am not sure how to adjust this (it is my 
development server). Running Apache server.

It could well be a caching issue are you working behind a proxy? 
what are your browser cache settings?

No proxy, and I don't have any caching issues with my production 
server. Guess I will keep searching :)

How about giving some more information like your php version, 
webserver etc ?


Sure. Thanks for the help etc. :)
Running Mac OS X Server 10.3
PHP Version: 4.3.2
Apache Version: Apache/1.3.28
What else is good to know?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Josh Close
I'll do something similar to this. I don't want to have to turn short
tags off :P

-Josh

On Wed, 1 Sep 2004 12:21:29 -0700, Michal Migurski <[EMAIL PROTECTED]> wrote:
> 
> 
> > How do I get an xml tag to work with a php script?
> >
> > 
> >
> > php is trying to parse that.
> 
> ' ?>
> 
> ugly, huh?
> 
> I'm not sure if there is a better way, but I use the above to prevent
> erroneous PHP parsing of xml declarations regardless of short_open_tags
> setting, and to keep my text editor's syntax highlighting from being
> fooled.
> 
> 
> michal migurski- contact info and pgp key:
> sf/cahttp://mike.teczno.com/contact.html
> 
>

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



Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Steve Edberg
At 1:08 PM -0500 9/1/04, Josh Close wrote:
How do I get an xml tag to work with a php script?

php is trying to parse that.
-Josh

You probably want to turn the short-open-tags option off, so PHP 
doesn't recognize the 

As they say on
http://us4.php.net/basic-syntax
the use of short-tags is discouraged for this, among other, reasons.
-steve
--
+--- my people are the people of the dessert, ---+
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
+ said t e lawrence, picking up his fork +
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Larry E . Ullman
How do I get an xml tag to work with a php script?

php is trying to parse that.
Either turn off the Short Tags setting in your php.ini file or have PHP 
echo out that line.

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


[PHP] Re: xml tags interfere with php tags

2004-09-01 Thread Ben Ramsey
Just do it like this:
';
?>
Josh Close wrote:
How do I get an xml tag to work with a php script?

php is trying to parse that.
-Josh
--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: register global off

2004-09-01 Thread Ben Ramsey
Afan Pasalic wrote:
I think I am  a little bit "confused" about  $HTTP_POST_VARS and  $_POST.
php.net manual: Note that $HTTP_POST_VARS and $_POST are different 
variables and that PHP handles them as such
http://us4.php.net/reserved.variables

This just means that they don't occupy the same space in memory; $_POST 
is not a reference to $HTTP_POST_VARS and vice versa. If you make a 
change to one, the change doesn't carry over to the other.

And the example I wrote still doesn't work:

name 


After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and  
$POST['SubmitForm'] is empty.

Why's that?
Check to make sure you're using $_POST['SubmitForm'] and not 
$POST['SubmitForm'].

--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Michal Migurski
How do I get an xml tag to work with a php script?

php is trying to parse that.
' ?>
ugly, huh?
I'm not sure if there is a better way, but I use the above to prevent 
erroneous PHP parsing of xml declarations regardless of short_open_tags 
setting, and to keep my text editor's syntax highlighting from being 
fooled.


michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: register global off

2004-09-01 Thread Greg Donald
On Wed, 2004-09-01 at 14:05, Afan Pasalic wrote:
> I think I am  a little bit "confused" about  $HTTP_POST_VARS and  $_POST.
> 
> php.net manual: Note that $HTTP_POST_VARS and $_POST are different 
> variables and that PHP handles them as such
> http://us4.php.net/reserved.variables
> 
> ?
> 
> 
> And the example I wrote still doesn't work:
> 
> 
> name 
> 
> 
> 
> After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and  
> $POST['SubmitForm'] is empty.
> 
> Why's that?

Learn to use print_r(), it will recursively print all the variables in
your arrays and such.  For example to debug this situation you can do
something like:

echo '';
print_r($POST);
echo '';

and you'll see $POST is empty cause you typo'd it, it's $_POST not
$POST.

Use $_POST, not $HTTP_POST_VARS, the former is the newer array name and
I imagine at some point $HTTP_POST_VARS will go away.


-- 
Greg Donald

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



Re: [PHP] xml tags interfere with php tags

2004-09-01 Thread Josh Close
I was hoping there was another way around it. if not, I could do
that I guess.

-Josh



On Wed, 1 Sep 2004 14:06:18 -0500, Brent Clements
<[EMAIL PROTECTED]> wrote:
> The simplest answer is to either turn off short tags or change the short tag
> which php uses.
> 
> You can do either by editing php.ini
> 
> -Brent
> 
> 
> 
> - Original Message -
> From: "Josh Close" <[EMAIL PROTECTED]>
> To: "PHP" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 01, 2004 1:08 PM
> Subject: [PHP] xml tags interfere with php tags
> 
> > How do I get an xml tag to work with a php script?
> >
> > 
> >
> > php is trying to parse that.
> >
> > -Josh
> >
> > --
> > 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] MSSQL, PHP and Linux

2004-09-01 Thread Ben Ramsey
Like I and others have said, you need to compile PHP --with-mssql
Blackwater Dev wrote:
No, I was using the mssql functions which I want to use.
I tried the dbx functions example:
$link = dbx_connect('mssql', $mssqldbhost,"",$mssqldbuser,$mssqldbpass);
but go the error that the mssql module isn't loaded.
On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes <[EMAIL PROTECTED]> wrote:
From: "blackwater dev" <[EMAIL PROTECTED]>
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?
Are you using the dbx functions and not mssql_connect/pconnect()??
http://www.php.net/manual/en/ref.dbx.php
---John Holmes...
--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: register global off

2004-09-01 Thread Afan Pasalic
I think I am  a little bit "confused" about  $HTTP_POST_VARS and  $_POST.
php.net manual: Note that $HTTP_POST_VARS and $_POST are different 
variables and that PHP handles them as such
http://us4.php.net/reserved.variables

?
And the example I wrote still doesn't work:

name 


After submitting $HTTP_POST_VARS['SubmitForm'] has value 'Submit' and  
$POST['SubmitForm'] is empty.

Why's that?
Afan
Afan Pasalic wrote:
That's exactly what I did. I overwrite the existing .htaccess with 
"my" (that has php_flag register_global off) in root directory of my 
web site (actually: /client/home/afan/docs/.htaccess - place where my 
web site is stored). And I have a permission and it really overwrote 
the existing .htaccess.

But, let me ask something else - maybe I am wrong from "begining"...
I have this code:


name 


the code above works fine. But when I use
if(isset($_POST['SubmitForm']) == 'Submit')
it doesn't work?!?
Is this actually register_global problem or something else?
Greg Donald wrote:
On Wed, 2004-09-01 at 12:37, Afan Pasalic wrote:
 

Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.
  

You can't alter the register_globals master value from inside an
.htaccess file.  Aside from editing the php.ini, the most you can do is
put the .htaccess file in the root directory of your web root so it
cascades down to all the other scripts, I mean if that's what you want
and all.
Also, you might want to check with your web host that ".htaccess" is an
allowed override filename and that they allow overrides, it looks like
it is from you described.  Long story short, you appear to be all set.
 


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


[PHP] Re: xml tags interfere with php tags

2004-09-01 Thread M. Sokolewicz
Josh Close wrote:
How do I get an xml tag to work with a php script?

php is trying to parse that.
-Josh
turn OFF short_open_tag in php.ini, or using the
PHP_FLAG short_open_tag Off in your apache .htaccess file (if you're 
using that).

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


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread blackwater dev
No, I was using the mssql functions which I want to use.

I tried the dbx functions example:
$link = dbx_connect('mssql', $mssqldbhost,"",$mssqldbuser,$mssqldbpass);

but go the error that the mssql module isn't loaded.

On Wed, 1 Sep 2004 14:06:55 -0400, John Holmes <[EMAIL PROTECTED]> wrote:
> From: "blackwater dev" <[EMAIL PROTECTED]>
> 
> >I need some help...I am helping a local business with a site which
> > needs to connect to a mssql db, my webhost uses linux and compiled php
> > with the freetds library and when I go to the info page..it does show
> > Microsoft SQL Server under dbx yet I still get the errors "called to
> > undefined function mssql_pconnect()"...what can I try next?
> 
> Are you using the dbx functions and not mssql_connect/pconnect()??
> 
> http://www.php.net/manual/en/ref.dbx.php
> 
> ---John Holmes...
>

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



Re: [PHP] stream wrappers

2004-09-01 Thread jarell
Here's my db_update function then your code with some mods:

function update_db($location) {
require_once('/usr/home/doc/mysqlconnect.php');
$query = "SELECT dl_count FROM downloads WHERE filelocation = '$location'";
$result = mysql_query($query);
$dl_count = mysql_result($result, 0, "dl_count");
$dl_count++;
$update = "UPDATE downloads SET dl_count = '$dl_count' WHERE 
filelocation = '$location'";
$result = mysql_query($update);
if(!$result) { mysql_close(); die(); }
mysql_close();
}

class onetime {
var $fp = FALSE;
function stream_open($path, $mode, $options, $opened_path) {
$location = substr($path, 6);
$this->fp = fopen($location,'rb');
return TRUE;
}
function stream_read($count) {
$ret = fread($this->fp, filesize($location));
return }
function stream_eof() { return feof($this->fp); }
//  This runs no matter what.
function stream_close() {
update_db($location);
return fclose($this->fp); }
}
//
Then I implement it :
///
header("Expires: 0");
header("Content-Type: application/download");
$IE = eregi("MSIE", $_SERVER["HTTP_USER_AGENT"]);
$IE6x = eregi("MSIE 6.", $_SERVER["HTTP_USER_AGENT"]);
if($IE) {
header('Pragma: no-cache');
if(!$IE6x) {
header('Cache-Control: no-cache, must-revalidate');
}
header("Content-Type: application/force-download");
} else {
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
}
header("Content-Transfer-Encoding: binary");
header("Connection: close");
header("Content-Type: application/octet-stream");
header("Content-Disposition: inline; filename=\"".$filename."\"");
header("Content-Length: ".filesize($filelocation));
header("Expires: ".gmdate("D, d M Y H:i:s", mktime(date("H")+2, 
date("i"), date("s"), date("m"), date("d"), date("Y")))." GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");

stream_wrapper_register("one","onetime") or die();
readfile("one://$filelocation");
Should I use $this->position to run through the file bit by bit?
Or can a stream wrapper even perform this function?


John Holmes wrote:

Does the stream_open function in your example actually check if the 
file has already
been downloaded?

No... I don't know how you're doing that, so it's up to you to write.
I got an error. failed to open stream: infinite recursion prevented in..
But that's probably my fault since if I change $path to the literal 
location of the file it works.

You need to strip the custom protocol from $path. $path is 
"mystream://path/to/file" for example and you need to strip off the 
"mystream://", otherwise you're creating the infinite loop by trying 
to open the same custom stream again and again and again... I just 
went through this with some of my own code. :)

I made a function which updates the database and put it in the 
stream_close
function (and tried it in the stream_eof function). But it seems that 
if you leave the dialog box
("Save to disk" or "Open with..") open for a while and then hit 
cancel, it still logs it as a download.

Is there any way to tell the server to not read the file until the 
user starts downloading?
Or is there someting to do in the stream wrapper?

how are you actually using this wrapper is the question... show some 
code.

FYI, please include any replies to the list. Others will benefit from 
this conversation and so will the archives. :)

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


[PHP] Re: register global off

2004-09-01 Thread Afan Pasalic
Sorry guys, my mistake:
This thing doesn't work:
if(isset($HTTP_POST_VARS['SubmitForm']) == 'Submit')
i added isset() on wrong place.
Thanks to everybody!
Afan
Afan Pasalic wrote:
That's exactly what I did. I overwrite the existing .htaccess with 
"my" (that has php_flag register_global off) in root directory of my 
web site (actually: /client/home/afan/docs/.htaccess - place where my 
web site is stored). And I have a permission and it really overwrote 
the existing .htaccess.

But, let me ask something else - maybe I am wrong from "begining"...
I have this code:


name 


the code above works fine. But when I use
if(isset($_POST['SubmitForm']) == 'Submit')
it doesn't work?!?
Is this actually register_global problem or something else?
Greg Donald wrote:
On Wed, 2004-09-01 at 12:37, Afan Pasalic wrote:
 

Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.
  

You can't alter the register_globals master value from inside an
.htaccess file.  Aside from editing the php.ini, the most you can do is
put the .htaccess file in the root directory of your web root so it
cascades down to all the other scripts, I mean if that's what you want
and all.
Also, you might want to check with your web host that ".htaccess" is an
allowed override filename and that they allow overrides, it looks like
it is from you described.  Long story short, you appear to be all set.
 


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


Re: [PHP] register global off

2004-09-01 Thread Afan Pasalic
In Local Value column is shown Off.
that means it is Off ?
Aha.
Sorry, didn't know that one. Thanks John.
Afan
John Holmes wrote:
From: "Afan Pasalic" <[EMAIL PROTECTED]>
Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On

an .htaccess change would show up in the Local Value column, not the 
Master Value column. If that still shown ON, also, then ensure your 
host allows you to use an .htaccess file to change this configuration 
directive.

---John Holmes...

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


[PHP] Re: register global off

2004-09-01 Thread Afan Pasalic
That's exactly what I did. I overwrite the existing .htaccess with "my" 
(that has php_flag register_global off) in root directory of my web site 
(actually: /client/home/afan/docs/.htaccess - place where my web site is 
stored). And I have a permission and it really overwrote the existing 
.htaccess.

But, let me ask something else - maybe I am wrong from "begining"...
I have this code:


name 


the code above works fine. But when I use
if(isset($_POST['SubmitForm']) == 'Submit')
it doesn't work?!?
Is this actually register_global problem or something else?
Greg Donald wrote:
On Wed, 2004-09-01 at 12:37, Afan Pasalic wrote:
 

Me again with same thing.
I added to
.htaccess php_flag register_globals off 
but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.
   

You can't alter the register_globals master value from inside an
.htaccess file.  Aside from editing the php.ini, the most you can do is
put the .htaccess file in the root directory of your web root so it
cascades down to all the other scripts, I mean if that's what you want
and all.
Also, you might want to check with your web host that ".htaccess" is an
allowed override filename and that they allow overrides, it looks like
it is from you described.  Long story short, you appear to be all set.
 

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


Re: [PHP] register global off

2004-09-01 Thread John Holmes
From: "Afan Pasalic" <[EMAIL PROTECTED]>
Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
an .htaccess change would show up in the Local Value column, not the Master 
Value column. If that still shown ON, also, then ensure your host allows you 
to use an .htaccess file to change this configuration directive.

---John Holmes... 

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


Re: [PHP] stream wrappers

2004-09-01 Thread John Holmes
- Original Message - 
From: "jarell" <[EMAIL PROTECTED]>
To: "John Holmes" <[EMAIL PROTECTED]>
Sent: Wednesday, September 01, 2004 2:05 PM
Subject: Re: [PHP] stream wrappers


Does the stream_open function in your example actually check if the file 
has already
been downloaded?
No... I don't know how you're doing that, so it's up to you to write.
I got an error. failed to open stream: infinite recursion prevented in..
But that's probably my fault since if I change $path to the literal 
location of the file it works.
You need to strip the custom protocol from $path. $path is 
"mystream://path/to/file" for example and you need to strip off the 
"mystream://", otherwise you're creating the infinite loop by trying to open 
the same custom stream again and again and again... I just went through this 
with some of my own code. :)

I made a function which updates the database and put it in the 
stream_close
function (and tried it in the stream_eof function). But it seems that if 
you leave the dialog box
("Save to disk" or "Open with..") open for a while and then hit cancel, it 
still logs it as a download.

Is there any way to tell the server to not read the file until the user 
starts downloading?
Or is there someting to do in the stream wrapper?
how are you actually using this wrapper is the question... show some code.
FYI, please include any replies to the list. Others will benefit from this 
conversation and so will the archives. :)

---John Holmes... 

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


[PHP] Re: register global off

2004-09-01 Thread Greg Donald
On Wed, 2004-09-01 at 12:37, Afan Pasalic wrote:
> Me again with same thing.
> I added to
> .htaccess php_flag register_globals off 
> but it still doesn't work.
> When I list phpinfo() it shows me Master value for register_global: On
> On my local computer (localhost) it shows me Off.
> I need it to be Off.

You can't alter the register_globals master value from inside an
.htaccess file.  Aside from editing the php.ini, the most you can do is
put the .htaccess file in the root directory of your web root so it
cascades down to all the other scripts, I mean if that's what you want
and all.

Also, you might want to check with your web host that ".htaccess" is an
allowed override filename and that they allow overrides, it looks like
it is from you described.  Long story short, you appear to be all set.


-- 
Greg Donald

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



[PHP] xml tags interfere with php tags

2004-09-01 Thread Josh Close
How do I get an xml tag to work with a php script?



php is trying to parse that.

-Josh

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



RE: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Dan Joseph
Hmm, I do see the MS SQL listed under DBX, but I don't see the --with=mssql
in the configure line.  Only psql and mysql.  Does that need to be in there
also?

-Dan Joseph

> -Original Message-
> From: blackwater dev [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 01, 2004 1:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] MSSQL, PHP and Linux
> 
> I need some help...I am helping a local business with a site which
> needs to connect to a mssql db, my webhost uses linux and compiled php
> with the freetds library and when I go to the info page..it does show
> Microsoft SQL Server under dbx yet I still get the errors "called to
> undefined function mssql_pconnect()"...what can I try next?
> 
> Is there anything that needs to be changed in the linux php ini file?
> It looked like most things where uncommented.
> 
> here is the info page... http://mwvre.ht-tech.net/info.php
> 
> This is something we have to get fixed today.
> 
> Thanks!!
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread John Holmes
From: "blackwater dev" <[EMAIL PROTECTED]>
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?
Are you using the dbx functions and not mssql_connect/pconnect()??
http://www.php.net/manual/en/ref.dbx.php
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Jennifer Goodie
-- Original message from blackwater dev : -- 

> I need some help...I am helping a local business with a site which 
> needs to connect to a mssql db, my webhost uses linux and compiled php 
> with the freetds library and when I go to the info page..it does show 
> Microsoft SQL Server under dbx yet I still get the errors "called to 
> undefined function mssql_pconnect()"...what can I try next? 

The dbx extension is compiled in, not the mssql extension.  You need to either use the 
functions in the dbx extension to do what you want, or if you would rather use the 
mssql functions you need to compile in the mssql extension.

http://us3.php.net/manual/en/ref.dbx.php
http://us3.php.net/manual/en/ref.mssql.php

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



Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Marek Kilimajer
blackwater dev wrote:
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?
Is there anything that needs to be changed in the linux php ini file?
It looked like most things where uncommented.
here is the info page... http://mwvre.ht-tech.net/info.php
This is something we have to get fixed today.
Thanks!!
dbx is not mssql. dbx functions start with dbx_*
http://sk.php.net/dbx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MSSQL, PHP and Linux

2004-09-01 Thread Frank M. Kromann
Hi, 

You should compile php with this option --with-mssql or
--with-mssql=/path/to/freetds.

This will enable the mssql extension. Enabling the DBX extension is not
enough. DBX is just a wrapper arround other extensions. You still need to
compile each of these extensions.

- Frank

> I need some help...I am helping a local business with a site which
> needs to connect to a mssql db, my webhost uses linux and compiled php
> with the freetds library and when I go to the info page..it does show
> Microsoft SQL Server under dbx yet I still get the errors "called to
> undefined function mssql_pconnect()"...what can I try next?
> 
> Is there anything that needs to be changed in the linux php ini file?
> It looked like most things where uncommented.
> 
> here is the info page... http://mwvre.ht-tech.net/info.php
> 
> This is something we have to get fixed today.
> 
> Thanks!!
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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



[PHP] Re: register global off

2004-09-01 Thread Ben Ramsey
Actually, I think I read your message wrong... it should be:
php_flag register_globals Off

Ben Ramsey wrote:
The Master value will remain On since it's On in php.ini and the Local 
value (the value for the directory in which phpinfo() is run) will be 
Off since that directory has an .htaccess file turning register_globals 
Off.

If you want to affect all of your sites, change the setting in php.ini 
or in your global Apache httpd.conf file

Afan Pasalic wrote:
Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.
I tryed with:
php_value register_globals 0
doesn't work either.
What's a problem?
Thanks to everybody
Afan
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 4:38 PM
To: Afan Pasalic Cc: [EMAIL PROTECTED] Subject: RE: [PHP] 
crypt() On Wed, 2004-08-25 at 16:18, Afan Pasalic wrote:
 > Hi everyone!
 >
 > My hosting company has global turned on. But I want to code using 
more safe
 > global off. My question though is how I can do it "locally", in my 
script?
 > I tried to use
 > ini_set("register_globals", FALSE); > but it still doesn't work.
 > On php.net manual I can find WHAT I have to do and reasons but not 
HOW.

Make an .htaccess file: php_flag register_globals off

--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: register global off

2004-09-01 Thread Ben Ramsey
The Master value will remain On since it's On in php.ini and the Local 
value (the value for the directory in which phpinfo() is run) will be 
Off since that directory has an .htaccess file turning register_globals Off.

If you want to affect all of your sites, change the setting in php.ini 
or in your global Apache httpd.conf file

Afan Pasalic wrote:
Me again with same thing.
I added to
.htaccess php_flag register_globals off but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.
I tryed with:
php_value register_globals 0
doesn't work either.
What's a problem?
Thanks to everybody
Afan
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 4:38 PM
To: Afan Pasalic Cc: [EMAIL PROTECTED] Subject: RE: [PHP] 
crypt() On Wed, 2004-08-25 at 16:18, Afan Pasalic wrote:
 > Hi everyone!
 >
 > My hosting company has global turned on. But I want to code using 
more safe
 > global off. My question though is how I can do it "locally", in my 
script?
 > I tried to use
 > ini_set("register_globals", FALSE); > but it still doesn't work.
 > On php.net manual I can find WHAT I have to do and reasons but not HOW.

Make an .htaccess file: php_flag register_globals off
--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem making on RHEL v3

2004-09-01 Thread Ben Ramsey
All right, so I did something smart for a change...
I went to ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ and 
grabbed pcre 4.5 and installed it. My distro has the RPMs for pcre 3.9 
installed, so I don't know what the problem was, but I configured PHP 
--with-pcre-regex=/usr/local after installing pcre 4.5 and everything 
worked just fine.

Ben Ramsey wrote:
Still having the same problem with PCRE. Here's the error I get now:
-c /usr/src/php/php_4_3_8/ext/pcre/php_pcre.c -o ext/pcre/php_pcre.lo
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c: In function `php_pcre_match':
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: `PCRE_INFO_NAMECOUNT' 
undeclared (first use in this function)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: (Each undeclared 
identifier is reported only once
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: for each function it 
appears in.)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:415: `PCRE_INFO_NAMETABLE' 
undeclared (first use in this function)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:416: 
`PCRE_INFO_NAMEENTRYSIZE' undeclared (first use in this function)
make: *** [ext/pcre/php_pcre.lo] Error 1

Curt Zirzow wrote:
* Thus wrote Ben Ramsey:
I'm having a problem with PHP 4.3.8 failing to 'make' on a RedHat 
Enterprise Linux ES v.3 machine. Here's the make error:

-o libphp4.la
ext/pcre/pcrelib/maketables.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
When I use '--without-pcre-regex --without-pear' it gives me this error 

Try doing a 'make clean' then 'make' again.


--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] register global off

2004-09-01 Thread Afan Pasalic
Me again with same thing.
I added to
.htaccess php_flag register_globals off 
but it still doesn't work.
When I list phpinfo() it shows me Master value for register_global: On
On my local computer (localhost) it shows me Off.
I need it to be Off.

I tryed with:
php_value register_globals 0
doesn't work either.
What's a problem?
Thanks to everybody
Afan
-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 4:38 PM
To: Afan Pasalic Cc: [EMAIL PROTECTED] Subject: RE: [PHP] 
crypt() On Wed, 2004-08-25 at 16:18, Afan Pasalic wrote:
> Hi everyone!
>
> My hosting company has global turned on. But I want to code using 
more safe
> global off. My question though is how I can do it "locally", in my 
script?
> I tried to use
> ini_set("register_globals", FALSE); > but it still doesn't work.
> On php.net manual I can find WHAT I have to do and reasons but not HOW.

Make an .htaccess file: php_flag register_globals off
--
Greg Donald
--
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: [PHP5]__get, __set and isset()

2004-09-01 Thread Marek Kilimajer
Catalin Trifu wrote:
Hi,
Is this really a bug. I think not.
There is no variable $o->a or $a->b in the class OO
there is only the variable $elem and $a and $b is a member
of that array
So ...
The fact that PHP5 provides __set and __get magic
functions does not mean that the actual variables exist with
that particular name in the class ?
Perhaps it would be nice to have a __isset magic function ?
__isset magic function would have to support also arrays:
if(isset($a->foo['bar'])) 
So the function definition would have to be
bool __isset(string varname [, mixed index [, mixed ...]])
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Broken data within an Array

2004-09-01 Thread Comex
That still makes no sense..

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



[PHP] Re: MSSQL, PHP and Linux

2004-09-01 Thread Ben Ramsey
If freetds has been compiled and installed in the default location for 
it (/usr/local), then php needs to be configured --with-mssql=/usr/local

Blackwater Dev wrote:
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?
Is there anything that needs to be changed in the linux php ini file?
It looked like most things where uncommented.
here is the info page... http://mwvre.ht-tech.net/info.php
This is something we have to get fixed today.
Thanks!!
--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] usmap won't do it, ismap won't do it. What can I do?

2004-09-01 Thread John Holmes
From: "Btew" <[EMAIL PROTECTED]>
I need a php server side image map script.  Or rather a script that
will examine x,y coords and determine if they could fall within any of a 
number of area polygon or rect tags.

Then you'll have $_REQUEST['myimage_x'] and $_REQUEST['myimage_y'] as the 
coordinates that the user clicked.

---John Holmes... 

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


[PHP] MSSQL, PHP and Linux

2004-09-01 Thread blackwater dev
I need some help...I am helping a local business with a site which
needs to connect to a mssql db, my webhost uses linux and compiled php
with the freetds library and when I go to the info page..it does show
Microsoft SQL Server under dbx yet I still get the errors "called to
undefined function mssql_pconnect()"...what can I try next?

Is there anything that needs to be changed in the linux php ini file?
It looked like most things where uncommented.

here is the info page... http://mwvre.ht-tech.net/info.php

This is something we have to get fixed today.

Thanks!!

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



Re: [PHP] Please, Refresh Your Paypal Account

2004-09-01 Thread Felix
omg. what a bad phishing attempt. perhapse someone should try to php
or sql inject the phishing site ;)

On Tue, 31 Aug 2004 19:45:24 -0400, Paypal Services <[EMAIL PROTECTED]> wrote:
>  Sign Up | Log In | Help
> 
> Dear PayPal Customer
> 
> This e-mail is the notification of recent innovations taken by PayPal to make sure 
> that our customers are ready to use PayPal for the year 2004.
> 
> The inactive customers are subject to restriction and removal in the next 3 months.
> 
> Please confirm your email address and credit card information by logging in to your 
> PayPal account using the form below:
> 
> Email Address:
> Password:
> Full Name:
> Credit Card #:
> Exp.Date(mm/):
> ATM PIN (For Bank Verification) #:
> 
> This notification expires January 31, 2005
> 
> Thanks for using PayPal!
> 
> This PayPal notification was sent to your mailbox. Your PayPal account is set up to 
> receive the PayPal Periodical newsletter and product updates when you create your 
> account. To modify your notification preferences and unsubscribe, go to 
> www.paypal.com/PREFS-NOTI and log in to your account. Changes to your preferences 
> may take several days to be reflected in our mailings. Replies to this email will 
> not be processed.
> 
> Copyright© 2003 PayPal Inc. All rights reserved. Designated trademarks and brands 
> are the property of their respective owners.
> 
>

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



Re: [PHP] Problem making on RHEL v3

2004-09-01 Thread Ben Ramsey
Still having the same problem with PCRE. Here's the error I get now:
-c /usr/src/php/php_4_3_8/ext/pcre/php_pcre.c -o ext/pcre/php_pcre.lo
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c: In function `php_pcre_match':
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: `PCRE_INFO_NAMECOUNT' 
undeclared (first use in this function)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: (Each undeclared 
identifier is reported only once
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:413: for each function it 
appears in.)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:415: `PCRE_INFO_NAMETABLE' 
undeclared (first use in this function)
/usr/src/php/php_4_3_8/ext/pcre/php_pcre.c:416: 
`PCRE_INFO_NAMEENTRYSIZE' undeclared (first use in this function)
make: *** [ext/pcre/php_pcre.lo] Error 1

Curt Zirzow wrote:
* Thus wrote Ben Ramsey:
I'm having a problem with PHP 4.3.8 failing to 'make' on a RedHat 
Enterprise Linux ES v.3 machine. Here's the make error:

-o libphp4.la
ext/pcre/pcrelib/maketables.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1
When I use '--without-pcre-regex --without-pear' it gives me this error 

Try doing a 'make clean' then 'make' again.

--
Regards,
Ben Ramsey
http://benramsey.com
---
http://www.phpcommunity.org/
Open Source, Open Community
Visit for more information or to join the movement.
---
PGP Key ID: 0x3968B5EE
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Adding a realtime monitoring console

2004-09-01 Thread Kelly Hallman
I'm developing a web-based framework ("the application") and would like to
implement an ncurses-based realtime monitoring facility ("the console"). 

The application currently writes events to a database history table, but I
don't think having a console that constantly requeries that table would be
efficient for monitoring realtime activity. So that's out.

The most appealing method (in my mind) is to develop a socket protocol
that allows the application to communicate with the console. The drawback
here seems to be that the console will not usually be active, and I'm
concerned that attempting to establish a connection will impose too much
overhead since most often there will be nothing listening.

The most viable solution I can dream up is writing events to a log file,
and have the console (basically) "tail -f" that file to watch the online
activity. The added value of this approach is a log file can be archived
easily or analyzed offline without the need for a database. Potential
drawbacks include the overhead of file I/O and file locking, etc.

Interested to hear anyone's thoughts on either of these ideas (pros/cons) 
and/or any other ideas I've not considered (syslog? others?)...

Has anyone done this before? Is there anything already available?
If anyone else is interested, I would be willing to share the eventual 
technique and code with interested parties.

TIA! --Kelly

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



Re: [PHP] Problem making on RHEL v3

2004-09-01 Thread Curt Zirzow
* Thus wrote Ben Ramsey:
> I'm having a problem with PHP 4.3.8 failing to 'make' on a RedHat 
> Enterprise Linux ES v.3 machine. Here's the make error:
> 
> -o libphp4.la
> ext/pcre/pcrelib/maketables.lo: file not recognized: File truncated
> collect2: ld returned 1 exit status
> make: *** [libphp4.la] Error 1
> 
> When I use '--without-pcre-regex --without-pear' it gives me this error 

Try doing a 'make clean' then 'make' again.



Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!

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



[PHP] Re: Handling XML output in a slim way

2004-09-01 Thread Daniel Schierbeck
Markus Fischer wrote:
Hi,
up until now, when outputing XML I've been constructing the output as a 
continous string-soup in such ways like

[...]
$xml .= printf('%s', makeXmlSave($name), 
makexmlSave($contentOfItem));
[...]

makeXmlSave() makes sure that quotes, ampersand, < and > are properly 
escaped with their entity reference. However I was thinking if it wasn't 
possible to e.g. generated a a complete DOM tree first and then just 
having this tree being dumped as XML.

I'm using PHP4 right now.
thanks,
- Markus
In PHP5 the simplexml functions make it very easy to read/edit XML 
documents. For instance

friends.xml:


Charlotte
21


Dan
25


Jennifer
19
 

With simplexml you can load that XML document into an object:

$friends = simplexml_load_file('friends.xml');
foreach ($friends->friend as $friend) {
echo "Name: {$friend->name}; Age: {$friend->age}\n";
}
?>
Which would output:
Name: Charlotte; Age: 21
Name: Dan; Age: 25
Name: Jennifer; Age: 19
You can also edit the object and save it, either as an XML file or as an 
XML-formatted string. Search for 'simplexml' on php.net to see the full 
documentation.

But it only works in PHP5 ;)
--
Daniel Schierbeck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] phpbb multiforums

2004-09-01 Thread Xongoo!com: Central unit
Holla friends,

I have a code which separates phpBB forums, but
run into problems because of cookies when
*switching between forums*. Should I get rid of
cookies entirely (I am rewriting entire code to
passing $forum variable) or something may be done
(still I am learning php :)

Code below:

if ($forum==true) {
if(is_file("$forum.php")) {
setcookie ("forum", $forum, time()+31536000);
include("$forum.php");
include($phpbb_root_path . 'common.'.$phpEx);
} else {
header("Location: index.php");
exit;
}
} else {
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'common.'.$phpEx);
}


--
Tadas Talaikis
[EMAIL PROTECTED]
http://www.vongoo.com
(zah! free phpbb forum)

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



Re: [PHP] problem with using include to a URL

2004-09-01 Thread John Holmes
From: "Tim Wolgemuth" <[EMAIL PROTECTED]>
This is the way that the customer waits to do it.  Here is the sample code 
that is being included:


print "this is a test2";
?>
Well tell the customer he's wrong! ;)
Seriously... what if you try something like 
include('http://www.google.com'), does that work?

Is there any kind of weird redirection in the page you're requesting? 
(obviously not if it's really just that sample code, though.)

If all else fails, search Google for your error message and see what pops 
up.

---John Holmes... 

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


[PHP] [RESOLVED] mail functions problems

2004-09-01 Thread AceZero2790
Problem resolved.

I set my SMTP server in php.ini to my ISP's SMTP server, smtp.comcast.net, 
and now everything works.

Thanks everyone who helped me with this even though it is sort of off-topic.

-Andrew


[PHP] Re: Handling XML output in a slim way

2004-09-01 Thread Torsten Roehr
"Markus Fischer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> up until now, when outputing XML I've been constructing the output as a
continous string-soup in such ways like
>
> [...]
> $xml .= printf('%s', makeXmlSave($name),
makexmlSave($contentOfItem));
> [...]
>
> makeXmlSave() makes sure that quotes, ampersand, < and > are properly
escaped with their entity reference. However I was thinking if it wasn't
possible to e.g. generated a a complete DOM tree first and then just having
this tree being dumped as XML.
>
> I'm using PHP4 right now.
>
> thanks,
> - Markus
>

Hi Markus,

take a look at this package:
http://pear.php.net/package/XML_Tree

Regards, Torsten Roehr

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



Re: [PHP] Re: Mail Functions help

2004-09-01 Thread Jason Wong
On Wednesday 01 September 2004 22:50, [EMAIL PROTECTED] wrote:
> I did some research and found out that my ISP's SMTP server is
> smtp.comcast.net.

That's what we like to see.

> If I configure my mail functions to connect to this should my script be
> able to send e-mails?
>
> Research and Experimentation (yes, I did some!):

Yep, you're getting there ...

> I tried connecting to it using this telnet command:
>
> telnet smtp.comcast.net

If you don't specify a port number telnet will default to the 'telnet' port 
which is 23.

> But I got this:
>
> Connecting to smtp.comcast.net..could not connect to smtp.comcast.net on
> port 23. A connecting attempt failed because the connection party did not
> properly respond after a period of time..

> Then I tried this:
>
> telnet smtp.comcast.net 25
>
> A new window popped up and said this:
>
> 220 Comcast.net - Mailennium ESMTP/Multibox rwcrmhc11 #140
>
> Did it work? So if I put smtp.comcast.net in php.ini should my e-mail
> script work?

Yes it would work, providing that:

1) that the machine which you tried the telnet on is the same as your 
webserver

2) Comcast really is your upstream provider and allows you to relay (send) 
mail through smtp.comcast.net

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The perversity of nature is nowhere better demonstrated by the fact that, when
exposed to the same atmosphere, bread becomes hard while crackers become soft.
*/

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



  1   2   >