[PHP] COM Bug in PHP 4.3.10

2004-12-30 Thread Tohar Trabinovitch
Hi,

 

I need to know when will be the next PHP 4.3.x release with the fix for
the COM bug which was in 4.3.10.

This is CRITICAL for us, because we run our application over windows
using COM object and we use earlier version of PHP which has security
bugs.

 

COM Bug URL:

http://bugs.php.net/bug.php?id=31159

 

Thanks,

 

Tohar Trabinovitch

Software Engineer

E: [EMAIL PROTECTED]

T: 972-3-9008269

C: 054-777 30 43



This message is intended only for the person(s) to which it is addressed
and may contain Sphera Corporation privileged, confidential and/or
proprietary information. If you have received this communication in
error, please notify us immediately by replying to the message and
deleting it from your computer. Any disclosure, copying, distribution,
or the taking of any action concerning the contents of this message and
any attachment(s) by anyone other than the named recipient(s) is
strictly prohibited.

 



[PHP] Re: wrong value from define

2004-12-30 Thread Arthur
 Arthur wrote:
  Hi,
 
  in the following code, i want to get a constant value from config.php. I
  don't receive the value, that is defined, but the name of the constant.
  I tested the defines in config.php by echoing all defines, and it was
  allright, so i'm quite confused why it doesn't work here.
 
  That's my piece of code (which is in a class in a file which is in the
same
  dir as config.php):
 
  function reg($name, $pw, $ally, $act) {
include('config.php');
echo(DB_SERV_NAME . 'br');
$dbp = mysql_connect(DB_SERV_NAME, DB_USR_NAME, DB_PW);
if(!$dbp) die (MySQL-Fehler);
 
  Thats my error message:
 
  Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL Server
Host
  'DB_SERV_NAME' (11001) in
  C:\apachefriends\xampp\htdocs\alliance\script\cl.member.php on line 34
  MySQL-Fehler
 
  Normally, i should get 'localhost'.
  Anyone who can help me?
 place this at the top of the file: error_reporting(E_ALL);

 Either you don't define the consatnts properly or the include file
 doesn't exist.

Well, I tested the constants by another script and they were fine and i
tried it with an non-exisitng file and there was an error message, thus this
file is found.
By the error_reporting i get follwing message:
Notice: Use of undefined constant 'DB_SERV_NAME' - assumed 'DB_SERV_NAME'...
That message occurs for every constant used in the mysql_connect statement.

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



Re: [PHP] PEAR DB vs ADODB

2004-12-30 Thread Lester Caine
Matthew Weier O'Phinney wrote:
There's not much benefit or point in PEAR developers developing for a
non-PEAR library -- the idea is to create a set of high quality
libraries following a common set of coding standards and practices;
compatibility with outside libraries doesn't make sense if those
libraries do not follow the same guidelines.
But since ADOdb is well established, and has a large following, there 
will be moves from non-PEAR developers to at least try and create a 
level of compatibility. ADOdb already has a PEAR compatibility mode, 
which should work into any PEAR based component.

Some of us are already running PEAR only code as part of an existing 
ADOdb framework, but will probably end up re-coding the PEAR stuff to 
take out another layer of abstraction ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Question: arrays and form elements

2004-12-30 Thread Stuart Felenstein
Generally, when I set up a form where, for example,
I'll be taking multiple selections from a list I would
set the variable / element name as myvar[].  So I
have the brackets [] after the variable name to make
it an array. 

What I want to know is there a way to get around the
use  of this syntax ? If the variable name was just
myvar (no brackets) is there a way for me to still
grab all the selections and put them into an array ?

Hope this question is clear.

Thank you
Stuart 

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



[PHP] Re: COM Bug in PHP 4.3.10

2004-12-30 Thread M. Sokolewicz
as stated in 
news://news.php.net:119/[EMAIL PROTECTED] 
(internals) the status of this is still unknown. The PHP Development 
Team is working on it however, and my guess is that it will be fixed for 
4.3.11 (due for beta in January)

- Tul
Tohar Trabinovitch wrote:
Hi,
 

I need to know when will be the next PHP 4.3.x release with the fix for
the COM bug which was in 4.3.10.
This is CRITICAL for us, because we run our application over windows
using COM object and we use earlier version of PHP which has security
bugs.
 

COM Bug URL:
http://bugs.php.net/bug.php?id=31159
 

Thanks,
 

Tohar Trabinovitch
Software Engineer
E: [EMAIL PROTECTED]
T: 972-3-9008269
C: 054-777 30 43

This message is intended only for the person(s) to which it is addressed
and may contain Sphera Corporation privileged, confidential and/or
proprietary information. If you have received this communication in
error, please notify us immediately by replying to the message and
deleting it from your computer. Any disclosure, copying, distribution,
or the taking of any action concerning the contents of this message and
any attachment(s) by anyone other than the named recipient(s) is
strictly prohibited.
 


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


[PHP] authentication problem...

2004-12-30 Thread Ali
Hi there

this is a tutorial am trying to do...chk out the code..

if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))
 || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'open' ) ) {

header( 'WWW-Authenticate: Basic realm=Private' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;

} else {

echo 'Success!';

}

when i tried to access the page..the dialogue box appears asking for user
name and password..and when i type the user and open...it just keeps on
asking for the user name and password rather than logging in and showing
success..Is there anything to do with the any settings in the apache or
php...am using apache 1.3.33 and php 4.3.10 on winXP pro SP1..and i have php
installed as a module...OR is there anything to do with the code

thanks...

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



Re: [PHP] authentication problem...

2004-12-30 Thread Christophe Chisogne
Ali a écrit :
if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))
 || ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'open' ) ) {
Better use $_SERVER['PHP_AUTH_USER'] instead of $PHP_AUTH_USER
and $_SERVER['PHP_AUTH_PW'] instead of $PHP_AUTH_PW.
Chapter 33. HTTP authentication with PHP
http://www.php.net/manual/en/features.http-auth.php
Christophe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Question: arrays and form elements

2004-12-30 Thread Jay Blanchard
[snip]
Generally, when I set up a form where, for example,
I'll be taking multiple selections from a list I would
set the variable / element name as myvar[].  So I
have the brackets [] after the variable name to make
it an array. 

What I want to know is there a way to get around the
use  of this syntax ? If the variable name was just
myvar (no brackets) is there a way for me to still
grab all the selections and put them into an array ?
[/snip]

Nope, this is the method for doing what you say.

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



Re: [PHP] Re: COM Bug in PHP 4.3.10

2004-12-30 Thread Rasmus Lerdorf
M. Sokolewicz wrote:
as stated in 
news://news.php.net:119/[EMAIL PROTECTED] 
(internals) the status of this is still unknown. The PHP Development 
Team is working on it however, and my guess is that it will be fixed for 
4.3.11 (due for beta in January)

- Tul
Tohar Trabinovitch wrote:
Hi,
 

I need to know when will be the next PHP 4.3.x release with the fix for
the COM bug which was in 4.3.10.
This will be fixed in 4.3.11.  The first release candidate will be out 
next week.

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


Re: [PHP] 4.3.10 mySQL

2004-12-30 Thread John Nichel
Please reply to the list.
GH wrote:
how do i do that on windows?
On Wed, 29 Dec 2004 16:58:53 -0500, John Nichel [EMAIL PROTECTED] wrote:
GH wrote:
Hi all
I just installed PHP  MySql on my laptop together with IIS (go ahead
and boo)...
I just ran a ?PHP phpinfo(); ? script to test that the server was
working and got a strange result
it says that I have version  3.23.49  when I have 4.1.8 of mysql
installed on the machine... what happened?
3.x are the libraries bundled with PHP.  I you want to use the client
libraries to match your version of MySQL, you will have to build
(compile) php against them.
On Windows?  Don't know.  I don't use it.  But I'm sure there are 
compliers out there.  Replying to the list rather than to just one 
person will increase your chances of someone being able to answer this 
question for you.

--
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] Align pic

