[PHP] Subject: [PHP] imagecreate with Windows .exe installer
The php_gd.dll is in the extension folder, the error does not show in Apache, it opens with php 4.1.1 running. The error shows on the page in the browser when the page is loaded? I restarted Apache after altering the .ini file? Mike You need to have that dll installed on your system. You need to download php-version.zip file that contains all of the dlls in it to run with. Ray Hunter Firmware Engineer ENTERASYS NETWORKS -Original Message- From: Mike Brackenridge [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 10:01 AM To: [EMAIL PROTECTED] Subject: [PHP] imagecreate with Windows .exe installer php4 installed with Apache on Windows ME, using as localhost. I am trying to use imagecreate with a version of php4 that was installed with the binary .exe installer, php seems to be installed OK. I have changed the .ini file line: ;extension=php_gd.dll To extension=php_gd.dll But I get an error of: Fatal error: call to undefined function: imagecreate() in c:directory
[PHP] fork?
how do i do two things at the same time, i'm thinking of the equivalent of fork in perl Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fork?
Vulcan Logic SRM www.vl-srm.net Every your task is a banana. Regards, Andrey Hristov - Original Message - From: Paul Roberts [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 23, 2002 1:05 PM Subject: [PHP] fork? how do i do two things at the same time, i'm thinking of the equivalent of fork in perl Paul Roberts [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] Newbie on Sessions/Pages Management
I'm very new to PHP, as a matter of fact, I never had any experience anything about web-enabled applications development. I've been more into local Visual Basic and MS SQL Serve devt. If there's any kind soul out there, please HLP The question is: why do the values of my session variables disappear when i traverse through different php scripts? duhh =( Sincerely yours, Alex - Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games
[PHP] Unix Authentication
For one of my php applications I want to check user's UNIX[Linux] account. If his / her username password pair matches with that of /etc/passwd or samba or NIS then only the user will be allowed to access the contents. How to achieve this ? TIA Shekhar ___ V I I T, http://www.viitindia.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Output buffering behaviour
hi, I'm working on content management system entirely written in Object oriented PHP using templates i used output buffering to be able to send header calls in the middle of my classes i have noticed that performance has become random meaning that the same script could take from 1 up to 30 seconds in the same conditions, passing exactly the same params. while trying to find a solution, i removed the ob_end_flush() call while keeping the ob_start() call at the beginning of the script and strangely speed of execution came back to normal. output buffering is still on i am not flushing it out the pages are generated just fine without freeing the buffer ?? i would like to know if anyone has had similar experiences with output buffering this behavior occurred on a windows and a linux box both with php 4.1.1 and pretty much the same php.ini settings Regards __ hassan el forkani http://WarmAfrica.com EveryOne's Africa __ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql_db_query and the future?
Hi folks, just wondering, why the mysql_db_query is being abandoned and called deprecated ? With the current implementation of the mysql_connect I have a problem with using 2 databases with the same username/password. PHP will use the same connection and so only use one of the two databases :-(. Is there any other way than always calling mysql_select_db before making a query? I was used using an abstraction layer with a class for each connection which used also mysql_db_query for the query so that I could use each class on a different database (but with the same connection parameters). Is there a speed penalty in using the combination of mysql_select_db();mysql_query ... compared against mysql_db_query? Thanks a lot for already reading this ;-) Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mysql_db_query and the future?
You can add the database to your query. Such as: SELECT * FROM database.table WHERE stuff=other_stuff; I am not sure what other databases support this notation but I know that MySQL does. Eric On Sat, 23 Feb 2002, Thomas Seifert wrote: Hi folks, just wondering, why the mysql_db_query is being abandoned and called deprecated ? With the current implementation of the mysql_connect I have a problem with using 2 databases with the same username/password. PHP will use the same connection and so only use one of the two databases :-(. Is there any other way than always calling mysql_select_db before making a query? I was used using an abstraction layer with a class for each connection which used also mysql_db_query for the query so that I could use each class on a different database (but with the same connection parameters). Is there a speed penalty in using the combination of mysql_select_db();mysql_query ... compared against mysql_db_query? Thanks a lot for already reading this ;-) Thomas -- Eric Thelin [EMAIL PROTECTED] AZtechBiz.com: Where Arizona Does Tech Business -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie on Sessions/Pages Management
Alexander P. Javier wrote: I'm very new to PHP, as a matter of fact, I never had any experience anything about web-enabled applications development. I've been more into local Visual Basic and MS SQL Serve devt. If there's any kind soul out there, please HLP The question is: why do the values of my session variables disappear when i traverse through different php scripts? duhh =( Do you have cookies enabled? By default the session variables rely on PHP sending a session cookie. If your browser doesn't accept them, you'll end up with 'new' sessions on every page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Newbie on Sessions/Pages Management
every script you use the variable should contain a session_start() statement... - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 23, 2002 5:26 PM Subject: [PHP] Re: Newbie on Sessions/Pages Management Alexander P. Javier wrote: I'm very new to PHP, as a matter of fact, I never had any experience anything about web-enabled applications development. I've been more into local Visual Basic and MS SQL Serve devt. If there's any kind soul out there, please HLP The question is: why do the values of my session variables disappear when i traverse through different php scripts? duhh =( Do you have cookies enabled? By default the session variables rely on PHP sending a session cookie. If your browser doesn't accept them, you'll end up with 'new' sessions on every page. -- 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] uploading files | how to avoid submitting twice?
Hi there, I would like to upload files using a form. Unfortunatelly it takes a while till the file is uploaded to the server. During this time the same page with the submit button is viewed. If the user clicks another time on the submit button, I get wrong records and sometimes the same file twice. Is there a way to redirect imediatelly to a waiting page? I tryed to redirect, but somehow the server is first uploading the file before something else happens. Thanx for any help Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 23 Feb 2002 16:42:47 -0000 Issue 1189
php-general Digest 23 Feb 2002 16:42:47 - Issue 1189 Topics (messages 85925 through 85941): Re: sometimes browser just recieves half the page 85925 by: Gary Re: how to build an array 85926 by: Steven Walker 85928 by: jtjohnston Not Quite: how to build an array 85927 by: jtjohnston Re: login determines content on page 85929 by: jtjohnston 85930 by: Rasmus Lerdorf Subject: [PHP] imagecreate with Windows .exe installer 85931 by: Mike Brackenridge fork? 85932 by: Paul Roberts 85933 by: Andrey Hristov Newbie on Sessions/Pages Management 85934 by: Alexander P. Javier 85939 by: Michael Kimsal 85940 by: Edward van Bilderbeek - Bean IT Unix Authentication 85935 by: developer.viitindia.org Output buffering behaviour 85936 by: hassan mysql_db_query and the future? 85937 by: Thomas Seifert 85938 by: Eric Thelin uploading files | how to avoid submitting twice? 85941 by: Andy 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] -- ---BeginMessage--- John Ericson wrote: Im programming a page where I have a java-tree-menu that gets generated from a db. The code works perfectly but sometimes when a browser reads the page I just get half of the page. I have noticed this behaivour on many different browsers such as mozilla, netscape, galeon, explorer and even wget sometimes. The page is here so you can try it yourself (Its a frameset page actually, the page with the problem is to the left): http://www.rskhq.2y.net/~nacka/ The actual php page that has the problem is: http://www.rskhq.2y.net/~nacka/vr_navbar.php I suspect it is some problem with the configuration of apache or php but I dont know where to start looking. Versions: PHP 4.1.1 (See http://www.rskhq.2y.net/~nacka/phpinfo.php) Apache/1.3.22 (Unix) Please CC me since Im not a member of this maillinglist. The javascript showing up in the left frame is not showing the same as your link to it. The page showing up in the frame is broken. The javascript tags are closed before the script script language=JavaScript/script Gary ---End Message--- ---BeginMessage--- Also, for adding items onto an array use array_push() Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Friday, February 22, 2002, at 07:41 PM, Jim Winstead wrote: Jtjohnston [EMAIL PROTECTED] wrote: Where/How do I start in building a new array? .= doesn't work: $authors .= explode(;, $mydata-KW); '.=' doesn't work because that does a string append. you just want: $authors = explode(;, $mydata-KW); then you can sort the array using sort(). http://php.net/sort jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Yeah but, this doesn't work either? I'm trying :) $news = mysql_query(select AS from $table); while ($mydata = mysql_fetch_object($news)) { # $authors = explode(;, $mydata-AS); array_push ($authors, explode(;, $mydata-AS)); } foreach($authors as $author) { echo $authorbr\n; } ---End Message--- ---BeginMessage--- OK. I use: while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } Then why Invalid argument supplied for foreach() Am I indeed building an array as I go through my database? foreach($authors as $author) { #echo sort($author).br\n; echo $authorbr\n; } http://www.php.net/manual/en/control-structures.foreach.php foreach ($arr as $value) { echo Value: $valuebr\n; } I have the right syntax? Did I build the array? Newbie, but have to learn it somehow :) snip- $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(select AS from $table); while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } foreach($authors as $author) { echo $authorbr\n; } ---End Message--- ---BeginMessage--- What's the difference between if (isset($submit_happening)) and if $submit_happening) John [EMAIL PROTECTED] wrote: On Fri, 22 Feb 2002 21:38:16 -0500, you wrote: I'd to know how difficult it is to achieve the following: Create login page, when the submit button is clicked, the user info is checked against a database as to whether is login info is valid. if it is valid, a page is displayed that lists all of the classes that the user has registered for, meaning each user will see a different list of classes. At first, I thought this was a homework question, but that seems unlikely. Ok, one way to do this is to have a form submit to itself. Briefly : ? if
[PHP] Re: php 4.1.1 vs 4.0.6
Cc Zona [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ezra Nugroho) wrote: I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's comming soon). I heard that there is some significant difference between 4.0.x and 4.1.x What is the main difference between 4.0.6 and 4.1.1 ? Are the 4.1.x completely backward compatible with 4.0.x? Should be 99% compatible. http://www.php.net/release_4_1_0.php -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Novice question
Hi, thanks for reading this, Im just going to say it cos i dont want to waste your time. Im looking for a really big favour here(cos I think it may take time to spot this, although it might only take five seconds to spot, but I dunno,the problem area of code is only four lines long), so dont spend time reading this unless you got half an hour spare or are looking a good samaritan award or something. Still reading this? Excellent, Iam saved. I wrote code which takes a input string, breaks it up and puts the bits into an array called $real. THIS WORKS. But I may have lots of input strings so I slapped a for loop around the code to do the same thing for all the inputs and THAT WORKS ASWELL! Then i wanted to save the different bits of each input string in its own array, so I created an array of arrays and at the end of each cycle of the big loop, I take out all the element in $real and put them into the array of arrays, called $poly[][]. THIS DOESNT WORK. I've spent a week trying to fix this and get that horrible feeling that all the work is going down the drain, cos if I dont get this working, I am screwed. I'd be sincerely grateful if someone could help me with this /*===*/ I put these type of comments around the problem area of the code, which is about four lines long near the bottom /*===*/ Regards Bren html body ? print_r($poly); echoHR; $real[0]=0; $z=array_pop($real); $array[0] = 0; $z = array_pop($array); /*$real[0] = 0; $z = array_pop($real);*/ $test[0]=0; $z = array_pop($test); /*big loop=*/ for($ws=0;$wscount($poly);$ws++) { $rt=0; $c = explode(+, $poly[$ws]); /*echoC EQUALS.BR.*/ /*echoshit; print_r($c);*/ for($r=0;$r=count($c);$r++) { /* echopeaches; echoHR;*/ $m=$c[$r]; echoM EQUALS.BR; echo$m; echoBR; $count=0; for($j=0;$jstrlen($m);$j++) { /* echopurple;*/ /* echo$c[$r];*/ echoBR; /*$count=0;*/ if($m[$j]==- ) { $count++; } } if((($m[0]==-)AND($count2))OR($count1)) { echodumbass; echoBR; /*if(count($real)=4)*/ { array_push($real,$c[$r]); echoBR; } } elseif(($m[0]==-)AND($count1)) { echobla; echoBR; $ss = explode(-,$m); for($cnt=0;$cntcount($ss);$cnt++) { echosweetness; echoBR; $ss[$cnt] = -.$ss[$cnt]; for($waa=0;$waacount($c);$waa++) { array_push($real,$ss[$cnt]); } } } else { echowaaweaaawaaaweaaa; echoBR; $ss = explode(-,$m); for($na=1;$nacount($ss);$na++) { $ss[$na] = -.$ss[$na]; } for($la=0;$la=count($c);$la++) { array_push($real,$ss[$la]); echoBR; } } /*echo$count; echoreal; echoBR; print_r($real); */ } /* for($rt=0;$rtcount($real);$rt++) */ /*=heres the problem==*/ while(count($real)0) { print_r($real); echoBR; $poly[$ws][$rt]=array_pop($real); $rt++; echopink elephants; /**/ } } /*end of big loop*/ echoreal; echoBR; print_r($real); echoHR.POLY EQUALS; for($ty=0;$ty4/*count($poly[$ws][$rt])*/;$ty++) { echoHR.print loop; echo $poly[0][$ty]; echoHR; } echoHR; ? /body /html _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Associative array key as a variable
Hi. I have the following PHP program executed from an HTML form where I pass the associative array key name as a variable: ? function show($name) { $cnt = count($HTTP_POST_VARS[$name]); echo Count for $name is $cnt; echo br /; } show(countries); show(cities); ? The result is always 0. The form fields do have name=countries[] and name=cities[] to indicate an array. When I hardcode the count line in the function as follows just to test to make sure the transfer from the browser works, it displays a correct non-zero result: $cnt = count($HTTP_POST_VARS[cities]); I even tried these statements in the function but all give a 0 result: $cnt = count($HTTP_POST_VARS[.$name.]); How do I get the count line to work with a variable in the function? Thanks, Eurico -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative array key as a variable
Use global. Read the docs about variable scoping. If you use php =4.1.0 then use $_POST, $_GET,... they not need to use global. Global scope. ? function show($name) { global $HTTP_POST_VARS; $cnt = count($HTTP_POST_VARS[$name]); echo Count for $name is $cnt; echo br /; } show(countries); show(cities); ? Regards, Andrey Hristov - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 23, 2002 7:31 PM Subject: [PHP] Associative array key as a variable Hi. I have the following PHP program executed from an HTML form where I pass the associative array key name as a variable: ? function show($name) { $cnt = count($HTTP_POST_VARS[$name]); echo Count for $name is $cnt; echo br /; } show(countries); show(cities); ? The result is always 0. The form fields do have name=countries[] and name=cities[] to indicate an array. When I hardcode the count line in the function as follows just to test to make sure the transfer from the browser works, it displays a correct non-zero result: $cnt = count($HTTP_POST_VARS[cities]); I even tried these statements in the function but all give a 0 result: $cnt = count($HTTP_POST_VARS[.$name.]); How do I get the count line to work with a variable in the function? Thanks, Eurico -- 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] phpnuke site down?
Anyone have any idea what's wrong with www.phpnuke.org? No response neither yesterday, nor today :-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: uploading files | how to avoid submitting twice?
Andy [EMAIL PROTECTED] wrote: Is there a way to redirect imediatelly to a waiting page? I tryed to redirect, but somehow the server is first uploading the file before something else happens. unfortunately, no. one thing you can do is use javascript to pop up a small window in your form's onsubmit method that tells the user to hang on, and then close that window in the next page's onload method. it isn't easy to do a real progress meter, but even this little bit should help tremendously. you may also want to check the md5 sum of the file contents against previous uploads to detect duplicates. jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fork?
Paul Roberts [EMAIL PROTECTED] wrote: how do i do two things at the same time, i'm thinking of the equivalent of fork in perl you need to enable the pcntl extension, and then you can use pcntl_fork (http://php.net/pcntl_fork). you may also be able to use the 'ticks' mechanism (http://www.php.net/manual/en/control-structures.declare.php). jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php 4.1.1 vs 4.0.6
On Sunday 24 February 2002 01:14, John Lim wrote: Cc Zona [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ezra Nugroho) wrote: I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's comming soon). I heard that there is some significant difference between 4.0.x and 4.1.x What is the main difference between 4.0.6 and 4.1.1 ? Are the 4.1.x completely backward compatible with 4.0.x? Should be 99% compatible. But the 1% which isn't compatible can be a major pain. If you're mainly writing your own stuff then you should be OK. The recommended php.ini settings for 4.1.X will break a lot of stuff written by other people. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Mr. Cole's Axiom: The sum of the intelligence on the planet is a constant; the population is growing. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php 4.1.1 vs 4.0.6
In 4.1.x series there are new vars (global scope) $_GET,$_POST,$_COOKIE,$_FILES,$_SESSION not available in 4.0.x versions. For old scripts could be problem that register_globals is off in the 4.1.x tree(for new installations, not upgrades). But this is for good. Regards, Andrey Hristov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not Quite: how to build an array
On Saturday 23 February 2002 14:43, jtjohnston wrote: OK. I use: while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } Then why Invalid argument supplied for foreach() Have you checked that $authors is indeed an array? Try print_r($authors), if you see an Array printed then you're OK, anything else then $authors is not an array hence your foreach loop fails. Also what does a typical 'AS' field look like? Am I indeed building an array as I go through my database? As it stands your code will only get the last set of $authors. Your while loop is not adding to $authors, it is replacing it each time through the loop. Thus you'll end up with whatever is in the last row of the results. As someone already suggested, you could use: array_push($authors, explode(;, $mydata-AS)); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* It's not the men in my life, but the life in my men that counts. -- Mae West */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not Quite: how to build an array
Let's work on some debugging. By using mysql_error() you'd eventually find out that AS is a reserved word in mysql, see: http://www.mysql.com/doc/R/e/Reserved_words.html That said, here's some example code to play with, untested but should work. if (!$conn = mysql_connect($host, $user, $pass)) { echo 'Cannot Connect: '. mysql_error(); exit; } if (!mysql_select_db($dbname)) { echo 'Cannot Select Db: '. mysql_error(); exit; } $sql = SELECT something FROM $tablename; // AS is reserved as the following is a valid // SQL query: SELECT foo AS bar FROM blah // See: http://www.sqlcourse.com/ // http://www.w3schools.com/sql/ if (!$result = mysql_query($sql)) { echo Cannot run query ($sql): . mysql_error(); exit; } while ($row = mysql_fetch_assoc($result)) { $authors[] = explode(';', $row['something']); } print_r($authors); Rename your field to something other then AS, like perhaps authors or something ;) Also eventually learn about Database Normalization. Regards, Philip Olson OK. I use: while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } Then why Invalid argument supplied for foreach() Am I indeed building an array as I go through my database? foreach($authors as $author) { #echo sort($author).br\n; echo $authorbr\n; } http://www.php.net/manual/en/control-structures.foreach.php foreach ($arr as $value) { echo Value: $valuebr\n; } I have the right syntax? Did I build the array? Newbie, but have to learn it somehow :) snip- $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(select AS from $table); while ($mydata = mysql_fetch_object($news)) { $authors = explode(;, $mydata-AS); } foreach($authors as $author) { echo $authorbr\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
[PHP] using PHP to access another site - stock quotes ??
Hi, I am developing site that needs to have stock quotes retrieved and placed into the database. Perhaps someone know if there is a site that would supply me with quotes? - I just do not want to do it manually :-(( I guess I could setup a cron job to run @ midnight and update quotes for selected stocks but I am not sure where to access quotes - any pointers? Thanks Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using PHP to access another site - stock quotes ??
Pax [EMAIL PROTECTED] wrote: I am developing site that needs to have stock quotes retrieved and placed into the database. Perhaps someone know if there is a site that would supply me with quotes? - I just do not want to do it manually :-(( http://www.google.com/search?q=php%20stock%20quotes gives lots of solutions. most of them pull the data from yahoo. jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] encryption and HTTP
Without using SSL or JavaScript, is there any way to make an md5 hash or encrypt a string before sending it out as a POST request? It seems that without encrypting the data before sending it, it can still be intercepted. Once intercepted, it doesn't matter if I use md5() on the $_POST['password'] once it gets to the script, because anyone can submit the same intercepted string to the script via POST and it will be md5()ed when it gets there, thus defeating the purpose. Maybe I haven't quite wrapped my brain around a decent authentication scheme yet. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using PHP to access another site - stock quotes ??
You might be interested in learning more about XML-RPC, which will allow cross-platform language-neutral XML documents to generate events or perform remote procedural calls (RPC). You can use any language that can parse XML documents, which of course includes our beloved PHP. This article focuses on Python, but it's just an introduction and the theory is the same for PHP: http://www.onlamp.com/pub/a/python/2000/11/22/xmlrpcclient.html Erik On Saturday, February 23, 2002, at 02:04 PM, Pax wrote: Hi, I am developing site that needs to have stock quotes retrieved and placed into the database. Perhaps someone know if there is a site that would supply me with quotes? - I just do not want to do it manually :-(( I guess I could setup a cron job to run @ midnight and update quotes for selected stocks but I am not sure where to access quotes - any pointers? Thanks Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] adding 'vote' mechanism
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have an SQL table that holds 'tips' and is linked to a table containing the authors details. I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it. The (simplified) table looks like this: id | authId | title | tip The only way I've come up with so far is to add two more fields (thumbs_up and thumbs_down). Then each time someone votes... get the current value of the field (say thumbs_up) use php to increment it's value and pop it back in the db. Is there a better way? - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8d/CbHpvrrTa6L5oRAkiJAJ9jSWhYcfaYkCLwh89oBRgPO4qGAACfVk35 2wYbTAlhyXEEsXEOh/x7u8k= =N0Cm -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Redirecting with PHP if JS is disabled?
Hi there, I am wondering if it is anyhow possible to check if the client has activated JavaScript and in case he has not to redirect him to another page? The thing is, as soon as the noscipt tap detects it, php is already parsed and withouth JS I don not see a possibility to redirect him. Does anybody have an idea on that? Thanx andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] adding 'vote' mechanism
On Saturday, February 23, 2002, at 02:42 PM, Nick Wilson wrote: I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it. The (simplified) table looks like this: id | authId | title | tip The only way I've come up with so far is to add two more fields (thumbs_up and thumbs_down). Then each time someone votes... get the current value of the field (say thumbs_up) use php to increment it's value and pop it back in the db. What if you made the field a signed INT field, and used PHP to subtract one from the current value of the field every time someone chose thumbs down or add one to the current value of the field every time someone chose thumbs up. This way you could have a level of how well the author stacks up. This is just another idea shooting the moon, the truth is that it would probably be fine either way. A matter of personal preference. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not Quite: how to build an array
I'm splitting mysql entries to build an array of author names called $authors. As someone already suggested, you could use: array_push($authors, explode(;, $mydata-AS)); http://ccl.flsh.usherb.ca/db/authors_under_study.php It works, but still gets First argument to array_push() needs to be an array and fails before it gets to print_r($authors). Am I doing something wrong here: $authors = array_push($authors, explode(;, $mydata-AUS)); ---snip $news = mysql_query(select id,AUS from $table); $authors = array(); while ($mydata = mysql_fetch_object($news)) { echo $mydata-id.|.$mydata-AUS.hr\n; $authors = array_push($authors, explode(;, $mydata-AUS)); } print_r($authors); -snip- The data looks like: id-1 = Zola, Émile; id-2 = Mendès, Catielle ??; Grutman; Bernabé, Jean; Andrade, Mario de; Sutherland, Ronald; Faulkner, William Harrison; Nabokov, Vladimir; Klein, Abraham Moses; Chassay, Jean-François; Glissant, Édouard; Martí, José; Jonassaint, Jean; Aguiar, Flavio; id-3 = Roberts, Charles George Douglas; Carman, Bliss; Scott, Francis Reginald; Gustafson, Ralph; Marriott, Anne; Kenneth, Leslie; id-4 = Roberts, Charles George Douglas; Carman, Bliss; Scott, Francis Reginald; Gustafson, Ralph; Marriott, Anne; Kenneth, Leslie; id-5 = Tremblay, Michel; Glassco, Bill; Freeman, David; Meunier, Claude; Gaboriau, Linda; Fennario, David;; id-6 = Tremblay, Michel; Laurendeau, André; Gélinas, Gratien; Glassco, Bill; Dassylva, Martial; Desbiens, Jean-Paul; Dubé, Marcel; Germain, Jean-Paul; Renaud, Jacques; Van Burik, John; Renaud Jacques;; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirecting with PHP if JS is disabled?
Why don't you do it the other way round: redirect if JS *is* available? Bogdan Andy wrote: Hi there, I am wondering if it is anyhow possible to check if the client has activated JavaScript and in case he has not to redirect him to another page? The thing is, as soon as the noscipt tap detects it, php is already parsed and withouth JS I don not see a possibility to redirect him. Does anybody have an idea on that? Thanx andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] adding 'vote' mechanism
I personally prefer voting mechanisms that display how many votes have been cast. If you keep the thumbs_up separate from thumbs_down, you can figure the total number of votes. Otherwise, you will not be able to know whether the author is *really* average or just never voted for. Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Saturday, February 23, 2002, at 11:45 AM, Erik Price wrote: On Saturday, February 23, 2002, at 02:42 PM, Nick Wilson wrote: I'd like to add a simple 'thumbs up, thumbs down' vote mechanism to it. The (simplified) table looks like this: id | authId | title | tip The only way I've come up with so far is to add two more fields (thumbs_up and thumbs_down). Then each time someone votes... get the current value of the field (say thumbs_up) use php to increment it's value and pop it back in the db. What if you made the field a signed INT field, and used PHP to subtract one from the current value of the field every time someone chose thumbs down or add one to the current value of the field every time someone chose thumbs up. This way you could have a level of how well the author stacks up. This is just another idea shooting the moon, the truth is that it would probably be fine either way. A matter of personal preference. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] REDIRECT_QUERY_STRING weirdness ... redirecting from one file to another
Hi, I would like any file under the root of a certain domain name to redirect to a PHP template file. For instance, I would like a request for /services/ to redirect to http://myhost/index.php?path=/services/ . This is similar to what PHP.Net does with their function lookup shortcut (where you can go to http://php.net/function-name instead of the longer equivalent.) I have it set up with mod_rewrite as follows: RewriteEngine on RewriteRule ^(.+) /path/to/index.php?path=$1 [L] The only problem is that Apache is considering this a redirect, and is thus overwriting my $1 with the name of the current file (index.php.) The only place I can find the original file is HTTP_SERVER_VARS[REDIRECT_QUERY_STRING]. Is there a way to pull out the name of the original file without going through extracting $HTTP_SERVER_VARS and the like? BTW, I know there was a post on how PHP.Net did the function shortcut a while back. If someone can post a link to that again, I'd be grateful. I can't seem to find it. Thanks! Erica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unknown column when column does exist.
I've just created a add record to table type of page - basically copied a working php file I have on hand, and changed the values etc. Now, I am having problems trying to troubleshoot something. Basically my mySQL query is: INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE, DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event goes here', 'Another Organization', 'Coquitlam', 'BC', 'Another Date', 'Another Date', '$250') and I have a coding in my php file that pretty much tells mySQL if it can't insert this, spit out the problem: Can't execute INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE, DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event goes here', 'Another Organization', 'Coquitlam', 'BC', 'Another Date', 'Another Date', '$250') Unknown column 'ORG' in 'where clause' Okay, there's an ORG column in the database table, and if I check my mySQL phpAdmin interface (even ran the same query in the myPHPAdmin interface), the very record has been inserted into the database without problems. So the inserting record into database part isn't the problem - it seems to me that the problem is that somewhere along the line, PHP is confused and is telling me something else. Ideas? Thanks! -- Laurie Landry [EMAIL PROTECTED] - email (604) 693-1120 - voicemail/fax -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] encryption and HTTP
The PHPLIB auth class has some code to do this. You might want to look there for ideas. If I recall correctly, they sent a hidden random string along with the form that was different on each request. They then did an md5 hash of the post data concatenated with the random string. Kirk -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 23, 2002 12:20 PM To: PHP Subject: [PHP] encryption and HTTP Without using SSL or JavaScript, is there any way to make an md5 hash or encrypt a string before sending it out as a POST request? It seems that without encrypting the data before sending it, it can still be intercepted. Once intercepted, it doesn't matter if I use md5() on the $_POST['password'] once it gets to the script, because anyone can submit the same intercepted string to the script via POST and it will be md5()ed when it gets there, thus defeating the purpose. Maybe I haven't quite wrapped my brain around a decent authentication scheme yet. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] PHP 5?
Are there rumblings of what to look for in the next major release of PHP yet? Is there a different, better place to ask? I'm just curious... Wes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php - mail() and sendmails clientmqueue directory
I'm setting up a contact page on a site. Typically I use form inputs to assemble the data and then use the mail() function to send the data to the appropriate user. Whenever I submit the form data, I immediately see a system error reporting that sendmail (version 8.12.1) cant chdir to /var/spool/clientmqueue ... and naturally the mail does not get delivered. Permissions and ownership of this directory are 4770 and root.smmsp respectively. (smmsp is the SendMail Mail Submission Protocol userid/groupid). If I change permissions to 4777, the mail gets through, but I get a syslog warning that I have dangerous permissions set for that directory (I agree). Has anyone else experienced this issue, and or can anyone recommend a secure solution. -- Regards Luke -- Q: What does FAQ stand for? A: We are Frequently Asked this Question, and we have no idea. -- C.O.L.S FAQ - http://www.linuxsecurity.com/docs/colsfaq.html Note: Remove NOSPAM from my return address if necessary -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upload a file
hi, I try to upload a file using a form. When I use INPUT TYPE=text it is ok, but when i change it to hidden it doesn't work :( This is a part of the form: INPUT TYPE=hidden NAME=dir VALUE=? echo $dir? where $dir is a directory where I want ot place the file. The script to copy a file looks like that: copy($userfile, $dir.$userfile_name); Please help Czeslaw -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] countless
Success. After a bit of tinkering :) and reading up. Thanks for the ideas. Now one last question. here is my array $authors: http://ccl.flsh.usherb.ca/db/authors_under_study.php sorted alphabetically. How do I go about sorting again it so it renders: Aguiar, Flavio1 Andrade, Mario de1 Ashcroft, W.D. 1 Atwood, Margaret 3 Auden, W. H.3 Bernabé, Jean1 Birney, Earle 4 Basically, I want to start a new array (do i have to?) and count every time an author appears, eliminating repetition. J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sendmail
Hello, Can anyone help me in solving this problem.. For sending mail using sendmail i have written the code like this but it is giving some error messages in the From address instead of address $TO=Me; $[EMAIL PROTECTED]; $fd = popen(/usr/sbin/sendmail -t,w); fputs($fd, To: $user\n); fputs($fd, From: $TO\n); fputs($fd, Subect: Feedback\n); $ver = phpversion(); fputs($fd, X-Mailer: PHP/FI $ver\n\n); fputs($fd, Hii $user,\n $body \n); pclose($fd); Can anyone tell the solution for this. -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need a random number eather one or two
I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right any solutions Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012
Re: [PHP] I need a random number eather one or two
On Sun, 24 Feb 2002, Philip J. Newman wrote: I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right Google is your friend. 'php rand' http://www.alt-php-faq.org/local/90/ Other details in PHP manual, Mathematical functions section. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: I need a random number eather one or two
rand (1, 2) http://www.php.net/manual/en/function.rand.php ? J Philip J. Newman wrote: I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right any solutions Philip J. Newman Philip's Domain - Internet Project. http://www.philipsdomain.com/ [EMAIL PROTECTED] Phone: +64 25 6144012 -- John Taylor-Johnston - ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ - Université de Sherbrooke: http://compcanlit.ca/ 819-569-2064 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Ughh not a cookie :(
Below is included part of a script for a polls (simple yes no) I am trying to use cookies to determin if they have already voted or not. No errors are displaed but, I have tried to vote, and it gives no errors, nor does it give an increase in the database, fine you might think its doing its job right. But no, because i asked someone else to vote on it and it still didnt go up, and he definately has not got the cookies. Also, is it possible to use variables within cookies' names? as you can see I am using _$id because there is more than 1 poll likely to be used. If anyone can help clear up this odd problem I would be very happy. Alternatilvly, would it be easier to use a second table with IP's of those voted and the polls wich they have and used while($num $max) { if($currip == $row[voter_ip]; { $gvarvoted = true; } } if($gvarvoted == true) { showres(); } } or something like that ? Code follows -- include config.php; include functions.php; $mode=$HTTP_GET_VARS['mode']; $id = $HTTP_GET_VARS['id']; $submitted = $HTTP_POST_VARS['pollsubmitted']; $isyes = $HTTP_POST_VARS['yes']; $isno = $HTTP_POST_VARS['no']; /* is set, do some thin */ switch ($mode) { case'show': $hasvoted = $HTTP_COOKIE_VARS[hasvoted_$id]; if($hasvoted == hasvoted) { /* Show Results */ } else { $sql = SELECT * FROM polls WHERE id = '$id'; $result = mysql_db_query($database,$sql,$db); $row = mysql_fetch_array($result); $noofresponses = $row[noofresponses]; $yes = $row[yes]; $no = $row[no]; $yes = $yes +1; $no = $no +1; $noofresponses = $noofresponses + 1; if(isset($isyes)) { $usql = UPDATE polls SET noofresponses = '$noofresponses', yes = '$yes' WHERE id = '$id'; $res = mysql_db_query($database,$usql,$db); } if(isset($isno)) { $usql = UPDATE polls SET noofresponses = '$noofresponses', no = '$no' WHERE id = '$id'; $res = mysql_db_query($database,$usql,$db); } setcookie(hasvoted_$id,hasvoted); /* end of if(isset($hasvoted_$id) */ } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need a random number eather one or two
He was probably looking for an alternative solution, such as $heads=(microtime() % 2) :-) Bogdan Duncan Hill wrote: On Sun, 24 Feb 2002, Philip J. Newman wrote: I'm trying to make a random number kind of a coin toss, heads = 1 = left tales = 2 = right Google is your friend. 'php rand' http://www.alt-php-faq.org/local/90/ Other details in PHP manual, Mathematical functions section. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions
ok, i got i working now, thanx to all who helped especially michael, chris edward alyx - Do You Yahoo!? Yahoo! Sports - Coverage of the 2002 Olympic Games
[PHP] Re: Sendmail
Do you have a specific reason for calling Sendmail directly? If not, try http://www.php.net/manual/en/function.mail.php Erica Uma Shankari T. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, Can anyone help me in solving this problem.. For sending mail using sendmail i have written the code like this but it is giving some error messages in the From address instead of address $TO=Me; $[EMAIL PROTECTED]; $fd = popen(/usr/sbin/sendmail -t,w); fputs($fd, To: $user\n); fputs($fd, From: $TO\n); fputs($fd, Subect: Feedback\n); $ver = phpversion(); fputs($fd, X-Mailer: PHP/FI $ver\n\n); fputs($fd, Hii $user,\n $body \n); pclose($fd); Can anyone tell the solution for this. -Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help a newbie out...
I'm getting a parse error with the following on line 9 http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps any clue? ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Personal Site: http://www.mikezornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help a newbie out...
Michael Zornek wrote: I'm getting a parse error with the following on line 9 http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps any clue? ~ Mike |$full_anchor_tag = a href=\mailto\: ;| should be |$full_anchor_tag = a href=\mailto:\; ;| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help a newbie out... FIXED
Twas 2/23/02 11:27 PM, when Michael Zornek [EMAIL PROTECTED] said: I'm getting a parse error with the following on line 9 http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps any clue? Fixed, I figured it out.. I forgot to replace a bunch of vars with the new names... ugh (so newbie :-) If you are interested in small little function to help you write less spamable mailto anchors checkout: http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.php http://www.applestudentdevelopers.org/testbed/ASD_PrintEmailLink.phps ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Personal Site: http://www.mikezornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 24 Feb 2002 04:46:46 -0000 Issue 1190
php-general Digest 24 Feb 2002 04:46:46 - Issue 1190 Topics (messages 85942 through 85980): Re: php 4.1.1 vs 4.0.6 85942 by: John Lim 85949 by: Jason Wong 85950 by: Andrey Hristov Novice question 85943 by: brendan conroy Associative array key as a variable 85944 by: ejfs.sympatico.ca 85945 by: Andrey Hristov phpnuke site down? 85946 by: Thalis A. Kalfigopoulos Re: uploading files | how to avoid submitting twice? 85947 by: Jim Winstead Re: fork? 85948 by: Jim Winstead Re: Not Quite: how to build an array 85951 by: Jason Wong 85952 by: Philip Olson 85960 by: jtjohnston using PHP to access another site - stock quotes ?? 85953 by: Pax 85954 by: Jim Winstead 85956 by: Erik Price encryption and HTTP 85955 by: Erik Price 85965 by: Johnson, Kirk adding 'vote' mechanism 85957 by: Nick Wilson 85959 by: Erik Price 85962 by: Steven Walker Redirecting with PHP if JS is disabled? 85958 by: Andy 85961 by: Bogdan Stancescu REDIRECT_QUERY_STRING weirdness ... redirecting from one file to another 85963 by: Erica Douglass Unknown column when column does exist. 85964 by: lmlweb.mybc.com PHP 5? 85966 by: Weston Houghton php - mail() and sendmails clientmqueue directory 85967 by: Luke Vogel upload a file 85968 by: czeslaw countless 85969 by: jtjohnston Sendmail 85970 by: Uma Shankari T. 85977 by: Erica Douglass I need a random number eather one or two 85971 by: Philip J. Newman 85972 by: Duncan Hill 85973 by: jtjohnston 85975 by: Bogdan Stancescu Ughh not a cookie :( 85974 by: John Cuthbert sessions 85976 by: Alexander P. Javier help a newbie out... 85978 by: Michael Zornek 85979 by: Bogdan Stancescu Re: help a newbie out... FIXED 85980 by: Michael Zornek 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] -- ---BeginMessage--- Cc Zona [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ezra Nugroho) wrote: I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's comming soon). I heard that there is some significant difference between 4.0.x and 4.1.x What is the main difference between 4.0.6 and 4.1.1 ? Are the 4.1.x completely backward compatible with 4.0.x? Should be 99% compatible. http://www.php.net/release_4_1_0.php -- CC ---End Message--- ---BeginMessage--- On Sunday 24 February 2002 01:14, John Lim wrote: Cc Zona [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ezra Nugroho) wrote: I am deciding between 4.0.6 and 4.1.1 (or maybe 4.1.2 if it's comming soon). I heard that there is some significant difference between 4.0.x and 4.1.x What is the main difference between 4.0.6 and 4.1.1 ? Are the 4.1.x completely backward compatible with 4.0.x? Should be 99% compatible. But the 1% which isn't compatible can be a major pain. If you're mainly writing your own stuff then you should be OK. The recommended php.ini settings for 4.1.X will break a lot of stuff written by other people. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Mr. Cole's Axiom: The sum of the intelligence on the planet is a constant; the population is growing. */ ---End Message--- ---BeginMessage--- In 4.1.x series there are new vars (global scope) $_GET,$_POST,$_COOKIE,$_FILES,$_SESSION not available in 4.0.x versions. For old scripts could be problem that register_globals is off in the 4.1.x tree(for new installations, not upgrades). But this is for good. Regards, Andrey Hristov ---End Message--- ---BeginMessage--- Hi, thanks for reading this, Im just going to say it cos i dont want to waste your time. Im looking for a really big favour here(cos I think it may take time to spot this, although it might only take five seconds to spot, but I dunno,the problem area of code is only four lines long), so dont spend time reading this unless you got half an hour spare or are looking a good samaritan award or something. Still reading this? Excellent, Iam saved. I wrote code which takes a input string, breaks it up and puts the bits into an array called $real. THIS WORKS. But I may have lots of input strings so I slapped a for loop around the code to do the same thing for all the inputs and THAT WORKS ASWELL! Then i wanted to save the different bits of each input string in its own array, so I created an array of arrays and at the end of each cycle
[PHP] Re: php3/php4 difference
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... $numresult=mysql_query($sql) or die( 4 QUERY ERR $sql); echo numresult = $numresult; $numrows=mysql_num_rows($numresult); mysql_free_result($numresult); echo P align='left'You have selected .$numrows . record(s).; When I run the script above on php4 windows I get the following result: numresult = Resource id #2 You have selected 0 record(s). When I run the script above on php3 linux I get the following result: numresult = 2 You have selected 1382 record(s). Why do I get two different values for $numresult? Thanks Are you actually using the same database for both queries? Try running the query from the command line on both machines and see what happens. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php