Re: [PHP] Apache RewriteRule Help!!!!

2008-06-16 Thread Miguel J. Jiménez
El Fri, 13 Jun 2008 10:23:29 -0400
Daniel Brown [EMAIL PROTECTED] escribió:

 You can start by asking your question on an Apache list.  This has
 nothing to do with PHP.  ;-P
 
 To answer your question, use this in your .htaccess file:
 
 RewriteCond %{SCRIPT_FILENAME} index
 RewriteCond %{QUERY_STRING} ^[a-zA-Z0-9]
 RewriteRule .* http://www.yourdomain.com/404.php [L]
 
 Next time, though, please try to ask questions on the appropriate
 lists.
 

I did write to the apache users list at the same time more or less and
still waiting a reply :'(


---
.-.
| Miguel J. Jiménez   |
| Sector Público, ISOTROL S.A.|
| [EMAIL PROTECTED]   |
:-:
| KeyID 0xFFE63EC6 hkp://pgp.rediris.es:11371 |
:-:
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.|
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).|
| Tlfn: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849 |
| http://www.isotrol.com  |
:-:
| UTM ED-50 X:765205.09 Y:4144614.91 Huso: 29 |
:-:
|   Me dijeron: 'instala Windows, se listo'; así que |
| instalé primero Windows y luego fui listo y lo borré|
| para instalar Linux|
'-'


signature.asc
Description: PGP signature


[PHP] Apache RewriteRule Help!!!!

2008-06-13 Thread Miguel J. Jiménez
Hi, I am having a little problem here, I have a .htaccess that looks
thus:

RewriteEngine on
RewriteBase /INDEX
RewriteRule ^(.*\.(log|sqlite))$ index.php [L]
RewriteRule ^(.*\.(js|css|png|jpg|gif|xml))$  [L]
RewriteRule ^(.*)$ index.php?m=$1 [L,QSA]

When I type http://foo/INDEX/mp3; it goes [internally] to
http://foo/INDEX/index.php?m=mp3;. Great so far... The problem is when
I try to forbid access to http://foo/INDEX/index.php?m=mp3; for the
user. I mean if the user types http://foo/INDEX/index.php?m=mp3; I
want the apache to send a redirect code or something...

I tried:

RewriteCond %{IS_SUBREQ} false
RewriteRule index.php - [L,NS,R=404]

...just below  the line RewriteBase /INDEX but when I do this, it just
redirect *always* even if I type http://foo/INDEX/mp3;.

How can I make apache work fine with http://foo/INDEX/mp3; and
redirect to an error page (or moved url or wahtever)
with http://foo/INDEX/index.php?m=mp3; (from the client view)

thanks for the help


---
.-.
| Miguel J. Jiménez   |
| Sector Público, ISOTROL S.A.|
| [EMAIL PROTECTED]   |
:-:
| KeyID 0xFFE63EC6 hkp://pgp.rediris.es:11371 |
:-:
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.|
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).|
| Tlfn: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849 |
| http://www.isotrol.com  |
:-:
| UTM ED-50 X:765205.09 Y:4144614.91 Huso: 29 |
:-:
|   Me dijeron: 'instala Windows, se listo'; así que |
| instalé primero Windows y luego fui listo y lo borré|
| para instalar Linux|
'-'


signature.asc
Description: PGP signature


[PHP] Array of PDO objects

2008-06-06 Thread Miguel J. Jiménez
Hi, I want to know if I can set an array with PDO objects, thus:

$foo = array(new PDO(...), new PDO(...));
$oSt = $foo[0]-prepare(...);

and so on... I tried that aproach and PHP is always complaining about
using prepare() in a non-object...

---
.-.
| Miguel J. Jiménez   |
| Sector Público, ISOTROL S.A.|
| [EMAIL PROTECTED]   |
:-:
| KeyID 0xFFE63EC6 hkp://pgp.rediris.es:11371 |
:-:
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.|
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).|
| Tlfn: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849 |
| http://www.isotrol.com  |
:-:
| UTM ED-50 X:765205.09 Y:4144614.91 Huso: 29 |
:-:
|   Me dijeron: 'instala Windows, se listo'; así que |
| instalé primero Windows y luego fui listo y lo borré|
| para instalar Linux|
'-'


signature.asc
Description: PGP signature


[PHP] DOMXML Warning

2008-02-12 Thread Miguel J. Jiménez
Hi, after enabling error reporting with E_ALL I am having this strange
warning while loading a XML:

Warning: DOMDocument::load() [function.DOMDocument-load]: Extra content
at the end of the document in [...]

The code I use is:

$dom = new DOMDocument();
$dom-load(http://example.com/file.xml;);
[...]

If I open the xml uri (with firefox) I get a complete and well formed
xml (nothing strange about it).

With error reporting disabled everything works fine so I am
puzzled :-( Any help will be appreciated.


---
.-.
| Miguel J. Jiménez   |
| Sector Público, ISOTROL S.A.|
| [EMAIL PROTECTED]   |
:-:
| KeyID 0xFFE63EC6 hkp://pgp.rediris.es:11371 |
:-:
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.|
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).|
| Tlfn: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849 |
| http://www.isotrol.com  |
:-:
| UTM ED-50 X:765205.09 Y:4144614.91 Huso: 29 |
:-:
| Oh no, Number One. I'm sure most will be much more |
| interesting. Let's see what's out there. Engage.   |
|  Capt. Jean-Luc Picard  |
|Star Trek TNG (1x01, Encounter At Farpoint)  |
'-'


signature.asc
Description: PGP signature


Re: [PHP] Screenshot from web page

2007-10-16 Thread Miguel J. Jiménez

Gevorg Harutyunyan escribió:

Hi,

I would like to make web page screenshot and generate an image for
example .jpg or .png using PHP,Apache.

If any one has experiance in doing that please help.

I know that there are lot of services like that, but I don't want to use them.
In real I need that to generate screenshot of my local server pages.

  
There is a firefox extension called screengrab to do just that... The 
results are, well, perfect! the URL is:


https://addons.mozilla.org/es-ES/firefox/addon/1146

--
.---.
| Miguel J. Jiménez |
| Programador Senior|
| Área de Internet  |
| [EMAIL PROTECTED]|
:---:
| ISOTROL, S.A. |
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.  |
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).  |
| Teléfono: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849   |
| http://www.isotrol.com|
:---:
| Una bandera une a los habitantes de un pais bajo unos ideales|
| comunes y es por eso por lo que todos ellos deben aceptarlos de   |
| buena gana y no ser forzados a ello pues entonces dicha bandera   |
| no serviría de nada. - Emperador Ming, Flash Gordon (1x07)(2007) |
'---'


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

[PHP] Problem with eAccelerator 0.9.5.2

2007-10-04 Thread Miguel J. Jiménez
Hi, I am new to eAccelerator... when I use purge or clean the apache 
error log says:


* File does not exist: /var/www/PHPE6F78DE9-13E4-4dee-8518-5FA2DACEA803, 
referer: https://pitufina/eaccelerator.php *


It does everytime I use eaccelerator_purge() or eaccelerator_clean() ... 
The error is always the same. Does anyone have any clue on why is this?


My eAccelerator config is as follow:

extension=eaccelerator.so
eaccelerator.shm_size=16
eaccelerator.cache_dir=/tmp/eaccelerator
eaccelerator.enable=1
eaccelerator.optimizer=1
eaccelerator.check_mtime=1
eaccelerator.debug=0
eaccelerator.filter=
eaccelerator.shm_max=0
eaccelerator.shm_ttl=0
eaccelerator.shm_prune_period=0
eaccelerator.shm_only=0
eaccelerator.compress=1
eaccelerator.compress_level=9
eaccelerator.allowed_admin_path=/var/www -- I am in a closed security 
enviroment so do not complain about admin privileges to all root


The command php -v returns:

PHP 5.2.3-1+b1 (cli) (built: Jun 21 2007 20:58:46)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
   with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by 
eAccelerator
   with Xdebug v2.0.0, Copyright (c) 2002, 2003, 2004, 2005, 2006, 
2007, by Derick Rethans



Thanks...

--
.---.
| Miguel J. Jiménez |
| Programador Senior|
| Área de Internet  |
| [EMAIL PROTECTED]|
:---:
| ISOTROL, S.A. |
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.  |
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).  |
| Teléfono: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849   |
| http://www.isotrol.com|
:---:
| Una bandera une a los habitantes de un pais bajo unos ideales|
| comunes y es por eso por lo que todos ellos deben aceptarlos de   |
| buena gana y no ser forzados a ello pues entonces dicha bandera   |
| no serviría de nada. - Emperador Ming, Flash Gordon (1x07)(2007) |
'---'


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

[PHP] PHP error catching

2007-06-20 Thread Miguel J. Jiménez
Hi. I have been asked to try to catch the php error generated when the 
PHP script exceed execution time, but I do not know if that can be 
done... Any ideas? Mainly I want to show a custimized error page instead 
of that error (kind of Sorry but we are busy right now or something 
similar)

Thanks.

--
.-.
| Miguel J. Jiménez   |
| Programador Senior  |
| Área de Internet/XSL/PHP|
| [EMAIL PROTECTED]  |
:-:
| ISOTROL, S.A.   |
| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.|
| Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).|
| Teléfono: +34 955 036 800 - Fax: +34 955 036 849|
| http://www.isotrol.com  |
:-:
| The dark side lives within all of us, from the most primitive  |
| species, to the most highly evolved.   |
| Da'an, Earth Final Conflict |
'-'


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

Re: [PHP] Include file questions

2007-05-24 Thread Miguel J. Jiménez

Stephen escribió:

1) Does the filename extension matter? I prefer *.inc? It seems to work fine, 
but I only see others using *.php
   
  2) Does the include file need an opening ?php and ending ? ?
   
  Not big issues, but I am curious.
   
  Thanks

  Stephen

  

If you use .inc extension you will have to modify the apache so they do
not show:

RedirectMatch 404 /^.*\.(inc)$/

Thus, if you try to access the file using the navigator it will show a
Page not found error :-D

--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).
Teléfono: +34 955 036 800 - Fax: +34 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you 
have in all the world. Do you realize how foolish that is? How ominous? 
How can this country survive if friends can't rise above the quarrel.

Constance Hazard, North  South (book I)



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

Re: [PHP] pdo-oracle + nls_lang environment variable...