2004-12-30 Thread John Nichel
Labunski wrote:
Sorry for posting this here,
but this is only newsgroup I'm using, and I can't solve simple HTML problem.
yeah, it's funny, but still.. ;)
So join a HTML or CSS newsgroup.
--
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


[PHP] distributed architecture....

2004-12-30 Thread Bruce Douglas
hi...

i'm contemplating a project where a number of websites would communicate with 
each other via some network of round robin/distributed servers. Each 'client' 
website/app would be considered to be a 'node' of the overall network, and be 
able to upload/download information to the network. The master servers would 
maintain the information, such that if a request for information came from one 
of the 'client' sites, the master server would shove the information back to 
the client for display. 

the overall goal of the project would be a way of allowing a client site to 
'share/exchange' information with other client sites within the network, and to 
allow the content of a given client site to be influenced by the content of 
other sites within the network...

has anybody heard/seen anything like this...??

in searching google/sourceforge/freenet/etc.. i can't find anything that's 
similar, or that could be used as a starting point for the architecture... the 
closest i can find is the open source gnutella/limeware p2p app structure...

thanks

bruce
[EMAIL PROTECTED]

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



[PHP] Re: distributed architecture....

2004-12-30 Thread Greg Beaver
Bruce Douglas wrote:
hi...
i'm contemplating a project where a number of websites would communicate with each other via some network of round robin/distributed servers. Each 'client' website/app would be considered to be a 'node' of the overall network, and be able to upload/download information to the network. The master servers would maintain the information, such that if a request for information came from one of the 'client' sites, the master server would shove the information back to the client for display. 

the overall goal of the project would be a way of allowing a client site to 
'share/exchange' information with other client sites within the network, and to 
allow the content of a given client site to be influenced by the content of 
other sites within the network...
has anybody heard/seen anything like this...??
in searching google/sourceforge/freenet/etc.. i can't find anything that's similar, or that could be used as a starting point for the architecture... the closest i can find is the open source gnutella/limeware p2p app structure...
Do a websearch for XML REST.
Regards,
Greg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread blackwater dev
**First let me say that I am a linux newbie**

I have installed Fedora 3 on a development box.  I then downloaded the
php5 source and followed the php documentation:
# ./configure --with-mysql 
# make
# make install

Everything went fine, I then went to add the loadmodule line and did a
locate on my box for libphp5.so and it can't find it...shoudln't it be
there?  It can find libphp4.so but that was left over from the Fedora
install.  For the heck of it I added the loadmodule line for
libphp4.so and gave it the path to libphp4.so, I then added the
AddType lines and restarted apache.  Problem is, it doesn't parse the
php file at all.

What are some possible reasons when I don't have libphp5.so?

Thanks!

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



RE: [PHP] distributed architecture....

2004-12-30 Thread Jones, Douglas 1
I would also suggest that you look into SOAP for this project.  My
office hosts a search program that uses SOAP to go out and search the
databases of remote sites, most of which run architectures completely
different than ours.  It would probably be pretty easy to use SOAP to
get the data off of the master servers (use RPC calls) and it would
probably be pretty simple to upload the data using SOAP as well.


--
Doug Jones
Co-Op Web Developer
[EMAIL PROTECTED](856) 792-9454


-Original Message-
From: Bruce Douglas [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 30, 2004 9:52 AM
To: php-general@lists.php.net
Subject: [PHP] distributed architecture


hi...

i'm contemplating a project where a number of websites would communicate
with each other via some network of round robin/distributed servers.
Each 'client' website/app would be considered to be a 'node' of the
overall network, and be able to upload/download information to the
network. The master servers would maintain the information, such that if
a request for information came from one of the 'client' sites, the
master server would shove the information back to the client for
display. 

the overall goal of the project would be a way of allowing a client site
to 'share/exchange' information with other client sites within the
network, and to allow the content of a given client site to be
influenced by the content of other sites within the network...

has anybody heard/seen anything like this...??

in searching google/sourceforge/freenet/etc.. i can't find anything
that's similar, or that could be used as a starting point for the
architecture... the closest i can find is the open source
gnutella/limeware p2p app structure...

thanks

bruce
[EMAIL PROTECTED]

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

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



[PHP] Understanding flock()

2004-12-30 Thread Gerard Samuel
Im trying to simulate conditions, to see how flock works.
Can anyone verify with the example code below,
that data, never gets written to the file.
//1  //2 are supposed to be processes???
For me, the var_dump() reports -
int(7) bool(false)
Thanks
$fp = fopen('foo.txt', 'w'); //1
flock($fp, LOCK_EX) or die('Unable to lock'); //1
unlink('foo.txt') or die('Unable to remove foo.txt'); //2
$bytes = fwrite($fp, 'testing'); //1
fclose($fp); //1
var_dump($bytes, file_get_contents('foo.txt')); //1
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread John Nichel
blackwater dev wrote:
**First let me say that I am a linux newbie**
I have installed Fedora 3 on a development box.  I then downloaded the
php5 source and followed the php documentation:
# ./configure --with-mysql 
# make
# make install
What did you build it against?  You have no webserver type in your 
configure line.  If I'm not mistaken, all you have above  will do is 
build the cli, and not the loadable module.

--
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] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread Jason Wong
On Thursday 30 December 2004 22:56, blackwater dev wrote:
 **First let me say that I am a linux newbie**

 I have installed Fedora 3 on a development box.  I then downloaded the
 php5 source and followed the php documentation:
 # ./configure --with-mysql
 # make
 # make install

 Everything went fine, I then went to add the loadmodule line and did a
 locate on my box for libphp5.so and it can't find it...shoudln't it be
 there? 

[snip]

 What are some possible reasons when I don't have libphp5.so?

