Re: [PHP] Reading files in PHP 5.3.0

2009-09-11 Thread Steve Brown
function parseResponseHeaders($header_file) {     $http_found = $error_found = false;     $http_reponse = $error_message = NULL;     $response = array();     $response['ResponseCode'] = NULL;     $response['ErrorMessage'] = NULL;     if (!is_file($header_file) ||

[PHP] Reading files in PHP 5.3.0

2009-09-10 Thread Steve Brown
I've been beating my head against a wall all day and can't figure this one out. The code below worked perfectly in PHP5.2.4. However, I recently upgraded to PHP5.3.0 and this code no longer works. The function below accepts the path to a text file containing headers from a cUrl session (example

Re: [PHP] isset not functioning

2009-08-03 Thread Steve Brown
if(isset($_REQUEST['firstname']) !empty($RESULT['firstname'])) {  $name = $_REQUEST['firstname'];  } else {  $name = 'Sir or Madam'; } Can anyone see any problems with the code? Your conditional will never evaluate to true. What is $RESULT? Where did it come from? $RESULT is not a

[PHP] http://go-pear.org?

2007-10-04 Thread Steve Brown
I'm trying to install Pear on OSX, but http://go-pear.org/ doesn't seem to be resolving. Pear manual states I should: curl http://go-pear.org/ | php but this fails and dig go-pear.org reveals that the name does not resolve. Is there a package somewehre I can download and install? -- PHP

[PHP] Questions about overloading and visibility in PHP5

2007-09-18 Thread Steve Brown
I've been doing a bunch of reading about objects and overloading in PHP5, but I've got a couple of questions that I can't seem to find the answer to online. Suppose the following code in PHP5.2.4: ?php class foo { public $x; private $z = 'z'; public function __set

[PHP] PHP4 vs PHP5 Performance?

2007-08-24 Thread Steve Brown
Recently, I've been doing a lot of benchmarking with Apache to compare different OSes and platforms. I did a stock install of Ubuntu 7.04 Server w/ Apache2 and PHP5. To do the test, I used ab to fetch the following document: html head titlePHP Web Server Test/title /head body ?php phpinfo(); ?

Re: [PHP] Printing library in PHP ?

2006-03-14 Thread Steve Brown
I am currently migrating an application originally written with Delphi to PHP. Everything is going fine except the printing of the reports that does not produce the same visual result (i.e does not look the same or has some aligmment issues). We generate all of our printed reports using FPDF

Re: [PHP] [HS] IDE PHP on Linux...

2006-02-13 Thread Steve Brown
Finally, I discovered that I need to have PHP and Apache on my computer in order than Eclipse may give me auto-complete... No you don't. Eclipse does code completion out-of-the-box w/out installing additional software. Check your Preferences. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] building php, using mysql for apache2

2005-06-01 Thread Steve Brown
trying to build php4 with mysql4.1-12, for use in apache2. i have the following ./compile that works for php5. however, when i try to use it for php4, i get a msg, stating that it can't find the MySQL Headers... From http://us3.php.net/manual/en/ref.mysql.php: === For compiling, simply use

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
Food:Fruit:Red Food:Fruit:Green Food:Fruit:Yellow Food:Vegetables:Long Food:Vegetables:Round Food:Vegetables:Round:Spikey Food:Vegetables:Round:Smooth How is your structure being built? Is it hard-coded or dynamic (e.g. pulled from a DB)? We employ a similar tree structure for manging

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
On 5/27/05, Chris W. Parker [EMAIL PROTECTED] wrote: Let's say you're entering a new product, you'd want to see a list of all the available categories, not just the last node of a branch. Not neccesarily; it depends on how big your tree structure is. If you only have 10 categories where an

Re: [PHP] Recursion: Ugh!

2005-05-27 Thread Steve Brown
** email gagging, sorry if this is a DP ** On 5/27/05, Chris W. Parker [EMAIL PROTECTED] wrote: Let's say you're entering a new product, you'd want to see a list of all the available categories, not just the last node of a branch. Not neccesarily; it depends on how big your tree structure is.

Re: [PHP] Dynamic Generating reports to print

2005-04-23 Thread Steve Brown
My plan is move away from the current solution but I am still confused of how am I going to get control of the layout of the report. Generate a PDF ? Use CSS ? Some of the trick parts are, for instance, to have the same header in all pages of the same report, if I have tabular data greater

[PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Steve Brown
I'm working on a script that will parse through a long string using regexs to pattern match a certain format. I'm having an issue with a '?' in a string being picked up as an end-of-code character, but only if the line before it is commented out. If the line before is NOT commented out, PHP

Re: [PHP] String parsing issue in PHP 4.3.10?

2004-12-21 Thread Steve Brown
Quote: The one-line comment styles actually only comment to the end of the line or the current block of PHP code, whichever comes first. This means that HTML code after // ? WILL be printed: ? skips out of the PHP mode and returns to HTML mode, and // cannot influence that. If asp_tags

Re: [PHP] php editor or php IDE for linux with autocompletion

2004-11-30 Thread Steve Brown
Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). I use the PHPEclipse add on for the Eclipse IDE. Eclipse provides a fantastic suite of tools for coding in almost any language. The PHPEclipse add-ons

Re: [PHP] SOAP w/PHP 4

2004-10-29 Thread Steve Brown
Does PHP 4 support SOAP, or does something have to be added to it?? We use the NuSOAP package in our SOAP apps: http://dietrich.ganx4.com/nusoap/index.php We had to use the latest CVS version of NuSOAP to get all of our apps working correctly, NOT the current Stable version however. -- PHP

Re: [PHP] Virtual Host problem

2004-09-23 Thread Steve Brown
Someone correct me if I am wrong, but haven't you just confused the hell out of Apache? You have just declared three virtual hosts, all listening on port 80, but apache has no way to identify them based on the incoming packets. You need to add a ServerName directive to each virtual host

Re: [PHP] mysql_connect does not connect

2004-09-20 Thread Steve Brown
I definitely mind. I don't believe in rewarding bad behavior. It is reasonable to contribute to the productive development of solutions, but the attitude in this group is not productive. I have the impression that the real reason you want answers is so that you can continue in unproductive

Re: [PHP] mysql_connect does not connect

2004-09-17 Thread Steve Brown
snip lots of garbage OK, I'm going to jump in and try and take a stab at this. Sam, if you wouldn't mind answering a question: are you still unable to connect to your mysql server? I'll also add that your understanding of firwalls is lacking. Regardless of where your server is (local or

Re: [PHP] sorting multidimensional array by a second level value

2004-09-17 Thread Steve Brown
I'd like to sort the array based on one of the values in the field href, description, or time. Is there a canonical way of doing this? Probably easiest to write your own sort function the use usort(), http://www.php.net/usort has pretty good documentation on how to accomplish this. Steve --

Re: [PHP] reading from files

2004-09-17 Thread Steve Brown
I am wondering how to read lines from a file to a php array? I would like to integrate a logfile into a html site. Is it possible to read line by line and to check how many lines there are in total? I'm new here, so someone please tell me if RTFM is frowned upon as a response. :)

Re: [PHP] Intermittent Seg Fault with PHP4.3.8 + FTP

2004-09-08 Thread Steve Brown
OK. Sounds like a genuine segfault to me. The CLI version will simply print Segmentation fault to the screen or Segmentation fault (core dumped) when configured with debugging enabled. Thanks for the help Jim. I had to install gdb and recompile php, but I was able to get consistant backtraces

Re: [PHP] Intermittent Seg Fault with PHP4.3.8 + FTP

2004-09-08 Thread Steve Brown
...and just for clarification... after re-reading my response to you it came to my attention that one might assume I'm somehow involved with PHP development. You mean you won't be the person fixing this bug?? Man, I'm screwed now! j/k ;-) No worries! -- PHP General Mailing List

[PHP] Intermittent Seg Fault with PHP4.3.8 + FTP

2004-09-07 Thread Steve Brown
I'm using PHP to write some backup scripts. One of the scripts uses PHP to connect via FTP to a server, download some scripts and tar them up. I'm getting intermittent segmentation faults with this script, and I'm not sure what to report to troubleshoot this. Can someone tell me what would be

Re: [PHP] Intermittent Seg Fault with PHP4.3.8 + FTP

2004-09-07 Thread Steve Brown
1) Environment a) OS b) PHP Version c) CLI or web-based d) Are you running php as an apache module? I'm runnning PHP 4.3.8 in CLI on Redhat 9 in this particular case. PHP compiled with --enable-ftp (among other things). PHP is installed as an Apache2 module, but (obviously