2007-05-17 Thread Miguel J. Jiménez

Javier Ruiz escribió:

Hi,

I'm using pdo-oci on php-5.2.2 against an oracle-10g server, using
oracle-instantclient (compiled oracle with
'--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib').

The problem...:
I make a simple php script that makes a select from a table. The table
contains spanish characters so I set the enviroment variable NLS_LANG to
SPANISH_SPAIN.AL32UTF8 before running apache (also tried other values 
that
use iso8859-1...). If I run the script in console (using the CLI 
version of
php) the returned data is in the desired collation, so I can see the 
spanish

special characters like ñ, ó and so on... The problem is that running
exactly the same script via HTTP (apache2) I always get question marks
replacing the special characters...

I tried many things... I export the enviroment variable as root and as 
the
user running the apache daemon, I modified the apache init script to 
export
the variables just before starting apache, I tried using the putenv 
function

in php code and no luck at all...

I realized about something that maybe is related... a php script 
running in

CLI can access any environmental variable, but no any env-var running in
apache... for example the following code: ?php echo getenv(LC_ALL); ?
will return my locale setting in CLI but returns nothing via http... 
is it

normal?

TIA!




Maybe you have the AddDefaultCharset directive from Apache2 set to 
ISO-8859-15 instead of UTF-8 (or even off)? I have worked with php-oci8 
and php5.2 without any collation problem this far (using ñ € ans so on...)


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).
Teléfono: +34 955 036 800 - Fax: +34 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

Re: [PHP] Static methods have access to private members

2007-05-17 Thread Miguel J. Jiménez

Theodore Root escribió:
I have a question regarding static methods in PHP5.x. Specifically, it 
seems that one can access member variables declared private from 
static methods, just as you can from instance methods.  I was 
wondering if this is by design, or if this feature might go away.  I 
have worked up an example, hopefully it won't get mangled:


?php

class TestClass
{
   private $myVar;
 public static function loadAllObjects()
   {
   $vars = array();
   $tempVar = new TestClass();
   $tempVar-myVar = Example;
   $vars[] = $tempVar;
   return $vars;  }
}


$test = TestClass::loadAllObjects();

print_r($test);


?


This code executes fine on PHP 5.2.0 with no errors or warnings, even 
though one might say that I have accessed the private $myVar from 
outside the instance of TestClass created in $tempVar.  This 
feature is useful to me because I'd like to create a static method 
on my DB-persisted objects that lets me load an array of all of a 
given type of object from a database, building each one without having 
to use setters/getters for each member variable (not because thats 
difficult, but because its nice to be able to have private members 
that can't be accessed at all from the outside world), while avoiding 
lazy loading.  So essentially, my questions is, is the above 
functionality intended?



Thanks!

-TJ

Mmm pardon me if I am wrong but I think you have accessed the private 
variable using an instanced object inside the static method and what you 
are returning is fine... You did not access the private variable using 
$this-myVar ...


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).
Teléfono: +34 955 036 800 - Fax: +34 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

Re: [PHP] PHP MySQL

2007-05-11 Thread Miguel J. Jiménez

Jason Pruim escribió:

Hi Everyone,

I know this isn't strictly a PHP question, and I apologize in advance 
for that. I'm trying to setup a website for some of my customers that 
would allow them to update a database on their schedule, making it 
easier for us to have the most up to date info, and taking some of the 
work off of us.


Right now, the question I have is, how would I be able to select 
certain records to be deleted (Or moved to another table called 
deleted)? Is it as simple as looping through the database, having 
them check a checkbox, and then hit a remove button?


As I go, I will be adding a login screen to it, and hopefully 
protecting against SQL injection attacks... But right now, I'm still 
just learning and trying.


The SQL syntax is easy enough for me to figure out, but the php is 
throwing me off right now...


I'm running PHP 5.2.0
MySQL 5.0.24A

Any points to the right documents are greatly appreciated as well as 
sample code :)


Currently here is the code I'm working with on the page to display it:

$link = mysql_connect($server, $username, $password)
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully BR';
mysql_select_db('legion') or die('Could not select database' . 
mysql_error());

echo 'DB selected BR';



$result = mysql_query(SELECT * FROM current) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
$FName = $row[FName];
$LName = $row[LName];
$Add1 = $row[Add1];
$Add2 = $row[Add2];
$City = $row[City];
$State = $row[State];
$Zip = $row[Zip];
$Date = $row[Date];


echo $FName, $LName,  $Add1, $Add2, $City, $State, $Zip, $DateBR;
};

I'm sure there is an easier way to do that as well... But this way 
worked :)


Jason



Well, first of all you need to get the IDs of the rows you want to 
remove and then you will do something like:


DELETE FROM table WHERE id IN (list of IDs to remove)

You will need to show a list of removable records to the client as a 
list; for example:


   John Doe #1
   John Doe #2
   .
   .
   John Doe #n

with a checkbox every one of them. The when you hit submit in the form 
you just send the IDs to the php script...


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).
Teléfono: +34 955 036 800 - Fax: +34 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

Re: [PHP] passing GET via include

2007-05-04 Thread Miguel J. Jiménez

Mark Smith escribió:

Hello all,
Is there a way to allow the passing of variables to included scripts 
using the GET method, for example includefile.php?name=person; or is 
there another method of including files that allow you to do this. I 
have attempted to do this without success, I just get a message saying 
the file cannot be found.


If you define the variables before the *include* the included file will 
see them without problem...


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

Re: [PHP] Limit query results

2007-05-04 Thread Miguel J. Jiménez

Use SELECT DISTINCT in your SQL syntax.

--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

Re: [PHP] Different behaviour : command line / cron

2007-04-18 Thread Miguel J. Jiménez

mbneto escribió:

Hi,

I've developed a simple script that among other things sends a fax using
hylafax's sendfax program.   If I test it calling directly from the 
command

line it works fine.

If I let it run from cron it executes everything fine except the fax.

I am using the system call and in order to debug I am using the following
code

...
$cmd = sprintf('/usr/bin/sendfax -n -d %s %s',$fax,$file) ;
mail ([EMAIL PROTECTED], fax, $cmd.\n.system($cmd));
...

The output from the command line (/usr/bin/php /path/to/file/script.php)

/usr/bin/sendfax -n -d fax_number /tmp/fax.txt
request id is 471 (group id 471) for host localhost (1 file)

The output when it executed from cron (*/1 * * * * /usr/bin/php
/path/to/file/script.php)

/usr/bin/sendfax -n -d fax_number /tmp/fax.txt

In both cases the fax.txt has the same content.

Any idea why and how to solve it?

Try deactivate php_gtk extension in PHP-CLI if you have it loaded... I 
had the same problem you describe and while googling I found about this 
solution and worked fine.


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

You let a political fight  come between you and your best friend you have in all 
the world. Do you realize how foolish that is? How ominous? How can this country survive 
if friends can't rise above the quarrel.
Constance Hazard, North  South (book I)


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

[PHP] pg_last_error()

2007-04-02 Thread Miguel J. Jiménez
Hello, the question is simple... After I try to free a resultset in 
postgres using pg_free_result() it returns false ... Can I use 
pg_last_error() to get the cause of this last error? I have tried but it 
returns an empty string and I do not know if it is because I cannot use 
pg_last_error() thus. Thanks a lot...


--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Killing is often a part of life. What's hypocritical is to condemn, and then make 
allowances when the situation suits.
Utu-Noranti Pralatong (Farscape 4x17 - A Constellation Of Doubt)


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

Re: [PHP] converting video formats

2007-03-27 Thread Miguel J. Jiménez

Bruce Gilbert escribió:

Can someoune point me in the right direction as to how (if possible)
to convert a video format uploaded to a server to a flash format
(.flv) no matter what the orginal format is?

thanks


I recommend you use FFMPEG ... It can convert almost any video type to FLV

--
Miguel J. Jiménez
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Killing is often a part of life. What's hypocritical is to condemn, and then make 
allowances when the situation suits.
Utu-Noranti Pralatong (Farscape 4x17 - A Constellation Of Doubt)


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

Re: [PHP] PHP newbie question on xslt

2007-03-26 Thread Miguel J. Jiménez

Timothy Murphy escribió:

I've been trying some of the programs
in the PHP manual at http://www.php.net/manual/en/
in chapters CLXXXI and CLXXXII to work, for example

// Example 2519. Creating an XSLTProcessor

?php

$xml_filename = collection.xml;
$xsl_filename= collection.xsl;

$doc = new DOMDocument();
$xsl = new XSLTProcessor();

$doc-load($xsl_filename);
$xsl-importStyleSheet($doc);

$doc-load($xml_filename);
echo $xsl-transformToXML($doc);

?

(where I have added the two filenames,
and copied the files collection.x?l from the manual).

When I run PHP I get:

[EMAIL PROTECTED] Test]# php ex2519.php
// Example 2519. Creating an XSLTProcessor

Segmentation fault


I'm running the program under Fedora-6 Linux
with the latest versions of all programs.

Is there something I should have included,
to get the program to run?

Any advice or suggestions gratefully received.

  


Try not to load both xml and xsl in the same $doc variable... use one 
for the xsl and another for the xml. I think you are destroying the dom 
for the xsl before the transform...


--
Miguel J. Jiménez
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Killing is often a part of life. What's hypocritical is to condemn, and then make 
allowances when the situation suits.
Utu-Noranti Pralatong (Farscape 4x17 - A Constellation Of Doubt)


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

Re: [PHP] php, oci8 and oracle

2007-03-09 Thread Miguel J. Jiménez
Hi I use Debian testing with ORACLE INSTANT CLIENT and OCI8 without any 
problem ... Any how, I think apache run as www-data so if you export the 
variables as root only root will see them (I think). I think there is a 
way to export a variable directly within apache configuration files so 
you do not need to write a script. Using OIC I only need to export 
LD_LIBRARY_PATH to the OIC path because I do not even need tnsnames.ora .


sirakov escribió:

Hi,
I have a problem with oci8. I installed ORACLE Enterprise with php5 and
apache, with this script :

?php phpinfo(); ?

I receive information for the set modules. I see that oci8 is enabled
however ORACLE_HOME is empty. Additionally, I tried to write a little script
which I run as a root. Due to this script, I set variables and start apache:

cmd=`which apache2ctl`
$cmd stop
ORACLE_HOME=/u01/app/oracle/oracle/product/10.2.0/db_1;export ORACLE_HOME
echo ORACLE_HOME: $ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
echo ORACLE_SID: $ORACLE_SID
ORATAB=/etc/oratab; export ORATAB
echo ORATAB: $ORATAB
ORACLE_HOME_LISTNER=$ORACLE_BASE, export ORACLE_HOME_LISTNER
echo ORACLE_HOME_LISTNER: $ORACLE_HOME_LISTNER
ORACLE_BASE=$ORACLE_HOME; export ORACLE_BASE
echo ORACLE_BASE: $ORACLE_BASE
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15; export NLS_LANG
echo NLS_LANG: $NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH
LD_PRELOAD=/u01/app/oracle/oracle/product/10.2.0/db_1/lib/libclntsh.so
echo LD_PRELOAD:$LD_PRELOAD
$cmd start

In /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini I set the
extension=oci8.sо, but ORACLE_HOME is still empty (see here
http://www.picvalley.net/u/9/8466_726.PNG)

If someone has an idea how to solve the problem, I will highly appreciate
any advices with this regard. I read about an installation of ORACLE Instant
client and oci8 but I do not know whether I need this instant client at all,
because I use Oracle Enterprise.

PS. i'm sorry for the bad english, i can't explain the problem better.
  



--
Miguel J. Jiménez
Área de Internet/XSL/PHP
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

La dicotonomía entre desarrollo económico y sostenibilidad es falsa. Si nos 
quedamos
sin planeta no habrá economía que valga
(Al Gore, Ex-Vicepresidente de EE.UU.)


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

Re: [PHP] needed Yahoo like window for db query.

2007-02-18 Thread Miguel J. Jiménez
El Sun, 18 Feb 2007 01:23:26 -0800 (PST)
Chris Carter [EMAIL PROTECTED] escribió:

 
 Need some help on getting some database result in a css popup like
 yahoo. The requirement is to open a div or a window similar to yahoo
 one. As you can see from the link below.
 
 http://news.yahoo.com/s/ap/20070218/ap_on_go_co/us_iraq
 
 On this if you click on the Images next to the links Iraq,
 President Bush, Hillary Rodham Clinton, Pentagon, etc. This
 opens a div within the page with the search result. They are using
 some JavaScript to achieve this.
 
 Is there anyone with idea of where to find a code for a similar kind
 of window. I need to present data from database in a similar kind or
 window.
 
 Any link, text to search in google or code would do :-|
 
 Thanks in advance,
 
 Chris

What you need is called AJAX :-)


---
Miguel J. Jiménez
ISOTROL, S.A.
[EMAIL PROTECTED]
+34 955036800
+34 607448764

I try to save a life a day. Usually it's my own.
John Crichton, FARSCAPE (1x07)

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



Re: [PHP] (DRW) Ordenar por fecha

2007-02-08 Thread Miguel J. Jiménez
Seguramente tengas que usar la función FORMAT(); dependiendo del tipo
de base de datos será de una forma u otra.


El Thu, 8 Feb 2007 18:28:54 -0500
Anuack Luna [EMAIL PROTECTED] escribió:

 Hola Foreros
 
 Tengo la siguiente pregunta.
 
 Como puedo darle la orden a un juego de registro que me lo ordene por
 fecha?
 
 SELECT *
 FROM mi_sitio_personal_menu
 ORDER BY id DESC
 
 Si le digo Orden by fecha Desc... Me lo ordena por números, no por
 fecha.
 
 La fecha de la siguiente forma: DIA/MES/AÑO
 
 Alguna sugerencia... Adjunto database
 
 
 --
 -- Estructura de tabla para la tabla `mi_sitio_personal`
 --
 
 CREATE TABLE `mi_sitio_personal` (
   `id` int(11) NOT NULL auto_increment,
   `publico_privado` varchar(10) default '0',
   `usuario` varchar(255) default NULL,
   `fecha` varchar(100) default NULL,
   `categoria` varchar(100) default NULL,
   `pequena_comentario` text,
   `comentario` text,
   `archivo` varchar(255) default NULL,
   PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
 
 --
 -- Volcar la base de datos para la tabla `mi_sitio_personal`
 --
 


-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

La dicotonomía entre desarrollo económico y sostenibilidad es falsa.
Si nos quedamos sin planeta no habrá economía que valga
(Al Gore, Ex-Vicepresidente de EE.UU.)

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



Re: [PHP] Re: How to prevent DomDocument from adding a !DOCTYPE.

2007-01-17 Thread Miguel J. Jiménez
El Wed, 17 Jan 2007 13:53:36 +0100
Mathijs [EMAIL PROTECTED] escribió:

sByTagName() etc..
 
 Is there mabye an other way to parse this HTML and replace/modify its 
 atttributes?
 
 Thx in advanced.
 


Have you try preg_replace?

-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

¿Cuántas lecciones más necesitaremos para aprender cuántas lecciones
más necesitaremos para acertar? Juan José Ibaretxe (13/01/2007)

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



Re: [PHP] md5

2007-01-17 Thread Miguel J. Jiménez
El Wed, 17 Jan 2007 15:27:27 -
Ross [EMAIL PROTECTED] escribió:

 
 Hi,
 
 Does md5 really offer much in terms of protection?
 
 The algorithm is really well known.
 
 I would like to hear your thoughts and poosible alternatives (mcrypt?)
 
 R. 
 

It works for me. Althought is possible (theorically) to have two strings
with the same MD5 is practically impossible to guess one ;-). You can
also use sha1 if you prefer.