By default the database that the 'locate' command uses is updated once a day. 
If you have only just installed something and have not updated that database 
then 'locate' will have no idea about the new files.

Use:

  find / -name libphp5.so

Better still, when inside the php5 source directory use:

  configure --help | less

to see where exactly the installation will place your files.

-- 
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 world has many unintentionally cruel mechanisms that are not
designed for people who walk on their hands.
  -- John Irving, The World According to Garp
*/

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



[PHP] Re: build list of available functions and classes

2004-12-30 Thread Jason Barnett
You may want to check out phpm, an attempt at creating a CLI for the PHP
manual:
http://eide.org/?epc=php
Sounds interesting, I will look at it.
I'm not sure if that developer's work will answer your questions or not,
but he appears to have tackled the issue already.
Also, Rasmus Lerdorf has provided a dictionary of all PHP functions for
use with VIM; this may also be useful (google for 'rasmus vim
dictionary').
Many thanks for this tip!  I knew there was a reason I subscribed to 
this newsgroup!  :)

What exactly are your requirements?  If all you need is an extension 
(including standard PHP functions) / class / function list then you can 
look into the Reflections API.  For example to get a class's list of 
functions (public, protected and private) you can use the following:

?php
$class = 'DomDocument';
$reflection = new ReflectionClass( $class );
$methods = $reflection-getMethods();
print( nl2br( print_r( $methods, TRUE ) ) );
?
At this point the $methods array has a bunch of ReflectionMethod objects 
and you can get function names from there.  You can also get Parameters 
(I think) and comments.  However, I have only gotten user-defined class 
and function comments to print properly.

--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread blackwater dev
I don't seem to have an apxs directory.  I don't even have an apache
directory as apachectl resides in /usr/sbin/apachectl

Of course apache was installed from the fedora install.


How do I install this against apache?

On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
 blackwater dev wrote:
  **First let me say that I am a linux newbie**
 
  I have installed Fedora 3 on a development box.  I then downloaded the
  php5 source and followed the php documentation:
  # ./configure --with-mysql
  # make
  # make install
 
 What did you build it against?  You have no webserver type in your
 configure line.  If I'm not mistaken, all you have above  will do is
 build the cli, and not the loadable module.
 
 --
 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
 


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



Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread blackwater dev
I don't seem to have an apxs directory.  I don't even have an apache
directory as apachectl resides in /usr/sbin/apachectl

Of course apache was installed from the fedora install.


How do I install this against apache?

On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
 blackwater dev wrote:
  **First let me say that I am a linux newbie**
 
  I have installed Fedora 3 on a development box.  I then downloaded the
  php5 source and followed the php documentation:
  # ./configure --with-mysql
  # make
  # make install
 
 What did you build it against?  You have no webserver type in your
 configure line.  If I'm not mistaken, all you have above  will do is
 build the cli, and not the loadable module.
 
 --
 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
 


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



[PHP] Re: authentication

2004-12-30 Thread zerof
Ali wrote:
Hi everyone...
can anyone lead me to a good tutorial on authentication...it wud be good if
i can get a one in connection with a database..
thnks

If you understand portuguese: http://www.educar.pro.br/
---
zerof
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Mário Gamito
Hi,
A friend of mine told me that in Windows, PHP shows its warnings at the 
bottom of the pages.

Actually, i've never had thought about this issue before.
Better still... i even didn't know PHP for Windows had this behaviour.
In Linux they're shown at the top and now i'm in the mood to make PHP 
warnings appear at the bottom too. But...

... i've browsed php.ini and didn't found any way (obvious, at least) to 
do the same thing in Linux.

Already googled also, but nothing.
Is it possible to achieve this in Linux ?
Any help would be apreciated.
Warm regards.
--
Mário Gamito
Administração de sistemas e desenvolvimento
Netual - Multimédia e Telecomunicações, Lda.
Rua João Afonso, Nº1
3800-198 Aveiro - Portugal
Tel. +351 234 371 431 / Fax. +351 234 371 438
E-mail: [EMAIL PROTECTED]
www.netual.pt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Warnings on the bottom of the pages on Linux

2004-12-30 Thread Jason Barnett
I haven't done it (what's the point since I'm a Windows user lol), but 
you can change the default error handler.  If it's error messages at the 
bottom of HTML pages you want then just choose appropriate HTML elements 
you need to align a message at the bottom of your page.

http://php.net/function.set-error-handler
--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread John Nichel
blackwater dev wrote:
I don't seem to have an apxs directory.  I don't even have an apache
directory as apachectl resides in /usr/sbin/apachectl
Of course apache was installed from the fedora install.
How do I install this against apache?
I don't know if the rpm install of Apache includes apxs.  If it doesn't, 
you'll have to install Apache from source.

Look here under Apache+PHP (DSO Module)
http://www.blazonry.com/scripting/install_apache.php
--
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] Warnings on the bottom of the pages on Linux

2004-12-30 Thread John Nichel
Mário Gamito wrote:
Hi,
A friend of mine told me that in Windows, PHP shows its warnings at the 
bottom of the pages.

Actually, i've never had thought about this issue before.
Better still... i even didn't know PHP for Windows had this behaviour.
In Linux they're shown at the top and now i'm in the mood to make PHP 
warnings appear at the bottom too. But...

... i've browsed php.ini and didn't found any way (obvious, at least) to 
do the same thing in Linux.

Already googled also, but nothing.
Is it possible to achieve this in Linux ?
Any help would be apreciated.
Warm regards.
http://us4.php.net/manual/en/ref.outcontrol.php
--
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] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Jason Barnett

Is it possible to achieve this in Linux ?
Any help would be apreciated.
Warm regards.

http://us4.php.net/manual/en/ref.outcontrol.php
Call me stupid (actually please don't :) ) but how does output buffering 
 help in this case?  Are you suggesting he write an output handler?


--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to argue with ASP people...

2004-12-30 Thread Tony Di Croce
I am fairly new to PHP, but I am loving it... I have recently gotten
involved in a business venture and I have been using PHP so far...
Recently I have taken on a partner, and he is a big ASP guy...

I am not totally against ASP, but it would have to be pretty good to
get me to switch at this point (PHP seems to do everything I need)...
But I will need to convince him of this...

What points can I bring up in PHP's favor? In what areas does PHP trounce ASP?

-- 

td

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



Re: [PHP] Question: arrays and form elements

2004-12-30 Thread Brent Baisley
Nope. Is there a problem you are having with using that syntax?
If you are having trouble with referencing the fields with javascript, 
you can't use the regular syntax you are used to.:
document.formname.fieldname[]

That will give you an error because of the brackets.
In javascript you'll need to reference field names with brackets like 
this:
document.formname.elements[fieldname[]]

On Dec 30, 2004, at 6:48 AM, Stuart Felenstein wrote:
Generally, when I set up a form where, for example,
I'll be taking multiple selections from a list I would
set the variable / element name as myvar[].  So I
have the brackets [] after the variable name to make
it an array.
What I want to know is there a way to get around the
use  of this syntax ? If the variable name was just
myvar (no brackets) is there a way for me to still
grab all the selections and put them into an array ?
Hope this question is clear.
Thank you
Stuart
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Align pic

2004-12-30 Thread John Nichel
Reply to the list please.
Gleb Belov wrote:
Sorry for posting it here as well, but can anybody please tell me
about these? I mean, the HTML and CSS newsgroups as I really need them
too.
Thanks and sorry.
http://webstandardsgroup.org/mail/
--
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] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread Rasmus Lerdorf
John Nichel wrote:
I don't know if the rpm install of Apache includes apxs.  If it doesn't, 
you'll have to install Apache from source.
Usually apxs is in the apache-dev package on the various distros.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Warnings on the bottom of the pages on Linux

