[PHP] Re: php.ini question
does phpinfo(32) show the $action variable anywhere? If so just use the global array variable it shows up under. Personally I'd just use the $_GET['action'] alias. You can safely turn register_globals on if you're the only guy that runs scripts on that server and your scripts will never have to run on a server where it is off. If not you should do it for yourself in .htaccess or with ini_set(). Just be sure you are careful to initialize all internal variables that don't come directly from user input. - Original Message - From: "Joe Kupiszewski" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, March 26, 2003 12:56 PM Subject: php.ini question > I didn't do the installation, but the phpinfo() shows the following: > > version - 4.2.3 > > ./configure' '--with-apxs=/usr/local/sbin/apxs' > '--with-config-file-path=/usr/local/etc' '--enable-versioning' > '--with-regex=system' '--without-gd' '--without-mysql' '--with-zlib' > '--with-mysql=/usr/local' '--prefix=/usr/local' 'i386-portbld-freebsd4.7' > > and the php path info is listed as > /usr/local/etc > > I do have root access as this is not a production machine, but for the life > of me cannot seem to get it to read the php.ini file. I believe php and > apache are interacting properly, or I wouldn't get the phpinfo() to work. > > The root of my real problem is that in trying to pass variable values from > php scripts to reinvocations of the same script using > http://pathtofile.php?action=3 > > I realize that this is a register_globals thing and that I can access it by > one of two ways: > > 1) Turning register_globals on (which many tell me is a security risk) > 2) Using $_REQUEST["action"] > 3) $HTTP_POST_VARS and $HTTP_GET_VARS -> with ["action"] > > However, using the second (haven't tried the 3rd) method and trying to > incorporate this variable value into an sql statement it bombs. This may be > more appropriate for an sql post, but thought I would throw it up here and > see if anyone can shed some light as to how php is interpreting 2) and 3) > > One workaround I have started with was just assigning the > $_REQUEST["action"] value to a new local variable and just using that, but > it seems like there would be an easier way and that this method is just a > lot of wasted work. > > Thanks for any thoughts and I am happy to post add'l script details. > > Joe... > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php.ini question
does phpinfo(32) show the $action variable anywhere? If so just use the global array variable it shows up under. Personally I'd just use the $_GET['action'] alias. You can safely turn register_globals on if you're the only guy that runs scripts on that server and your scripts will never have to run on a server where it is off. If not you should do it for yourself in .htaccess or with ini_set(). Just be sure you are careful to initialize all internal variables that don't come directly from user input. "Joe Kupiszewski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I didn't do the installation, but the phpinfo() shows the following: > > version - 4.2.3 > > ./configure' '--with-apxs=/usr/local/sbin/apxs' > '--with-config-file-path=/usr/local/etc' '--enable-versioning' > '--with-regex=system' '--without-gd' '--without-mysql' '--with-zlib' > '--with-mysql=/usr/local' '--prefix=/usr/local' 'i386-portbld-freebsd4.7' > > and the php path info is listed as > /usr/local/etc > > I do have root access as this is not a production machine, but for the life > of me cannot seem to get it to read the php.ini file. I believe php and > apache are interacting properly, or I wouldn't get the phpinfo() to work. > > The root of my real problem is that in trying to pass variable values from > php scripts to reinvocations of the same script using > http://pathtofile.php?action=3 > > I realize that this is a register_globals thing and that I can access it by > one of two ways: > > 1) Turning register_globals on (which many tell me is a security risk) > 2) Using $_REQUEST["action"] > 3) $HTTP_POST_VARS and $HTTP_GET_VARS -> with ["action"] > > However, using the second (haven't tried the 3rd) method and trying to > incorporate this variable value into an sql statement it bombs. This may be > more appropriate for an sql post, but thought I would throw it up here and > see if anyone can shed some light as to how php is interpreting 2) and 3) > > One workaround I have started with was just assigning the > $_REQUEST["action"] value to a new local variable and just using that, but > it seems like there would be an easier way and that this method is just a > lot of wasted work. > > Thanks for any thoughts and I am happy to post add'l script details. > > Joe... > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php.ini question.....
HI All On Tuesday 18 February 2003 18:32, David Otton wrote: > On Tue, 18 Feb 2003 17:38:28 +0100, you wrote: > >At last I got safe-mode turned off (Gott sei dank!). But I'm still having > > a problem. I can only read Mysql DBs. I can not open a DB to update. > > You have to connect to MySQL with a username and password. > > First check that the user you're connecting as has permission to do > UPDATEs as well as SELECTs. At the command line I have no problem with Mysql... JIM -- Jim Hatridge Linux User #88484 -- BayerWulf Linux System # 129656 The Recycled Beowulf Project Looking for throw-away or obsolete computers and parts to recycle into a Linux super computer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php.ini question
document root is where your webserver gets his files from. Default on Apache is htdocs. Hope this helps, Andy http://www.globosapiens.net Global Travellers Network! "Taylor Lewick" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... When setting doc_root in the php.ini section, should that be the cgi-bin directory, or the doc-root of the webserver, i.e. htdocs..? Thanks, Taylor Taylor Lewick Unix System Administrator Fortis Benefits 816 881 6073 "Help Wanted. Seeking Telepath..." "You Know where to apply." Please Note The information in this E-mail message is legally privileged and confidential information intended only for the use of the individual(s) named above. If you, the reader of this message, are not the intended recipient, you are hereby notified that you should not further disseminate, distribute, or forward this E-mail message. If you have received this E-mail in error, please notify the sender. Thank you * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php