[PHP] MYSQL translator

2005-08-01 Thread Alessandro Rosa
Dear All subscribers,

I wish to submit to you a PHP class I coded to translate native language
parsed queries into SQL syntax ones.

The main goal of this class is the implementation into web-based
applications
for letting final users/customers input their own defined queries without
knowing
sql syntax strictly. This goes into the direction of giving wider
flexibility to sql users.

Native language queries really look like everyday input requests.

Class still supports French and Italian, but I look forward to find helpers
to
supply other languages. So you are invited to visit this link

http://www.phpclasses.org/browse/package/2449.html

for further infos, as well as the class code, examples, shots to preview how
it
works and a short tutorial.

For those who would like helping me to provide new language, I'm going
to write down a PDF document for listing the general features, the
properties
of all entries to lessen the creation of new related dictionaries.

Thanks,

Alessandro Rosa

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



[PHP] MYSQL translator

2005-07-20 Thread Alessandro Rosa
Dear All subscribers,

my intention, through this e-mail, is to submit to your attentions one PHP
class
devoted to translate input native language commands for database into MYSQL
commands lines.

The goal of this class is to provide a comfortable code interface to let
programmers
implement forms within their programs so that customers/users can input
self-defined command lines and reach their own queries.

Programmers can freely implement as they want. For example, one suggested
way
is evidently prompt-like, so that customers can use the program to get their
queries.

Purposes of this class and everything related is contained in the file
readme.html

I do not know lots of forums, but if you like this code you might also post
it
to other national PHP forums.

If you are interested in, please ask me to send you the related PHP code by
e-mail: [EMAIL PROTECTED]

I look forward to your feedbacks.

Alessandro Rosa

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



[PHP] submission PHP code : MYSQL command lines translation

2005-07-19 Thread Alessandro Rosa
Dear All subscribers,
 
my intention, through this e-mail, is to submit to your attentions one PHP class
devoted to translate input native language commands for database into MYSQL
commands lines.

Download the code from:
http://freeweb.supereva.com/malilla/Mirror/Download/Code/Php/php_mysql_translator.zip

or ask it to me.

The goal of this class is to provide a comfortable code interface to let 
programmers
implement forms within their programs so that customers/users can input
self-defined command lines and reach their own queries.

Programmers can freely implement as they want. For example, one suggested way
is evidently prompt-like, so that customers can use the program to get their 
queries.

Purposes of this class and everything related is contained in the file 
readme.html

I do not know lots of forums, but if you like this code you might also post it
to other national PHP forums.

I hope the forums I sent provide attachments sending too, otherwise feel free
to ask me to send you the related PHP code.

I look forward to your feedbacks.

Alessandro Rosa


[PHP] submission PHP code : MYSQL command lines translation

2005-07-19 Thread Alessandro Rosa
Dear All subscribers,
 
my intention, through this e-mail, is to submit to your attentions one PHP class
devoted to translate input native language commands for database into MYSQL
commands lines.

The goal of this class is to provide a comfortable code interface to let 
programmers
implement forms within their programs so that customers/users can input
self-defined command lines and reach their own queries.

Programmers can freely implement as they want. For example, one suggested way
is evidently prompt-like, so that customers can use the program to get their 
queries.

Purposes of this class and everything related is contained in the file 
readme.html

I do not know lots of forums, but if you like this code you might also post it
to other national PHP forums.

I hope the forums I sent provide attachments sending too, otherwise feel free
to ask me to send you the related PHP code.

I look forward to your feedbacks.

Alessandro Rosa


[PHP] session data not recorded

2005-07-16 Thread Alessandro Rosa
I have a problem to record session data and I would you
help me. I suppose there's something I missed in the general
configurations during the last install, but I can't realize it.

I arranged a couple of simple files handling sessions, to show you my
problem.

I have a file index.php :
---
?php session_start();

$_SESSION['user'] = User;
$_SESSION['psw'] = Psw;

?

a href=page2.phpGo!/a
---

and then the file page2.php :

---
?php session_start();

echo $_SESSION['user'];
echo br/;
echo $_SESSION['psw'];

?
---

But when page2.php is loaded, then a blank page is displayed.

What's wrong with this?
Thanks in advance.

Alessandro

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



[PHP] session data not recorded (ADD-ON)

2005-07-16 Thread Alessandro Rosa
I forgot to write that:
- my config is Win2000/php 4.4.0/apache 1.3
- Session files are correctly created and information stored therein.

Then there a trouble in reading such files, since when I call a session
variable, the content is not displayed.

So what to do?

Alessandro


[PHP] session data not recorded : solved !

2005-07-16 Thread Alessandro Rosa
It was due to my firewall. Highest level protection stopped any cookie
to be read. So, once realized, everything re-started to work as usual.

Alessandro


[PHP] constructors in PHP

2005-07-11 Thread Alessandro Rosa
Is there the possibility to have in PHP multiple class constructors
as in C++ or just one ?
I would be sure about it in order to prevent useless mad investigations
in the code I'm writing.

Thanks in advance ...

Alessandro Rosa


Re: [PHP] constructors in PHP

