[PHP] Problems compiling PHP 5.0.0b1

2003-07-01 Thread Mauricio Cuenca
Hello,

I've tried several times compiling PHP 5.0.0b1 on a Linux RedHat 8.0 using
this configure command:
./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5

And I get the following error:
configure: error: libxml2 version 2.5.1 or greater required.

Then, I downloaded and compiled  libxml 2.5.7 and the same error appears.

I've compiled several diffrent versions of PHP before without problems. Has
anyone had a similar problem ?

TIA,

_
Mauricio Cuenca



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



[PHP] PEAR Documentation

2002-09-05 Thread Mauricio Cuenca

Hello,

I just started to use some PEAR classes, by now, I'm dealing with PEAR::DB
that has a lot of examples and documentation but I can't find anything
similar for PEAR::HTML_QuickForm.

Where can I find documentation about this class ? I'm trying to learn it
just by trial and error but a list of functions, methods and properties
would be very nice.

Thanks,

_____
Mauricio Cuenca



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




[PHP] Sessions with register_globals = off

2002-09-06 Thread Mauricio Cuenca

Hello,

I'm working with register_globals turned off. I'm setting this session
cookie:

   if ($nresult) {
  if (mysql_numrows($nresult)) {
  session_start();
 $_SESSION['auth'] = 'TRUE'; } }

And then I'm checking if the cookie is set, but it doesn't work:
   if ($_SESSION['auth'] == 'TRUE') {
  show_menu(); }

Is there any error on my code ? What am I doing wrong ?
I read this on http://www.php.net/release_4_1_0.php:
"Another neat trick is that creating new entries in the $_SESSION array will
automatically register them as session variables, as if you called
session_register(). This trick is limited to the session module only - for
example, setting new entries in $_ENV will *not* perform an implicit
putenv()."

That's what I am not using sessione_register($variable).

TIA,

_
Mauricio Cuenca



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




Re: [PHP] Sessions with register_globals = off

2002-09-07 Thread Mauricio Cuenca

Sessions are now being registered, but I have a problem unregistering them.
This is the code that I'm using to test it:

kill.php
session_start();
print("ID = ".$_SESSION['id']); //The value is printed
print("PERMISOS = ".$_SESSION['permisos']); //The value is printed
unset($_SESSION['id']);
unset($_SESSION['permisos']);
print("ID = ".$_SESSION['id']); //The value is NOT printed
print("PERMISOS = ".$_SESSION['permisos']); //The value is NOT  printed
---kill.php-

If the page is reloaded, the result is exactly the same.

But if I keep reloading the page $_SESSION['id'] and $_SESSION['permisos']
have the same value. Is there any other way to unregister session variables
???

Thank you very much.
_____
Mauricio Cuenca


- Original Message -
From: "Daniel Guerrier" <[EMAIL PROTECTED]>
To: "Mauricio Cuenca" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, September 06, 2002 2:11 PM
Subject: Re: [PHP] Sessions with register_globals = off


> Here you go
>
> http://www.zend.com/manual/function.session-is-registered.php



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




[PHP] Crontab

2002-06-05 Thread Mauricio Cuenca

Hello,

I need to run a daily script on our website but I'm trying to avoid using
CRONTAB.

Is there any way that I can run this daily ?
Is there any equivalent to ASP's Application_OnStart for PHP ?

Thanks,

_
Mauricio Cuenca
[EMAIL PROTECTED]



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




[PHP] PEAR::Pager examples

2003-09-15 Thread Mauricio Cuenca
Hello,

