[PHP] Weird results with floor compiling with -march=pentium4 -mcpu=pentium4

2007-05-08 Thread Rodolfo Gonzalez Gonzalez

Hi,

Just for the record. I compiled PHP 5.2.2 with CFLAGS=-O2 -march=pentium4 
-mcpu=pentium4, as usual (I've done so with all the 5.x.x series, and the 
proc is a Pentium 4, of course) and a customer complained about weird 
results in one of his scripts. I isolated the problem to be related to the 
floor function. The problem was that it returned weird results. Sample 
script:


?php

$nt = 100;
$promrow2['uni_gifts'] = 1;
$promrow2['unidades'] = 10;
$calc_cnt=floor(($nt*$promrow2['uni_gifts'])/$promrow2['unidades']);

print $calc_cnt;

?

printed :.01

Casting to integer the value returned by floor solved the problem. I 
recompiled with CFLAGS=-O2 -march=i686 -mcpu=i686 and the problem was 
solved too. I've compiled 5.2.2 with nocona optimizations without problems 
in other machines, so I don't consider this a normal behavior. But report 
submited. Has anyone faced the same problem?.


Software:

PHP 5.2.2
GCC 3.2.2

Regards,
Rodolfo.

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



Re: [PHP] Re: performance.

2005-07-26 Thread Rodolfo Gonzalez Gonzalez

On Tue, 26 Jul 2005, Matthew Weier O'Phinney wrote:

this could be a silly question. Is there some performance penalty when
using the  operator [in heredoc]


Try doing some benchmarks using microtime(). My gut reaction is that
there shouldn't be any difference; heredoc syntax is simply another form
of quoting strings.



I had forgotten the heredoc name for that sintax style. I'll do some 
benchmarking. My reaction is the same, and even as there just one 
asignment, I guess the operation is faster



Thanks,
Rodolfo.

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



[PHP] performance.

2005-07-25 Thread Rodolfo Gonzalez Gonzalez

Hi,

this could be a silly question. Is there some performance penalty when 
using the  operator like this:


$var =EOP
add a bunch of text here
and here
EOP;

Just curious.

Thanks,
Rodolfo.

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



[PHP] memcached and objects.

2005-07-02 Thread Rodolfo Gonzalez Gonzalez

Good morning,

I would like to use PHP's memcached extension to store objects. However I 
keep getting the incomplete object everytime I try to operate on an 
object got from the cache. How can be an object stored in memcached and 
later recovered to work with it?. Is this possible?. I would thank you a 
lot if you point me to some example.


Thanks in advanced.

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



Re: [PHP] auto reply framework

2005-07-02 Thread Rodolfo Gonzalez Gonzalez

On Sat, 2 Jul 2005, Nate Tanner wrote:

I'm working on the design of a program for sending automatic messages to 
users, based on certain conditions. It seems like there should be some 
So the point is that I need to be able to set up rules for what each message contains, and when each message should be sent, based on selected conditions.

Is there anything out there (PHP/Mysql solution preferably) that might give 
some help with something like this?



Hi Nate,

maybe something here could help you: 
http://freshmeat.net/search/?q=membershipsection=projectsGo.x=0Go.y=0


I have done similar things with perl (could be also php from cli) and 
crontab, and a web interface for setting up things, but all handmade.


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



Re: [PHP] memcached and objects.

2005-07-02 Thread Rodolfo Gonzalez Gonzalez

On Sat, 2 Jul 2005, Jochem Maas wrote:
I would like to use PHP's memcached extension to store objects. However I 
keep getting the incomplete object everytime I try to operate on an 


load the class definition BEFORE you try to extract the object from the 
cache.



Thanks to Jochem and Brad for your answers. I see now where my problem is.

I forgot to post that the objects I want to cache are recordsets generated 
by Adodb. However, since the recordset class is generated by Adodb with a 
(I guess) factory class, and the object's class is not defined in a file 
with the same name as the class, how to figure out which file to load 
:-S ?  ... I've googled to see if there's some sample code for caching 
adodb recordsets, without success so far. Is someone aware of some class 
to cache Adodb recordsets in memcached?.


Thanks again,
Rodolfo.

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



[PHP] SCORM PHP

2005-06-25 Thread Rodolfo Gonzalez Gonzalez

Hello,

I have searched freshmeat/hotscripts/google/... for some class or simple 
PHP script (not a full LMS) to display SCORM content, without success. 
Does someone know about this topic or if such a class/script exists?, 
thanks a lot in advanced for your help.



Regards.

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



[PHP] Conflicts between c-client and MySQL

2004-12-14 Thread Rodolfo Gonzalez Gonzalez
Hello,

I'm trying to compile with: UW-IMAP's c-client 2004, MySQL 4.1.7,
php-5.0.3RC2 and php-5.0.2, configure somethingmorehere --with-imap
--with-mysqli, and I get this:

/usr/lib/libc-client.a(misc.o)(.text+0x8a4): In function `hash_reset':
/home/rodolfo/software/imap-2004a/c-client/misc.c:278: multiple definition
of `hash_reset'
/usr/lib/mysql/libmysqlclient.a(hash.o)(.text+0x130): first defined here
/usr/bin/ld: Warning: size of symbol `hash_reset' changed from 94 to 89 in
/usr/lib/libc-client.a(misc.o)
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

Any help is appreciated,
Rodolfo.

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



[PHP] Session file not written *solved*, but session variables *still* messed up.

2004-11-15 Thread Rodolfo Gonzalez Gonzalez
On Fri, 12 Nov 2004, Klaus Reimer wrote:
 Rodolfo wrote:
  The weirdness comes when in one frame the script will print Agent Smith
  while in the other frame of the same frameset the script which loads on it
  will print Thomas Anderson...

 On the other hand: Have you checked that your disk has enough room for
 more sessions? Maybe you are working on the bleeding edge of your
 harddisk capacity.

Hi,

I found the cause for this message:

---
Nov 15 12:22:02 http2 httpd: PHP Warning:  Unknown(): Failed to write
session data (files). Please verify that the current setting of
session.save_path is correct (/var/tmp/php) in Unknown on line 0
---

this is the cause:

---
Nov 15 12:22:02 http2 httpd: PHP Warning:  Unknown(): The session id
contains invalid characters, valid characters are only a-z, A-Z and 0-9 in
Unknown on line 0
---

and the configuration lines which cause these messages, are, IMO, these:

---
session.entropy_length = 16
session.entropy_file = /dev/urandom
---

Maybe some PHP or Zend guru could confirm this?.

On the other hand, it is still not clear why different session data is
appearing in different frames. Could some cache software (ie. Squid) being
messing up the cookies?, or maybe MMCache? :S

Thanks.

Regards,
Rodolfo.

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



Re: [PHP] Session file not written, session variables messed up.

2004-11-12 Thread Rodolfo Gonzalez
Hi Klaus,

On Fri, 12 Nov 2004, Klaus Reimer wrote:
  The weirdness comes when in one frame the script will print Agent Smith
  while in the other frame of the same frameset the script which loads on it
  will print Thomas Anderson...

 Are both frames loaded at the same time? It's not possible to have two
 concurrently running scripts access the same session at the same time


Yes, both are loaded at the same time, I mean, in the same frameset. I
don't use trans_sid, and I don't pass the SID constant nor the
session_name()=session_id() as a GET to the frame src's referred from the
frameset, so I relay on cookies. Both scripts also do a check against a
database to see if the session id stored on it is the same as the session
id which the login script stored in the $_SESSION array, for that
username, so it is supposed that every username logged on the scripts
would have one unique session id...


 always use session_start() in the PHP code. Maybe the auto_start session
   behaves differently. Maybe you can try disabling auto_start and start
 the session manually. I don't think it make a difference, but who knows.


I should try it anyway, indeed. Also, do you think that with using another
session handler (mm perhaps) instead of files the execution could speed up
or avoid file problems?. The load of the servers is not that high anyway.

I forgot to mention, I'm also using Turck MMCache as cache and
optimizer... I don't know if this could cause something weird (wouldn't
sound logical, but...). Turck MMCache version is 2.4.6.


 On the other hand: Have you checked that your disk has enough room for
 more sessions? Maybe you are working on the bleeding edge of your


Yes, I thought it too, but it still has some Gb of free space. I also
checked for problems with available file handlers/excesive opened files on
the OS side, but everything seems normal.

Thank you,
Rodolfo.

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



Re: [PHP] Maintaining sessions across multiple sites

2004-07-30 Thread Rodolfo Gonzalez Gonzalez
On Fri, 30 Jul 2004, Tom Rogers wrote:

 RD I'm in the process of building an application that has an adminstration
 RD back-end shared by multiple sites. I need to maintain a persistent session

 msession is designed for just this purpose


how reliable msession is?. I'm interested on it too.


Regards.

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



[PHP] Problem with PEAR DB MySQLi

2004-07-26 Thread Rodolfo Gonzalez Gonzalez
Hi,

I'm trying to use PEAR's DB class with the new PHP 5 MySQLi support on
MySQL 4.1.3, using this example from the PEAR's docs (with my parameters
of course). I'm getting DB unknown error messages after the query. The
same query from the mysql client works fine, there are no connection
problems... anyone has tried PEAR with mysqli?.

?php
// Create a valid DB object named $db
// at the beginning of your program...
require_once 'DB.php';

$db = DB::connect('mysqli://prueba:[EMAIL PROTECTED]:3306/mibase');
if (DB::isError($db)) {
die($db-getMessage());
}

// Proceed with a query...
$res = $db-query('SELECT * FROM users');

// Always check that result is not an error
if (DB::isError($res)) {
die($res-getMessage());
}
?

result:

DB Error: unknown error


Regards,
Rodolfo.

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



[PHP] Compilation problem with PHP5 and MySQL 4.1

2004-07-22 Thread Rodolfo Gonzalez Gonzalez
Hi,

I know that this should go to the php-inst ml, but I can not resubscribe
(the error in the P.S.).

I'm trying to install PHP 5 + MySQL 4.1.3 in Apache 1.3 and I'm getting
these messages:

(tons of first defined messages before, just pasted a sample below)
...
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x260): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x350): In function
`net_write_command':
: multiple definition of `net_write_command'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x350): first defined here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xa60): In function
`my_net_read':
: multiple definition of `my_net_read'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0xa60): first defined here
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1


I have installed MySQL from RPM's built from the official SRPMs.

Any help is appreciated.
Rodolfo.

P.S. the ml subscription system in php.net is failing due to this:

Warning: fsockopen(): php_hostconnect: connect failed in
/local/Web/sites/phpweb/include/posttohost.inc on line 29

Warning: fsockopen(): unable to connect to master.php.net:80 in
/local/Web/sites/phpweb/include/posttohost.inc on line 29

We were unable to subsribe you due to some technical problems.
Please try again later.

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



[PHP] Framework in PHP?

2004-03-05 Thread Rodolfo Gonzalez Gonzalez
Hello,

which free (as in beer) framework writen in PHP (OO) would you consider
the best for developing large web applications?. I was looking at Seagull
(http://seagull.phpkitchen.com/)... I would appreciate your comments on
this and other frameworks.

Thank you,
Rodolfo.

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



[PHP] Code still showing up :(

2002-12-19 Thread Lic. Rodolfo Gonzalez Gonzalez
Hi,

I'm still having the same problem, the PHP code is sometimes not
interpreted, but passed as text/plain to the browser. The MIME type is
configured correctly, and once (in the master httpd.conf). I even
recompiled Apache. The system: RedHat 6.2 (ancient, I know) with Apache
1.3.27 and PHP 4.2.3. My MIME type defs:

AddType application/x-httpd-php .php .php4 .php3 .phtml .html
AddType application/x-httpd-php-source .phps

The module loads correctly, and no error is shown in the logs. The problem
happens mainly with Horde/IMP (I'm using Horde's PEAR, BTW). I guess that
everything started when Perl was upgraded from 5.6.0 to 5.8.0, but I can't
see any connection.

Any idea is appreciated.

Thanks.



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




Re: [PHP] Code appearing suddenly!.

2002-12-17 Thread Lic. Rodolfo Gonzalez Gonzalez
On Tue, 17 Dec 2002, Matthieu Le Corre wrote:

 look at your apache httpd.conf file 
 maybe php type  is not correctly definy ...
 i've had the ame pb ... the mime type was definied twice ;)

Bad luck, the code is still appearing randomly. The script is parsed
correctly if the page is reloaded :(

Thanks anyway :)



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




[PHP] Code appearing suddenly!.

2002-12-16 Thread Lic. Rodolfo Gonzalez Gonzalez
Hi,

I've just recompiled PHP 4.2.3 on RedHat w/Apache, after having upgraded
from Perl 5.6.0 to 5.8.0 (I had to disable mod_perl for now, due to
incompatible libraries). But now something weird is happening: sometimes
as a page with PHP code loads in the browser, it's not processed by PHP,
but the PHP code is shown (!), and the weird part of the problem is that
sometimes the very same page gets executed correctly! (no code is
displayed, and of course no modification is done in httpd.conf or mime
types, etc.). Any idea of the cause of this weird problem?.

Thanks.


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




[PHP] Per instance disable_functions in CGI mode

2002-12-16 Thread Lic. Rodolfo Gonzalez Gonzalez
Hi,

some weeks ago I asked if it was possible to have a per apache-virtualhost
disable_functions list. Rasmus answered that this is not possible since
the interpreter is initialized once, and it'd be too expensive to reload
the config.

But, what about PHP as CGI?. I guess the disable_functions parameter still
applies for the php.ini only, but what if I create several php binaries,
each one with a different path to php.ini (kind of a mess if I have
several virtual hosts, I know, but I only wanna know if this setup is
possible :-) ). I guess that I could have then one disable_functions list
per CGI binarie, right?. I know that I'd need to prepend the #!/.../php
line to every script, but only once (I would not run /cgi-bin/php.cgi).

Regards.



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




[PHP] php_value disable_functions sintax?

2002-11-25 Thread Rodolfo Gonzalez
Hi,

I'm trying to use disable_functions inside an Apache's VirtualHost, like 
this:

php_value disable_functions basename,chgrp,chmod,phpinfo

I tried both with and without  but the functions are not disabled. I'm 
using php_flag safe_mode on in the same virtual host. Any help on what I'm 
doing wrongly is appreciated.


Thanks.
Rodolfo.




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




Re: [PHP] php_value disable_functions sintax?

2002-11-25 Thread Rodolfo Gonzalez
On Mon, 25 Nov 2002, Rasmus Lerdorf wrote:

 You can't disable functions in your httpd.conf.  That particular directive
 is probably the only one that is server-wide and can only be set in your
 php.ini file.  The reason is that it is too expensive to disable and
 re-enabled functions on a per-request basis which is what we would need to
 do if we allowed you to set it per-dir or per-vhost.

Hmm, that's a pitty, now I have two choices: disable user access and
modification of files on the server or modify the sources commenting out
the functions I want to disable (because having 3 Apache and PHP instances
is not well worth for just 2 poll scripts in two virtual hosts).

I guess I'll disable access to users.


Thanks anyway.




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




[PHP] File download + HTTP auth problem.

2002-11-05 Thread Rodolfo Gonzalez
Hello,

I have this simple script called index.php in a directory protected with
HTTP auth (require valid-user):

?php
  $archivo = '/somewhere/out/docroot/registro.csv';
  header('Content-Type: application/octect-stream');
  header('Content-Length: '.filesize($archivo));
  header('Content-Disposition: attachment; filename=registro.csv');
  readfile($archivo);
?

When I access the directory with Netscape/Mozilla/Galeon it works fine, 
Apache asks the login and password and the script sends the file. But 
with MSIE 6.x (from Windows XP) it does not work: it presents the download 
dialog asking to save or open the file, but then MSIE reports an error 
and does not download the file. I discovered later that Konqueror asks for 
the login and password again when the download starts. What could be 
causing this?. Thanks in advance.

Rodolfo.




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




RE: [PHP] Encrypted MySQL passwords

2002-09-27 Thread Rodolfo Gonzalez

On Thu, 26 Sep 2002, John Holmes wrote:
  BTW (and I have not checked the CVS/TODO, so I ask here), is
  there planned support for SSL  MySQL 4.x.x in PHP?.
 Yes. More info in Chapter 4.3.9.1 of the MySQL manual.

Nope, I mean: support for SSL+MySQL4 in PHP's mysql_connect. I know that
MySQL 4.0 supports SSL, but I don't know if PHP has/will have support for
MySQL connections using SSL in future versions.

Thanks.



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




RE: [PHP] Encrypted MySQL passwords

2002-09-27 Thread Rodolfo Gonzalez

On Fri, 27 Sep 2002, Rodolfo Segleau wrote:
  Nope, I mean: support for SSL+MySQL4 in PHP's mysql_connect. I know that
  MySQL 4.0 supports SSL, but I don't know if PHP has/will have support for
  MySQL connections using SSL in future versions.
 Rodolfo (Tocayo!), 

Hola!,

 The PHP mysql_connect will also use an int client_flag to enable SSL 
 connections. It seems that they are going to implement the exact same flags. 
 Note, it's planned for PHP v4.3.0

Those are real good news. Thanks a lot :)

Regards,
Rodolfo.




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




Re: [PHP] Encrypted MySQL passwords

2002-09-26 Thread Rodolfo Gonzalez

On Thu, 26 Sep 2002, Brad Bonkoski wrote:

 also might be better then sending it in the clear.

But I guess that the original poster wanted to know how to avoid the clear
text session originated by the client-server dialog itself, not the
passwords in a query (its easy to log the sessions using tcpdump, for
example). BTW (and I have not checked the CVS/TODO, so I ask here), is
there planned support for SSL  MySQL 4.x.x in PHP?.

Thanks,
Rodolfo.




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




Re: [PHP] formatting a filename

2002-09-05 Thread Rodolfo Gonzalez

On Thu, 5 Sep 2002, Javier Montserat wrote:

 i want to format the filename of an uploaded file as follows :-
 -- replace blankspace with _
 -- remove any illegal characters.
 Which string functions should I use to do this?

http://www.php.net/manual/en/function.ereg.php
http://www.php.net/manual/en/function.ereg.php




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




Re: [PHP] XML vs Everything Else

2002-09-04 Thread Rodolfo Gonzalez

On Tue, 3 Sep 2002, Geoff Hankerson wrote:
 Spend some time learning about xml and you won't regret it

Sorry for the off topic, but in fact XML is not that hard to learn, it's
just custom markup that needs to follow certain rules. The important part
is the parser or the program logic to work with the XML documents, IMHO.

Sorry again.



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




[PHP] Download site down?

2002-08-31 Thread Rodolfo Gonzalez

To the php.net webmaster, 

there seems to be a problem with the us2.php.net site: I reach it with 
ping, but going to 

http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip 

causes an eternal Sending request (and telneting to port 80 of that host 
doesn't open).

Regards.




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




Re: [PHP] Re: Pictures and sound in MySQL and access via PHP

2002-08-11 Thread Rodolfo Gonzalez

On Sat, 10 Aug 2002, lallous wrote:
  I'm making a on-line dictionary. I use PHP and a MySQL Database.
  Now I want to add audio-streaming (MP3) and pictures (JPG) to the database
  and retrieve it true PHP. Can sombody help me out with a little

If the files are not secret or for members only, you should better
store them somewhere under your http document tree, and store *only* their
filenames in the database, then you could provide a link to the file. I
think this would be the faster. Or if you want to protect the files, you
could place them outside your document tree, and then use fileread or
something similar to read them. But I'd suggest you to keep only the
filenames on the database, and store the files in the filesystem, it'd
better for the performance and integrity of the files.

Good luck.




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




Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0and 4.2.1

2002-07-22 Thread Rodolfo Gonzalez

On Mon, 22 Jul 2002, 1LT John W. Holmes wrote:
 This other guy needs to quit his freakin whining and just do his job. Or go
 use ASP...the choice is yours.

Or JSP, for that matter. I've just discussing with a friend about this 
security issue, and he was trying to convince me to move to Java... :)




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




[PHP] Benchmarking a site...

2002-07-11 Thread Rodolfo Gonzalez

Hi,

is it possible to benchmark a site/page which uses authentication via PHP 
sessions?. If so, could you please tell me some hints to do it?.

Thank you.
Rodolfo.



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




Re: [PHP] ??????????????????????????????????????????????????????````````````````````ØØØØØØØØØØ=?iso-8859-1?B?2NjY2NjY2NjFxcXFxcXFxcXFxcXFxcX

2002-07-09 Thread Rodolfo Gonzalez

To the kind moderator of the list: please kick off this guy (Erik
Hegreberg [EMAIL PROTECTED] ), he's really annoying. Or at least bounce
his e-mails back to him ;) ).

Thanks.


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




Re: [PHP] ????????????????????????????????????????????

2002-07-09 Thread Rodolfo Gonzalez

On Tue, 9 Jul 2002, Andrew Brampton wrote:

snip, because it was private e-mail

Yes Andrew, but why this guy don't read the d@mn footer which comes from
every mail and simple unsubscribes himself!!, even a newcomer/newbie can
learn how to do it after all the explanations which other list members
sent him.

Ok, no more mails on this subject, because we just follow his game.



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




RE: [PHP] Alpha Channel Question

2002-07-02 Thread Rodolfo Gonzalez

On Tue, 2 Jul 2002, Lazor, Ed wrote:
 The idea is to create a simple glare effect by taking a white circle and 
 making it more transparent around the edges.  Though this only produces a 
 white circle with fuzzy edges.  Can anyone tell me what I'm doing wrong and 

Which browser are you using to view the resulting PNG?. Because if it's 
MSIE, you won't be able to view it correctly (MSIE doesn't support Alpha 
Channels in PNG's directly, you must use a control to display them). Try 
with a best browser(tm), Mozilla, or NS, f. ex. :)

Hope this helps.




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




Re: [PHP] Resoltuion

2002-06-21 Thread Rodolfo Gonzalez

On Thu, 20 Jun 2002, Edgar wrote:
 Are there any way to know what screen resolution use a user in your
 monitor?

From a quick search with Google:

http://www.alt-php-faq.org/local/89/

Good luck.



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




Re: [PHP] download

2002-06-11 Thread Rodolfo Gonzalez

On Tue, 11 Jun 2002, Kris Vose wrote:
 are there any php functions that handle downloads.  For Instance I want to create a 
link that contains a url string.  In this string a variable is defined as a file.  
This file will be downloaded when the user clicks on the link.  How do you handle 
this file in php?  Is there a function that will do this.  I have tried the copy 
function but it does not seems to work.

There are some scripts  hotscripts.com

Basically you use http://www.php.net/header to do the trick (but I have
found some little problems with MSIE).

Good luck.



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




[PHP] Getting info from a realvideo file.

2002-06-11 Thread Rodolfo Gonzalez

Hello list,

I'm wondering if there's any way to get the info of a realvideo file 
(resolution, author, and so on). I know rm is a closed format, but maybe 
you know of something, done either in PHP or in another language.

Thank you,
Rodolfo.




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




Re: [PHP] Secure File Upload

2002-06-05 Thread Rodolfo Gonzalez

On Wed, 5 Jun 2002, Lowell Allen wrote:

 Add this to your HTML form:
 input type=hidden name=MAX_FILE_SIZE value=1024

The manual says this can be easily bypassed.

Regards.



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




Re: [PHP] Re: [PHP-DEV] Timeline for Apache 2 full use?

2002-05-14 Thread Rodolfo Gonzalez

On Tue, 14 May 2002, Richard Archer wrote:
 Aah, but by the same logic, if Apache 2.0 with PHP4 can provide the
 users with a faster, more stable service, it's bad *not* to use it.

It's bad if the beasts are experimental.

Now, I guess this is for the devel list:

libmcrypt4-2.4.19-1mdk
libmcrypt4-devel-2.4.19-1mdk
mcrypt-2.5.10-1mdk

-- begin --

mcrypt.c: In function `zm_startup_mcrypt':
mcrypt.c:272: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:273: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:274: `MCRYPT_BLOWFISH_128' undeclared (first use in this 
function)
mcrypt.c:274: (Each undeclared identifier is reported only once
mcrypt.c:274: for each function it appears in.)
mcrypt.c:275: `MCRYPT_BLOWFISH_192' undeclared (first use in this 
function)
mcrypt.c:276: `MCRYPT_BLOWFISH_256' undeclared (first use in this 
function)
mcrypt.c:277: `MCRYPT_BLOWFISH_448' undeclared (first use in this 
function)
mcrypt.c:278: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:279: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:280: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:281: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:282: `MCRYPT_IDEA' undeclared (first use in this function)
mcrypt.c:283: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:284: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:285: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:286: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:287: `MCRYPT_RC2_128' undeclared (first use in this function)
mcrypt.c:288: `MCRYPT_RC2_256' undeclared (first use in this function)
mcrypt.c:289: `MCRYPT_RC2_1024' undeclared (first use in this function)
mcrypt.c:290: `MCRYPT_RC4' undeclared (first use in this function)
mcrypt.c:291: `MCRYPT_RC6_128' undeclared (first use in this function)
mcrypt.c:292: `MCRYPT_RC6_192' undeclared (first use in this function)
mcrypt.c:293: `MCRYPT_RC6_256' undeclared (first use in this function)
mcrypt.c:294: `MCRYPT_SAFER_64' undeclared (first use in this function)
mcrypt.c:295: `MCRYPT_SAFER_128' undeclared (first use in this function)
mcrypt.c:296: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c:297: `MCRYPT_SERPENT_128' undeclared (first use in this function)
mcrypt.c:298: `MCRYPT_SERPENT_192' undeclared (first use in this function)
mcrypt.c:299: `MCRYPT_SERPENT_256' undeclared (first use in this function)
mcrypt.c:300: `MCRYPT_TWOFISH_128' undeclared (first use in this function)
mcrypt.c:301: `MCRYPT_TWOFISH_192' undeclared (first use in this function)
mcrypt.c:302: `MCRYPT_TWOFISH_256' undeclared (first use in this function)
mcrypt.c:303: warning: passing arg 3 of `zend_register_long_constant' 
makes integer from pointer without a cast
mcrypt.c: In function `zif_mcrypt_get_cipher_name':
mcrypt.c:1497: warning: assignment makes pointer from integer without a 
cast
make[3]: *** [mcrypt.lo] Error 1
make[3]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
make[2]: *** [all-recursive] Error 1
make[2]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext/mcrypt'
make[1]: *** [all-recursive] Error 1
make[1]: Saliendo directorio `/usr/src/RPM/BUILD/php-4.2.1/ext'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.95528 (%build)

-- end --

Apache 2.0.35, PHP 4.2.1

Regards.




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




RE: [PHP] Secure MySQL connections in PHP with 'stunnel'

2002-04-29 Thread Rodolfo Gonzalez

On Mon, 29 Apr 2002, Stefen Lars wrote:
 However, I am interested in learning how to connect directly to the MySQL 
 port, as in a second step of the project I am working on, various data from 
 various servers will be handled. The 'dump to a file' approach, while fine 
 in my little example below, will no longer be manageable in step two.

Hi, AFAIK MySQL 4.x.x (alpha) has support for SSL, but I guess the PHP 
mysql extension won't have it until MySQL 4.x.x is stable (?).

Anyway, since the people from MySQL are pushing the use of 4.x.x, it'd be 
cool if PHP adds this SSL support :)

Regards,
Rodolfo.


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




RE: [PHP] file download in IE

2002-04-23 Thread Rodolfo Gonzalez

On Tue, 23 Apr 2002, .ben wrote:

 I think this is only an issue with an un-patched IE5.01, anything higher
 than that should work fine.

In my experience, there're problems even with MSIE 6.x.

Regards,
Rodolfo.


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




Re: [PHP] Browser cache

2002-04-23 Thread Rodolfo Gonzalez

http://www.php.net/manual/en/function.header.php

RT... M :)

On Tue, 23 Apr 2002, José León Serna wrote:

 Hello:
 How could I disable the browser cache?, I have a script that generates
 an image and shows it via IMG SRC=myimage. The problem is if I change
 the image, the browser doesn't reflect the changes until I push refresh. I
 supose is sending a header, but which header?
 
 Best Regards.
 
 QaDRAM Studio, RAD Development for the WEB
 http://studio.qadram.com
 
 
 


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




Re: [PHP] The so-called improvment in PHP 4.2.0

2002-04-22 Thread Rodolfo Gonzalez

On Mon, 22 Apr 2002, Leif K-Brooks wrote:
 The only problem with that is that I have at least 50 scripts that are using
 the old thing!

You could auto_prepend the file which has the code for backwards 
compatibility of the variables.



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




RE: [PHP] nl2br returns BR /? normality or a bug?

2002-04-05 Thread Rodolfo Gonzalez

On Sat, 6 Apr 2002, Maxim Maletsky wrote:
 But again (I like insisting on such things),
 Why do I have it now and didn't have it before? Why did it change
 anyway? I haven't seen it on any other my server and I use it quite a
 lot.

Directly from the manual:

Note:  Starting with PHP 4.0.5, nl2br() is now XHTML compliant. All 
versions before 4.0.5 will return string with 'br' inserted before 
newlines instead of 'br /'.

http://www.php.net/manual/en/function.nl2br.php

Regards.


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




RE: [PHP] strip_tags() problem

2002-04-04 Thread Rodolfo Gonzalez

 -Original Message-
 From: Ryan Govostes [mailto:[EMAIL PROTECTED]]
 Subject: [PHP] strip_tags() problem
 I've tried several variations of the above, such as using preg_replace() 
 instead of strip_tags() and readfile() instead of include(), but it does 
 not work at all, no matter what. Does anyone know why?

http://www.php.net/fopen

Regards.
Rodolfo.


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




RE: [PHP] eregi_replace

2002-04-04 Thread Rodolfo Gonzalez

I got this as output:

V:\memo\F0001\abcdef.com
V:\memo\F0001\abcdef.com

But no errors. Where does it fail?

php-4.0.6-5mdk

On Thu, 4 Apr 2002, Rick Emery wrote:

 I think you found a bug in PHP.
 
 I even tried simple things like:
 $qq = V:\\memo\\F0001\\abcdef.com;
 print $qq\n;
 $qx = ereg_replace(V:\\memo,,$qq);
 print $qx;
 
 and it failed


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




RE: [PHP] Reliability of sessions

2002-04-04 Thread Rodolfo Gonzalez

On Thu, 4 Apr 2002, Vladislav Kulchitski wrote:
 Even though sessions are more handy, I still don't know what happens if
 cookies are disabled in the client's browser.

You don't even need to use cookies to support sessions. It's all in the 
manual.

Regards,
Rodolfo.


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




RE: [PHP] eregi_replace

2002-04-04 Thread Rodolfo Gonzalez

On Thu, 4 Apr 2002, Rick Emery wrote:
 it should print:
 V:\memo\F0001\abcdef.com
 \F0001\abcdef.com

Indeed, sorry for the lapsus. In fact, look at this:

in:

$qq = V:\\memo\\F0001\\abcdef.com;
print $qqbr\n;
$qx = ereg_replace('V:\\','',$qq);
print $qx;

out:

Parse error:  parse error in /home/rodolfo/public_html/test.php on line 5

in:

$qq = V:\\memo\\F0001\\abcdef.com;
print $qqbr\n;
$qx = ereg_replace(V:\\,'',$qq);
print $qx;

out:

V:\memo\F0001\abcdef.com
Warning:  Trailing backslash in /home/rodolfo/public_html/test.php on line 
5

Regards,
Rodolfo.




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




RE: [PHP] Email Verification

2002-02-24 Thread Rodolfo Gonzalez

On Mon, 25 Feb 2002, Martin Towell wrote:
 You can use sockets and connect to their mail server (bit after the @) and
 pretend to send an email to them, but cancel the request before you
 actually send anything - doesn't always work though, as some servers will
 report back the all users are correct

Anyway, you'd have problems, because for @something sometimes something 
has a MX pointing to something else. Also, with regex it'd be a bit 
difficult (I just remember when I propossed to use e-mail checks in IMP, 
the guys came with a two page long regex just to cover one part of the RFC 
:( ). Anyway for general pourpose it'be useful the class by Manuel Lemos 
(look for it in php classes).

Regards.




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




Re: [PHP] Re: PHP and HTTPS

2002-02-19 Thread Rodolfo Gonzalez

On Mon, 18 Feb 2002, Michael Kimsal wrote:

  on IE on pc a this page cannot be displayed error (with possible
  reasons like your browser needs to be set to accept SSL2 and SSL3 [it is
  by the way]) is generated half of the time. the other half it works.
 We've worked with this several times - it's an issue with IE under 
 Windows.  The claim is that it only affect 'high security' (SGP or 
 something) but my own experience is that it's always affected.  IE
 just won't work right with SSL if the web server isn't IIS.  You pretty 
 much have no choice but to live with it or move to IIS as a server platform.

Then maybe it's not a bug in MSIE, but a feaure included to force people
to move to IIS+Win2k, just because most people use MSIE, and don't know
about other browsers. That's typical from M$ :(

Sorry for the semi-off-topic.

Regards.


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




Re: [PHP] Re: PHP and HTTPS

2002-02-19 Thread Rodolfo Gonzalez

On Mon, 18 Feb 2002, J Smith wrote:
 plaintext, no SSL at all. Useful if you want to keep your password safe 
 during transmission, but it sucks that everything can't be encrypted.

That's the way hotmail works too, f. ex. I guess it's to increase speed.



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




RE: [PHP] PHP and Apache authorization: how to logout. Help!

2002-02-02 Thread Rodolfo Gonzalez

On Fri, 1 Feb 2002, Matthew Walker wrote:
 Does anyone have the answer for this question? I need it too...

As I learnt before, it's not possible without closing the user's browser.

 My site is in directory which is protected with .htaccess file.
 I want to develope a logout function, which can reset Apache
 authorization.


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




RE: [PHP] Best way to frequently check database?

2002-01-31 Thread Rodolfo Gonzalez

On Thu, 31 Jan 2002, Rick Emery wrote:
 To timeout users after 20 minutes, use a cookie which is set for 20 minutes.

But once again you can have problems with cookies, they're not reliable
(user can have cookies support turned off) and they tend to be good for
CSS attacks :(

You could have a timestamp updated in every access to a page, and then a
cron job to delete the entries with timestamps older than some interval
of time. But I guess that if your app will have tons of load, this is not
a very good solucion :)

Regards.


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




Re: [PHP] PHP Chat REALTIME

2002-01-22 Thread Rodolfo Gonzalez

On Tue, 22 Jan 2002, Joffrey van Wageningen wrote:
 socket to the server (read: the php script running). the only realy useful
 language is javascript becouse flash and java are not portable on some
 platforms. the next problem is javascript isnt able (for security reasons)
 to open a socket to the outside.

But it would be better to have just a server written in C/C++/whatever and
then a Java applet to connect to the server from the browser, just as
almost every chat around the www do (even an IRC server would do the job
propperly secured). Disadvantages:  the browser must support Java applets
(not a big deal anyway, since with an HTML chat you'll most likely need
frames). I see this solution simpler.

Regards.





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




[PHP] MySQL 4.x's SSL connections from PHP.

2002-01-22 Thread Rodolfo Gonzalez

Hi list,

again with my question, but now a bit different: I guess the current
version of PHP doesn't support the connection to a MySQL server using the
SSL features provided by the 4.x series of MySQL for an encrypted
connection (correct me if I'm wrong, please). Is it planned to include
this support in a near version?.

Thank you.
Rodolfo.




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




[PHP] Connection to MySQL with SSL.

2002-01-21 Thread Rodolfo Gonzalez

Hi,

if a MySQL server is compiled with SSL support (that's for the 4 series),
is it possible to use this secure connection from a PHP script (with
mysql_connect)?.

Thank you.



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




Re: [PHP] Frames and Sessions

2001-11-13 Thread Rodolfo Gonzalez

On Tue, 13 Nov 2001, Martín Marqués wrote:
  I have tried starting a session in the main frameset file, then adding
  ?=SID? to the URLs of the frame files, which sort of works but breaks
  where JavaScript is used for buttons in one of the frames. JavaScript
  doesn't seem to cope with the PHP tags.

Append manually the ?=SID? (or session_name().=.session_id()) to the
javascript code it works well :)



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




[PHP] Deleting HTTP auth...

2001-10-19 Thread Lic. Rodolfo Gonzalez Gonzalez

Hello list,

Is it possible to delete the data from an Apache's HTTP authentification
directly from a PHP script?. I know that the username/password pair is
stored in two variables which are sent by the client to the server,
right?. is it possible to alter them from PHP¿?.

Thanks a lot,
Rodolfo.


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




Re: [PHP] Problem: ereg doesn't work ok (?).

2001-09-25 Thread Lic. Rodolfo Gonzalez Gonzalez

On Thu, 20 Sep 2001, * RzE: wrote:
  This sometimes work, but sometimes it doesn't randomly, even with the same
  (apache-1.3.20, rh-7.1) and it's the same. Any help is appreciated. Thank
 Ehhh... works fine here! Dunno what's wrong. Don't you do anything
 almost a complete year using the link it produces. No prob at all.

I noticed something I haven't before: I'm generating a RPM for php-4.0.6
which is what I'm installing, but using the .spec file from the 4.0.4
which comes with RedHat. Well, in the configure it had
--with-regex=system. I removed this option, recompiled, and the regex'es
seem to be working fine now. The --with-regex=system comes by default in
the RedHat RPM for PHP.

Thank you.
Rodolfo.

P.S.
 $yesternews = date(Y-m-d, mktime(0,0,0,$regs[2],$regs[3]-1,$regs[1]));

Indeed. Cool, thanks :)


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




[PHP] Globals and HTTP_SESSION_VARS variables.

2001-09-25 Thread Rodolfo Gonzalez Gonzalez

Hi,

Is here anyway to make a variable like $var not the same than
$HTTP_SESSION_VARS[var], when register_globals=1?. (where $var is in the
script scope).

I read in a changelog that this is relatively recent (make $var the same
than $HTTP_SESSION_VARS[var]).

Thank you.

Regards,
Rodolfo.


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




Re: [PHP] PHP vs M$.NET C#?

2001-09-19 Thread Lic. Rodolfo Gonzalez Gonzalez

On Wed, 19 Sep 2001, Christian Reiniger wrote:
 Not at all I'd guess.
 C# is MS's reaction to Java, which has been around for quite some years
 now. And there's nothing new / innovative in C#

Indeed, its their reaction against the lawsuit which MS lost. So, if they
cannot have Java, they do thei own language, and with our bad luck and
their marketing, C# will prevail. PHP would be in the level of ASP.

Regards.



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




Re: [PHP] Problem: ereg doesn't work ok (?).

2001-09-18 Thread Lic. Rodolfo Gonzalez Gonzalez

On Tue, 18 Sep 2001, * RzE: wrote:

  and get DD-MM-, but with well formed -MM-DD it doesn't match!. Is
  this a bug?.
 It would help if you send the code you're using, 'cause we can't see
 what you're doing now. FAFAIK it should just be possible. See the

Sure:

--- start ---

$datenews = urldecode($datenews); // just in case, but it's the same
  // without this line and the one below.
$datenews = trim($datenews);

if (!ereg(([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}), $datenews, $regs)) {
echo Duh! that is not a date, u kiddie: $datenews.;
exit;
}
else echo Cool! it is a date. Continue the proggie.;

--- end ---

where $datenews is passed as a get variable, which is obtained with this:

--- start ---

// the $regs array comes from the ereg expression above (the one which
// doesn't work as expected).

$timestamp = mktime(0,0,0,$regs[2],$regs[3],$regs[1]);
$yesterday = $timestamp - 86400; // one day before... that's yesterday :)
$yesternews = date(Y-m-d,$yesterday);

// here I pass the new datenews to myself:

print a href=\$PHP_SELF?datenews=.urlencode($yesternews).\Older news/a\n;

--- end ---

This sometimes work, but sometimes it doesn't randomly, even with the same
date both times, and the worst thing is that the failure notice prints
the right date in the right format. Now I went back to php-4.0.6
(apache-1.3.20, rh-7.1) and it's the same. Any help is appreciated. Thank
you.

Regards.
R.


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




Re: [PHP] Re: Problem: lost session id when htaccess'ing.

2001-09-18 Thread Lic. Rodolfo Gonzalez Gonzalez

On Tue, 18 Sep 2001, Chris Lee wrote:
 - you have cookie support on or off ?
 - you using any header redirects ? (you have to manually add the SID to
 URI's)

Sorry for the lenght of this mail.

PHP compiled with --enable-trans-id, so PHP adds SID to the URL.

session.use_cookies = 0, session.referer_check =, session.auto_start = 1,
session.name = SID

Having this doc tree:

/index.html
   |
   \___ systems/index.html
   |___ .htaccess

--- /index.html ---

!-- where systems/ is htaccess protected, using a hacked version of
mod_auth_mysql --
!-- here PHP attaches the first SID (supposed to be taken by
systems/index.html automagically, as session.auto_start = 1 --
a href=systems/index.htmlEnter/a

--- /index.html ---

Now:

--- systems/index.html ---

?php
if ($HTTP_SESSION_VARS[inside] != 1)
   // register all the session variables, etc.
?
frameset cols=100,*
   frame src=menu.html !-- here php attaches the *new* SID, not the --
   !-- passed from /index.html --
   frame src=main.html
/frameset

--- systems/index.html ---

Do I need to use the SID constant with session_id() to set the first
session ID? (I mean, the one from the href who taked me to the systems/
directory).

Thanks,
Rodolfo.


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




[PHP] Problem: lost session id when htaccess'ing.

2001-09-17 Thread Lic. Rodolfo Gonzalez Gonzalez

Hello,

I have a problem with sessions: I have php with sessions autostarting,
compiled with transid support. I have a homepage with a link to another
page protected via Apache's htaccess. Well, the href's in the homepage get
the correct SID=md5 session id, then I click the link, I give login and
password, Apache checks and accepts the data, but then in the next page I
get a new session_id value!! (as if the SID passed in the URL were being
lost!). I guess this is not normal. What can I do?.

Many thanks in advanced.
Rodolfo.

P.S. apache-1.3.20, custom mod_mysql_auth, php-4.0.8-dev (latest snapshot,
4.0.6 had a bug in the imap code, and I haven't returned to 4.0.5 yet).



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




[PHP] Problem: ereg doesn't work ok (?).

2001-09-17 Thread Lic. Rodolfo Gonzalez Gonzalez

Hello,

I have a problem with ereg: following the example from the documentation
(see the ereg page in the manual), I'm using it to parse a -MM-DD date
and get DD-MM-, but with well formed -MM-DD it doesn't match!. Is
this a bug?.

Regards,
Rodolfo.

php-4.0.8-dev  (maybe the problem is due to the dev, but I'd like to
confirm it).




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




[PHP] Sessions and img src=...

2001-04-04 Thread Lic. Rodolfo Gonzalez Gonzalez

Hi there,

I have a problem. I am trying to use a simple php script to display a JPEG
from a "protected" catalog (the image files are out of the web tree). It's
called from an IMG tag, like this:

--- main file ---

?php
   session_start();
?
html
...

?php
session_register("imgname");
$HTTP_SESSION_VARS[imgname] = "something.jpg";
print "img src=\"viewer.php?".session_name()."=".session_id()."\"";
?

---

In viewer.php I use session_start() to resume the current session. However
this doesn't work at all. Is there any restriction for sessions when you
call the script like I'm doing?:

--- viewer.php --

?php

session_start();

function LoadJPEG($imgname1) {
   $im = @ImageCreateFromJPEG ($imgname1);
   if (!$im) {
  $im = ImageCreate (150, 30);
  $bgc = ImageColorAllocate ($im, 255, 255, 255);
  $tc  = ImageColorAllocate ($im, 0, 0, 0);
  ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);
  ImageString($im, 1, 5, 5, "Error loading $imgname1", $tc);
   }
   return $im;
}

Header("Content-type: image/jpeg");

// here $HTTP_SESSION_VARS[imgname] is empty... :(

$im = LoadJPEG("/cat/$HTTP_SESSION_VARS[imgname]");

ImageJPEG($im);
ImageDestroy($im);

?

---

Any help is appreciated.

Regards.
Rodolfo.



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




[PHP] Silly sessions problem.

2001-03-22 Thread Lic. Rodolfo Gonzalez Gonzalez

Hello list,

I just can't make sessions work. This is driving me mad, I'm sure it's
something silly, but maybe my headache made me a fool :P :) ... could you
please tell me what's wrong here?. hello.php has a link to next.php:

--- start of hello.php ---

?php
   session_start();
   session_register("hello");
   $hello = "Hello World!";
?
html
headtitle/title/head
body
?php
   print "a href=\"next.php\"$hello/a";
?
/body
/hmtl

--- end of hello.php ---

-- start of next.php

?php
   // following the manual, I need to call session_start to resume the
   // session I started at hello.php (?)

   session_start();
?
html
headtitle/title/head
body

?php
   print "Hello is set to: $HTTP_SESSION_VARS[hello] - $hello";
?

/body
/html

--- end of next.php ---

Now I click on the hyperlink and get a new cookie (produced by call to
session_start() in next.php). Using PHP4.0.4pl1 (with --enable-trans-id),
Apache, and the linux version of ns navigator as browser.

Thank you!,
Rodolfo.



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




Re: [PHP] Silly sessions problem.

2001-03-22 Thread Lic. Rodolfo Gonzalez Gonzalez

 I just can't make sessions work.

Now this is strange! I copied exactly the same scripts I posted to my
win98SE box running Apache 1.3.19 and PHP  4.0.4pl1 and they worked!.
Which could be the reasons for the sessions not to work?. Do they work
transparently for name based virtuals, don't they?.




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




Re: [PHP] deleting cart items on session expire

2001-02-16 Thread Lic. Rodolfo Gonzalez Gonzalez

On Fri, 16 Feb 2001, Jason Brooke wrote:

  However, there's no necessity to have the cgi version if you already have
  the modular version.  All that is needed is to call the appropriate script
 No there's not - I think that goes without saying though.
 install' - then you can use this awesome tool from the command line without
 having to invoke a http request to your webserver usng a third-party tool.

And add to this that then you can place the script you want to run out of
the web tree, just in case you run something sensitive :)

My 2 cents.


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




Re: [PHP] Mail-Encryption

2001-02-09 Thread Lic. Rodolfo Gonzalez Gonzalez

On Thu, 8 Feb 2001, Richard Lynch wrote:

 Maybe you can create a custome keyring for just the web-usage of public keys
 only...

Hum... I wouldn't like it, anyway. Hmmm, is there any other way to pass
"stdin" to an external program, other than using echo and a pipe?. I've
also tried by placing echo and gpg in the php "exec dir" and chown'ing
them to the uid.gid of the php script, and it didn't work.

Thanks.



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




Re: [PHP] Mail-Encryption

2001-02-09 Thread Lic. Rodolfo Gonzalez Gonzalez

On Fri, 9 Feb 2001, Christian Reiniger wrote:

  This returns echoes the part after the | in safe-mode.
 echo only outputs something. it doesn't return anything.

Yup, grammar error, I meant "prints to stdout" :)

 Write
 $comm = "$data | " . $this-gpg_command;

Didn't work that way :(

 and:
 $this-gpg-kommand is an illegal (no minus in identifiers!)

Certainly, my typo in the post :)

Thank you.
Rodolfo.




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




Re: [PHP] Mail-Encryption

2001-02-08 Thread Rodolfo Gonzalez Gonzalez

On Thu, 8 Feb 2001, Richard Lynch wrote:

 You can find a long-winded post from me a year or two ago about my trials
 and tribulations (and a *lot* of help from others to get me going).

I found a pgp class and took parts of it to work with gpg, but it doesn't
work in safe-mode. I'm using this pipe to pass the data to encrypt to gpg:

   $comm = "echo '$data' | $this-gpg-commmand";
   $fd = popen("$comm","r");

   if (!$fd) {
  return -2;
   }

   $encrypted = "";
   while (!feof($fd)) {
  $encrypted .= fgets($fd,4096);
   }

   pclose($fd);

This returns echoes the part after the | in safe-mode. How could this work
in this mode?.

Thank you.
Rodolfo.


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




[PHP] popen in safe_mode with pipe

2001-01-17 Thread Lic. Rodolfo Gonzalez Gonzalez

Hello,

I need to encode some text using GPG in a PHP program. I've a class wich
uses popen like this:

//--- start ---

// parameters to gpg omited...

$command = "echo '$text' | gpg snip";

$fd = popen("$command","r")
if (!$fd) {
   return -2;
}

$enc = "";

while (!feof($fd)) {
   $enc .= fgets($fd,4096);
}

pclose($fd);

//--- end ---

That's with PHP4. It works ok in non-safe-mode, but with safe-mode turned
on it doesn't. I'd like to use safe mode. Does anyone know a better (or
correct) way to open this kind of pipe under safe_mode? (I've read a
comment in the manual telling about opening the pipe for read-write mode,
but it seems not to work wit the echo stuff in the first part of the
command).

Thank you.
Rodolfo.




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