2004-12-30 Thread John Nichel
Jason Barnett wrote:

Is it possible to achieve this in Linux ?
Any help would be apreciated.
Warm regards.

http://us4.php.net/manual/en/ref.outcontrol.php
Call me stupid (actually please don't :) ) but how does output buffering 
 help in this case?  Are you suggesting he write an output handler?
If he wants to go that far, yes, but he doesn't have too.  If all the OP 
wants to achieve is have his error messages appear at the bottom of the 
output instead of inline

?php
ob_start();
include ( nofile.inc.php );
// Some more PHP stuff
//  Capture stuff before display
$possible_errors = ob_get_clean();
ob_end_clean();
//  What I want to display first
echo ( This is the output of my scriptbr /br / );
//  Display Errors if exist
if ( ! empty ( $possible_errors ) ) {
echo ( $possible_errors );
}
?
--
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] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Marek Kilimajer
Mário Gamito wrote:
Hi,
A friend of mine told me that in Windows, PHP shows its warnings at the 
bottom of the pages.

Actually, i've never had thought about this issue before.
Better still... i even didn't know PHP for Windows had this behaviour.
In Linux they're shown at the top and now i'm in the mood to make PHP 
warnings appear at the bottom too. But...

... i've browsed php.ini and didn't found any way (obvious, at least) to 
do the same thing in Linux.

Already googled also, but nothing.
Is it possible to achieve this in Linux ?
Any help would be apreciated.
Warm regards.
Neither one is true. Error messages show up where they occur. HTML 
markup might influence where they visualy appear in the browser, but you 
can look at the source code to find out the exact place.

Example 1:
echo 'Hello ';
$i = 1 / 0;
echo 'World';
Example 2:
echo 'tabletrtdFirst Row/td/tr';
$i = 1 / 0;
echo 'trtdSecond Row/td/trtable';
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to argue with ASP people...

2004-12-30 Thread Daniel Schierbeck
Tony Di Croce wrote:
I am fairly new to PHP, but I am loving it... I have recently gotten
involved in a business venture and I have been using PHP so far...
Recently I have taken on a partner, and he is a big ASP guy...
I am not totally against ASP, but it would have to be pretty good to
get me to switch at this point (PHP seems to do everything I need)...
But I will need to convince him of this...
What points can I bring up in PHP's favor? In what areas does PHP trounce ASP?
First of all, ASP doesn't run on anything but Windows servers (unless 
you're willing to use ChiliASP... *hiss*)

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


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread Rory Browne
Sorry if you recieved this twice. Head's wreaked today, and I keep
making mistakes, such as posting to a person instead of to the list.

If you're using apache2 then you need to add something along the lines
of --with-apxs to your ./configure line. With apache1.3 it was
--with-apxs=/path/to/apxs. I'm not sure what whether it's still
--with-apxs, or --with-apxs2, but either way you'll probably be
looking for the path to apxs2. Just for your information apxs is the
APache eXtension System.

If you want to use locate, on recently created files, then you should
schedule locate to run updatedb more often. your locate is only as
recent as your last updatedb.


On Thu, 30 Dec 2004 10:39:50 -0500, blackwater dev
[EMAIL PROTECTED] wrote:
 I don't seem to have an apxs directory.  I don't even have an apache
 directory as apachectl resides in /usr/sbin/apachectl
 
 Of course apache was installed from the fedora install.
 
 How do I install this against apache?
 
 On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
  blackwater dev wrote:
   **First let me say that I am a linux newbie**
  
   I have installed Fedora 3 on a development box.  I then downloaded the
   php5 source and followed the php documentation:
   # ./configure --with-mysql
   # make
   # make install
 
  What did you build it against?  You have no webserver type in your
  configure line.  If I'm not mistaken, all you have above  will do is
  build the cli, and not the loadable module.
 
  --
  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
 
 
 
 --
 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] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Rory Browne
Apologies Marek if you recieved this twice, I mailed you instead of
the list first time around.

me.is_confused() == true;

What does it matter whether errors show at the top or bottom of the
page. They are probably different errors that show up, some of which
show at the top, and others of which show up at the bottom.

But all that aside, wouldn't it be better to remove/debug these
errors, instead of moving them around the page. Am I missing something
here?

Rory


On Thu, 30 Dec 2004 15:58:24 +, Mário Gamito [EMAIL PROTECTED] wrote:
 Hi,
 
 A friend of mine told me that in Windows, PHP shows its warnings at the
 bottom of the pages.
 
 Actually, i've never had thought about this issue before.
 Better still... i even didn't know PHP for Windows had this behaviour.
 
 In Linux they're shown at the top and now i'm in the mood to make PHP
 warnings appear at the bottom too. But...
 
 ... i've browsed php.ini and didn't found any way (obvious, at least) to
 do the same thing in Linux.
 
 Already googled also, but nothing.
 
 Is it possible to achieve this in Linux ?
 
 Any help would be apreciated.
 
 Warm regards.
 --
 Mário Gamito
 Administração de sistemas e desenvolvimento
 Netual - Multimédia e Telecomunicações, Lda.
 Rua João Afonso, Nº1
 3800-198 Aveiro - Portugal
 Tel. +351 234 371 431 / Fax. +351 234 371 438
 E-mail: [EMAIL PROTECTED]
 www.netual.pt
 
 --
 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] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread blackwater dev
I just went ahead and installed apache from source with apxs then
recompiled php5.  I then created a info.php file which simply prints
out phpinfo but get this error now.


Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/usr/local/apache2/htdocs/info.php'
for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line
0

Thanks!
On Thu, 30 Dec 2004 11:55:38 -0500, Rasmus Lerdorf [EMAIL PROTECTED] wrote:
 John Nichel wrote:
  I don't know if the rpm install of Apache includes apxs.  If it doesn't,
  you'll have to install Apache from source.
 
 Usually apxs is in the apache-dev package on the various distros.
 
 -Rasmus
 
 --
 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: COM Bug in PHP 4.3.10

