[PHP-WIN] serialize and unserialize
Hello all i need a little help with serialize and unserialize here is my code 'cart', 'y' => $password); session_register("y"); $var = serialize($data); //$chksum = md5($data . md5('secret salt here')); //$var = serialize(array($data,$chksum)); setcookie('data', $var, time() + 3600); } else { $var = unserialize($_COOKIE['data']); list($data, $chksum) = $var; if (md5($data . md5('secret salt here')) == $chksum) { // Data is valid $data = unserialize($_COOKIE['data']); list($y, $chksum) = $data; $x = $data['x']; $y = $data['y']; session_register("y"); } //session_register("y"); } ?> the problem is when i try to pull it back out to use the number that is generated by $password it gives me this error Notice: unserialize(): Error at offset 9 of 118 bytes in c:\program files\apache group\apache\htdocs\header.php on line 24 any ideas towards fixin this would be appreciated
RE: [PHP-WIN] Problem with Modules
If the application can't find a module, then it normally means that particular module is not in the know path of the application trying to access it. However, your error message below suggest that the application do know where it resides, but it seams likt it does not have sufficient access to load the module - check read and execution rights. There are several steps of authentication with IIS, and the lowest (read last check) is that of the file system, but this is not sufficent to load and execute an application. Access rights needs to be set explecitly in the IIS manager to - however, IIS should set the access right proplery in the file system to once they are set. -Original Message- From: Cole Hubbard To: Svensson, B.A.T. (HKG) Sent: 2003-12-21 20:39 Subject: Re: [PHP-WIN] Problem with Modules Here's the error message: Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_.dll' - The specified module could not be found. Yet I know the module file is there. I just don't know why it's not loading them. This happens with different modules every time. After I cycle through the error messages the script executes properly and outputs to the browser. This is outputted at the end of the page: PHP Warning: Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_ifx.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_oci8.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_oracle.dll' - The specified module could not be found. in Unknown on line 0 Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) PHP Warning: Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_sybase_ct.dll' - The specified module could not be found. in Unknown on line 0 Not sure what the problem is, since the files exist and are in the right place. Besides this error, scripts run fine. It's just getting annoying. B.A.T. Svensson wrote: > Can you give a more detial error description? > > And what do you mean it runs fine? Fine excpet when > you try to execute a php script via the webserver? > > IF you want to execute php scritps on IIS, there are > several steps that needs to be completed in order to > make it work. > > -Original Message- > From: Cole Hubbard > To: [EMAIL PROTECTED] > Sent: 2003-12-21 06:12 > Subject: [PHP-WIN] Problem with Modules > > I just set up my webserver on an old Windows 2000 box that I have. > > AMD Athlon 750Mhz, 512MB RAM, 4GB hard drive > > Should be enough to test scripts and everything that I might need to do, > > and so far it's working just great. I'm running IIS on this server. > Whichever version that comes with 2000, I think it's 4.0. Maybe 5. > > Perl installed great, and it runs great. I manually installed the full > binaries for PHP, went in just fine. Except for when I try to load > scripts. The first time I run a script on the server it gives me about > five errors saying it cannot find module files. I've checked that these > > files are in the location that the program is looking for them in, but > PHP just isn't finding them. I have no clue why. > > Any help would be appreciated. > > ~Cole Hubbard > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-windows Digest 22 Dec 2003 08:29:01 -0000 Issue 2052
php-windows Digest 22 Dec 2003 08:29:01 - Issue 2052 Topics (messages 22413 through 22416): Re: Problem with Modules 22413 by: php maillist 22414 by: Cole Hubbard 22416 by: Svensson, B.A.T. (HKG) serialize and unserialize 22415 by: webmaster.multiwebmastertools.com Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- I just know a little about it In my memory, the key action is to modify the correct path of dynamic library in php.ini yesI always be annoyed by it because the PHP sometimes read his configs(php.ini) from c:/winnt/ and sometimes from the path which it be installed in. find the php.ini and test the environment variable "extension_dir" may help you the second way is moving all Dll to a new path and changing setup again some one tells me that it could work only in c:\winnt\system32\ and thats all you can try :) Frederick Kuo Cole Hubbard 提到: > Here's the error message: > > Unknown(): Unable to load dynamic library > 'C:\PHP\extensions\php_.dll' - The specified module could not be found. > > Yet I know the module file is there. I just don't know why it's not > loading them. This happens with different modules every time. After I > cycle through the error messages the script executes properly and > outputs to the browser. > > This is outputted at the end of the page: > > PHP Warning: Unknown(): Unable to load dynamic library > 'C:\PHP\extensions\php_ifx.dll' - The specified module could not be > found. in Unknown on line 0 PHP Warning: Unknown(): Unable to load > dynamic library 'C:\PHP\extensions\php_oci8.dll' - The specified module > could not be found. in Unknown on line 0 PHP Warning: Unknown(): Unable > to load dynamic library 'C:\PHP\extensions\php_oracle.dll' - The > specified module could not be found. in Unknown on line 0 Cannot find > module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At > line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) > Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module > (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At > line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) > Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find > module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module > (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module > (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module > (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module > (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module > (SNMP-MPD-MIB): At line 0 in (none) Cannot find module > (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module > (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module > (SNMPv2-TM): At line 0 in (none) PHP Warning: Unknown(): Unable to load > dynamic library 'C:\PHP\extensions\php_sybase_ct.dll' - The specified > module could not be found. in Unknown on line 0 > > Not sure what the problem is, since the files exist and are in the right > place. Besides this error, scripts run fine. It's just getting annoying. > > B.A.T. Svensson wrote: > >> Can you give a more detial error description? >> And what do you mean it runs fine? Fine excpet when >> you try to execute a php script via the webserver? >> >> IF you want to execute php scritps on IIS, there are >> several steps that needs to be completed in order to >> make it work. >> >> -Original Message- >> From: Cole Hubbard >> To: [EMAIL PROTECTED] >> Sent: 2003-12-21 06:12 >> Subject: [PHP-WIN] Problem with Modules >> >> I just set up my webserver on an old Windows 2000 box that I have. >> >> AMD Athlon 750Mhz, 512MB RAM, 4GB hard drive >> >> Should be enough to test scripts and everything that I might need to do, >> >> and so far it's working just great. I'm running IIS on this server. >> Whichever version that comes with 2000, I think it's 4.0. Maybe 5. >> >> Perl installed great, and it runs great. I manually installed the >> full binaries for PHP, went in just fine. Except for when I try to >> load scripts. The first time I run a script on the server it gives me >> about five errors saying it cannot find module files. I've checked >> that these >> >> files are in the location that the program is looking for them in, but >> PHP just isn't finding them. I have no clue why. >> >> Any help would be appreciated. >> >> ~Cole Hubbard >> --- End Message --- --- Begin Message --- Tried all that. Couldn't get any of it to work. Would compiling PHP myself have any effect? If so, how would I go about doing this? (What's a good compiler?) Php Maillist wrote: > I just know a little about it > In my memory, the key ac
RE: [PHP-WIN] serialize and unserialize
Ignorant question: You are doing unserialize() twice on the same entity. Are you allowed to do that? -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2003-12-21 21:37 Subject: [PHP-WIN] serialize and unserialize Hello all i need a little help with serialize and unserialize here is my code 'cart', 'y' => $password); session_register("y"); $var = serialize($data); //$chksum = md5($data . md5('secret salt here')); //$var = serialize(array($data,$chksum)); setcookie('data', $var, time() + 3600); } else { $var = unserialize($_COOKIE['data']); <--- list($data, $chksum) = $var; if (md5($data . md5('secret salt here')) == $chksum) { // Data is valid $data = unserialize($_COOKIE['data']); <--- list($y, $chksum) = $data; $x = $data['x']; $y = $data['y']; session_register("y"); } //session_register("y"); } ?> the problem is when i try to pull it back out to use the number that is generated by $password it gives me this error Notice: unserialize(): Error at offset 9 of 118 bytes in c:\program files\apache group\apache\htdocs\header.php on line 24 any ideas towards fixin this would be appreciated -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] Question about general web site layout
Okay. This is not really a question specific to Windows. But here is goes. I am looking for some 'Nest Practice' advice on how to layout my pages and config files. By layout I am not talking about the presentation of the page for the browser but instead the layout of the pages on disk. Here is an example many sites have the home page in the root (http://www.somesite.com/index.php (html). This is the entry point to the site. The average site have a left nav menu with links to thinks like thier blob and maybe an 'About'. Most sites that use this type of layout will link the 'About' to a sub-folder under the home as in http://www.somesite.com/about/index.php (html). Here is my point. On the 'About' I want to use the same header/footer and menu as on the main page. This can be handled via an include in the main page like: Question is on the 'About' section which is one level below the main in the disk heirarchy, should I start by just using the relative include path as in: To me this provide a solution alright but not a clean solution. How does everyone else accomlish this in thier multi-page sites. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-windows Digest 23 Dec 2003 05:36:16 -0000 Issue 2053
php-windows Digest 23 Dec 2003 05:36:16 - Issue 2053 Topics (messages 22417 through 22418): Re: serialize and unserialize 22417 by: Svensson, B.A.T. (HKG) Question about general web site layout 22418 by: Paul Menard Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Ignorant question: You are doing unserialize() twice on the same entity. Are you allowed to do that? -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2003-12-21 21:37 Subject: [PHP-WIN] serialize and unserialize Hello all i need a little help with serialize and unserialize here is my code 'cart', 'y' => $password); session_register("y"); $var = serialize($data); //$chksum = md5($data . md5('secret salt here')); //$var = serialize(array($data,$chksum)); setcookie('data', $var, time() + 3600); } else { $var = unserialize($_COOKIE['data']); <--- list($data, $chksum) = $var; if (md5($data . md5('secret salt here')) == $chksum) { // Data is valid $data = unserialize($_COOKIE['data']); <--- list($y, $chksum) = $data; $x = $data['x']; $y = $data['y']; session_register("y"); } //session_register("y"); } ?> the problem is when i try to pull it back out to use the number that is generated by $password it gives me this error Notice: unserialize(): Error at offset 9 of 118 bytes in c:\program files\apache group\apache\htdocs\header.php on line 24 any ideas towards fixin this would be appreciated --- End Message --- --- Begin Message --- Okay. This is not really a question specific to Windows. But here is goes. I am looking for some 'Nest Practice' advice on how to layout my pages and config files. By layout I am not talking about the presentation of the page for the browser but instead the layout of the pages on disk. Here is an example many sites have the home page in the root (http://www.somesite.com/index.php (html). This is the entry point to the site. The average site have a left nav menu with links to thinks like thier blob and maybe an 'About'. Most sites that use this type of layout will link the 'About' to a sub-folder under the home as in http://www.somesite.com/about/index.php (html). Here is my point. On the 'About' I want to use the same header/footer and menu as on the main page. This can be handled via an include in the main page like: Question is on the 'About' section which is one level below the main in the disk heirarchy, should I start by just using the relative include path as in: To me this provide a solution alright but not a clean solution. How does everyone else accomlish this in thier multi-page sites. --- End Message ---