RE: [PHP] Call to undefined function: xml_parser_create()... but CGI compiled --with-xml

2003-11-03 Thread Dave [Hawk-Systems]
a production box running 4.2.2 recently had a script added to it requiring use of xml functionality. The box was already compiled (a few versions earlier) with the --with-xml option. Since then, have upgraded this box twice (though it is due for another) using config.nice to ensure the same

[PHP] caveats for upgrade from 4.2.2 to 4.3

2003-11-03 Thread Dave [Hawk-Systems]
any warnings, problems, or other issues we should be aware of... production server, already addressed the register_globals issue Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Call to undefined function: xml_parser_create()... but CGI compiled --with-xml

2003-11-01 Thread Dave [Hawk-Systems]
a production box running 4.2.2 recently had a script added to it requiring use of xml functionality. The box was already compiled (a few versions earlier) with the --with-xml option. Since then, have upgraded this box twice (though it is due for another) using config.nice to ensure the same

[PHP] best method to resize images

2003-09-26 Thread Dave [Hawk-Systems]
have a situation where clients will be uploading images via a web interface. We need to process these images to create thumbnails. In the past we have used image but have found that the output is somewhat less than desireable and limited to jpg. We would like to be able to soften the image

[PHP] parsing of large csv file for insert into pgsql via PHP

2003-09-25 Thread Dave [Hawk-Systems]
we have a number of csv dumps that occasionally have to be used to update tables in a postgres database... normally this is done by uploading the file and whomever running a php based parser which opens the file into an array via file(), does a split() on the comma, then executes an insert or

RE: [PHP] Dynamically generate a drop down list

2003-07-28 Thread Dave [Hawk-Systems]
Is it possible to have a function which echoes the values as they are read from the database? something like function init_auth_list() { print select name=author option value=\\select the name of the author/option\; $query=select name from author order by name;

[PHP] scoring/sorting db search results based on score

2003-07-17 Thread Dave [Hawk-Systems]
looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in keywords is worth

RE: [PHP] scoring/sorting db search results based on score

2003-07-17 Thread Dave [Hawk-Systems]
Appreciate the responses... Try SELECT , (((keywords LIKE '%$search%') * 5) + ((title LIKE '%$search%') * 3) + (description LIKE '%$search%')) score FROM . ORDER BY score DESC PostgreSQL cannot type cast the Boolean type so you have to use a case statement, also changing like to

RE: [PHP] Upgrading 4.2.2 to 4.3.2

2003-07-14 Thread Dave [Hawk-Systems]
any takers on this? -Original Message- From: Dave [Hawk-Systems] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2003 11:09 AM To: [EMAIL PROTECTED] Subject: [PHP] Upgrading 4.2.2 to 4.3.2 Live server was previously a 4.0.4 install that we upgraded to 4.2.2 Am getting ready

[PHP] Upgrading 4.2.2 to 4.3.2

2003-07-10 Thread Dave [Hawk-Systems]
Live server was previously a 4.0.4 install that we upgraded to 4.2.2 Am getting ready to upgrade it again to 4.3.2 and wish to verify some things. 1) any caveats to be aware of? 2) it appears from reading INSTALL that a seperate build isn't required if we want to run both dynamic and static,

RE: [PHP] fsockopen - returning results from port 80, 8080 and 443 requests

2003-07-07 Thread Dave [Hawk-Systems]
any takers on this, before I give up and drop to curl for those types of requests? Dave Creating a quick script where we can poll the services on a particular server to verify if they are running or not. this will be included in a larger scope application once the details are worked out. Am

[PHP] fsockopen - returning results from port 80, 8080 and 443 requests

2003-07-06 Thread Dave [Hawk-Systems]
Creating a quick script where we can poll the services on a particular server to verify if they are running or not. this will be included in a larger scope application once the details are worked out. Am having a problem getting results from queries to web server ports though. Port 80(std),