2004-12-30 Thread Andi Gutmans
We are looking into it right now. Hopefully we will have a new version or 
at least a release candidate within 2 weeks.

At 11:08 AM 12/30/2004 +0200, Tohar Trabinovitch wrote:
--
Hi,

I need to know when will be the next PHP 4.3.x release with the fix for 
the COM bug which was in 4.3.10.

This is CRITICAL for us, because we run our application over windows using 
COM object and we use earlier version of PHP which has security bugs.


COM Bug URL:
http://bugs.php.net/bug.php?id=31159http://bugs.php.net/bug.php?id=31159

Thanks,

Tohar Trabinovitch
Software Engineer
E: [EMAIL PROTECTED]
T: 972-3-9008269
C: 054-777 30 43

This message is intended only for the person(s) to which it is addressed 
and may contain Sphera Corporation privileged, confidential and/or 
proprietary information. If you have received this communication in error, 
please notify us immediately by replying to the message and deleting it 
from your computer. Any disclosure, copying, distribution, or the taking 
of any action concerning the contents of this message and any 
attachment(s) by anyone other than the named recipient(s) is strictly 
prohibited.


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


Re: [PHP] Re: Warnings on the bottom of the pages on Linux

2004-12-30 Thread Curt Zirzow
* Thus wrote Jason Barnett:
 I haven't done it (what's the point since I'm a Windows user lol), but 
 you can change the default error handler.  If it's error messages at the 
 bottom of HTML pages you want then just choose appropriate HTML elements 
 you need to align a message at the bottom of your page.
 
 http://php.net/function.set-error-handler

And to demonstrate this:

class EHandler {

  // the method to collect the errors
  public function accept(...) {}

  // the method to show the errors
  public function display() {}
}

$eh = new EHandler();
set_error_handler(array($eh, 'accept'));

// do stuff that causes errors, notices or warnings
// ...


$eh-display();


Curt
-- 
Quoth the Raven, Nevermore.

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



Re: [PHP] How to argue with ASP people...

2004-12-30 Thread Ben
Daniel Schierbeck wrote:
Tony Di Croce wrote:

What points can I bring up in PHP's favor? In what areas does PHP 
trounce ASP?

First of all, ASP doesn't run on anything but Windows servers (unless 
you're willing to use ChiliASP... *hiss*)
Exactly! Portability is key.  Not being locked into a particular OS or 
web server allows for much more flexibility as you go forward.

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


[PHP] Quick compile question --with-oci8

2004-12-30 Thread Brian Duke

This has been going on for about a week now. I have an oracle client
installed. I have php4 source installed all on a stripped down fedora
server. We get various errors. Like the infamous ld can find XXX in
-lclntsh.

Correct me if I'm wrong but we will have to install oracle8 || 9i before we
can compile php --with-oci8. I don't really want to run oracle. Our local
server only needs to use the oci8 functions to log into the datawarehouse
and update our local mysql database but after a week of frustration I think
that's what we have to do. 

Thanks all.


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: [suspicious - maybe spam] Static Keyword

2004-12-30 Thread Jason Barnett
Paul Higgins wrote:
Hi,
I was reading this article:  
http://www.phppatterns.com/index.php/article/articleview/6/1/1/ .

I have a question about it.  If you create this static Singleton object, 
does it persist in memory globally?  Or is it recreated each time a .php 
page is requested?

AFAIK singletons are used so that you only have one object of that type 
*for a request*.  The singleton is created and destroyed on every 
request (as are all objects).

--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread John Nichel
blackwater dev wrote:
I just went ahead and installed apache from source with apxs then
recompiled php5.  I then created a info.php file which simply prints
out phpinfo but get this error now.
Warning: Unknown: failed to open stream: Permission denied in Unknown on 
line 0
Warning: Unknown: Failed opening '/usr/local/apache2/htdocs/info.php'
for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line
0
Thanks!
*sigh*
http://groups-beta.google.com/groups?hl=enq=%22Permission+denied+in+Unknown+on+line+0%22qt_s=Search+Groups
http://www.linuxquestions.org/questions/history/211964
--
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] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread Bruce Douglas
if you want to know/have a rough guide on building/compiling php with 
mysql/mysqli support, the following link should help you out... although it's 
for linux..


http://marc.theaimsgroup.com/?l=php-generalm=109026859726530w=2

it kind of walks you through what you need to do..

hope it helps...

peace..



-Original Message-
From: Rory Browne [EMAIL PROTECTED]
Sent: Dec 30, 2004 11:00 AM
To: php-general@lists.php.net
Subject: Re: [PHP] what am I doing wrong? PHP5 on Fedora

Sorry if you recieved this twice. Head's wreaked today, and I keep
making mistakes, such as posting to a person instead of to the list.

If you're using apache2 then you need to add something along the lines
of --with-apxs to your ./configure line. With apache1.3 it was
--with-apxs=/path/to/apxs. I'm not sure what whether it's still
--with-apxs, or --with-apxs2, but either way you'll probably be
looking for the path to apxs2. Just for your information apxs is the
APache eXtension System.

If you want to use locate, on recently created files, then you should
schedule locate to run updatedb more often. your locate is only as
recent as your last updatedb.


On Thu, 30 Dec 2004 10:39:50 -0500, blackwater dev
[EMAIL PROTECTED] wrote:
 I don't seem to have an apxs directory.  I don't even have an apache
 directory as apachectl resides in /usr/sbin/apachectl
 
 Of course apache was installed from the fedora install.
 
 How do I install this against apache?
 
 On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
  blackwater dev wrote:
   **First let me say that I am a linux newbie**
  
   I have installed Fedora 3 on a development box.  I then downloaded the
   php5 source and followed the php documentation:
   # ./configure --with-mysql
   # make
   # make install
 
  What did you build it against?  You have no webserver type in your
  configure line.  If I'm not mistaken, all you have above  will do is
  build the cli, and not the loadable module.
 
  --
  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
 
 
 
 --
 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



[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Static Keyword

2004-12-30 Thread Paul Higgins
Hi,
I was reading this article:  
http://www.phppatterns.com/index.php/article/articleview/6/1/1/ .

I have a question about it.  If you create this static Singleton object, 
does it persist in memory globally?  Or is it recreated each time a .php 
page is requested?

Thanks
Paul
_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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


Re: [PHP] How to argue with ASP people...

2004-12-30 Thread Jason Barnett
Ben wrote:
Daniel Schierbeck wrote:
Tony Di Croce wrote:

What points can I bring up in PHP's favor? In what areas does PHP 
trounce ASP?

First of all, ASP doesn't run on anything but Windows servers (unless 
you're willing to use ChiliASP... *hiss*)

Exactly! Portability is key.  Not being locked into a particular OS or 
web server allows for much more flexibility as you go forward.

- Ben
Flexibility of usage is another one.  Most PHP code out there has a 
license agreement that is pretty flexible (e.g. PHP license) and will 
allow you to sell the code, build commercial projects derived from the 
code, or use the code for your own personal (read: free) usage.

Most importantly: most PHP code out there is open source and plain text. 
 So if you want to change something you can usually do it with ease. 
Or you can at least see how it works and build something on your own 
that fits your purposes better.  I have learned a *tremendous* amount 
about how things work in the web by just looking at what other people 
have done in their projects (e.g. PEAR projects) and reading their 
comments (if the author bothered to comment the code :) ).

