[PHP] building php 4.3.7 with sablot 1.0.1 and gcc 3.3.3
I'm trying to build php 4.3.7 with sablot 1.0.1 and expat 1.95.7 - I'm using gcc3.3.3. sablot and expat built fine, but when I build/link php: /usr/lib/libsablot.so: undefined reference to `operator new[](unsigned)' /usr/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/libsablot.so: undefined reference to `operator delete(void*)' /usr/lib/libsablot.so: undefined reference to `__gxx_personality_v0' /usr/lib/libsablot.so: undefined reference to `__cxa_pure_virtual' /usr/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/libsablot.so: undefined reference to `operator delete[](void*)' /usr/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' /usr/lib/libsablot.so: undefined reference to `operator new(unsigned)' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 It does seem to have much to do with php as such, but just in case it rings a bell with anyone? thanks, Per Jessen, Zurich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPLOAD scripts refuse to function
cory wrote --- napsal:: Sure that sounds easy right? well I have tried at least 10 different php scripts as well as a handful of cgi. Same resuls with everyone of them...nothing in my specified tmp folder. Every uploaded file is removed from the temporary directory right after the script is over. You have to move the file to another location. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] triggering scripts through apache configuration
Chris Wagner wrote --- napsal:: hello, wondering how you might go about triggering PHP scripts from an apache configuration file, for certain events... for instance, how might i trigger a script whenever a file was accessed within a given directory. and, would it be possible to know which file was accessed? if the above is possible, could you also trigger different scripts for when a file download begins and when a file download finishes? thanks. Seems you want mod_rewrite. Lets say you have /download/ directory, then you put this in /download/.htaccess RewriteEngine on RewriteRule ^.*$handler.php handler.php will be the script that will be triggered for all requests to /download/ directory, you can find out the real request from $_SERVER['REQUEST_URI'], do whatever magic you need to do. But don't forget that you will have to output the file yourself, in handler.php, including the right headers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP DL and UL Speed Test
Guys... Anybody knows of a php script that can help measure download and upload speed tests? Thank you for any comments. Anton Krall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions cookies
How exactly do sessions work? I've heard that if cookies are disabled that a session will then pass it's variables in the url (through GET). Yet when I manually disable cookies none of my pages work (because the $_SESSION variables do not seem to be working). Any ideas? Best Regards, Scott Taylor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sessions cookies
Scott Taylor wrote: How exactly do sessions work? I've heard that if cookies are disabled that a session will then pass it's variables in the url (through GET). Yet when I manually disable cookies none of my pages work (because the $_SESSION variables do not seem to be working). The variables themselves aren't passed, only a session ID, and that is only passed through GET/POST if transparent SID support is enabled (it is disabled by default). You can change the session.use_trans_sid setting in your php.ini file or if your server supports .htaccess you can create one and add php_flag session.use_trans_sid on to it. For more information see the manual: http://www.php.net/manual/en/ref.session.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: building php 4.3.7 with sablot 1.0.1 and gcc 3.3.3
Per Jessen wrote: I'm trying to build php 4.3.7 with sablot 1.0.1 and expat 1.95.7 - I'm using gcc3.3.3. sablot and expat built fine, but when I build/link php: /usr/lib/libsablot.so: undefined reference to `operator new[](unsigned)' [snip] After some research, I can answer my own question - I did try out gcc3.3.2 and gcc 3.3.4 before I found the following: http://archive.gingerall.cz/archives/public/sablot2002/msg00517.html I have been having the same Sablotron/gcc3/etc.. linking problem and solved the issue by adding a compiler instruction/reference to the standard C++ libraries/symbols by adding the following LDFLAGS option to my Apache configure statement: LDFLAGS='-lstdc++' Might it not be a Good Thing to add this and/or an explanation to the build instructions (unless it's already there, in which case it would be a Good Thing for me to read them). /Per Jessen, Zurich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mod_rewrite Issues
This isn't exactly a PHP issue, but they seem to go rather hand in hand... Right now I'm just running my own apache server on my computer and I'm trying to protect my scripts using mod_rewrite. I uncommented all the mod_rewrite lines in the apache configuration file and restarted it all. I got no errors doing this, so I assume it compiled fine. The problem is, I can put a rewrite rule in the httpd.conf file or a .htaccess file but it never rewrites any URLs... For example: RewriteEngine on RewriteRule ^/woot$ /beta I tried that as a test in a .htaccess file and put it in my root C:\htdocs folder. I went to http://localhost/woot but it didn't show anything, gave me a 404. I went to http://localhost/beta and it showed exactly what it was supposed to. I assume it's something I'm doing wrong with my code, but I've followed this sitepoint article to the point pretty much. Any help here would be greatly appreciated... Thanks, Stephen Craton http://www.melchior.us http://www.melchior.us/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPLOAD scripts refuse to function
On June 18, 2004 10:26 pm, cory wrote: ok, someone please lend me some advice here. I am trying create a upload form for my site. Sure that sounds easy right? well I have tried at least 10 different php scripts as well as a handful of cgi. Same resuls with everyone of them...nothing in my specified tmp folder. After contactig my host so many times, they know my name by voice, I have made no progress and here I sit without a very neccessary aspect of our website. Anyone have any idea on this...is there something server side that would prohibit me from executing my upload scripts? (yes chmod the folder...done) I have no problem with ANY other cgi or php script that I have used. Thanks in advance for any insight... Are uploads enabled in php.ini? -Cory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to iterate over fields names with mysql_fetch_assoc
How do I iterate over fields when I perform the below script: each row has: artist_name,urlPath,biography as fields while ($row = mysql_fetch_assoc($result)) { # if the current field name is 'artist_name', do something switch($GetCurrentFieldNameintheCurrentRow) { case $row[ 'field name is now: artist_name'] //do something break; } If I write the below code, I only get the first field name of each row...which makes sense In this case, I get 'artist_name' while ($row = mysql_fetch_assoc($result)) { $fieldName= key($row); echo 'fieldName is: '.$fieldName.\n; } many thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] variable question
is there a way to use one variable to create another? Example $poo=1 and i want $lie1 OR $poo=2 and i want $lie2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable question
On Sat, 19 Jun 2004 14:25:27 -0600, water_foul [EMAIL PROTECTED] wrote: is there a way to use one variable to create another? Example $poo=1 and i want $lie1 OR $poo=2 and i want $lie2 If I understand you right, you want: ${'lie' . $poo} when $poo is 1, that will give you $lie1, and when $poo is 2, it'll give you $lie2. You're almost certain to be better off using arrays though,,, -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: variable question
sorry i didn't say this before but please hurry i need this to finish a php script -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable question
Thanks oh so much Robin Vickery [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 19 Jun 2004 14:25:27 -0600, water_foul [EMAIL PROTECTED] wrote: is there a way to use one variable to create another? Example $poo=1 and i want $lie1 OR $poo=2 and i want $lie2 If I understand you right, you want: ${'lie' . $poo} when $poo is 1, that will give you $lie1, and when $poo is 2, it'll give you $lie2. You're almost certain to be better off using arrays though,,, -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to iterate over fields names with mysql_fetch_assoc
On Sat, 19 Jun 2004 13:25:54 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How do I iterate over fields when I perform the below script: ... If I write the below code, I only get the first field name of each row...which makes sense In this case, I get 'artist_name' while ($row = mysql_fetch_assoc($result)) { $fieldName= key($row); echo 'fieldName is: '.$fieldName.\n; } ?php while ($row = mysql_fetch_assoc($result)) { foreach ($row as $fieldName = $fieldValue) { echo 'fieldName is: '.$fieldName.\n; echo 'fieldValue is: '.$fieldValue.\n; } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] umm i am confused...
i get the following error Parse error: parse error, unexpected T_STRING in C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\personal\links.php on line 21 -- for the following code and i cant figure out why (you may need to maxamise to read it right) ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset(${'link' . $loopnum . '})){ loop_new_adderss($loopnum+1,$url,$name); }; else{ setcookie(link . $loopnum . ,$url,time()+3600*200); setcookie(name . $loopnum . ,$name,time()+3600*200); print(a href=$url$name/a was added); }; }; if(isset($_GET[new])) { loop_new_address(1,$_GET[name],$_GET[url]); }; print(table); print(trtdform Method=GET action=module/personal/delete.phpdelete/td/tr); //write code $writenum=1; while(isset(${'link' . $writenum . ''})); print(a href=${'link' . $writenum . ''}${'name' . $writenum . ''}/a); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] umm i am confused...
action=module/personal/delete.phpdelete/td/tr); replace this with action=module/personal/delete.phpdelete/td/tr; and remove the ; after } - it's ugly and useless ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: umm i am confused...
I figured it out Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i get the following error Parse error: parse error, unexpected T_STRING in C:\Inetpub\localroot\aichlmayr.net\sites\aaron\module\personal\links.php on line 21 -- for the following code and i cant figure out why (you may need to maxamise to read it right) ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset(${'link' . $loopnum . '})){ loop_new_adderss($loopnum+1,$url,$name); }; else{ setcookie(link . $loopnum . ,$url,time()+3600*200); setcookie(name . $loopnum . ,$name,time()+3600*200); print(a href=$url$name/a was added); }; }; if(isset($_GET[new])) { loop_new_address(1,$_GET[name],$_GET[url]); }; print(table); print(trtdform Method=GET action=module/personal/delete.phpdelete/td/tr); //write code $writenum=1; while(isset(${'link' . $writenum . ''})); print(a href=${'link' . $writenum . ''}${'name' . $writenum . ''}/a); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular Expressions Tester/designer
Anyone know of a good regular expressions tester/designer for php coding running windows. I've looked at the Rad Software Regular Expressions Designer and it looks pretty good except that it is intended for .net and it really doesn't seem to be entirely PCRE compatible. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular Expressions Tester/designer
On Sat, 19 Jun 2004 17:23:53 -0400, Al [EMAIL PROTECTED] wrote: Anyone know of a good regular expressions tester/designer for php coding running windows. I've looked at the Rad Software Regular Expressions Designer and it looks pretty good except that it is intended for .net and it really doesn't seem to be entirely PCRE compatible. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You could always just use a simple online one like... http://www.quanetic.com/regex.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod_rewrite Issues
This isn't exactly a PHP issue, but they seem to go rather hand in hand... Right now I'm just running my own apache server on my computer and I'm trying to protect my scripts using mod_rewrite. I uncommented all the mod_rewrite lines in the apache configuration file and restarted it all. I got no errors doing this, so I assume it compiled fine. The problem is, I can put a rewrite rule in the httpd.conf file or a .htaccess file but it never rewrites any URLs... For example: RewriteEngine on RewriteRule ^/woot$ /beta You may need to add a RewriteCond: http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cookie question
whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie question
Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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] how to iterate over fields names with mysql_fetch_assoc
thanks...that is what I had used previously :) Another php coder had given me a hint that I could just take each incoming row on the fly with $row['artist_name'] without reading everything into an array: What I had previously was: while ($row = mysql_fetch_assoc($result)) { $playlist[] = $row; //read in entire array before doing anything } # get row count $c= count($playlist); for ($x = 0; $x $c; $x++) { foreach($playlist[$x] as $key = $val) { switch ($key) { # if key name is 'artist_name', do something case 'artist_name' : break; # if key name is 'urlPath', do something case 'urlPath' : break; } } } is there a way to grab the info on the fly without reading the $result into an array ? many thanks as I am on my 3rd week with php On Jun 19, 2004, at 1:45 PM, Robin Vickery wrote: On Sat, 19 Jun 2004 13:25:54 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How do I iterate over fields when I perform the below script: ... If I write the below code, I only get the first field name of each row...which makes sense In this case, I get 'artist_name' while ($row = mysql_fetch_assoc($result)) { $fieldName= key($row); echo 'fieldName is: '.$fieldName.\n; } ?php while ($row = mysql_fetch_assoc($result)) { foreach ($row as $fieldName = $fieldValue) { echo 'fieldName is: '.$fieldName.\n; echo 'fieldValue is: '.$fieldValue.\n; } } ? -- 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] cookie question
all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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] Why is PHP Segmentation Faulting?!?!?!?
Hey all Total PHP newbie here. I posted a day ago about php working 'intermittently'. I was told to check my apache logs which was a good hint cause php is seg faulting. I've broken it down to my connection script to my database and I ran it in gdb to see if it would tell me anything. Since I am linux-tarded I don't have any clue what the problem is. Here is my php code!!! It is stored in a file called dbConnect.php ?PHP //DEFINE GLOBAL VARIABLES TO BE USED BY ALL DATABASE FUNCTIONS global $g_dbConn; function dbConnect($HostName, $UserName, $Password) { global $g_dbConn; if($HostName $UserName $Password) { print($HostName); print($UserName); print($Password); $g_dbConn = mysql_connect($HostName, $UserName, $Password); if($g_dbConn) { print(\n . $g_dbConn); mysql_select_db(dba,$g_dbConn); print(\npast select\n); } } } function dbIsConnected() { if($GLOBALS[g_dbConn]) { return true; } else { return false; } } print(start\n); dbConnect(localhost, root, CantSeeThis); print(finish\n); ? Here is the output in GDB!!! (gdb) run dbConnect.php Starting program: /usr/bin/php dbConnect.php (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 1080622560 (LWP 29396)] X-Powered-By: PHP/4.2.2 Content-type: text/html start localhostrootCantSeeThis Resource id #1 past select finish Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1080622560 (LWP 29396)] 0x4207492e in _int_free () from /lib/tls/libc.so.6 Here is the backtrace (gdb) bt #0 0x4207492e in _int_free () from /lib/tls/libc.so.6 #1 0x42073908 in free () from /lib/tls/libc.so.6 #2 0x0812b20d in _efree () #3 0x40962a35 in _close_mysql_link (rsrc=0x0) at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:253 #4 0x081407f2 in list_entry_destructor () #5 0x0813f3c8 in zend_hash_clean () #6 0x0813f46c in zend_hash_graceful_reverse_destroy () #7 0x081409bf in zend_destroy_rsrc_list () #8 0x081320fd in shutdown_executor () #9 0x0813a145 in zend_deactivate () #10 0x0806f078 in php_request_shutdown () #11 0x0806d5d5 in main () #12 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 (gdb) WTF is the problem. I have a feeling my script sucks and I am doing something totally stupid -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie question
lemme clarify what i mean by function, i created a function Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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] cookie question
sorry i misse dsomething else i should say, this is in the function but i haven't sent any output before i call the function Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] lemme clarify what i mean by function, i created a function Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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] cookie question
Are you sure you're trying to access them properly, and on the next page refresh? ex) ?php // Print an individual cookie echo $_COOKIE[TestCookie]; echo $HTTP_COOKIE_VARS[TestCookie]; // Another way to debug/test is to view all cookies print_r($_COOKIE); ? On Sat, 19 Jun 2004 15:56:36 -0600, water_foul [EMAIL PROTECTED] wrote: all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why is PHP Segmentation Faulting?!?!?!? --- ANOTHER HINT
I don't know if this helps... but when I comment out all of the print functions it seg faults at a totally different spot... SCRIPT!!! ?PHP //DEFINE GLOBAL VARIABLES TO BE USED BY ALL DATABASE FUNCTIONS global $g_dbConn; function dbConnect($HostName, $UserName, $Password) { global $g_dbConn; if($HostName $UserName $Password) { //print($HostName); //print($UserName); //print($Password); $g_dbConn = mysql_connect($HostName, $UserName, $Password); if($g_dbConn) { //print(\n . $g_dbConn); mysql_select_db(dba,$g_dbConn); //print(\npast select\n); } } } function dbIsConnected() { if($GLOBALS[g_dbConn]) { return true; } else { return false; } } //print(start\n); dbConnect(localhost, root, CantSeeThis); //print(finish\n); ? GDB RUN!!! (gdb) run dbConnect.php The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/bin/php dbConnect.php (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 1080622560 (LWP 29412)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1080622560 (LWP 29412)] 0x4207441c in _int_malloc () from /lib/tls/libc.so.6 (gdb) BACKTRACE (gdb) bt #0 0x4207441c in _int_malloc () from /lib/tls/libc.so.6 #1 0x4207378d in malloc () from /lib/tls/libc.so.6 #2 0x409caa4a in my_malloc () from /lib/libmysqlclient.so.12 #3 0x409db73a in vio_new () from /lib/libmysqlclient.so.12 #4 0x409c71bb in mysql_real_connect () from /lib/libmysqlclient.so.12 #5 0x40963161 in php_mysql_do_connect (ht=0, return_value=0x8221604, this_ptr=0x0, return_value_used=1, persistent=0) at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:662 #6 0x40963d9e in zif_mysql_connect (ht=1108554344, return_value=0x42133268, this_ptr=0x42133268, return_value_used=1108554344) at /usr/src/redhat/BUILD/php-4.2.2/ext/mysql/php_mysql.c:714 #7 0x0815355c in execute () #8 0x081532ce in execute () #9 0x0813a7c6 in zend_execute_scripts () #10 0x080705ca in php_execute_script () #11 0x0806d648 in main () #12 0x42015704 in __libc_start_main () from /lib/tls/libc.so.6 (gdb) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie question
i did that and it doesn't say that theere there, how do you set cookies so that theyy dont expire (maby the expiration is set wrong.. i'm a newb with cookies Joel Kitching [EMAIL PROTECTED] wrote Are you sure you're trying to access them properly, and on the next page refresh? ex) ?php // Print an individual cookie echo $_COOKIE[TestCookie]; echo $HTTP_COOKIE_VARS[TestCookie]; // Another way to debug/test is to view all cookies print_r($_COOKIE); ? On Sat, 19 Jun 2004 15:56:36 -0600, water_foul [EMAIL PROTECTED] wrote: all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie question
There are many examples (in the comments) at the manual entry for set_cookie at php.net; go try one of those. On Sat, 19 Jun 2004 16:07:34 -0600, water_foul [EMAIL PROTECTED] wrote: i did that and it doesn't say that theere there, how do you set cookies so that theyy dont expire (maby the expiration is set wrong.. i'm a newb with cookies Joel Kitching [EMAIL PROTECTED] wrote Are you sure you're trying to access them properly, and on the next page refresh? ex) ?php // Print an individual cookie echo $_COOKIE[TestCookie]; echo $HTTP_COOKIE_VARS[TestCookie]; // Another way to debug/test is to view all cookies print_r($_COOKIE); ? On Sat, 19 Jun 2004 15:56:36 -0600, water_foul [EMAIL PROTECTED] wrote: all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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 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] cookie question
i figured it out ty Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There are many examples (in the comments) at the manual entry for set_cookie at php.net; go try one of those. On Sat, 19 Jun 2004 16:07:34 -0600, water_foul [EMAIL PROTECTED] wrote: i did that and it doesn't say that theere there, how do you set cookies so that theyy dont expire (maby the expiration is set wrong.. i'm a newb with cookies Joel Kitching [EMAIL PROTECTED] wrote Are you sure you're trying to access them properly, and on the next page refresh? ex) ?php // Print an individual cookie echo $_COOKIE[TestCookie]; echo $HTTP_COOKIE_VARS[TestCookie]; // Another way to debug/test is to view all cookies print_r($_COOKIE); ? On Sat, 19 Jun 2004 15:56:36 -0600, water_foul [EMAIL PROTECTED] wrote: all i did was a function and some conditionals Joel Kitching [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Did you do this before you sent some outut? This would send headers, therefore causing you to not be able to send the cookie header. On Sat, 19 Jun 2004 15:51:00 -0600, water_foul [EMAIL PROTECTED] wrote: whats wrong with this script setcookie('link' . $loopnum . '',$url,time()+3600*200); setcookie('name' . $loopnum . '',$name,time()+3600*200); it doesn't write the cookies -- 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 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] quick question
how do you set a system path to the top level, i allredy tried '/' but it ignores the last '. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: quick question
I would also like to know how to set a cookie to all dirs in a domain how do you set a system path to the top level, i allredy tried '/' but it ignores the last '. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cookie
how do you set a cookie to mutiple directories? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cookie question...
how do i read a cookie created by this code setcookie('link1',blah,time()+3600,'/'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Regular Expression - it works but uses way too much memory ?
Robin Vickery sagde: The S modifier that you're using means that it's storing the studied expression. If the regexp changes each time around the loop then over 3 iterations, that'll add up. See if removing that modifier helps at all. The S modifier wasn't needed, I added it because I thought it would speed it up but it didn't. Removing it didn't help on the memory usage, but it performs a little better without. If that's not it, then these *might* save you some memory, although I've not tested them: I'm not entirely sure why you're matching (.*) at the end then putting it back in with your replacement text. Without running it, I'd have thought that you could leave out the (.*) from your pattern and the $4 from your replacement and get exactly the same effect. I tried removing $4 and (.*) but the result isn't the same, actually my first reg. exp. didn't have $4, but I had to add it. Without it 51 of the 1246 texts isn't processed right? Also there isn't really any difference in how it performs with or without it. You could use a non-capturing subpattern for $2 which you're not using in your replacement. $replace = /^((?:[a-z]+?[^a-z]+?){.($count).})(.$typedmask.)/i; I didn't know you could do that.. cool :), this made the script run a little faster but it still uses the same amount of memory. And maybe a look-behind assertion for the first subpattern rather than a capturing pattern then re-inserting $1. $replace = /^(?=(?:[a-z]+?[^a-z]+?){.($count).})(.$typedmask.)/i; $with = error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. ... With ?= I get a lot of warnings: here is an example: $replace is '/^(?=(?:[a-z]+?[^a-z]+?){50})(go)(.*)/i' $with is 'error-start sourcetext=3 id=49 group=- class=- corrected-from=go corrected-to=god$2error-end sourcetext=3 id=49$3' br / bWarning/b: Compilation failed: lookbehind assertion is not fixed length at offset 34 with the corrections added the reg.exp. looks like this: $typedmask = preg_replace(/\s+/,.*?,$corr['typed']); $replace = '/^((?:[a-z]+?[^a-z]+?){'.($count).'})('.$typedmask.')(.*)/i'; $with = '$1error-start sourcetext='.$corr['sourcetext'].' id='.$corr['id'].' group='.$corr['grupper'].' class='.$corr['ordklasse'].' corrected-from='.$corr['typed'].' corrected-to='.$corr['corrected'].'$2error-end sourcetext='.$corr['sourcetext'].' id='.$corr['id'].'$3'; $text = $skipText[0] . preg_replace ($replace,$with,$text,1); It completes a little faster and the output is exactly the same as before, but it still uses way too much memory. [EMAIL PROTECTED] testextract]# time php ../export.php export6.txt real1m15.851s user0m18.720s sys 0m1.750s From top just before the script completed: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND 7843 root 17 0 269M 269M 3328 R41.7 53.6 0:19 php This isn't a huge problem anymore, as we have been allowed to move the project to a 3 times faster server with less activity (because of this). But I would still like to know if there is a solution to this because it seems quite insane that it allocates more than 250MB memory generate 4MB output. Thanks Robin! I really appreciate your answer. Brgds Ulrik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hellllppp my php kills the browser
i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: hellllppp my php kills the browser
i fixed it i had an endless loop oops :) Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hellllppp my php kills the browser
Perhaps you would be better off going to IRC, as you seem to have many (smaller) questions... On Sat, 19 Jun 2004 17:42:26 -0600, water_foul [EMAIL PROTECTED] wrote: i fixed it i had an endless loop oops :) Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- 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] cookie question...
First I recomend you to read this page: http://ar.php.net/manual/en/function.setcookie.php For that example the code should be: $_COOKIE['link1'] El sáb, 19-06-2004 a las 19:47, water_foul escribió: how do i read a cookie created by this code setcookie('link1',blah,time()+3600,'/'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie question...
Angel Freire wrote: First I recomend you to read this page: http://ar.php.net/manual/en/function.setcookie.php I think your recommendtation ought to be http://ar.php.net/manual/ instead. ;-) -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Computer algebra in PHP
Take a look at the code available at http://www.phpmath.com. Several people have contributed some numerical methods that could be useful for you. Lukasz Karapuda -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 6:05 PM To: [EMAIL PROTECTED] Subject: Re: Computer algebra in PHP Chris Sangwin wrote: Does anyone know of any PHP scripts which perform simple computer algebra functions in PHP? For example, (using a Maple-like syntax) expand( (2*x-2)^4 ); diff( sin(x^2), x); factor( x^2+2*x+1, x); and so on. Many thanks Chris Sangwin :-) That would be nice. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: hellllppp my php kills the browser
Please read: http://www.catb.org/~esr/faqs/smart-questions.html Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i fixed it i had an endless loop oops :) Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hellllppp my php kills the browser
I see enough of this Holier Than Thou attitude on the OCLUG list, I don't need to see it here as well, and if you keep it up people like me...the newbies will shy away from PHP! On Sun, 20 Jun 2004 12:39:26 +1000, Aidan Lister [EMAIL PROTECTED] wrote: Please read: http://www.catb.org/~esr/faqs/smart-questions.html Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i fixed it i had an endless loop oops :) Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Michael Lauzon, Founder The Quill Society http://www.quillsociety.org/ [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: hellllppp my php kills the browser
However, those newbies who stick around will learn how to research and find most of the answers themselves. Not a bad result, if you ask me. Education often sounds Holier than Thou, but there's usually a good reason for it. Bob -Original Message- From: Michael Lauzon [mailto:[EMAIL PROTECTED] Sent: Saturday, June 19, 2004 8:20 PM To: Aidan Lister Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: heppp my php kills the browser I see enough of this Holier Than Thou attitude on the OCLUG list, I don't need to see it here as well, and if you keep it up people like me...the newbies will shy away from PHP! On Sun, 20 Jun 2004 12:39:26 +1000, Aidan Lister [EMAIL PROTECTED] wrote: Please read: http://www.catb.org/~esr/faqs/smart-questions.html Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i fixed it i had an endless loop oops :) Water_foul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i dont know why but the following code kills the browser: ?php //the function for adding new addresses function loop_new_address($loopnum,$url,$name){ //the ${'link' . $loopnum} says put $link and add $loopnum to the end if(isset($_COOKIE['link' . $loopnum . ''])){ loop_new_address_help($loopnum+1,$url,$name); } else{ setcookie('link' . $loopnum . '',$url,time()+3600,'/'); setcookie('name' . $loopnum . '',$name,time()+3600,'/'); setcookie('link' . $loopnum . '',$url,time()+3600); setcookie('name' . $loopnum . '',$name,time()+3600); print('a href=$url' . $name . '/a was added'); }; }; //A function to let loop_new_address loop function loop_new_address_help($loopnum,$url,$name){ loop_new_address($loopnum,$url,$name); }; if(isset($_GET['new'])) { loop_new_address(1,$_GET['url'],$_GET['name']); }; print('table'); print('trtdform Method=GET action=module/personal/delete.phpdelete/td/tr'); //write code $writenum=1; while(isset($_COOKIE['link' . $writenum . ''])==true){ print('a href=' . $_COOKIE['link' . $writenum . ''] . '' . $_COOKIE['name' . $writenum . ''] . '/a'); }; include('links.htm') ? trtdinput type=submit value=Delete Checked/form/td/tr /table table trtdform METHOD=GET ACTION=module/personal/links.phpinput type=hidden name=new value=1/tdtd/td/tr trtdSite name/tdtdINPUT TYPE=text NAME=name VALUE=/td/tr trtdsite url (if it is not on this site it MUST contain http://;)/tdtdINPUT TYPE=text NAME=url VALUE=/td/tr trtd/tdtdINPUT TYPE=SUBMIT VALUE=Continue/form/td/tr /table -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Michael Lauzon, Founder The Quill Society http://www.quillsociety.org/ [EMAIL PROTECTED] -- 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] RE: Build Url based on screen width
I need to build a url based on screen width. The code is below if (screen.width 800) { document.write('a href=frameview.php?winwidth=880winheight=540'); } else if (screen.width = 800) { document.write('a href=frameview.php?winwidth=680winheight=440'); } However, I need to add some parameters to the url dynamically. For example, a href=frameview.php?winwidth=680winheight=440street=durbon a href=frameview.php?winwidth=680winheight=440street=secker ... Not getting success in try to combine Javascript and PHP scripting. Nyon --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: hellllppp my php kills the browser
Michael Lauzon wrote: I see enough of this Holier Than Thou attitude on the OCLUG list, I don't need to see it here as well, and if you keep it up people like me...the newbies will shy away from PHP! everyone with a holier than thou attitude were also newbies once. The difference is that they knew how to ask questions when there were in that stage. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Secure Website using Cookies
When a user registers at my site, a random number is md5 encrypted and assigned to them and is stored in the database. When they login, this number is stored in a secure cookie. On certain pages that may contain sensitive user information such as order history or other, the page looks for the cookie and if it doesn't match the number in the database, they are not allowed access. I was wondering if this is a secure way to make sure it is the unique user who is actually viewing the information? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php