php-general Digest 18 Feb 2012 05:16:21 - Issue 7694
Topics (messages 316710 through 316723):
Re: basic captcha
316710 by: Donovan Brooke
316711 by: Donovan Brooke
316712 by: Donovan Brooke
316719 by: Geoff Shang
Re: html_entity_decode is trying to kill me
Besides, are there some APIs I can use if I want to setget environment
variables like DOCUMENT_ROOT in my extension(similar to
sapi_cgienv_get/set).
Thanks!
2012/2/17 Rui Hu tchrb...@gmail.com
hi,
I just started to write a simple PHP extension hello, but encountered
some problems. I
Hi, All
I do not remember where I found the list of variables that are provided if
you load PHP using Apache, nginx, IIS ...
Fact is that there's a list of variables in the CGI 1.1 definition that
should be given to a cgi script:
http://tools.ietf.org/html/rfc3875#section-4
PATH_INFO is on the
Hi,
Just to also add the discussion why mod_rewrite or PATH_INFO :)
http://stackoverflow.com/questions/1565292/mod-rewrite-or-path-info-for-clean-urls
Bye
Simon
2012/2/17 Simon Schick simonsimc...@googlemail.com
Hi, All
I do not remember where I found the list of variables that are provided
Simon Schick simonsimc...@googlemail.com wrote:
Hi, all
When you ask for a captcha, I'd first ask what do you want to use it
for.
If you read the first lines of Wikipedia it has been developed to
differ
between a real user and a bot.
If you'd now say that you want to use it to protect spam in
On Fri, Feb 17, 2012 at 1:26 PM, Negin Nickparsa nickpa...@gmail.comwrote:
I have a Gams application
http://interfaces.gams-software.com/doku.php?id=env%3aspawning_gams_from_php
which I want to run it through php code after trying many things finally I
found that for running in commmand
I am in windows yeah I tried this one
if(shell_exec('C:\Program Files\GAMS23.7\gams.exe trnsport_php.gms'))
echo 'yes' ;
else echo 'no';
it wil show me no
my another try:
if(shell_exec('cd C:\Program Files\GAMS23.7') )
echo 'yes';
else echo 'no';
it will show me No
Negin Nickparsa nickpa...@gmail.com hat am 17. Februar 2012 um 12:26
geschrieben:
if(system('gams.exe trnsport_php.gms'))
echo 'Not Error';
else echo'Error';
it shows me Error
system() Returns the last line of the command output on success, and FALSE
on failure.
So, lets assume your gams
yes it prints nothing by this code
if (($out = system('C:\Program Files\GAMS23.7\gams.exe trnsport_php.gms'))
!== FALSE)
{
print('Not error');
printf('Output is %s', $out);
}
else
{
print('Error');
}
give the full path of trnsport_php.gms too.
shell_exec should be working fine on windows as well.
I don't know what is going here!? well it shows no error but the out put is
nothing and my gams when running should make a text file but by running,it
doesn't happen so It has problem
Try to write full path to executable file and don't forget to bring
double quote to that path. It must because Program files contain
space and php think your program is Program that contain parameter
files.
if(system(' C:\Program Files\GAMS23.7\gams.exe trnsport_php.gms')
On Fri, Feb 17,
Hei, Ashley
The php bugtracker himself uses just simple math.
Others are made by clicking on the man's name in the picture (3 shaddows of
people with names in there) ...
But I myself dislike the visitor having extra-work. Therefore I'll stick to
the honey-pot the referer check and so on.
One
replace \ in path with /
then should work fine on windows too.
if (($out = system(' C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms')) !== FALSE)
{
print('Not error!');
printf('Output is %s', $out);
}
else
{
print('Error');
}
Fatih it shows again nothing why I should set the full path even when I run
my file on the path I
On 17 Feb 2012, at 12:12, Negin Nickparsa wrote:
if (($out = system(' C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms')) !== FALSE)
{
print('Not error!');
printf('Output is %s', $out);
}
else
{
print('Error');
}
Fatih it shows again nothing why I should set
It generates NULL
I changed it to this one:
$out = $cmd;
now it shows
string(85) C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms 21
On Fri, Feb 17, 2012 at 2:19 PM, Stuart Dallas stu...@3ft9.com wrote:
On 17 Feb 2012, at 12:12, Negin Nickparsa wrote:
if (($out = system(' C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms')) !== FALSE)
{
print('Not error!');
printf('Output is %s', $out);
Apache
I think it's wrong:
system(' C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms'))
Instead, try this:
system(' C:/Program Files/GAMS23.7/gams.exe C:/Program
Files/GAMS23.7/trnsport_php.gms '))
It is a good practice to write full path because we don't know
behaviour any
On Feb 17, 2012, at 12:36 AM, Patrick Hafner wrote:
Hi,
have you tried reCAPTCHA by Google?
You can find the PHP library on the website.
Easy to use, customizable and free, but nothing to install on your server (no
open source)
But it aid OCR to Text activities at google and all
Duken how you use and again another without a dot?
I tried yours it says:
*Warning*: system() [function.system http://localhost/gams/function.system]:
Cannot execute a blank command in *C:\Program
Files\GAMS23.7\calling_gams.php* on line *23*
Error
stuart $out = `$cmd`; what it will do? what is `? I didn't ever seen it
backtick operator (
http://www.php.net/manual/en/language.operators.execution.php) works like
shell_exec()
On 17 February 2012 18:00, Negin Nickparsa nickpa...@gmail.com wrote:
stuart $out = `$cmd`; what it will do? what is `? I didn't ever seen it
Fatih it shows this:
ERRORNULL
maybe program Files which has space should have something like \ which I
don't know ha?
or because of Null It is correct?
ow! Thanks I got Stuart meaning Now
Please quote the relevant parts of the email you're replying to - your emails
have massively diminished usefulness to the archives.
On 17 Feb 2012, at 12:21, Negin Nickparsa wrote:
It generates NULL
My bad, try this…
$cmd = 'C:/Program\\ Files/GAMS23.7/gams.exe'.'
ok sorry,I tried yours It generates Null.
On Fri, Feb 17, 2012 at 4:06 PM, Stuart Dallas stu...@3ft9.com wrote:
Please quote the relevant parts of the email you're replying to - your
emails have massively diminished usefulness to the archives.
On 17 Feb 2012, at 12:21, Negin Nickparsa wrote:
Oops no! it shows this one:
string(100) 'C:/Program\' is not recognized as an internal or external
command, operable program or batch file.
On Fri, Feb 17, 2012 at 4:10 PM, Negin Nickparsa nickpa...@gmail.comwrote:
ok sorry,I tried yours It generates Null.
On Fri, Feb 17, 2012 at 4:06 PM,
Stuart I changed it to this one:$cmd = 'C:/Program\\Files/ Now it tells:
string(43) The system cannot find the path specified.
On Fri, Feb 17, 2012 at 4:12 PM, Negin Nickparsa nickpa...@gmail.comwrote:
Oops no! it shows this one:
string(100) 'C:/Program\' is not recognized as an internal
I think I've already decided how to handle this, but I thought it's worth
asking.
I've inherited some fairly static .asp sites which are being hosted on a windows
server and to tidy things up I'm looking to 'move' them to one of the linux boxes.
My Initial thought is simply to clone the working
On 17 Feb 2012, at 12:42, Negin Nickparsa wrote:
Oops no! it shows this one:
string(100) 'C:/Program\' is not recognized as an internal or external
command, operable program or batch file.
Change the \\ in the commands to just a single \ but leave the space after it.
On Fri, Feb 17, 2012
this one:
$cmd = 'C:/Program\ Files/GAMS23.7/gams.exe'.' '.escapeshellarg('C:/Program
Files/GAMS23.7/trnsport_php.gms').' 21';
GENERATES:
string(100) 'C:/Program\' is not recognized as an internal or external
command, operable program or batch file.
Change the \\ in the commands to just a
On 17 Feb 2012, at 12:53, Negin Nickparsa wrote:
this one:
$cmd = 'C:/Program\ Files/GAMS23.7/gams.exe'.' '.escapeshellarg('C:/Program
Files/GAMS23.7/trnsport_php.gms').' 21';
GENERATES:
string(100) 'C:/Program\' is not recognized as an internal or external
command, operable program
I can't move Gams because it has many dll files which should be in there.
gams.exe should be execute in that path file in program Files
one time I tried to do it and when It shows me missing files I copy pasted
many files but It needs many other files which I regretted so it is not
possible.
I
I read about
The useless command may be like c: or cd.
Example:
system('c: C:\Program Files\... parameter 1 parameter 2');
exec('c: C:\Program Files\... parameter 1 parameter 2');
in php manual But I didn't know how to work with it
It doesn't use any back slashes
On Fri, Feb 17, 2012 at
and this One
system (\c:\\program files\\myapp\\myapp.exe\ params_for_myapp);
On Fri, Feb 17, 2012 at 4:36 PM, Negin Nickparsa nickpa...@gmail.comwrote:
I read about
The useless command may be like c: or cd.
Example:
system('c: C:\Program Files\... parameter 1 parameter 2');
exec('c:
$cmd = system (\C:\\Program Files\\GAMS23.7\\gams.exe\
trnsport_php.gms);
$out = `$cmd`;
var_dump($out);
It shows NULL
On Fri, Feb 17, 2012 at 4:38 PM, Negin Nickparsa nickpa...@gmail.comwrote:
and this One
system (\c:\\program files\\myapp\\myapp.exe\ params_for_myapp);
On Fri, Feb 17,
C:\/Program\ Files\\...
--C
Negin
Nickparsa wrote:
I can't move Gams because it has many dll files
which should be in there.
gams.exe should be execute in that
path file in program Files
one time I tried to do it and when It
shows me missing files I copy pasted
many files but It needs
curtis what do you mean --c?
On Fri, Feb 17, 2012 at 4:54 PM, Curtis Maurand cur...@maurand.com wrote:
C:\/Program\ Files\\...
--C
Negin Nickparsa wrote:
I can't move Gams because it has many dll files which should be in there.
gams.exe should be execute in that path file in program
Curtis I wrote this one as you said:
if(system(C:\/Program\ Files\\GAMS23.7\\gams.exe \C:\/Program\
Files\GAMS23.7\trnsport_php.gms))
echo 'No Error';
else echo 'Error';
how to set the path file correct?I really need it
Does anyone has a good reference showing me how to write path files in php
ERRORNULL
maybe program Files which has space should have something like \ which I
don't know ha?
or because of Null It is correct?
means false.. it cannot find the path. you have problem with path.
Fatih C:\Program Files\GAMS23.7 this is where my Gams is.
maybe the problem is with permissions
what should I do for permissions?
what shoud I do to write this path file:'(
I need it!
when echo system('dir')
shows me files of C:\Program Files\GAMS23.7
then it shoud run the command gams.exe
On Fri, Feb 17, 2012 at 3:43 PM, Negin Nickparsa nickpa...@gmail.comwrote:
Fatih C:\Program Files\GAMS23.7 this is where my Gams is.
maybe the problem is with permissions
what should I do for permissions?
what shoud I do to write this path file:'(
I need it!
when echo system('dir')
shows
Fatih what is about another parts?
it's wrong Fatih because it shows me another color in editor
On Fri, Feb 17, 2012 at 5:24 PM, Negin Nickparsa nickpa...@gmail.comwrote:
Fatih what is about another parts?
well then fix it. i m not using editor.
:)
On Fri, Feb 17, 2012 at 5:27 PM, Fatih P. fatihpirist...@gmail.com wrote:
well then fix it. i m not using editor.
Hi everyone,
Thanks for all the great ideas and links.
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
But has anybody had any experience of translating the asp code over?
I've gone the other way and translated some PHP to ASP, which felt
pretty dirty. Are you dealing with simple includes and small bits of
logic? That's all that I had (also fairly static sites) and I found
the process quite
I found the correct one:
$cmd = 'C:\Progra~1\GAMS23.7\gams.exe'.'
'.escapeshellarg('C:\Progra~1\GAMS23.7\trnsport_php.gms').' 21';
$out = `$cmd`;
var_dump($out);
It will show NULL,so No error
and I am sure it is correct because If I change gams.exe to egams.exe it
recognizes
but
It can't run
Hi,
So I decided to give one of those PHP math classes a go and have come
across a joyful character encoding problem. He's the deal:
$rule = 1 lt; 2;
$rule = html_entity_decode($rule, ENT_QUOTES, 'UTF-8');
echo $rule;
And the result is still 1 lt; 2. I've tried different combinations
of
Is it possible to do an LDAP Password Modify Extended Operation, as
specified in RFC 3062? The password hashing scheme in the LDAP directory I
am working with may change periodically, so it is my understanding that I
can't hash a new password according to a specific scheme, e.g., {SHA}, on
my
I 3 myself sooo Much :) It works now like a charm I am successfully
finished:D
this is my SIMPLE solution no need to set path files! :D
echo exec('C:\WINDOWS\system32\cmd.exe');
echo exec('gams.exe trnsport_php.gms');
It works like a charm:)
On Fri, Feb 17, 2012 at 6:34 PM, Negin Nickparsa
Thanks for all the input. Yes, there are a lot of ways and means and
issues that can be considered (thanks Simon), but this project will use
a simple captcha, mostly because it is familiar to users and fits with
the project. Yes, I've found some options via google, but was more
inquiring to
Answering myself sort-of, I think I'm on the wrong track with
html_entity_decode(). Does an HTML entity refer to an HTML code
like div rather than the encoded format of characters? It seems
like htmlspecialchars_decode() is actually what I'm looking for, but
I'm getting the same results with
This info might be helpful. If I copy and paste the example from the
manual directly, it works as described:
$orig = I'll \walk\ the bdog/b now;
$a = htmlentities($orig);
$b = html_entity_decode($a);
echo $a; // I'll quot;walkquot; the lt;bgt;doglt;/bgt; now
echo $b; // I'll walk the bdog/b now
Donovan Brooke li...@euca.us wrote:
Thanks for all the input. Yes, there are a lot of ways and means and
issues that can be considered (thanks Simon), but this project will use
a simple captcha, mostly because it is familiar to users and fits
with
the project. Yes, I've found some options via
Savetheinternet wrote:
[snip]
There are plenty of free PHP captcha scripts out there. Just google
captcha PHP. Securimage (phpcaptcha.org) looks relatively okay.
Thanks,
Michael
Hi Michael, this looked promising.. however, requires some GD support it
appears I don't have.. here is the
Donovan Brooke wrote:
[snip]
Hi Michael, this looked promising.. however, requires some GD support it
appears I don't have.[snip]
Hi, well, just did the test on the live server and it *does* support it
there.. so I guess I use it.. just won't work in the development enviro.
Thanks for the
Ashley Sheridan wrote:
[snip]
Well, if the answer doesn't matter, another could just pick anything and run
with it couldn't they?
Thanks,
Ash
For the favorite color thing? The idea would be to require one (but not
all) of the word options in the list (so answer does matter)... most
bots
On Fri, Feb 17, 2012 at 5:00 PM, Marc Guay marc.g...@gmail.com wrote:
Hi,
So I decided to give one of those PHP math classes a go and have come
across a joyful character encoding problem. He's the deal:
$rule = 1 lt; 2;
$rule = html_entity_decode($rule, ENT_QUOTES, 'UTF-8');
echo $rule;
It actually works for me as well if I run it in the browser. The
structure of the app is a bit strange, though, so debugging character
encoding issues is quite difficult. The code is being run by Code
Igniter in the backend and the response passed via JSON to a ExtJS 4
frontend, so what I'm
Ugh. The problem is that the EvalMath class doesn't death with
comparisons between numbers, it only performs calculations. Barking
up the wrong tree for 2 hours is fun on a Friday!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ugh. The problem is that the EvalMath class doesn't death with
comparisons
between numbers, it only performs calculations. Barking up the wrong tree
for 2 hours is fun on a Friday!
Sorry, I just noticed death; seems your fingers contracted deal with into
death. Interersting...
--
PHP
On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:
Is it possible to do an LDAP Password Modify Extended Operation, as
specified in RFC 3062? The password hashing scheme in the LDAP directory I
am working with may change periodically, so it is my understanding that I
can't hash a
Mike Mackintosh mike.mackint...@angrystatic.com wrote on 02/17/2012
12:36:06 PM:
On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:
Is it possible to do an LDAP Password Modify Extended Operation, as
specified in RFC 3062? The password hashing scheme in the LDAP
directory I
On Fri, 17 Feb 2012, Ashley Sheridan wrote:
I would avoid making a user type in something they see in a picture, as
you've just succeeded in pissing off a bunch of blind people.
Thank you! Glad someone pointed this out so I didn't have to.
And if you use a system like Recaptcha which has an
I have a script that accepts four POST variables. Three are used and five more
are added for a total of eight keys and their urlencode() values all strung
together in the proper format.
Then cURL is initialized with the field string given to:
curl_setopt($ch, CURLOPT_POST,8);
curl_setopt($ch,
Am 18.02.12 01:54, schrieb Brian Smither:
I have a script that accepts four POST variables. Three are used and five
more are added for a total of eight keys and their urlencode() values all
strung together in the proper format.
Then cURL is initialized with the field string given to:
On Feb 17, 2012, at 3:34 PM, kirk.john...@zootweb.com wrote:
Mike Mackintosh mike.mackint...@angrystatic.com wrote on 02/17/2012
12:36:06 PM:
On Feb 17, 2012, at 10:57, kirk.john...@zootweb.com wrote:
Is it possible to do an LDAP Password Modify Extended Operation, as
specified in RFC
I've done a site from Classic ASP (no .net) to non-oop PHP.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
73 matches
Mail list logo