--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-generalw=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread blackwater dev
I actually recompiled it all but was getting permission errors.  I
then rebooted and now linux seems to want to use the old apache
instead of the new one I compiled with php support so I have to fix my
environment variables to point to the new apache and figure out my
permission errors.

Thanks!


On Thu, 30 Dec 2004 19:00:01 +, Rory Browne [EMAIL PROTECTED] wrote:
 Sorry if you recieved this twice. Head's wreaked today, and I keep
 making mistakes, such as posting to a person instead of to the list.
 
 If you're using apache2 then you need to add something along the lines
 of --with-apxs to your ./configure line. With apache1.3 it was
 --with-apxs=/path/to/apxs. I'm not sure what whether it's still
 --with-apxs, or --with-apxs2, but either way you'll probably be
 looking for the path to apxs2. Just for your information apxs is the
 APache eXtension System.
 
 If you want to use locate, on recently created files, then you should
 schedule locate to run updatedb more often. your locate is only as
 recent as your last updatedb.
 
 On Thu, 30 Dec 2004 10:39:50 -0500, blackwater dev
 [EMAIL PROTECTED] wrote:
  I don't seem to have an apxs directory.  I don't even have an apache
  directory as apachectl resides in /usr/sbin/apachectl
 
  Of course apache was installed from the fedora install.
 
  How do I install this against apache?
 
  On Thu, 30 Dec 2004 10:20:01 -0500, John Nichel [EMAIL PROTECTED] wrote:
   blackwater dev wrote:
**First let me say that I am a linux newbie**
   
I have installed Fedora 3 on a development box.  I then downloaded the
php5 source and followed the php documentation:
# ./configure --with-mysql
# make
# make install
  
   What did you build it against?  You have no webserver type in your
   configure line.  If I'm not mistaken, all you have above  will do is
   build the cli, and not the loadable module.
  
   --
   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
  
  
 
  --
  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] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread tr
John Nichel  wrote / napísal (a):
blackwater dev wrote:
I just went ahead and installed apache from source with apxs then
recompiled php5.  I then created a info.php file which simply prints
out phpinfo but get this error now.
Warning: Unknown: failed to open stream: Permission denied in Unknown 
on line 0

Warning: Unknown: Failed opening '/usr/local/apache2/htdocs/info.php'
for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line
0
Thanks!

*sigh*
http://groups-beta.google.com/groups?hl=enq=%22Permission+denied+in+Unknown+on+line+0%22qt_s=Search+Groups 

http://www.linuxquestions.org/questions/history/211964
as root switch to htdocs
and chmod 666 info.php
troby
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Why extra slashes???

2004-12-30 Thread Wiberg
Hi there!

Right now I'm creating a form that saves the text from a textarea to an
array. That doesn't seem to be any problem.
But when I save the contents, I get extra / ?

The code looks like this:
-

//Which main product category is to treat?
//
if (isset($_REQUEST[reqIDKategori])) {

$streqIDKategori = $_REQUEST[reqIDKategori];

}


//Save current main category to file
//
if (isset($_REQUEST[saveCategory])) {

//Open file for writing
//
$handle = fopen(../maincategorypages/ . $streqIDKategori . 
.html,wb);

//Get contents of textarea
//
$textArea = $_REQUEST[frmSaveArea];


//Save all info in textarea into file
//
fwrite($handle, $textArea);

//Close file
//
fclose($handle);

}


//Read maincategory html-file
//
function readFileCategory($ID) {

//Load file into array
//
$returnfile = file(../maincategorypages/ . $ID . .html);

//Send back array with fileinfo
//
return $returnfile;

}


//Show specific array to screen
//
function showArray($array) {

for ($i=0;$icount($array);$i++) {

echo $array[$i];

}

}

?
html
head
titlemain/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body bgcolor=#FF text=#00 background=../bkg/mainfyll.jpg
link=#00 vlink=#00 alink=#00
table width=100% border=0 cellspacing=0 cellpadding=0
  tr
td
  table width=100% border=0 cellspacing=2
cellpadding=2trtd

form
action=maincategory.php?saveCategory=yesreqIDKategori=?=$streqIDKategori?
 method=post name=frmSaveCatPage
textarea cols=50 rows=25
name=frmSaveArea?=showArray(readFileCategory($streqIDKategori))?/texta
rea
input type=submit value=Spara html för huvudkategori
/form
  /td/tr
  /table

  /td

!--Visa annonser i högerspalt--
?require(advertise.php);?

 /tr
  /table
/td
  /tr
/table

pnbsp;/p
pnbsp;/p
/body
/html



/G
@varupiraten.se
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.6 - Release Date: 2004-12-28

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



Re: [PHP] Quick compile question --with-oci8

2004-12-30 Thread Marek Kilimajer
Please, don't hijack threads.
Brian Duke wrote:
This has been going on for about a week now. I have an oracle client
installed. I have php4 source installed all on a stripped down fedora
server. We get various errors. Like the infamous ld can find XXX in
-lclntsh.
Correct me if I'm wrong but we will have to install oracle8 || 9i before we
can compile php --with-oci8. I don't really want to run oracle. Our local
server only needs to use the oci8 functions to log into the datawarehouse
and update our local mysql database but after a week of frustration I think
that's what we have to do. 

Thanks all.
I think you need to install only the client libraries.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread tr
tr  wrote / napísal (a):
John Nichel  wrote / napísal (a):
blackwater dev wrote:
I just went ahead and installed apache from source with apxs then
recompiled php5.  I then created a info.php file which simply prints
out phpinfo but get this error now.
Warning: Unknown: failed to open stream: Permission denied in 
Unknown on line 0

Warning: Unknown: Failed opening '/usr/local/apache2/htdocs/info.php'
for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line
0
Thanks!

*sigh*
http://groups-beta.google.com/groups?hl=enq=%22Permission+denied+in+Unknown+on+line+0%22qt_s=Search+Groups 

http://www.linuxquestions.org/questions/history/211964
as root switch to htdocs
and chmod 666 info.php
troby
It is also recomended to remove the apache binary rpm packages from
you system as root: rpm -e apache*
Then go to you /etc/init.d/ directory and create a shell script naming 
httpd_start: containing: #!/bin/bash