I've been using the PEAR::DB_Pager class for a while, but looking at the
PEAR documentation I saw that there is another database paging class.
PEAR::Pager (http://pear.php.net/package/Pager/). It seems to be good, but I
couldn't find any documentation about it.

Has anyone had any experiencie with this package that can share ?

TIA,

____
Mauricio Cuenca

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



[PHP] Setlocale() not working

2003-10-24 Thread Mauricio Cuenca
Hello,

I'm trying to print the full date in spanish using the following lines:

setlocale(LC_TIME, 'es_ES');
strftime(DATE_FORMAT_LONG, mktime(0, 0, 0, 12, 31, 2002));

But my sysadmin tells me that the server doesn't have the spanish locale
installed. Is there a way that I can write the date in other language
without the need to harcode the weekday names ??? Using only the strftime
function ???

Thanks,

____
Mauricio Cuenca

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



[PHP] PATH_INFO in CGI Mode

2002-05-24 Thread Mauricio Cuenca

Hello,

I'm trying to work with the environment variable $PATH_INFO in a website
that has PHP as CGI, not as an Apache module. The differences are these:

1. As an Apache module when I get into this URL:
http://foo/script.php/path/info
everything works fine and $PATH_INFO equals to "/path/info"

2. But as CGI (the case of my Hosting Provider), the server sends a 500
Error and says "premature end of script headers".

Is this a normal behavior or its a problem with the server ? I'm hosting my
website on VERIO and can not change provider.

This is the answer that they gave me:
--
The above URL is not a valid path, and will not work when PHP is running as
a cgi. Please be advised that we have upgraded to PHP 4.1.2, so the error
coding is different. The above path is displaying an Internal Server error
because the php cgi is attempting to parse a path that does not exist.


Are they right ?

TIA,

_____
Mauricio Cuenca



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




[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca

Hello,

I've built a function that receives an array as an argument to create an
HTML drop-down list, but when I try to print the list this is all I got:

 Array[1]
 Array[1]


This is my code:
---

  Function TextList($sName, $aOptions)
  {
   $nCount = Count($aOptions); //Counts the elements of the array
   Print("\n");
   For ($i = 1; $i <= $nCount; $i++)
{
 Print(" $aOptions[1][1]\n");
}
   Print("\n");
  }

*/ Now I build the array */
   $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"),
Array(3,"Marzo"), Array(4,"Abril");

*/ And call the function */
TextList("my_list", $my_array);

I need to know how exaclty can I pass and receive an array as a function
argument. Hope you can help me, TIA.
--


Mauricio Cuenca



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




[PHP] Passing an array as an argument

2002-03-14 Thread Mauricio Cuenca

Hello,

I've built a function that receives an array as an argument to create an
HTML drop-down list, but when I try to print the list this is all I got:

 Array[1]
 Array[1]


This is my code:
---

  Function TextList($sName, $aOptions)
  {
   $nCount = Count($aOptions); //Counts the elements of the array
   Print("\n");
   For ($i = 1; $i <= $nCount; $i++)
{
 Print(" $aOptions[1][1]\n");
}
   Print("\n");
  }

*/ Now I build the array */
   $my_array = Array( Array(0,0), Array(1,"Enero"), Array(2,"Febrero"),
Array(3,"Marzo"), Array(4,"Abril");

*/ And call the function */
TextList("my_list", $my_array);

I need to know how exaclty can I pass and receive an array as a function
argument. Hope you can help me, TIA.
--


Mauricio Cuenca




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




[PHP] include_once()

2002-03-19 Thread Mauricio Cuenca

Hello,

I have a very long script with several functions in it. I wanted to split
the script into several files, so I created two sub-scripts and one main
script. This is the code from the main script:



MyFunction() is contained in the file "sub_script_1.php" which is properly
enclosed with valid PHP start and end tags.

But When I try to run the main script, I get this error:
Fatal error: Call to undefined function: MyFunction()in /main_script.php on
line 4.

How can I properly "divide" my script into several ones ???

TIA,

______
Mauricio Cuenca



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




Re: [PHP] include_once()

2002-03-19 Thread Mauricio Cuenca

Yes,

I read the documentation and took close note to include the start and end
tags... 

Thanks,

__
Mauricio Cuenca

- Original Message -
From: "anders nawroth" <>
To: "Mauricio Cuenca" ; <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 2:26 PM
Subject: Re: [PHP] include_once()


> Have you put 
> Anders
>
> - Ursprungligt meddelande -
> Från: "Mauricio Cuenca" <>
> Till: <>
> Skickat: den 19 mars 2002 17:43
> Ämne: [PHP] include_once()
>
>
> > Hello,
> >
> > I have a very long script with several functions in it. I wanted to
split
> > the script into several files, so I created two sub-scripts and one main
> > script. This is the code from the main script:
> >
> >  >
> > include_once("sub_script_1.php");
> > incude_once("sub_script_2.php");
> >
> > $temp = MyFunction();
> >
> > ?>
> >
> > MyFunction() is contained in the file "sub_script_1.php" which is
properly
> > enclosed with valid PHP start and end tags.
> >
> > But When I try to run the main script, I get this error:
> > Fatal error: Call to undefined function: MyFunction()in /main_script.php
on
> > line 4.
> >
> > How can I properly "divide" my script into several ones ???
> >
> > TIA,



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




Re: [PHP] include_once()

2002-03-19 Thread Mauricio Cuenca

No I haven't.

Wouldn't this affect my entire web site ?
I just need to include the files into a single script.

Thanks,
__
Mauricio Cuenca

- Original Message -
From: "Neil Freeman"
To: "Mauricio Cuenca"
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 12:30 PM
Subject: Re: [PHP] include_once()


> Have you remembered to set up PHP's include_path to point to the area
where
> your scripts are located?
>
> Neil
>
> Mauricio Cuenca wrote:
>
> > Hello,
> >
> > I have a very long script with several functions in it. I wanted to
split
> > the script into several files, so I created two sub-scripts and one main
> > script. This is the code from the main script:
> >
> >  >
> > include_once("sub_script_1.php");
> > incude_once("sub_script_2.php");
> >
> > $temp = MyFunction();
> >
> > ?>
> >
> > MyFunction() is contained in the file "sub_script_1.php" which is
properly
> > enclosed with valid PHP start and end tags.
> >
> > But When I try to run the main script, I get this error:
> > Fatal error: Call to undefined function: MyFunction()in /main_script.php
on
> > line 4.
> >
> > How can I properly "divide" my script into several ones ???
> >
> > TIA,
> >



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




[PHP] Exit();

2002-04-04 Thread Mauricio Cuenca

Hello,

I'm using recursive functions and call a function from inside another one.
The problem is that when I call the Exit(); function the whole program is
aborted. How can I quit just the current function, not the whole program ?


Function One()
{
If (!$var) { Exit(); }
}

Function Two();
{
One();//This line kills the program
Print("Hello"); //This is not printed =(
}


TIA,

__
Mauricio Cuenca


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