2005-07-11 Thread Alessandro Rosa
Thanks to all for clear responses!

So just a question now, why have not multiple constructors been implemented?
Are there some security issues related to them ?

Alessandro

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



Re: [PHP] constructors in PHP

2005-07-11 Thread Alessandro Rosa
  As far as I know, its not a security issue, but a structure/design
issue.

 The issue is that in php you can't definitely say what type a variable
 is , whereas in c++ you can say this variable is a string, this one a
 int, ….

But, right because PHP is weakly typed, multiple constructors could be
handled easier, I suppose ... isn't true?

Alessandro Rosa

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



[PHP] $_SESSION and header()

2005-06-26 Thread Alessandro Rosa
(a) : After saving a couple of data into two $_SESSION variables from a
form,
(b) : I used the header() function to redirect the browser to
(c) : display another page.

But, when I'm in the new page of (c), the $_SESSION variables stored
in (a) are no longer available and I can get anymore their values then,
(I can't say if they have been unset or erased).

I presume there's some relation with the use of header() and
the lost data.
My intention is to keep the automatic redirection by the header().

Any suggestion?
Thanks in advance.

Alessandro Rosa

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



Re: [PHP] $_SESSION and header()

2005-06-26 Thread Alessandro Rosa
Does (c) have at the top of its page:
?php session_start(); ?

André


 You have to pass the session ID between pages, either by setting
 session.use_cookies = 1 (so that the session ID is passed using a
 cookie where possible) or append the session ID to the URL you are
 redirecting to as part of the query parameters.

Paul


Thank you both!
I did always use session_start() and finally I also already use
the second option Paul addressed, in order to overcome the
issues raised by header(). Not in the same terms, but the URL
parameters was my idea too.

So could I guess that this is there's no direct remedy to
avoid header() delete sessions variables?:-)

Alessandro

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



[PHP] Firefox ABOUT: parameters list

2005-06-09 Thread Alessandro Rosa
I know there's not quite the right place
to ask for that, but how can one know which
are all the parameters one can type after
about: in Firefox 1.0.4 ?

That is, as far as I know, one can enter

about:config
about:plugins

Thanks and Regards

Alessandro Rosa






___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

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



[PHP] Firefox ABOUT: parameters list

2005-06-09 Thread Alessandro Rosa
I know this is not quite the right place
to ask for that, but how can one know which
are all the parameters one can type after
about: in Firefox 1.0.4 ?

That is, as far as I know, one can enter

about:config
about:plugins

Thanks and Regards

Alessandro Rosa






___ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

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



[PHP] headers and session

2005-06-06 Thread Alessandro Rosa
Hi to all,

I got a problem while storing session variables.

?php
session_start();
header( Cache-control: private );

require_once(config.inc.php);


$_SESSION['session_psw'] = $_POST['txtPassword'];
$_SESSION['session_user'] = $_POST['txtIdUtente'];



$PHPcmd = $GLOBALS['gestionale_path_name'].test/2.php ;

header( Location: .$PHPcmd );

?

After the call to header(...), the values of session variables are lost.

I think I should fix this up with some settings in my php.ini

Could you help me, please?

Alessandro Rosa

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



[PHP] headers and session

2005-06-06 Thread Alessandro Rosa
 Does config.inc.php have any whitespace following the closing ? tag, or
 does it output any HTML? That could be your culprit.

 What happens if you do your $_SESSION setting *before* the require, but
 directly after the initial header() call?

He knew that header may give problems with whitespaces, but this was not the
case.

With regard to your secondo question, it works !
that is, the code now looks like:

?php
session_start();


$_SESSION['session_psw'] = $_POST['txtPassword'];
$_SESSION['session_user'] = $_POST['txtIdUtente'];


header( Cache-control: private );

require_once(config.inc.php);
$PHPcmd = $GLOBALS['gestionale_path_name'].test/2.php ;

header( Location: .$PHPcmd );

?


But could someone explain me why ?

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



[PHP] headers and session (2)

2005-06-06 Thread Alessandro Rosa
I want to thank you all for previous helpings.

Really the first code was easy to be solved, but
this is how it shall work out. This is a program running
locally and the trouble is that session vars are stored
in local files. I must avoid to store a plain text password
therein, thus I need to crypt and save it into session.

When 2.php file just displays session data (it is test environemnt),
but the output is blank !

Suggest a different approach ?

Alessandro Rosa
 

?php
session_start();


require_once('crypting.php');
require_once(dirname(__FILE__).'/../mysql_wrap/mysql_man.php');

$handle_db = connect_to_mysql_server();
$psw = $_POST['txtPassword'];
$psw = encrypt( $psw, get_crypt_key() );
sql_disconnect( $handle_db );

$_SESSION['session_user'] = $_POST['txtIdUtente'];
$_SESSION['session_password'] = $psw;


session_cache_limiter('private');

require_once(config.inc.php);
$PHPcmd = $GLOBALS['gestionale_path_name'].phpcode/login/2.php ;

header( Location: .$PHPcmd );

?

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



[PHP] headers and session (question)

2005-06-06 Thread Alessandro Rosa
Here's below the solution (the encryption will be shortly performed
into login.php).