/usr/local/apachectl start
and another shell script naming as httpd_stop containing:
/usr/local/apachectl stop
go to /etc/rc.d/
and create symlink (ln -s /etc/init.d/httpd_start 
/etc/rc.d/rc3.d/S27httpd  and rc5.d/S27httpd) in dirs rc3.d and rc5.d 
pointing to /etc/init.d/httpd_start naming S27httpd

and then restart and it should work.
you can set permissions recursively this way: chmod -R 666 
/usr/local/apache/htdocs (to doc root)

hello
troby







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


Re: [PHP] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Marek Kilimajer
Rory Browne wrote:
Apologies Marek if you recieved this twice, I mailed you instead of
the list first time around.
me.is_confused() == true;
What does it matter whether errors show at the top or bottom of the
page. They are probably different errors that show up, some of which
show at the top, and others of which show up at the bottom.
I think it is important to understand that errors show up where they 
occur, it helps remove/debug these errors.

And I don't know of any kinds of errors that would relocate their 
messages around the output. So there are no /different errors that show 
up, some of which show at the top, and others of which show up at the 
bottom/

But all that aside, wouldn't it be better to remove/debug these
errors, instead of moving them around the page. Am I missing something
here?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Understanding flock()

2004-12-30 Thread Marek Kilimajer
Gerard Samuel wrote:
Im trying to simulate conditions, to see how flock works.
Can anyone verify with the example code below,
that data, never gets written to the file.
//1  //2 are supposed to be processes???
For me, the var_dump() reports -
int(7) bool(false)
Thanks
$fp = fopen('foo.txt', 'w'); //1
flock($fp, LOCK_EX) or die('Unable to lock'); //1
unlink('foo.txt') or die('Unable to remove foo.txt'); //2
$bytes = fwrite($fp, 'testing'); //1
fclose($fp); //1
var_dump($bytes, file_get_contents('foo.txt')); //1
To my knowledge (and might apply to unices only) unlink only unlinks 
file, it does not delete it. Unlinking removes link (reference, 
filename) to an inode that holds the file. Inode is deleted by the 
kernel once the link count referencing the inode reaches zero and the 
inode is no longer opened by any process. I hope I did not confuse you :-)

So the result is that even if process 2 unlinked the filename link, 
process 1 had opened the file (inode) so it's not removed untill it's 
closed and process 1 can write to it. file_get_contents() failed because 
the link no longer exists.

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


Re: [PHP] Warnings on the bottom of the pages on Linux

2004-12-30 Thread Rory Browne
That Marek seems to be my point exactly.

Aparently Mario would perfer his errors to show on the bottom instead
of on the top. I trying to figure out why this is, and why he wants
errors in his script at all?

me.level_of_confusion = CONFUSION_LEVEL_MAX;


On Fri, 31 Dec 2004 01:13:33 +0100, Marek Kilimajer [EMAIL PROTECTED] wrote:
 Rory Browne wrote:
  Apologies Marek if you recieved this twice, I mailed you instead of
  the list first time around.
 
  me.is_confused() == true;
 
  What does it matter whether errors show at the top or bottom of the
  page. They are probably different errors that show up, some of which
  show at the top, and others of which show up at the bottom.
 
 I think it is important to understand that errors show up where they
 occur, it helps remove/debug these errors.
 
 And I don't know of any kinds of errors that would relocate their
 messages around the output. So there are no /different errors that show
 up, some of which show at the top, and others of which show up at the
 bottom/
 
 
  But all that aside, wouldn't it be better to remove/debug these
  errors, instead of moving them around the page. Am I missing something
  here?


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



Re: [PHP] Why extra slashes???

2004-12-30 Thread John Holmes
Wiberg wrote:
Right now I'm creating a form that saves the text from a textarea to an
array. That doesn't seem to be any problem.
But when I save the contents, I get extra / ?
http://us4.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
--
---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] Quick compile question --with-oci8

2004-12-30 Thread John Nichel
Brian Duke wrote:
This has been going on for about a week now. I have an oracle client
installed. I have php4 source installed all on a stripped down fedora
server. We get various errors. Like the infamous ld can find XXX in
-lclntsh.
Correct me if I'm wrong but we will have to install oracle8 || 9i before we
can compile php --with-oci8. I don't really want to run oracle. Our local
server only needs to use the oci8 functions to log into the datawarehouse
and update our local mysql database but after a week of frustration I think
that's what we have to do. 

Thanks all.
You only need the client libraries, not the db itself.  If you have the 
Oracle CD's, the libraries will be on there (you can also download this 
from Oracle).

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


Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-30 Thread Al
You nailed it Curt.
Virtual Host Powweb removed the system default tmp directory without telling 
anyone.  All file uploading services were broken.

I fixed the problem in php.ini
Thanks everyone.

Curt Zirzow wrote:
* Thus wrote Al:
What is a $_FILE[user][error]= 6
I can't find Error level 6 in the manual or on Google.
Here is my files array:
[userfile] = Array
   (
   [name] = Readme.txt
   [type] =
   [tmp_name] =
   [error] = 6
   [size] = 0
   )
Doesn't make sense.  Readme.txt is simply a small text file on my local HD.

6 == Missing /tmp or similar directory. 

Which means that your php.ini's upload_tmp_dir isn't set properly.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what am I doing wrong? PHP5 on Fedora

2004-12-30 Thread John Nichel
tr wrote:
tr  wrote / napísal (a):
John Nichel  wrote / napísal (a):
blackwater dev wrote:
I just went ahead and installed apache from source with apxs then
recompiled php5.  I then created a info.php file which simply prints
out phpinfo but get this error now.
Warning: Unknown: failed to open stream: Permission denied in 
Unknown on line 0

Warning: Unknown: Failed opening '/usr/local/apache2/htdocs/info.php'
for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line
0
Thanks!


*sigh*
http://groups-beta.google.com/groups?hl=enq=%22Permission+denied+in+Unknown+on+line+0%22qt_s=Search+Groups 

http://www.linuxquestions.org/questions/history/211964
as root switch to htdocs
and chmod 666 info.php
troby
snip
you can set permissions recursively this way: chmod -R 666 
/usr/local/apache/htdocs (to doc root)
Do NOT do this.
1) You will make all your files world writeable...not good
2) By giving it the -R, you will have effectively taken away execute 
permission from not only /usr/local/apache/htdocs, but all the 
directories beneath it.  Directories need to have execute permission to 
be 'seen'.

Take a little time to read and understand your filesystem and it's 
permission levels.

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


Re: [PHP] Warnings on the bottom of the pages on Linux

2004-12-30 Thread John Nichel
Rory Browne wrote:
That Marek seems to be my point exactly.
Aparently Mario would perfer his errors to show on the bottom instead
of on the top. I trying to figure out why this is, and why he wants
errors in his script at all?
me.level_of_confusion = CONFUSION_LEVEL_MAX;
See, there's your problem.  It's not healthy to try and figure out why 
some people want to do things a certain way. ;)

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


