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

2008-06-15 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-15 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  ?
   
  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] 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:


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] 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: 
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] PHP & MySQL

2007-05-10 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 ';
mysql_select_db('legion') or die('Could not select database' . 
mysql_error());

echo 'DB selected ';



$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, $Date";
};

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  WHERE id IN ()

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] 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] 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 include"file.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] 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

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 :



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] 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] 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] 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   and € 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   in it, it 
> gives me a entity error.
> 
> This because the parser doesn't know the   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.   instead of   and ¤
instead of €


-- 
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] 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:

); // Must have wrapper
activated
file_put_contents(, $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] 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] How? First big letter

2004-06-25 Thread &quot;Miguel J. Jiménez"
Use ucfirst()
Labunski wrote:
Hello, how to make the firs letter of the word Big?
for example I have:
$colour = "car is red";
but I need:
$colour = "Car is big".
Thank you very much,
I would look for the answer myself using google,
but I have no time for it.
I hope there is an easy solution for this.
Lab.
 

--
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] how could I call "mail" command in PHP file

2004-06-15 Thread &quot;Miguel J. Jiménez"
Have you try mail() function?
Min Wang wrote:
Hello, all!
So glad to join this maillist. I'm a beginner of PHP. I'd like to call a "mail" command in a 
"mail.php" like the following:

There was no error, but it didn't send the mail as I wished.
Other command lines like:

worked.
"my.txt" lies in the same directory as "mail.php", and this command line works in the 
normal command line. But as a PHP file it doesn't work. What's wrong with this file? Could you give me 
some advices?
Thanks a lot!
Best!
Min
 

--
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] weird error

2004-06-03 Thread &quot;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 &quot;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 &quot;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 &quot;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


[PHP] Session name length

2004-05-25 Thread &quot;Miguel J. Jiménez"
How much long can be the session name? What is the limit? 10, 40, 255 
alphanumeric chars? or what?
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] XML problem

2004-05-18 Thread &quot;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 &quot;Miguel J. Jiménez"
Well, anyway... you can use this script:


   document.formName.buttonName.disabled=true;

--
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 &quot;Miguel J. Jiménez"
You may use:



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] Session not working while accessing through IE on Windows 2000

2004-04-22 Thread &quot;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] Text Box question

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

   
  document.formName.boxName.focus(); // set the focus to the box
   
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 &quot;Miguel J. Jiménez"
If you DO NOT register globals (in php.ini) you MUST use 
$_POST[""] or $_GET[""] to access those variables... 
If you DO resgister globals you can also use $ or $. 
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] what does this mean?

2004-03-10 Thread &quot;Miguel J. Jiménez"
That's a boolean casting; used for forcing a variable to become 
boolean... Hope it helps...

Harry Wiens wrote:

$this->styles['shadow'] = (boolean)$bool;
   
what does "(boolean)$bool" mean?

mfg.
harry wiens
 

--
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] strip down Warnings

2004-03-10 Thread &quot;Miguel J. Jiménez"
Use '@' before any function to avoid echoing warnings (JUST warnings)

--
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] Mail Headers

2004-03-08 Thread &quot;Miguel J. Jiménez"
You can view the source from an email message with Outlook or Thunderbird, and it will show headers and all that stuff...

---
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 &quot;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


[PHP] MCRYPT Help

2004-03-02 Thread &quot;Miguel J. Jiménez"
Hi, I have the following script that encode data using 3DES, but I 
cannot make a script to DECODE that data because all the tries return me 
thwe wrong string, can anybody tell me the right script to decode the data?

Copied from PHP Manual:


   $td = mcrypt_module_open('tripledes', '', 'ecb', '');
   $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
   mcrypt_generic_init($td, $key, $iv);
   $encrypted_data = mcrypt_generic($td, $input);
   mcrypt_generic_deinit($td);
   mcrypt_module_close($td);
   echo "KEY = ".$key."";
   echo "INPUT = ".$input."";
   echo "ENCRYPTED = ".$encrypted_data;
?>
--
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 &quot;Miguel J. Jiménez"
You must convert "\n" to  and spaces to   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 &quot;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 &quot;Miguel J. Jiménez"
Have you tried using '&' ?

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

[PHP] Messenger via PHP

2004-02-17 Thread &quot;Miguel J. Jiménez"
Hi, I want to know if there's a way to send MSN messenger messages thru 
PHP... If there is How can I do it? Thanks...



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

Re: [PHP] triple DES encryption

2004-02-09 Thread &quot;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 &quot;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);  
echo"stringa cifrata= $encrypted";
$key = "My key";
$string = mcrypt_cfb(MCRYPT_RIJNDAEL-256, $key, $encrypted, MCRYPT_DECRYPT);  
echo"stringa 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

[PHP] Help with a string replacement

2004-01-28 Thread &quot;Miguel J. Jiménez"
Hi, I want to replace a string "" with .
[whatever] may be what ever substring possible... ie. I want to replace 
all occurences that exists being [whatever] a variable expression...
Thanks...


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

