[PHP] Re: Re: PHP 4.2
Hello All, I also have the challenge of distributing php code to unknown php versions. There is a wide discrepancy in the functionality of even various PHP 4.x code. Since at the time of coding I don't know the version, I test for it when I need to, and include code accordingly. For example, in the case of image uploads I find out what PHP version the server is running. I declare a 'yardstick' value. If the server version is less than the yardstick then I include one block of code. If the server version is equal to or greater than the 'yardstick' value then I include another, different block of code. It's messy, and extra code, but it works... While there is a user contributed function for checking the difference of two php versions: http://www.php.net/manual/en/function.phpversion.php interfear01 at hotmail dot com 09-Jun-2002 03:00 function check_php_version ($version) ... wouldn't it be really nice to have the PHP development team make up a formal, built in function to handle this growing need to check versions? If such a function was made now, then we could rely on its availability some years in the future... Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada Easily create your very own Yellow Pages - free download http://www.dreamriver.com >Message-ID: <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >From: "Peter" <[EMAIL PROTECTED]> >Date: Mon, 24 Jun 2002 21:24:13 +0100 >Subject: Re: PHP 4.2 > >If you want an all in one solution without having to have two versions, >can't you read the status of register_globals from the config file and base >the rest of the script on this? >eg >if (register_globals == 'on') { >$name = _POST['name']; >$address = _GET['address']; >} > >then you can access the variables as if register_globals = on even if it >isn't >"Simon Troup" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> I've written a small freeware script that gets installed on a variety of >> different platforms running various PHP versions. >> >> I've read through the manual about the super global arrays and how post >and >> get vars are no longer registered by default, but am confused about when >it >> would be a good idea to "upgrade" the script. >> >> If I change everything in the script and use $_GET and $_POST etc. then >> those people who are still using earlier versions won't be able to >upgrade. >> >> Does anyone know what the uptake of the latest version is? What is >everyone >> else doing about this? If I were developing for one client it wouldn't be >a >> problem as obviously you'd know what you were developing for. >> >> I'd just like some feedback on when would be a good time to upgrade the >> scripts while causing the minimum disruption and maintaining maximum happy >> users. >> >> Thanks >> >> Zim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: Re: [PHP] Re: PHP 4.2
Rasmus, Yes, thank you, that's the function I wanted and didn't see ... Kind Regards, richard. > You mean like php.net/version_compare ? > > On Mon, 24 Jun 2002, Dreamriver.com wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using HTTP Post variables with multiple domains and scripts
Hi Folks, I use the regular form POST method to send variables from Domain A to Domain B. On domain B I run a short script. The script does it's thing and then sends the posted variables back to Domain A with header("Location: http://www.domainA.com/folder/script.php";); The problem is that the variables disappear at this point - after the domain B script is run - and do not appear to go any further. I have tried this code, which works: header("Location: http://www.domainA.com/folder/script.php?var1=foo&var2=bar";); ... but for security reasons I should not use the GET method for passing the originally posted variables. I do not want to stop the form post process, I just want to run my own script routine and then continue with the original form request. How do I accomplish the posting of variables from Domain A to Domain B and back again to Domain A without reposting them in an additional form post submission? Thanks! Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada Easily create your own Yellow Pages with phpYellow Pages http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP in the University and Corporation
Hello, I teach internet programming part-time and my findings are that the "best" language to learn for the web - for students - is php because it is more affordable and easier to learn for the students. The instruction the school provides does NOT include php. I added instruction in php as a "bonus". I teach students database design and then when it comes time to talk with the database I show them php. The students are amazed at how easy it is to connect to their database! When I see the students graduate, for the most part php is their preferred language - and that's just squeezing the php subject in less than 20 hours. I still agree that the "best tool for the job" is the way to go for commercial applications, but I encourage anyone teaching to introduce php as the superlative alternative it is, if only as a "bonus" instructional feature. Marketing hype is powerful, but ease of use and affordability is powerful too. Richard Creech http://www.dreamriver.com "Chris Lott" <[EMAIL PROTECTED]> wrote in message > Many institutions, like the one I teach for, are entrenched in ASP and Java > Also, these programs are typically staffed by a cadre of aduncts. If you > have PHP skills and teaching skills and you can basically donate your time > for the peanuts that are offered (and the fun of it), there is a place for > YOU to help promote PHP. > > often, in my experience, PHP is slow to be adopted in the corporate > environment because MS is so entrenched, and because MS' firm establishment > on the desktop means hiring MS people, who naturally promote and hire other > MS people, and administrators often equate using other technologies with > abandoning their desktops. > c > -- > Chris Lott > http://www.chrislott.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Initializing a db $var and retrieving a required CONSTANT
Hi Folks, Two questions: 1) Initializing a db $var What's the best way to code $dbvar, which is coming from a database query, given the new superglobals: $data = mysql_fetch_array(); $dbvar = stripslashes($data['someFieldName']); Is there a newer or better way to initialize $dbvar? 2) retrieving a required CONSTANT If a CONSTANT is defined on foo.php and called with a require_once("foo.php") on another page called bar.php, then CONSTANT is not global and is not called with the new supernotation, but rather same as before: $someVar = CONSTANT; ... correct? richard. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check Version - License verification
Hi All, In appreciation of the fine contributions found on this list I thought I'd post remarks about a new system I'm trying that shows some promise. The system purpose is to enable a third party [an administrator] to check the software version for a php driven software application [which you write]. This is the process: a) CONSTANTS define the PRODUCTNAME and the INSTALLVERSION for your software, as well as other admin data you might find useful. Note: the ADMINUSERNAME and ADMINPASSWORD are saved in php4 session. b) each page load for the administration page [except php_self] has the visitor [presumably admin] ip, port and datetime inserted into the administrator's application database table c) a threshold is set which when it is reached triggers a check version call d) the checkversion calls a script on your own site e) the script fetches version information from your own [remote] database f) the upgrade information is presented to the administrator, or if the version is ok then the administration page is loaded [which was the original file request] and in so doing the entire process can be relatively transparent to the admin user, g) [optional] deny the file request for the application administration page if the product registration does not match your [single domain license] license database. In this manner a third party administrator is enabled to check the version of their php driven software application - with easy to use upgrade links - and you the software developer have more control over the use of your own software. For obvious reasons these are not all the details, but this software is currently in place and preliminary tests are looking good. It's a good feature for the administrator to be able to check the version of their software and be able to upgrade in a timely manner. There are simpler ways to effect the algorithm above, of course, but this particular method shows some promise because of the license verification side effect. I thought someone on this list might be able to benefit from this algorithm. I don't have time to read this list everyday, but when I make time I always learn something - and appreciate your posts. Kind Regards, Richard Creech [EMAIL PROTECTED] Phone 250.744.3350 Pacific Time, Canada DreamRiver Software Powers the Net http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP_Upload with PHP
Hello, I also have been seeing file upload problems with version 4.1.2. It seems that the (phpinfo()) default settings of: upload_tmp_dir = no value no value ... are not in agreement with [online documentation] the anticipated temporary upload folder named "/tmp". $upload_tmp_dir = "/tmp" as the default included in the distribution file may improve harmony. Richard. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 1. php ISP host wanted, 2. Release of EasySQL
Hello All, php ISP HOST WANTED I seek expressions of interest from North American based PHP internet service providers (ISP's). We seek a php focused ISP where security, reliability and performance are paramount. RAID networking is essential. Our client needs mission critical host services on a priority basis. If you use or know of such host services, and are completely happy with them, kindly let us know too OFFLINE at: [EMAIL PROTECTED] Thank you. EASYSQL RELEASED Also, this is the first announcement of a new php MINI application called easySQL. easySQL is freely downloadable and lets you query a database using just your browser. Essentially it allows for a quick and dirty connect, select and query to a database without the need for installing larger programs. It is just one file, is driven by php and javascript, has rudimentary configurable password protection, has a reusable query option and has been tested for several months in hundreds of installs. More info: http://www.dreamriver.com/software/phpEasySQL/index.php Download: http://www.dreamriver.com/software/ Kind Regards, Richard Creech [EMAIL PROTECTED] 250.744.3350 Pacific Time Canada Download phpYellow Pages for dynamic Website Content http://dreamriver.com/software/index.php3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a user_auth script.- Anyone see the problem ?
In this line: if($row["account_password"]==$login_name you are missing a parenthesis character " ) " to end the condition with. Richard. [EMAIL PROTECTED] http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Volume email handling: I got the email blues
Hello All, I want to grab several thousand email addresses from my subscriber list and email them. I wrote a script to do this. The addresses come from an online database. I have completely rewritten the script once, but still it gives me email blues. The script in general is very sluggish and frequently chokes after a few thousand sends. Once I was told that my methodology is inefficient for larger volumes. Looping through a database set and sending email for each record was not as efficient as using some dedicated third party application designed to do just this. Ok, I'm ready for such suggestions now. So, what is the best approach for this problem, and can you provide download urls for a decent solution. I want to marry the code with a new software program I'm writing. Thanks in advance! Kind Regards, Richard Creech [EMAIL PROTECTED] 250.744.3350 Pacific Time Canada Create your own Yellow Pages Directory FREE with phpYellow Pages Buy the Premium Version and receive Professional Features http://www.dreamriver.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mysql update query
Greg, You must specify the tablename :) Like this: UPDATE myTableName ... or mysql> UPDATE persondata SET age=age+1; For the official syntax visit mysql language reference at http://www.mysql.com at http://www.mysql.com/doc/U/P/UPDATE.html Kind Regards, Richard Creech [EMAIL PROTECTED] 250.744.3350 Pacific Time Canada Dreamriver Software Powers the Net http://www.dreamriver.com You wrote: From: "Greg Sidelinger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Date: Tue, 4 Dec 2001 22:27:20 -0500 Message-ID: <000d01c17d3c$c0a393e0$1000a8c0@asylum> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_NextPart_000_000E_01C17D12.D7CD8BE0" Subject: mysql update query I'm having trouble getting an update query to work Here is what I'm doing $result = mysql_query("update table set value1='$value1', value2='$value2' where id='$id'"); It is not updating the database. All the $vars have values and I'm using the correct columns names. Could someone please point me in the correct direction because I have been trying different things for a while but can't seem to get it to work. Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]