1 ?php
2 session_start();

3 $_SESSION['session_user'] = $_POST['txtIdUtente'];
4 $_SESSION['session_password'] = $_POST['txtPassword'];

5 $PHPcmd = login.php ;

6 header( Location: .$PHPcmd );
7 ?


But a QUESTION now :

if line 5 is replaced by these two lines, say here 5a and 5b:

5a require_once(config.inc.php);
5b $PHPcmd = $GLOBALS['gestionale_path_name'].phpcode/login/login.php ;

this does not work (meaning user and psw are not passed to login.php);
but again the below code works again:

5a require_once(config.inc.php);
5b $PHPcmd = $gestionale_path_name.phpcode/login/login.php ;


Thanks,

Alessandro
 

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



[PHP] wait function

2005-02-05 Thread Alessandro Rosa
I would write down an efficient WAIT function.
The one I did was as follows:

function microdelay($delay) {
$UNUSED_PORT=31238;
@fsockopen(tcp://localhost,$UNUSED_PORT,$errno,$errstr,$delay);
}

But it does not seem to work well.

Any suggestion?

Regards

Alessandro


[PHP] RE: wait function

2005-02-05 Thread Alessandro Rosa
Yes, guys, SLEEP was what I was looking for.
I took up the code I showed before from such a
php site, but it did work on a linux server anyway.

I would try the alternative of SLEEP: I was not
so much aware of it.

Yours,

Alessandro





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



[PHP] remote permissions on MySQL

2004-12-13 Thread Alessandro Rosa
I'm a newbie on MySQL.

I just wanted to know whether there is the possibility
to create a new user/psw remotely onto a server.

That is, something related to command 'mysql_setpermissions',
but acting from a remote host.

Alessandro


[PHP] automatic responder

2004-11-28 Thread Alessandro Rosa
 Yes, but perhaps every 5 minutes. You have to solve this too, either 
 cron job if you have it available or it can be trigered by user http 
 requests (not very reliable).

Thanks again!
Yours e-mail fixed some procedural doubts I have been thinking about
such automatic responder.

Solution might be easy to achieve by implementing, on my own opinion,
a Javascript code with a nested 'SetTimeOut' function recursively calling 
itself every 5 mins (for example) and re-direction to a php code performing
the POP3 mailbox checking.
(obviously the php code shall include ECHOes to the timing Javascript
code again...)

Alessandro Rosa

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



[PHP] automatic responder

2004-11-28 Thread Alessandro Rosa
 This seems like a very weak re-implementation of cron. Seriously, this 
 problem has been solved.
 
 -ryan

Then, what do you exactly mean for cron job?

Alessandro

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



[PHP] automatic responder

2004-11-27 Thread Alessandro Rosa
Thank you for all responses about this topic.

I would also solve a more practical doubt finally: if I use
for example the PHP code 'POP3class', as suggested by
Manuel Lemos, it's implicitly meant that it should run periodically
on a web-server (for example, under a timer of a given number
of seconds), don't you?

Example: check pop3 mailbox every 5 secs by php code and
then perform all the required actions.

Alessandro Rosa

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



[PHP] automatic responder

2004-11-26 Thread Alessandro Rosa
How about coding an automatic responder via PHP ?

Alessandro Rosa


Re: [PHP] mp3 cropping

2004-11-18 Thread Alessandro Rosa
 Anyone out there know of a tool or technique for cropping an MP3 file 
 (e.g., cutting the first 30 sec out into another file)? PHP would be 
 nice, but not necessary.
 
 TIA,
 ryan

If your platform is Windows, you can look for 'CDex'.
This tool works as you desire.

Alessandro Rosa

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



[PHP] force a download

2004-11-15 Thread Alessandro Rosa
How can be forced a download by PHP with the
visualization of Directory dialog window in order to choose
the download path?

Alessandro Rosa


Re: [PHP] upload via FTP

2004-11-09 Thread Alessandro Rosa
 Your question is not very clear. Do you mean to say you only want your 
 FTP server to be accessible by your php scripts? If so the trick is to 
 listen only on localhost and not on the public ip.
 

No, only some of the scripts shall be
accessible by other scripts in the FTP server.

Alessandro Rosa

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



Re: [PHP] upload via FTP

2004-11-09 Thread Alessandro Rosa
 That's even more confusing. You run php scripts off a
 web server and not an FTP server.

Ok ... the server I'm dealing with works for both services.
But let me re-explain the question in new terms.

I have a bunch of php scripts on a web server.
I just wanted to know if it is possible to deny access
permissions for some of such scripts to a public user
but not to other scripts staying on the same server.

Alessandro Rosa

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



[PHP] upload via FTP

2004-11-08 Thread Alessandro Rosa
Dear all subscribers,

I'm coding a send-mail form, also including
edit boxes keeping the path of files to be uploaded
from the remote host onto an FTP server.

Is there the possibility (and if so, which ones) to
manage FTP permissions to have a file including
the variable with ID and PSW (for FTP access)
and which is usable
by the code running on the server exclusively but
cannot be accessed by any other user?

Alessandro