RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Local/master both still show off. I tried using the .htaccess trick, and that did not work either. I have tried now to use the extract($_COOKIE) and extract($_POST) option in the scripts to get around this for now, which seems to be working, but I need to consequently do a lot of testing now to verify everything works. I just don't get what the problem is with this not working. David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 12:08 PM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David [EMAIL PROTECTED] You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? That should be all you have to do. Does it say that the local and master values are both OFF, still? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Thanks for the info. I checked the file and it does not have much in it. I am working if I am not enabling this in php.ini correctly. I see [Security, Performance] list after the example. To enable, I just copied the example line, removed the [Security, Performance] stuff from the line, and set the value to equal On. Is this [Security, Performance] stuff actuall the name of the section that this option needs to be in--in that, do I need to do the following: [Security] register_globals = On And/or [Performance] register_globals = On -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 7:20 PM To: '[EMAIL PROTECTED]' Subject: Re: [PHP] Setcookie variable use issue after moving php app to di fferent server * Thus wrote Shapiro, David: You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? this looks like a RH setup.. take a look in: /etc/httpd/conf.d/php.conf For any directives being set in there. The ini files in php.d/ usually simply have: extension=file.so Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Setcookie variable use issue after moving php app to different se rver
Hello, We are trying to move our php app to a different server. For some reason, when we type in the login/password/account number info and click submit, it does not seem to set the variables. The webpage portion that collects the login/password/account looks like the following: tr tdbusername:/b/td tdinput type="text" name="UserName" value="?php echo $UserName ?" maxlength=8 class="form_style" /td /tr tr tdbpassword:/b/td tdinput type="password" name="Password" class="form_style"/td /tr tr td colspan="2" align="center" font color='gray' size=1Username and Password are case sensitive./font /td /tr tr td colspan="2" align="center"font color='red'?php echo $status; ?/font/td /tr tr td colspan="2" align="right" input type="submit" name="Submit" value=" Login " style="font-weight:bold;" /td /tr It looks like the value= line for user name puts the text the user types into in the $UserName variable (or is this setting a default value if $UserName exists?). The password line does not have this. Either way, this setup works fine on the original server. At the top of the index.php page, it then has php code like the following: ?php setcookie ("ccp_logged_in"); setcookie ("ccp_username"); setcookie ("ccp_uid"); setcookie ("ccp_fname"); setcookie ("ccp_lname"); setcookie ("ccp_access"); setcookie ("ccp_company"); setcookie ("ccp_account"); setcookie ("ccp_maccount"); setcookie ("ccp_master"); //Get Global Variable Settings require("internet/include/global.php"); / Open a Database connection to the MySQL Database / if ($UserName != ""){ $link = mysql_connect($SERVERNAME, $DB_USER, $DB_PWD) or die ("Could not Connect"); mysql_select_db ($DB) (code continues on to validate user and then if approved, goes to another page called page2.php) Note: The submit action is to go back to itself (index.php). It never gets in here as if $UserName is not set (at least that is what I think is going on because if I put $UserName = someuser/$Password=password/$AccountNo=someacctno just before the if...then statement, it validates and moves on to page2.php). If I hardcode set these (which is not an option for use..just for troubleshooting), it goes to page2.php, with the cookies, which I checked with print_r option. However, it has a if ($ccs_logged_in = 1) check that fails, even though the print_r shows it is set to 1 as if it is notusing the cookie. I am fairly new to php, so I do not know if I am supposed to capture the ccs_logged_in cookie value and assign it to $ccs_logged_in variable. I am not doing this because, well, it is working as such on the other server. Can anybody please help me understand what is goingon with these php pages? This electronic message transmission contains information from the office of David Shapiro, ITC^DeltaCom, Inc., which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by telephone 1-919-865-6955 or by electronic mail [EMAIL PROTECTED] immediately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to resolve the issue, although I still think this sounds right. Do I implement the turning on of the register_globals correctly, or do I need to do something different? David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 9:53 AM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David We are trying to move our php app to a different server. For some reason, when we type in the login/password/ account number info and click submit, it does not seem to set the variables. The magic 8-ball says register_globals is OFF on the new server... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? David -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 10:49 AM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David [EMAIL PROTECTED] Thanks for pointing in the hopefully the right direction. I see in /etc/php.ini the following: ; - register_globals = Off [Security, Performance] I put below this line: register_globals = On And I restarted apache. However, it did not seem to resolve the issue, although I still think this sounds right. Do I implement the turning on of the register_globals correctly, or do I need to do something different? That's the right method, but you may not have edited the correct php.ini. Create a PHP page that only has ?php phpinfo(); ? as the source. Load that page and it'll show you all of the setting PHP is currently using along with the location of the php.ini file it's getting the configuration from. The php.ini file will be listed in the first table that's shown. If there is a full path including php.ini at the end, then that's the right file. If it's just a path, then that's where PHP is expecting to find php.ini, but did not. Hope that helps. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Setcookie variable use issue after moving php app to di fferent server
Yes, I am afraid so. Both are marked as off. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 12:08 PM To: Shapiro, David; [EMAIL PROTECTED] Cc: Perry, Joe (ITCD) Subject: Re: [PHP] Setcookie variable use issue after moving php app to different server From: Shapiro, David [EMAIL PROTECTED] You certainly know your stuff. Unfortunatley, it says that is uses /etc/php.ini, which I did modify, but it also reports register_globals as still off too. It does show a scan dir for additional .ini files (/etc/php.d and additional ini files parsed as ldap.ini, mysql.ini, and odbc.ini too, but I don't think they would have anything to do with it. I'm stumped. Other than adding the entry and stop/starting apache, is there anything else I need to go? That should be all you have to do. Does it say that the local and master values are both OFF, still? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php