RE: [PHP] Warning: Invalid argument supplied for foreach()

2003-07-06 Thread Dave [Hawk-Systems]
Hi all, I am getting crazy, can't understand what i missed! Does anybody know? $champs = array (titre_art = h3 ,nom = bleu, prenom = green, resume = bold); foreach($champs as $key = $value) { echo td class='$value'$row($key))/td; } never used foreach()... but I would check

[PHP] timing out exec statements

2003-06-16 Thread Dave [Hawk-Systems]
we are dropping to a perl script to process transactions, occasionally the remote server the perl script interacts with becomes bogged, the transaction goes into limbo, or for whatever reason the processing of that transaction hangs (happening about 0.2% of the time). Is there a way to time and

[PHP] register_globals per virtual host

2003-03-19 Thread Dave [Hawk-Systems]
a while ago we upgraded the php installations on our servers. for a quick fix we set register_globals to on for code compatibility. Since then we have been cleaning up code to eliminate this. We likely still have some virtual hosts who are using these globals though, so while we are wanting

RE: [PHP] *Premature end of script headers

2002-12-18 Thread Dave [Hawk-Systems]
Guys? The support guy says that my php-script brings his php interpreter to crash. I am astonished (wow-what a powerful man I am :) ) - no, but really, it doesn't crash MY server? He also said, it happens just right after the file is being asked for, that is, as I suspect, somewhere in the first

[PHP] reconfigure not showing in phpinfo