Re: [PHP] How to echo something if not exist?

2004-01-27 Thread &quot;Miguel J. Jiménez"
Radwan Aladdin wrote:

Hi all..

I want to echo something if the GET value was not exist in the database..
So for example : The user enters his email address and if this email was not found in the field 
of the email addresses in the table.. then echo "Invalid Email Address"
So how to do it?

Regards..

You must use a select statement to know if it exists or not... kind of:
 
$rs = mysql_query("select email from  where email='$email'");
if (mysql_num_rows($rs) == 0)
   // Does not exist
else
   // Does exist



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

Re: [PHP] date fiedl

2004-01-19 Thread &quot;Miguel J. Jiménez"
Diana Castillo wrote:

Does anyone know if there is any speed advantage to saving a date as a unix
timestamp or a numeric field instead of a date field? (in Mysql)
thanks,
Well, I prefer using  an int(14) field for saving unix dates (so, I save 
the date as unix and not as date field). Thus is easier to work between 
dates adding and everything else...



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

Re: [PHP] Is this code right?

2004-01-19 Thread &quot;Miguel J. Jiménez"
Radwan Aladdin wrote:

Hi all.. I made this code for the login.php page.. it will compare A value from the users machine (Serial) and with a value inside the database (In that users' row).. so after logging it will check if also this value is the same and then echo something..is the following code is right for that? :



$link = mysql_connect("localhost", "Database username", "Database password) or die("Could  
not connect: " . mysql_error()); 
mysql_select_db("Table name", $link); 

$UserName = $_GET['UserName']; 
$Password = $_GET['Password']; 
$Serial = $_GET['Serial']; 

$query = "SELECT Serial, Password from accounts where UserName='$UserName'"; 
$result = mysql_query($query) or die("Query errort: " . mysql_error()); 
$row = mysql_fetch_row($result) or die("User Not found: " . mysql_error()); 
$Serial = htmlspecialchars($row[0]); 
 

mysql_select_db is for selecting the database and NOT the table, the 
SELECT statement must be something like this: "select SOMETHING from 
TABLE where WHERE_CLAUSE"



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

Re: [PHP] Re: how to open a webpage

2004-01-12 Thread &quot;Miguel J. Jiménez"
bernard wrote:

Hi,

Thanks for the suggestions !

Problem is solved sofar.

But how can I open the link in a new window, I tried (with my limited php
knowlegde) a lot of things, but i'ts not working :-(
 

To open the URL in a new window, you MUST use javascript.. You can 
output a HTMP page like this:
   
window.open('otherPage.html');
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER['PHP_AUTH_USER'] doesn't work with location header for Mozilla.

2004-01-09 Thread &quot;Miguel J. Jiménez"
I think it's because all headers must be sent BEFORE doing anything else ...



Scott Fletcher wrote:

Hi!

  The login page where the HTTP Authentication would pop-up asking the web
user to enter the user id and password to log in.  I'm using the PHP's
$_SERVER['PHP_AUTH_USER'] and it work okay in both Internet Explorer and
Gecko browsers, like Mozilla for example.  What I had discovered is that
when using the PHP's header, 'header("Location: https://whatever";); to go to
the next webpage (with HTTP Authentication is successful), is that HTTP
Authentication cease to exist on the next webpage for the Gecko browsers.
It work fine with Internet Explorer.
   Anyone know why does the Gecko browser lose the HTTP Authentication data
once the PHP location redirect header is used?  I'll post the code below.
--snip--
 if (!isset($_SERVER['PHP_AUTH_USER'])) {
// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
   } else if (isset($_SERVER['PHP_AUTH_USER'])) {
// If non-empty, open file containing valid user info
$filename = "/usr/local/apache/conf/whatever";
$fp = fopen($filename, "r");
$file_contents = fread($fp, filesize($filename));
fclose($fp);
// Place each line in user info file into an array
$line = explode("\n", $file_contents);
// For as long as $i is <= the size of the $line array,
// explode each array element into a username and password pair
$i = 0;
while($i <= sizeof($line)) {
 $data_pair = explode(":", $line[$i]);
 if (($data_pair[0] == $_SERVER['PHP_AUTH_USER']) && ($data_pair[1] ==
MD5($_SERVER['PHP_AUTH_PW']))) {
  $auth = 1;
  break;
 } else {
  $auth = 0;
 }
 $i++;
}
if ($auth == 1) {
   session_id($salt);
   session_start();
   $_SESSION['SESSION_IDENTIFIER'] = $salt;

//echo $_SERVER['PHP_AUTH_USER']." ";
   header("Location:
https://".$_SERVER['HTTP_HOST']."/administration/main_menu.php?PHPSESSID=".$salt);
} else {
 header('WWW-Authenticate: Basic realm="My Private Stuff"');
 header('HTTP/1.0 401 Unauthorized');
}
   }
 



-- 
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 &quot;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.



 Your name: 



#!/lusr/bin/php
Hi .
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