-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

¿Cuántas lecciones más necesitaremos para aprender cuántas lecciones
más necesitaremos para acertar? Juan José Ibaretxe (13/01/2007)

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



Re: [PHP] running exec() on client

2007-01-16 Thread Miguel J. Jiménez
El Tue, 16 Jan 2007 15:07:36 -
George Pitcher [EMAIL PROTECTED] escribió:

 Hi,
 
 I am looking for a solution to a server problem. I am part of a
 2-person team - I look after document scanning, OCR (by outside
 agencies) as well as all development.
 
 My colleague is responsible for obtaining copyright permission from
 publishers (for what I do). Part of her process is sending emails to
 publishers with Word attachments. These are presently being generated
 by PHP on our NT server,but recently the process has started to slow
 down the server to the point of uselessness.
 
 I'm looking for an alternative way to do this. My colleague has
 rejected text file attachments as looking unprofessional. I would
 like to find a way of generating these files without actually needing
 to use COM, or winword on the server. We looked at RTF templates but
 found the filesize too great.
 
 One option I am considering is installing PHP on her PC and doing the
 letter generation locally, but don't know how I'm going to trigger it
 esp as our IT person has said I can't install Apache.
 
 Doe anyone have any suggestions?
 
 
 Cheers
 
 George, an Englishman abroad in sunny Edinburgh
 

You do not need to have apache installed to run PHP you just need
PHP-CLI (Command Line Interface)


-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

¿Cuántas lecciones más necesitaremos para aprender cuántas lecciones
más necesitaremos para acertar? Juan José Ibaretxe (13/01/2007)

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



Re: [PHP] xml_parse() error with nbsp; and euro; etc.. How can i fix this?

2007-01-15 Thread Miguel J. Jiménez
El Mon, 15 Jan 2007 12:42:58 +0100
Mathijs [EMAIL PROTECTED] escribió:

 Hello there,
 
 When i want use parse_xml() and i have entities like nbsp; in it, it 
 gives me a entity error.
 
 This because the parser doesn't know the nbsp; entity.
 
 Now i saw on the bugs site of php a way to solve this, by using 
 xml_set_external_entity_ref_handler() with 
 http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent.
 See here: http://bugs.php.net/bug.php?id=15092#c27617
 
 But, it seems my knowledge of PHP isn't that good enough to
 understand what i have to do to get this to work.
 
 Can someone please help me to get this to work?
 
 Thx in advanced.
 

Try to use number codes, ie. #160; instead of nbsp; and #164;
instead of euro;


-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Siempre intento salvar una vida al día. Normalmente es la mía
(John Crichton, FARSCAPE 1x07)

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



Re: [PHP] Forms and destroying values

2007-01-12 Thread Miguel J. Jiménez
El Fri, 12 Jan 2007 03:27:12 -0500
Beauford [EMAIL PROTECTED] escribió:

 Hi,
 
 How do I stop contents of a form from being readded to the database
 if the user hits the refresh button on their browser.
 
 I have tried to unset/destroy the variables in several different
 ways, but it still does it. 
 
 After the info is written I unset the variables by using unset($var1,
 $var2, $etc). I have also tried unset($_POST['var1'], $_POST['var2'],
 $_POST['etc']). I even got deperate and tried $var = ; or
 $_POST['var'] = ;
 
 What do I need to do to get rid of these values??? Obviously I am
 missing something.
 
 Any help is appreciated.
 
 Thanks
 


Maybe you can check the IP and see if it has already save the data or
not.

-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Siempre intento salvar una vida al día. Normalmente es la mía
(John Crichton, FARSCAPE 1x07)

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



Re: [PHP] Re: PHP/Apache configuration failure

2007-01-11 Thread Miguel J. Jiménez
El Thu, 11 Jan 2007 08:15:49 -0500
Mark [EMAIL PROTECTED] escribió:

 LoadModule php5_module c:/Program Files/PHP/php5apache2_2.dll
 I do not have the AddModule line.
 I use AddType application/x-httpd-php .php .html. (I want to
 parse .html files as well.)
 I do not use the Action line.

The action line is to execute scripts as CGI I think it's no use
nowdays...


-- 
Miguel J. Jiménez
Área de Internet/XSL
[EMAIL PROTECTED]



ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla.
Teléfono: 955 036 800 - Fax: 955 036 849
http://www.isotrol.com

Siempre intento salvar una vida al día. Normalmente es la mía
(John Crichton, FARSCAPE 1x07)

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



Re: [PHP] Downloading a binary file

2007-01-11 Thread Miguel J. Jiménez
El Thu, 11 Jan 2007 14:59:36 -0500
Sugrue, Sean [EMAIL PROTECTED] escribió:

 I need download a binary file in php. I don't need to read the
 contents just download the whole file to a browsed directory.
 I know you can use the header function, does anyone know the syntax.
 
 Sean
 


Maybe you can do:

?php
$file = file_get_contents(URI); // Must have wrapper
activated
file_put_contents(FILE, $file);
?