2002-12-13 Thread Dave [Hawk-Systems]
Recently reconfigured php to add in support for some extensions we were previously not using (Pear among others). switched to src directory, backed up config.nice edited config.nice to remove/alter the appropriate --without lines rm config.cache ./config.nice make (no errors) make install (no

[PHP] Automatic include of files containing functions

2002-12-11 Thread Dave [Hawk-Systems]
On a few sites we have used a master include or function file containing all the unctions required for the site... Some of these function files may contain 30-40 functions and some pages use only 1 function from the file. Would like to be a little more dynamic in our approach of this, and have

RE: [PHP] Automatic include of files containing functions

2002-12-11 Thread Dave [Hawk-Systems]
having to include explicitly any files containing functions on any page as they would all be loaded dynamically. Am I groking this correctly? Original questions/requirements included below. Dave - Original Message - From: Dave [Hawk-Systems] [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent

RE: [PHP] Can PHP do this...?

2002-12-11 Thread Dave [Hawk-Systems]
John, PHP-general, OK. I think I understand this, but let me ask just to be sure. So if I setup in my page something to this effect: if ($_SERVER['!HTTPS']) { echo Switching over to SSL...; echo META redirect to SSL; yuck recommend insuring this is at the top of your page and

RE: [PHP] Automatic include of files containing functions

2002-12-11 Thread Dave [Hawk-Systems]
Here is what I am looking at for a partial solutions (see redirect missing function error for my next hurdle)... All functions are contained within individual files in a functions directory, none of which are hard included into the PHP pages; eg// ./functions/ShowThis.php

[PHP] redirect missing function error

2002-12-11 Thread Dave [Hawk-Systems]
related to Automatic include of files containing functions Can we capture errors for missing functions and have the script correct the problem and attempt again? For example// $result=MyFunction($someVariable); if this function doesn't exist, PHP generates an error. Capture the error

RE: [PHP] mailing a cookiecontent

2002-09-02 Thread Dave [Hawk-Systems]
Here's what I wanna do: On the first page I collect a lot of formfield values into a cookie. On the next page I display the content of this cookie. This works. What I even want to do is mailing the cookie content in the same time I submit the forms in the first page (or, when the new page loads).

[PHP] regex match problem

2002-08-14 Thread Dave [Hawk-Systems]
as part of a larger application we have a bit of code that processes whois to determine domain name expiry dates. Most formats are easily parsed, but Register.Com has thrown the little regex for a loop and I am unsure as to a clean workaround. Here is what we have; ...

RE: [PHP] Re: Not a Valid File-Handle Resource

2002-07-30 Thread Dave [Hawk-Systems]
$dataFile = fopen(/home/blurredv/data/.$username.Contact.txt,w); fputs($dataFile, $line); fclose ($dataFile); These are the errors: Warning: Supplied argument is not a valid File-Handle resource in /home/blurredv/public_html/redcarbon/update.php on line 34 Warning: Supplied

RE: [PHP] Paying Job...

2002-07-25 Thread Dave [Hawk-Systems]
I have never charge by the page simply because I don't want to be limited in my design. Also, I don't want them saying I've added unneeded pages to up the price. or have customers nitpicking about removing pages to cut costs... I don't know how you would charge by the script since you should be

RE: [PHP] String Manipulation

2002-07-25 Thread Dave [Hawk-Systems]
Wow, Thank you for the explanation, it helped out a lot ;) I don't know regex very well, but I hope that this will give me a better understanding of it. Thank you Yet again, Mike clipped regex explanation good luck understanding. personally it is one of those things that I dust off and pull

RE: [PHP] HTTP_POST_FILES undefined - What happen?

2002-07-24 Thread Dave [Hawk-Systems]
Thought I turned on register_globals on in the php.ini, my server didn't know the HTTP_POST_FILES. echo $HTTP_POST_FILES[$file]['type'] ; echo $HTTP_POST_FILES[$file]['name'] ; echo $HTTP_POST_FILES[$file]['size'] ; I've always get these messages: PHP Warning: Undefined variable:

RE: [PHP] Re: MySQL - PHP combined log

2002-07-22 Thread Dave [Hawk-Systems]
clip I want to be able to view a single log that contains the following: clip http://php.net/error_log how about this curve... getting PHP to append a line to the apache log. Currently we are exporting via fopen clf formatted logs for file uploads (whose file sizes are not recorded by

[PHP] regex in_array or array_search

2002-07-17 Thread Dave [Hawk-Systems]
other than each'ing an array and performing a regex match, is there an easier way to parse through the values in an array for a value matching *something*somethingelse* thanks Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] file() and array values contain extra \n

2002-07-16 Thread Dave [Hawk-Systems]
$users=file('.users'); # puts users in the file into an array so we can # check for valid or priv users with if(in_array($HTTP_SERVER_VARS[REMOTE_USER], $users)){} # we add additional users to the .users file with the following $users[]=$newuser; # adds the new user to the end of the above

RE: [PHP] Purpose of $$var ?????

2002-07-16 Thread Dave [Hawk-Systems]
variable variable... right up there with array array basically what you are saying is resolve $var, then find out what that variable holds example; assume your $counter is currently at 5 $var = v.$counter._high_indiv; would mean that $var= v5_high_indiv assuming that v5_high_indiv is

RE: [PHP] file() and array values contain extra \n

2002-07-16 Thread Dave [Hawk-Systems]
On Tuesday 16 July 2002 21:53, Dave [Hawk-Systems] wrote: $users=file('.users'); # puts users in the file into an array so we can # check for valid or priv users with if(in_array($HTTP_SERVER_VARS[REMOTE_USER], $users)){} # we add additional users to the .users file with the following

RE: [PHP] file() and array values contain extra \n

2002-07-16 Thread Dave [Hawk-Systems]
$users[]=$newuser; # adds the new user to the end of the above created users array # then write the array to the file $fd = fopen (.users, w+); fwrite ($fd, join(\n,$users)); fclose ($fd); the problem is after adding users, only the last user returns the user name in the array,

RE: [PHP] file() and array values contain extra \n

2002-07-16 Thread Dave [Hawk-Systems]
Start from scratch. You have a file with a single user on each line: tom\n dick\n harry\n You use file() to read into array $users. You compare as in above. You add a user by: $users[] = NEW_USER\n; You write out the file as above. curious... when I ran through that (before posting