php-general Digest 1 Jul 2011 06:28:32 -0000 Issue 7384
Topics (messages 313823 through 313833):
Re: I want to use POST when redirect via PHP Header function.
313823 by: Arthur Moczulski
313824 by: Ashley Sheridan
313826 by: Jim Giner
313827 by: Jasper Mulder
313828 by: Jim Giner
313829 by: Geoff Lane
313830 by: Steve Staples
Re: PDO_INFOMIX connection problem...
313825 by: Steve Staples
Re: Parent Limits?
313831 by: Brian Smither
313833 by: admin.buskirkgraphics.com
PHP 5.3.7RC2 Released for Testing
313832 by: Ilia Alshanetsky
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
that's quite basic thing which you can definitely find in the manual
On 30 June 2011 10:48, Md Ashickur Rahman Noor <ashickur.n...@gmail.com>wrote:
> >
> > On Thu, Jun 30, 2011 at 1:52 PM, Geoff Lane <ge...@gjctech.co.uk> wrote:
> > On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
> >
> > > I want to use POST when redirect via PHP Header function. Is it
> > > possible?
> >
> > AFAICT, it isn't. You can use GET variables by passing them on the
> > querystring. These can then be accessed via $_REQUEST, which is an
> > amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
> > that might take input from either $_POST or $_GET, you can usually
> > code fairly transparently by replacing both by $_REQUEST.
> >
> > Alternatively, you can create a form on the page and use client-side
> > javascript to 'auto-submit' via the body onLoad event. However, this
> > does require JS on the client and so cannot be guaranteed.
> >
> > HTH,
> >
> > --
> > Geoff
> >
>
> Thank you every one. If I use GET then the value will be shown in the
> address bar, Which I don't want to do.
>
> Can any one describe me the $_REQUEST and $_COOKIE, if you can give example
> it will be helpful for me.
> ----------------------------------------------------------
> Dedicated Linux Forum in
> Bangladesh<
> http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
> Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
> Thank you
> Md Ashickur Rahman
>
--- End Message ---
--- Begin Message ---
Md Ashickur Rahman Noor <ashickur.n...@gmail.com> wrote:
>>
>> On Thu, Jun 30, 2011 at 1:52 PM, Geoff Lane <ge...@gjctech.co.uk>
>wrote:
>> On Thursday, June 30, 2011, Md Ashickur Rahman Noor wrote:
>>
>> > I want to use POST when redirect via PHP Header function. Is it
>> > possible?
>>
>> AFAICT, it isn't. You can use GET variables by passing them on the
>> querystring. These can then be accessed via $_REQUEST, which is an
>> amalgamation of $_POST, $_GET, and $_COOKIE. So if you have a script
>> that might take input from either $_POST or $_GET, you can usually
>> code fairly transparently by replacing both by $_REQUEST.
>>
>> Alternatively, you can create a form on the page and use client-side
>> javascript to 'auto-submit' via the body onLoad event. However, this
>> does require JS on the client and so cannot be guaranteed.
>>
>> HTH,
>>
>> --
>> Geoff
>>
>
>Thank you every one. If I use GET then the value will be shown in the
>address bar, Which I don't want to do.
>
>Can any one describe me the $_REQUEST and $_COOKIE, if you can give
>example
>it will be helpful for me.
>----------------------------------------------------------
>Dedicated Linux Forum in
>Bangladesh<http://forums.linuxdesh.com/member.php?action=register&referrer=3%20>
>Follow Me Twiter <https://twitter.com/#%21/AshickunNoor>
>Thank you
>Md Ashickur Rahman
If you issue a header("Location:") call then you can't use post.
If you have to send back values that you don't want a user to see, why don't
you build the page you are outputting and echo it out instead of issuing a
whole redirect? That way, you can use hidden form elements to hold these values.
If you just need values to be persistent, have a look at the $_SESSION array
and session_start() which you can use for this.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--- End Message ---
--- Begin Message ---
Just as bottom posting (I know, it's in da rules) makes it rather difficult
for humans to read thru a topic, scrolling thru ever-longer messages to get
to the 'new' content.
Let's solve it for all by only posting your own content and let the sum of
all the messages equate to the topic. :)
"Ashley Sheridan" <a...@ashleysheridan.co.uk> wrote in message
news:4ce7359b-95f0-4c51-8d23-078b4838f...@email.android.com...
Ps. Could people please avoid top posting, as it does make it rather
difficult for the automated archive and some screen readers.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--- End Message ---
--- Begin Message ---
> To: php-gene...@lists.php.net
> From: jim.gi...@albanyhandball.com
> Date: Thu, 30 Jun 2011 09:12:45 -0400
> Subject: Re: [PHP] I want to use POST when redirect via PHP Header function.
>
> Just as bottom posting (I know, it's in da rules) makes it rather difficult
> for humans to read thru a topic, scrolling thru ever-longer messages to get
> to the 'new' content.
>
> Let's solve it for all by only posting your own content and let the sum of
> all the messages equate to the topic. :)
In fact, the posting rules state that one should only quote those parts of a
message that are relevant for the post. Unfortunately, many people decide
that everything is relevant, even for a long thread. Still, this should not mean
we have to flee to the opposite of no quoting. You will agree that quoting
your message above will be clearer than just replying without quote.
Personally, I think that incorrect spelling is far more annoying than
the quoting; that is, if it does not originate from incapability due to English
(whether it be British or American) being not the native language, as
opposed to spelling errors because of vapidity.
As for the readers of this list, I am sorry to go into this non-PHP subject,
but I couldn't really let this pass.
Best regards,
Jasper
--- End Message ---
--- Begin Message ---
DON't get me started on the massacre of the English language on posting
sites all over the internet! It seems that people are so wrought up in
their problem-of-the-moment that they don't realize that they are
mis-spelling, mis-typing and mis-stating their problem(s) in their frantic
posts. :)
"Jasper Mulder" <lord_fa...@hotmail.com> wrote in message
news:snt106-w65e964fcfdcf1ff338df0cf7...@phx.gbl...
Personally, I think that incorrect spelling is far more annoying than
the quoting; that is, if it does not originate from incapability due to
English
(whether it be British or American) being not the native language, as
opposed to spelling errors because of vapidity.
--- End Message ---
--- Begin Message ---
On Thursday, June 30, 2011, Jasper Mulder wrote:
> Personally, I think that incorrect spelling is far more annoying
> than the quoting; that is, if it does not originate from
> incapability due to English (whether it be British or American)
> being not the native language, as opposed to spelling errors because
> of vapidity.
Personally, I'm not sure that those who are lifeless, dull, or
unintersting are any more or less prone to spelling errors than the
rest of us; or that the more interesting members of this list are
immune!
> As for the readers of this list, I am sorry to go into this non-PHP subject,
> but I couldn't really let this pass.
Au contraire! Typos are very much a PHP subject. Take this from
someone who spent nearly two hours yesterday debuggin PHP code with
imbalanced parentheses, parentheses that should have been braces - and
vice versa, ampersands in place of dollar signs, and other typos!
I think the moral is that one should never code when tired ;(
--
Geoff
--- End Message ---
--- Begin Message ---
On Thu, 2011-06-30 at 15:20 +0100, Geoff Lane wrote:
> On Thursday, June 30, 2011, Jasper Mulder wrote:
>
> I think the moral is that one should never code when tired ;(
>
or coding while drunk... my favorite typo is $this == 'value'; or
$$this = 'value'; very hard to find sometimes...
As much as I hate to go off-topic even more, this is one thing that I do
like about Python. The fact that requires/enforces proper
indentation... but that is as far as I am going with that :)
Steve.
--- End Message ---
--- Begin Message ---
On Wed, 2011-06-29 at 16:42 -0400, Steve Staples wrote:
> I am trying to connect to an informix database, and using excel and odbc
> it works fine.
>
> I installed the PDO_INFORMIX via:
> pecl download pdo_informix
> phpize
> ./configure --with-pdo-informix=/opt/IBM/informix
> make
> make install
>
> and it all appeard to work... phpinfo() shows that it's enabled, and
> active... and when i do my PDO connection, it fails with this error:
>
> I also installed the CSDK prior to installing the pecl pdo_informix (as
> the php.net docs said)
>
> Fatal error: Uncaught exception 'PDOException' with message
> 'SQLSTATE=HY000, SQLDriverConnect: -23101 [Informix][Informix ODBC
> Driver][Informix]Unspecified System Error = -23101.'
>
> all the values in my code, i was given from my boss, which he used to
> get in with excel and the odbc. the $database has to be the full path
> of the informix table
>
> Also, we cannot even see my local machine hitting the server, yet when i
> try telnet to it, i can connect no issues... so it's not a firewall from
> my machine to it.
>
> Any ideas? or thoughts on how to get this working??
>
> -- code --
> <?php
> $host = "[ipaddress of machine]";
> $port = "[port number]";
> $database = "[actual path of database]";
> $server = "[server]";
> $protocol = "sesoctcp";
> $username = "[username]";
> $password = "[password]";
> $tablename = "[name of the table]";
>
> $db = new PDO("informix:host={$host}; service={$port};
> database={$database}; server={$server}; protocol={$protocol};
> EnableScrollableCursors=1;", $username, $password);
>
> print "Connection Established!\n\n";
>
> $stmt = $db->query("select * from {$tablename}");
> $res = $stmt->fetch( PDO::FETCH_BOTH );
> $rows = $res[0];
> echo "Table contents: $rows.\n";
>
> ?>
ok, so I ran the test... and it fails 100% of the tests...
# sudo make test
Build complete.
Don't forget to run 'make test'.
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/gd.so' - modules/gd.so: cannot open shared object file: No such
file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' -
modules/gd.so: cannot open shared object file: No such file or directory
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/mysql.so' - modules/mysql.so: cannot open shared object file:
No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/mysql.so'
- modules/mysql.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/mysqli.so' - modules/mysqli.so: cannot open shared object file:
No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/mysqli.so'
- modules/mysqli.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/pdo.so' - modules/pdo.so: cannot open shared object file: No
such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/pdo.so' -
modules/pdo.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: Module 'pdo_informix' already loaded in Unknown on line 0
Warning: Module 'pdo_informix' already loaded in Unknown on line 0
/usr/bin/php: symbol lookup error: modules/pdo_informix.so: undefined
symbol: php_pdo_register_driver
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/gd.so' - modules/gd.so: cannot open shared object file: No such
file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/gd.so' -
modules/gd.so: cannot open shared object file: No such file or directory
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/mysql.so' - modules/mysql.so: cannot open shared object file:
No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/mysql.so'
- modules/mysql.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/mysqli.so' - modules/mysqli.so: cannot open shared object file:
No such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/mysqli.so'
- modules/mysqli.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'modules/pdo.so' - modules/pdo.so: cannot open shared object file: No
such file or directory in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'modules/pdo.so' -
modules/pdo.so: cannot open shared object file: No such file or
directory in Unknown on line 0
PHP Warning: Module 'pdo_informix' already loaded in Unknown on line 0
Warning: Module 'pdo_informix' already loaded in Unknown on line 0
/usr/bin/php: symbol lookup error: modules/pdo_informix.so: undefined
symbol: php_pdo_register_driver
=====================================================================
PHP : /usr/bin/php
CWD : /home/sstaples/informixpdo/PDO_INFORMIX-1.2.6
Extra dirs :
VALGRIND : Not used
=====================================================================
--- End Message ---
--- Begin Message ---
With all kind respect to Richard Buskirk and Daniel Brown (thank you for
responding), their replies did not actually answer my question.
My question is: What module or php.ini setting would render inoperative a
directory traversal of X parents?
My original post follows.
The following works (three parents):
include("../../../includes/ini.inc.php");
require_once("../../../includes/ini.inc.php");
The following works (four parents):
include("../../../../includes/ini.inc.php");
The following does not work (four parents):
require_once("../../../../includes/ini.inc.php");
That is, require_once() with four parents has been reported to have been
disabled for security purposes. But apparently, not disabled is include() with
four parents.
The device or setting which is causing the problem is not known to me. It may
be just the four parents (and include() is getting the data from this file
elsewhere) or it may be the combination.
It has been reported this is not a limit within open_basedir. So, what is it?
What module or php.ini setting would have this effect?
Thank you.
--- End Message ---
--- Begin Message ---
Brian,
I totally get what you are saying.
I just may have not translated my thoughts to you very well and I am very
sorry for that.
I tested the design on a few of my servers.
I had issues on my windows Servers and did not have issues on my RHEL
servers
There is an actual term for this practice it is called "Linkal Gymnastics"
I have read many articles on this issue, in trying to explain the path
issues using "../" .
Many complain of performance issues in windows as well as Linux.
I want to propose something and you tell me if it makes sense.
Load the path to the file, not from the current location.
It is just bad practice, and if you ever change the location of the file you
have major problems.
You're not guessing at the location backwards and running into performance
issues.
Instead of loading the file in reverse
require_once("../../../../ini.inc.php"); <-- this path could be wrong.
try
require_once("C:/intepub/vhost/yourdoamin.com/httpdocs/www/ini.inc.php");<--
unless you move it the direct path is always right.
You can create constants as I said before making your life easier.
define('BASE_PATH','C:\\inetpub\\vhosts\\yourdoamin.com\\httpdocs\\');
simply calling
require_once(BASE_PATH."www/ini.inc.php");
I cannot tell you why there are performance issue, but there are and it
seems to be more directory path issues than php.
They did write a paper on this issue at Texas U under "Computer Science
Recursive Backtracking"
I hope this helps
Richard L. Buskirk
-----Original Message-----
From: Brian Smither [mailto:bhsmit...@gmail.com]
Sent: Thursday, June 30, 2011 2:30 PM
To: php-gene...@lists.php.net
Subject: [PHP] Re: Parent Limits?
With all kind respect to Richard Buskirk and Daniel Brown (thank you for
responding), their replies did not actually answer my question.
My question is: What module or php.ini setting would render inoperative a
directory traversal of X parents?
My original post follows.
The following works (three parents):
include("../../../includes/ini.inc.php");
require_once("../../../includes/ini.inc.php");
The following works (four parents):
include("../../../../includes/ini.inc.php");
The following does not work (four parents):
require_once("../../../../includes/ini.inc.php");
That is, require_once() with four parents has been reported to have been
disabled for security purposes. But apparently, not disabled is include()
with four parents.
The device or setting which is causing the problem is not known to me. It
may be just the four parents (and include() is getting the data from this
file elsewhere) or it may be the combination.
It has been reported this is not a limit within open_basedir. So, what is
it? What module or php.ini setting would have this effect?
Thank you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
The second release candidate of 5.3.7 was just released for
testing and can be downloaded here:
https://downloads.php.net/ilia/php-5.3.7RC2.tar.bz2 (md5sum:
1f4fba48807d5d6236b24ca1f1b63e69)
https://downloads.php.net/ilia/php-5.3.7RC2.tar.gz (md5sum:
d57c2d49d4e9c8a90d31068d88605ef2)
The Windows binaries are available at: http://windows.php.net/qa/
Given the small number of changes since the last RC, it is likely a
final version
will be released in 2 weeks. If it is not, a third release candidate
will be available
in 2 weeks. PHP 5.3.7 is focused on improving the stability and
security. To ensure
that the release is solid, please test this RC against your code base
and report any
problems that you encounter.
To find out what was changed since the last release please refer to the
NEWS file found within the archive or on
http://svn.php.net/viewvc/php/php-src/tags/php_5_3_7RC2/NEWS?revision=HEAD&view=markup
Windows users please mind that we don't provide VS6 builds anymore since
PHP 5.3.6. When using the openssl extension please mind a known
regression which might lead to a performance degression. This regression
will be fixed with RC2 and the final release.
Ilia Alshanetsky
--- End Message ---