---
Miguel J. Jiménez
ISOTROL, S.A.
[EMAIL PROTECTED]
+34 955036800
+34 607448764

I try to save a life a day. Usually it's my own.
John Crichton, FARSCAPE (1x07)

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



Re: [PHP] weird error

2004-06-03 Thread Miguel J. Jiménez
Better if you use $_SERVER['REMOTE_ADDR'] and so on...
pagongski wrote:
Hi guys,
I recently installed easy-php on my laptop so i could work on 
the go without having to upload my scripts to the server to test them 
out. The problem is that when i tried one of my scripts on it, i get 
some weird errors, and the script works fine on the online server.

Here are some example errors:
Notice: Use of undefined constant REMOTE_ADDR - assumed 
'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35

Notice: Undefined variable: HTTP_REFERER in .
I have register globals on. (was off so i turned them on 
thinking that might be the problem..didnt work either way)

Big thanks.
--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Remember username and password

2004-06-01 Thread Miguel J. Jiménez
Yes, you must use a cookie with function setcookie() before any header 
is sent...

Phpu wrote:
Hi,
How can i make a registration form that will remember my username and password every 
time i login from the same computer?
I think i should set a cookie but i don't know how.
Thanks

---
avast! Antivirus: Mensaje ENTRANTE limpio.
Base de datos de Virus (VPS): 0422-1, 27/05/2004
Fecha: 01/06/2004 13:01:38

 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] making selection in drop down

2004-05-28 Thread Miguel J. Jiménez
Use HTML attribute selected in the option field you want to set as 
default...

Alex Hogan wrote:
Hi All,
How can I force a selection on a drop down from a value in a database?
I have a drop down that contains locations.  These locations are
contained in a table.  When a search is completed the results are
displayed and I want to be able to use that same drop down and just
force the selection to the appropriate location.

alex hogan


*
The contents of this e-mail and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom it is addressed. The 
views stated herein do not necessarily represent the view of the company. If you are 
not the intended recipient of this e-mail you may not copy, forward, disclose, or 
otherwise use it or any part of it in any form whatsoever. If you have received this 
e-mail in error please e-mail the sender. 
*


---
avast! Antivirus: Mensaje ENTRANTE limpio.
Base de datos de Virus (VPS): 0422-1, 27/05/2004
Fecha: 28/05/2004 16:43:03

 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] combining string values

2004-05-26 Thread Miguel J. Jiménez
$finalvalue = $path.$filename;
Tommy Atherton wrote:
hi
I have a problem, I'm trying to combine the value of two strings
together into a final string. For example
$path = '/tmp/photos/';
$filename = 'pic1.jpg';
$finalvalue = $path + $filename; (I know that the + is not used its
there for explanation only)
The value for path will remain constant (for the time being at least
although) but the value for filename will be read from a database so
that will change.
Anyone care to help???
thanks in advance
Tommy


---
avast! Antivirus: Mensaje ENTRANTE limpio.
Base de datos de Virus (VPS): 0422-0, 25/05/2004
Fecha: 26/05/2004 17:57:17

 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
ICQ# 12670750
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] XML problem

2004-05-18 Thread Miguel J. Jiménez
Try the one at http://www.w3schools.com/
Phpu wrote:
Hi,
I know that this is not an xml list but maybe you could help me.
I'm looking for a good tutorial in xml or a list with most of the xml tags. I've 
googled for it but i can't find anything.
Could someone send me a link to that kind of tutorial?
--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
mjjimenez AT isotrol DOT com   ---   http://www.isotrol.com
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Button ???

2004-04-23 Thread Miguel J. Jiménez
Well, anyway... you can use this script:

script type=text/jaavscript
   document.formName.buttonName.disabled=true;
/script
--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]   ---   http://www.isotrol.com
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session not working while accessing through IE on Windows 2000

2004-04-22 Thread Miguel J. Jiménez
Be sure to know all about session cookies. By default, PHP stores the 
session in a cookie

Sheni R. Meledath escribió:

Hello:

We have set up a login page using sessions in PHP. Its working fine. 
The server is a FreeBSD/Apache/PHP 4.

While accessing this page from IE 6 on Windows 2000, the sessions are 
not working and they are getting the login page again  again. Are 
there any known issues of PHP using sessions with Windows 2000?

Could you please provide me the details?

Sheni R Meledath
[EMAIL PROTECTED]


--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]   ---   http://www.isotrol.com
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Session not working while accessing through IE on Windows 2000

2004-04-22 Thread Miguel J. Jiménez
You may use:

?php session.use_cookies=0; ?

to deactivate the cookies from sessions in runtime...

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED] --- http://www.isotrol.com
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Text Box question

2004-04-21 Thread Miguel J. Jiménez
You can use javascript to perform this... Do the following:

   script type=text/javascript
  document.formName.boxName.focus(); // set the focus to the box
   /script
Brent Clark escribió:

Hi all
I have a problem where, when I click on a link and when the page is finish
loading
I would like for the cursor to ready in the correct html text box.
I cant seem to find a solution
If anyone could help, that would be most appreciated
Kind Regards
Brent Clark
 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]   ---   http://www.isotrol.com
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] help! handling form variable