RE: [PHP] How to argue with ASP people...

2004-12-30 Thread mail.pmpa
Don't mean to start a discussion whatsoever, I love php, but one thing i
can't do in php is Response.Redirect .
Apart from that no complains so far :)

* Happy New Year *

Pedro Almeida.


-Mensagem original-
De: Tony Di Croce [mailto:[EMAIL PROTECTED] 
 
I am fairly new to PHP, but I am loving it... I have recently gotten
involved in a business venture and I have been using PHP so far...
Recently I have taken on a partner, and he is a big ASP guy...
(...) 

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



Re: [PHP] How to argue with ASP people...

2004-12-30 Thread Rasmus Lerdorf
mail.pmpa wrote:
Don't mean to start a discussion whatsoever, I love php, but one thing i
can't do in php is Response.Redirect .
Apart from that no complains so far :)
header(Location: $url);
which, by the way, makes a hell of a lot more sense.  It's just an HTTP 
response header like any other response header and it is called 
Location, not Redirect.

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


RE: [PHP] How to argue with ASP people...

2004-12-30 Thread Robby Russell
On Fri, 2004-12-31 at 02:49 +, mail.pmpa wrote:
 Don't mean to start a discussion whatsoever, I love php, but one thing i
 can't do in php is Response.Redirect .
 Apart from that no complains so far :)
 
 * Happy New Year *
 
 Pedro Almeida.
 

Sure you can..

class Response
{

  function redirect($location)
  {
header(Location:  . $location);
  }

  function write($text)
  {
print $text;
  }

}

Response::Redirect(http://www.planetargon.com/;);

Response::Write(bar);

There, now we can compete with ASP.

;-)



-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
*--- Now supporting PHP5 ---
/


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



Re: [PHP] Why extra slashes???

2004-12-30 Thread Zareef Ahmed
Hi, 

   You can user stripslashes() function to remove them if gpc quotes
is creating some kind of confusion in your mind. BTW these quotes are
important in some security related  situations.

zareef ahmed.


On Thu, 30 Dec 2004 20:15:06 -0500, John Holmes
[EMAIL PROTECTED] wrote:
 Wiberg wrote:
  Right now I'm creating a form that saves the text from a textarea to an
  array. That doesn't seem to be any problem.
  But when I save the contents, I get extra / ?
 
 http://us4.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc
 
 --
 
 ---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
 
 


-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

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



Re: [PHP] How to argue with ASP people...

2004-12-30 Thread John Nichel
mail.pmpa wrote:
Don't mean to start a discussion whatsoever, I love php, but one thing i
can't do in php is Response.Redirect .
Apart from that no complains so far :)
http://us4.php.net/header
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Xemacs indentation for php

2004-12-30 Thread Song Ken Vern-E11804
Hi, 

I would like the behaviour of turning on the cc-mode indentation in the ?php 
? tags
but turning off when escaping and doing html. 

I have been looking at the cc-engine.el source and can't seem to find the place 
where I should change.

Is this behaviour possible?

thanx

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



RE: [PHP] How to argue with ASP people...

2004-12-30 Thread mail.pmpa
Can I do any session handling before calling header(Location: $url); ?

Pedro Almeida.


-Mensagem original-
De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 

mail.pmpa wrote:
 Don't mean to start a discussion whatsoever, I love php, but one thing i
 can't do in php is Response.Redirect .
 Apart from that no complains so far :)

header(Location: $url);

which, by the way, makes a hell of a lot more sense.  It's just an HTTP 
response header like any other response header and it is called 
Location, not Redirect.

-Rasmus

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



RE: [PHP] How to argue with ASP people...

2004-12-30 Thread Robby Russell
sure, add this to the top of your file:
ob_start();


On Fri, 2004-12-31 at 04:50 +, mail.pmpa wrote:
 Can I do any session handling before calling header(Location: $url); ?
 
 Pedro Almeida.
 
 
 -Mensagem original-
 De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED] 
 
 mail.pmpa wrote:
  Don't mean to start a discussion whatsoever, I love php, but one thing i
  can't do in php is Response.Redirect .
  Apart from that no complains so far :)
 
 header(Location: $url);
 
 which, by the way, makes a hell of a lot more sense.  It's just an HTTP 
 response header like any other response header and it is called 
 Location, not Redirect.
 
 -Rasmus
 
-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
*--- Now supporting PHP5 ---
/

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



[PHP] for win, does sapi/cgi fastcgi handle only 1 request at a time?

2004-12-30 Thread Xuefer Tinys
seems it will block all other php requests
i've looked into the source, and seems it's only pre-fork under *nix not win
any ideas?

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



[PHP] Hosting woes and PHP 4.3.8 install (Interland)

2004-12-30 Thread [EMAIL PROTECTED]
My hosting company is very stubborn when it comes to functionality.  They do
not compile their version of PHP 4.3.8 with DOM so now none of my XML
generating code works.

The environment is a virtual host meaning that I share space on a server
with other users but only I have access to my stuff.  The software packages
including Apache and PHP are installed with scripts that create links from
where the files should be to where the files actually are (their home in
virtual package land).  For example the httpd.conf file is not in the
/etc/httpd directory, a link is there to point Apache to the actual file.

I have access to make changes to these files, that is not my problem.  My
problem is breaking the other PHP dependent applications such as Squirrel
Mail.  

So my question is, where is php actually installed on a normal machine?  I
would like to compile 4.3.8 with DOM support, and point Apache to the new
.so file, in a location of my choice.  Does this sound possible if so would
it be this simple?

Thanks for the insight!
Tim


RE: [PHP] Quick compile question --with-oci8

2004-12-30 Thread Brian Duke
Thanks John,
Can you (or someone on the list) direct me to the oracle site where I can
download the client files? The only client files I saw were for the 10g
instantclient. Our current build says the libraries need don't exist with
that one.  

 -Original Message-
 From: John Nichel [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 30, 2004 6:19 PM
 To: php-general@lists.php.net
 Subject: Re: [PHP] Quick compile question --with-oci8
 
 Brian Duke wrote:
  This has been going on for about a week now. I have an oracle client
  installed. I have php4 source installed all on a stripped down fedora
  server. We get various errors. Like the infamous ld can find XXX in
  -lclntsh.
 
  Correct me if I'm wrong but we will have to install oracle8 || 9i before
 we
  can compile php --with-oci8. I don't really want to run oracle. Our
 local
  server only needs to use the oci8 functions to log into the
 datawarehouse
  and update our local mysql database but after a week of frustration I
 think
  that's what we have to do.
 
  Thanks all.
 
 You only need the client libraries, not the db itself.  If you have the
 Oracle CD's, the libraries will be on there (you can also download this
 from Oracle).
 
 --
 By-Tor.com
 ...it's all about the Rush
 http://www.by-tor.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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