2004-03-30 Thread Miguel J. Jiménez
If you DO NOT register globals (in php.ini) you MUST use 
$_POST[post_var] or $_GET[get_var] to access those variables... 
If you DO resgister globals you can also use $post_var or $get_var. 
By default, register globals is set to Off for security reasons; so 
you'll need to set it On. The line must say:

   register_globals = On  ; Whether or not to register the EGPCS 
variables as global

Hope it helps!!!

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] fsockopen() errors.

2004-03-08 Thread Miguel J. Jiménez
Is it an error or a warning? If it is a warning you can try use @  
before fsockopen() to avoid echoing warning messages [EMAIL PROTECTED](...)].

--

Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] read and modified getting data

2004-02-23 Thread Miguel J. Jiménez
You must convert \n to br and spaces to nbsp; You can use 
strreplace() or some other function that exist in PHP just for that...

Tommi Virtanen wrote:

Hi!

I have quite simple form (it has textarea input), where I can write for 
example:

Data1
Data 2
This is text



So, input contains spaces, linefeeds and so on...

When I make page, which read data from this textarea-field, data came 
from without
spaces and linefeeds. How to correct this problem?

Regards,

gustavus

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
[EMAIL PROTECTED]
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] htmlspecialchars... or...?

2004-02-18 Thread Miguel J. Jiménez
[EMAIL PROTECTED] wrote:

Hi all...
I've having problems submitting information to salesforce.com...
I have a system set up that allows my users here in the office, to send 
individual leads, to salesforce...
However, if the users details contain characters such as...
Ù ë ý Ñ Ã   etc...

htmlspecialchars only does
(From what I understand...)
 

...

Surely is a problem with the encoding... try ISO-8859-1
Ù = %D9
ë = %EB
ý = %FD
Ñ = %D1
à = %C3
At least it works for the URL while passing parameters thru GET


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

Re: [PHP] Help with '' character

2004-02-17 Thread Miguel J. Jiménez
Have you tried using 'amp;' ?

Chris Bruce wrote:

I am having trouble with a string becoming truncated at an '' 
character. I am passing the variable via a link

(http://...campaign=MBI%20List%20-%20Steel%20%20Concrete) and then 
when I try to grab the incoming value of campaign into a SELECT query, 
it becomes

SELECT sum(sends) from campaigns where name='MBI List - Steel '

I have tried to urlencode the variable, and also use htmlentities, 
etc. to no avail.

Does anyone have a solution for this?

Thanks.


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

Re: [PHP] triple DES encryption

2004-02-09 Thread Miguel J. Jiménez
craig wrote:

Hi all,
I have to replicate the file encryption of a desktop bound
application. This means using triple DES, but I can't find 
anything on the web or in the maunual (other than single 
DES).

Does anyone know if it is doable to implement this using php, 
or if I should just tell the client that it can't be done?

TIA,
Craig
You'll need the MCRYPT module... it has DES, 3DES and whatever you want...



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

Re: [PHP] mcrypt don't work.

2004-02-08 Thread Miguel J. Jiménez
Mmm this same problem happen to me also... I use Apache 1.3.29 for Win32 
and PHP v4.3.4 ... I do not know why but mcrypt module failed to 
initialize

[EMAIL PROTECTED] wrote:

Hi all,
I have problem with mcrypt function.
There is always an error that I don't know how to correct this.
This is my code:
$string = Text string;
$key= My key;
$encrypted = mcrypt_cfb(MCRYPT_RIJNDAEL-256, $key, $string, MCRYPT_ENCRYPT);  
echostringa cifrata= $encrypted;
$key = My key;
$string = mcrypt_cfb(MCRYPT_RIJNDAEL-256, $key, $encrypted, MCRYPT_DECRYPT);  
echostringa decifrata= $string;

And the errore message is

Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 55
stringa cifrata= 
Warning: mcrypt_cfb(): Module initialization failed in /web/htdocs/www.automationsoft.biz/home/critto.php on line 58
stringa decifrata= 

I see, with phpinfo(), that my server support mcrypt and  RIJNDAEL-256.
I don't know why there is this error message.
All helps are precious.
Thanks in advance 
Francesco
[EMAIL PROTECTED]
(P.S. this is the link for a view in real time of  the problem www.automationsoft.biz/critto.php)

 



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

Re: [PHP] php on linux..

2004-01-08 Thread Miguel J. Jiménez
khoa vo wrote:

I am a newbie. I'm trying to write a php script and put it on the 
linux server at school.

index.html--
form action=action.php method=POST
 Your name: input type=text name=name /
input type=submit
/form
action.php--
#!/lusr/bin/php
Hi ?php echo $_POST[name]; ?.
I did locate php to find the path where php is installed and i got 
/lusr/bin/php.

index.html is working fine. So after i filled out the index.html form 
and press SUBMIT. It would print me to the action.php page only that
action.php page would display itself.

I have been trying to figure out this problem for quite some time and 
any help would be greatly appreciated. at first, i thought something is
wrong with the action.php so i changed the form and index.html but 
without success. My website is at www.cs.utexas.edu/users/khoa .

Thank you for all your help

Maybe you need to reconfigure APACHE to recognize the .php mime type... 
if you dont't have that configured Apache would treat the PHP as text 
instead of script, thus displaying itself...



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