[PHP] Cookie problem

2006-01-14 Thread Al
Can't get a cookie to set. Below is the code near the file top BEFORE any html output. $_POST['prefs'] comes from a hidden field in the middle of the html output. $_POST['filter'] comes from a select option. A Submit button closes the page and refreshes it. print_r($_POST) shows $_POST['prefs

[PHP] Re: array of checkbox values

2006-01-11 Thread Al
Sjef Janssen wrote: Hallo, I have a form with a number of checkboxes grouped together. The value of these boxes is stored in an array: $used[]. Now I found that the value of checked boxes (value = 'Y') are stored in the array while non checked boxes are not stored at all. This makes the array inc

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Al
Chris Lott wrote: What I have is a form with 45 data fields... if any of a selected 35 of those fields is empty, I want to have the user go back. So I can't loop over the entire _POST array. So I thought I would put the names of the fields I *do* want to check into an array and check. So this wo

Re: [PHP] Dynamic Array Index using Variable

2006-01-09 Thread Al
Jim Moseby wrote: I want to do something like this to check if a variety of submitted form fields (crn, instructor, etc) have any value in them: $reqfields = array('crn', 'instructor'); $errorflag = 0; foreach ($reqfields as $field) { if ($_REQUEST[$field] == '') { $erro

[PHP] Re: Set variable outside of scope (redo)

2006-01-05 Thread Al
Mike Tuller wrote: Excuse the last post, I didn't have all the code it there. I have a table listing items in a database, and have a delete button next to each item, and I want to be able to click on the delete and delete only that record in the database and then reload the page where it would d

Re: [PHP] help register domain name

2006-01-05 Thread Al
John Nichel wrote: n.g. wrote: hi, i want to register a domain name through NetworkSolutions.com, but it require a credit card which i dont have to pay the bill. if you have a credit card, i can transfer to your account, and then you please regiter the domain using my info. or if you have any

[PHP] Re: Setting cookie for two domains.

2006-01-05 Thread Al
Shafiq Rehman wrote: Hi, How can I register a session or cookie for two domains. I want to maintain logged user's state when he goes from one domain to other domain. Example Suppose a user is logged in on domain1.com. A cookie is set and user is authenticated from database on the basis of that

Re: [PHP] manipulating constant name as string

2006-01-02 Thread Al
Tom Rogers wrote: Hi, Monday, January 2, 2006, 4:37:17 AM, you wrote: DG> Hello DG> I am trying to access the constant name as string and not the constant DG> contents. For example, DG> define('myconst', 'const text 1'); DG> $myArray = array() DG> myArray['myconst'] = "this is it" DG> etc.

Re: [PHP] Which is faster, a MySQL access, or a set of PHPvariables?

2006-01-02 Thread Al
Dave M G wrote: Thank you for the advice. The point was raised, and it's a good one, that if I'm getting content from the database for most pages, then attaining the necessary translations probably won't make a difference. And of course, it is true that at my current level

[PHP] Re: php / JS / DOM question

2005-12-29 Thread Al
jonathan wrote: I know that this is more of a Javascript / DOM question but I cannot for the life of me figure this out: I have this form: When the user clicks on the button, I want the text that is in input elment 'q' to be sent to the Javascript function drawImg but when I debug i

[PHP] Re: PhP

2005-12-27 Thread Al
James Lumb wrote: Hi, Does anyway know whether there is a PHP function which creates a new file? i know there is fwrite, fopen etc but is there any way of creating a new file? Thanks, James _ Are you using the latest version of M

[PHP] Re: RegEx drop everything after last pattern

2005-12-23 Thread Al
John Nichel wrote: Okay, maybe it's just the fact that I'm concentration on getting out of here for the holidays more than I am on my work, but I'm pulling my hair out. Say I have a string - Now, is the time; for all good men! to come to the aide? of their What I want to do is drop everythin

Re: [PHP] Re: Filtering URLs problem..

2005-12-23 Thread Al
Jochem Maas wrote: ... Jochem's correct. I was in too big a hurry trying to help. It was you don't mind if I forward that to my girlfriend? ;-) (the bit about me being correct) obvious that Anders was not getting much useful help. His points 3 and 4 the lack of help is due to the

Re: [PHP] Re: Filtering URLs problem..

2005-12-23 Thread Al
Jochem Maas wrote: Al wrote: I didn't fully test this; but it should get you started. fully? more like not at all. point 1: "%.+%i"; ^-- double quotes are not escaped == parse error point 2: "%.+%i"; ^-- this will inject the strin

[PHP] Re: PHP is OK in IE but not in Netscape

2005-12-22 Thread Al
You do not have a legitimate HTML page. Back to the books first. Always validate here http://validator.w3.org/ If a page validates, it will run on about browser except NS4x and IE5x Nanu Kalmanovitz wrote: Hi The http://www.kalmanovitz.co.il/hello.php file appears OK in M$-IE but not in

[PHP] Re: Filtering URLs problem..

2005-12-22 Thread Al
I didn't fully test this; but it should get you started. $types= array('http', 'ftp', 'https', 'mms', 'irc'); $pattern= "%.+%i"; // the "i" makes it non case sensitive if(preg_match($pattern, $URL_str, $match)){ $URL= match[1]; } else{ User did not enter a complete link; do

Re: [PHP] i18n maybe?

2005-12-16 Thread Al
Jochem's right about this. I've just encountered problems trying to utf-8_decode strings. I now just make certain everying is set for utf-8, from webpage on. So far, no problems with this approach. Al... Jochem Maas wrote: hi Richard, what charset is your DB set to use? wh

Re: [PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
"; ?> The result of the echo is "four". Doing the same above with the [] after new_array returns the right result, a new array.(outputs Array). So what exactly where you saying 'Taint so' Al? I'm confused since Jochem's email about how to properly copy an ar

Re: [PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
Jochem Maas wrote: Al wrote: However For loops: $new_array= array(); foreach($old array as $value){ $new_array= $value: } Otherwise, all you'll get it the last assignment of $new_array as a variable, not an array. which is exactly what you get if yuou run the code above -

[PHP] Re: Declaring arrays? Good practice?

2005-12-14 Thread Al
s, if the expression is a bit fancy in the loop and you are using $keys, it is easy to make a mistake. Al.. Michael Hulse wrote: Sorry if this question sounds noobish: $foo = array(); // Declare first, good practice. $foo = array('one', 'two', 'three'); Us

Re: FW: [PHP] IE6 not returning POST data from a textarea

2005-12-13 Thread Al
Jay Blanchard wrote: [snip] Everyone keeps asking it. Of course it's named or Mozzilla wouldn't work. [/snip] You can insert a textarea into a page without a name and mozilla will work. If the textarea is named have you tried this echo $_POST['textareaName']; This thread was broken. No

[PHP] Re: IE6 not returning POST data from a textarea

2005-12-12 Thread Al
Al wrote: Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks For those interested, here is the answer... Text pasted into a textarea [e.g., from Word] can

Re: [PHP] IE6 not returning POST data from a textarea

2005-12-12 Thread Al
tomasz abramowicz wrote: Al wrote: Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks post your code. ie6 not returning post values from textarea fields

[PHP] IE6 not returning POST data from a textarea

2005-12-12 Thread Al
Anyone know to get IE6 to return POST data from a textarea when the text is pasted in? Works fine for Mozilla, etc. print_r($_POST) shows several and values just fine. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: What software do you use for writing PHP?

2005-12-06 Thread Al
Jeff McKeon wrote: Hey all, Forever now I've been using Frontpage for all my web work including php. I'm sure there's better software out there that is more suited to writing and editing PHP pages. What do you all use? Thanks, Jeff http://www.waterproof.fr/products/PHPEdit/ -- PHP General

[PHP] Re: Count and Preg_Replace Using Version 4.4.1

2005-12-05 Thread Al
Shaun wrote: Hi, The following code matches all occurences of tags within an html page and wraps form tags around it: echo preg_replace( '/]*>(.*?)<\/p>/ms', 'action="'.$CFG->edit_pages_adm.'/index.php?action=edit_paragraph" method="post"> $1 ', file_get_conte

Re: [PHP] What is

2005-11-25 Thread Al Hafoudh
Its same as or Wolf wrote: I have some scripts that I downloaded and am trying to make compliant with my server. They have -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Regex for balanced brackets?

2005-11-22 Thread Al
Jeffrey Sambells wrote: I came across this method of matching brackets with regex in .NET http://puzzleware.net/blogs/archive/2005/08/13/22.aspx but I am wondering if it is possible to do the same in PHP? I've tried it a bit but I can't seem to get it to work properly. I'm just wondering if

[PHP] Re: better way to mix html and php code?

2005-11-16 Thread Al
[EMAIL PROTECTED] wrote: Hi to all, always wondered what's better way to mix html and php code. Here are three "ways" of the same code. Which one you prefer? (And why, of caurse :)) Solution 1: ec

[PHP] Re: regex and global vars problem

2005-10-27 Thread Al
Jason Gerfen wrote: I am having a problem with a couple of function I have written to check for a type of string, attempt to fix it and pass it back to the main function. Any help is appreciated. if( ( eregi( "^[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[

[PHP] Re: Strange array access problem

2005-10-27 Thread Al
Ken Tozier wrote: I'm having a major problem with what seems, on it's face, to be a really basic array function. What happens is on the browser end, I've written some javascript code that packages up javascript variables in native PHP format and sends the packed variables to a PHP script o

[PHP] Re: cURL to re-post form iinformation

2005-10-25 Thread Al
Jay Blanchard wrote: Howdy all, I am trying a new technique, for me, when processing a form. The form is filled out and submitted, during processing it is determined that there is an error with the posted data...such as a blank or mismatched password, I want to return the form with the data fill

[PHP] Re: selected index

2005-10-25 Thread Al
Ross wrote: Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris" I want to do the find out the index of the $selected_person in the $people array. Is there a function that can do this?? ta, Ross It appears you are learning php. I

[PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-24 Thread Al
Shaun wrote: Hi, I am trying to create a regular expression for a width of a room, the value can be a whole integer (up to 999) with up to 2 decimal places -when it is stored in the database mysql will pad the value accordingly. /^[0-9]{1,3}.?[0-9]{0,2}?$/ The only problem I have found with

Re: [PHP] RegEx - Is this right?

2005-10-15 Thread Al Hafoudh
yes, it is equal, but i'd rather use file() function Gustav Wiberg wrote: Hi there! I want to get conents of a file and split into a array... $s = file_get_contents($fileName); $splitS = preg_split("/\n/",$s); Is this equal to using $splitS = file($fileName) ? /G http://www.varupirat

[PHP] Re: Store a variable name in a database field.

2005-10-13 Thread Al
Liam Delahunty wrote: I'm sure this is a pretty basic question, but I have searched for a decent answer and can't find one. I have a client that want to be able to write newsletters (newsleters_tbl.email_body) and use fields from his contact table, so as we grind through the contact list for new

Re: [PHP] Mystery about chmod and permissions

2005-10-09 Thread Al
"Directory permissions for $dirname: ". substr(sprintf('%o', fileperms($dirname)), -3). " //reports 0755; Give that a try - Jeff -Original Message- From: Al [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 3:50 PM To: php-general@lists.php.net Subject:

[PHP] Mystery about chmod and permissions

2005-10-09 Thread Al
I've got a script that checks a directory's permissions for 757 and if they are not correct, chmods them with a cgi script. That part works just fine. Can alternately switch the permissions from 755 to 757 and back. I can use a ftp utility to check the permissions and they are correct. The m

[PHP] ICQ

2005-10-08 Thread Al Hafoudh
is it possible to connect to icq, send messages and etc? thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] cgi chmod problem

2005-09-25 Thread Al
Mikey wrote: Al wrote: I've got a php script that checks certain file permissions and if not OK for writing, chmods as required. I can use ftp_site(); but, prefer not to because the code is not readily transportable. Requires ftp login. I'd like a simple cgi file that can be ca

[PHP] cgi chmod problem

2005-09-25 Thread Al
I've got a php script that checks certain file permissions and if not OK for writing, chmods as required. I can use ftp_site(); but, prefer not to because the code is not readily transportable. Requires ftp login. I'd like a simple cgi file that can be called by my script as needed. My cgi f

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Jasper Bryant-Greene wrote: Al wrote: I'd use this. It's simple and doesn't involve CURL. Here is a brief outline. $file_str= base64encode(serialize($_GET)); //$_GET can be any array Any reason why you base64_encode here? fwrite is binary-safe so base64 encoding your d

[PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Al
Graham Anderson wrote: I am using GET to send variables from one php script to another php script How would I POST the same variables ? This is the php script I am sending GET variables to... $movieBuilder = "./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov"; I am placing $mo

Re: [PHP] ftp_site problem

2005-09-23 Thread Al
[EMAIL PROTECTED] wrote: try: if(ftp_site($conn_id, "SITE chmod 0777 /public_html/EditPage/cd_ef_W.txt")) echo 'successful'; else 'failed'; it works for me Crom - Original Message - From: "Al" <[EMAIL PROTECTED]> To: Sent: Thur

[PHP] ftp_site problem

2005-09-22 Thread Al
I can't get ftp_site() to chmod a file. WS_FTP utility changes them OK. I can connect and log-in via ftp OK Then I send if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt")) echo 'successful'; else 'failed'; And get "successful" OK But, the file's permissions don't change.

[PHP] Re: email validation (no regex)

2005-09-21 Thread Al
Jim Moseby wrote: I threw together this totally untested and unreliable code to solicit comments on whether or not this is a good way to validate emails. Consider the following: function validate_email($email){ if (str_word_count($email,'@')!=1){return('Not a proper email address');} $par

[PHP] Re: Unserialize Errors

2005-09-19 Thread Al
James Thomas Richardson wrote: Hello all, I'm curious to know if there are stability issues with the un/serialize functions. I've my code, I serialize a multidimensional array to disk and when I read it in later, 20% of the time I get errors like: Notice: unserialize(): Error at offset 2137774

[PHP] Re: headers .vs javascript location.href

2005-09-19 Thread Al
bruce wrote: hi.. need to talk to someone to figure out how/what i need to do to use the php 'headers' function, as opposed to the javascript 'location.href'. i've tried to implement the buffering functions, but still get the same error... is there someone that i can talk to about this, who ha

Re: [PHP] Modifying data in forms with values

2005-09-13 Thread Al
Murray @ PlanetThoughtful wrote: I have to create registration forms all the time for people in the office and what I keep running into is that I need a way for when they edit a field that the drop-down list of choices is automatically set for the right now. I have 100+ counties in one list, but

[PHP] Re: FTP Chmod problem

2005-09-06 Thread Al
Matt Palermo wrote: Hello everyone. I have a script where I am using FTP functions to chmod files/folders. I'm running into a problem with the ftp_chmod() function when trying to change the permissions of a directory. Here is the code I'm using: ftp_chmod($connId, 0777, $folder); The func

[PHP] Re: Protecing files

2005-08-30 Thread Al
Thomas wrote: Hi there, How can I protect all files with extension .xml from being accessed by the outside? For Apache can one use .htaccess (if yes, how?), is there a generic way of keeping stalkers from viewing your config files? Thomas SPIRAL EYE STUDIOS P.O. Box 37907, Faerie Glen

[PHP] Re: regular expression for time

2005-08-29 Thread Al
babu wrote: HI, how can i write regular expression for time in 24-hour format i:e, HH:MM:SS. using preg_match. thanks babu - How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos Yo

[PHP] Re: strip out too many newlines

2005-08-04 Thread Al
Sebastian wrote: im working on a comment/forum app and when a user enters too many carriage returns i want to remove them before insert to db. example, user input: -snip- [quote=user] foo [/quote] more text... -snip- I to change to: [quote=user]foo[/quote] more text...

Re: [PHP] Re: Using File to count number of lines

2005-08-04 Thread Al
line. You either have to replace all line feeds with carriage return and then line feed, or read it in and parse it. Brandon On 8/4/05, Al <[EMAIL PROTECTED]> wrote: Tom Chubb wrote: I'm having a problem with the following code: http://www.mysite.co.uk/mailing_list_database.lis

[PHP] Re: Using File to count number of lines

2005-08-04 Thread Al
Tom Chubb wrote: I'm having a problem with the following code: $file = "http://www.mysite.co.uk/mailing_list_database.list";; $lines = count(file($file)); echo "$lines "; ?> I'm trying to show the number of subscribers to my visitors from a text file, but it returns a value of 1 when it sh

Re: [PHP] FAQ: replace first instance (couldn't find in archive)

2005-07-28 Thread Al
Dotan Cohen wrote: On 7/28/05, Jochem Maas <[EMAIL PROTECTED]> wrote: Dotan, now _I'm_ sending _you_ multiple copies (last one didn't go to the list by mistake!) php -r ' echo preg_replace("#the#","a","Then the big bear ate the little cat in the north of the woods.",1), "\n"; ' Wow! It wa

[PHP] Re: application-wide shared data/object

2005-07-28 Thread Al
Aiguo Fei wrote: In ASP.Net there is the concept of "application" which is a virtual directory on a Web server. An application can have application-wide shared data/objects, which can be accessed by any script of that application (i.e., scripts under the virtual directory). I have gone through se

[PHP] A directory permissions question

2005-07-25 Thread Al
I'm on virtual-host server and have been following a rule of making certain all directories on the root have permissions set to 755. This is the default when creating new directories with ftp, etc. Occasionally, I need directories with 757 and have always made certain they were not on the root

[PHP] A strategy question about using mySQL for saving flat-file stings?

2005-07-25 Thread Al
I've been creating a number of CM applications for a virtual-host website. One feature, of several applications, allows the editor [one of our people] to create simple text files. I've been using simple flat-files in a directory for saving the files. I've gotten tried of dealing with directory

[PHP] Re: Trimming Text

2005-07-17 Thread Al
Al wrote: André Medeiros wrote: Greetings. I am trying to trim some text containing HTML tags. What I want to do is to trim the text without trimming the tags or html entities like   and such, wich completelly break the design. Has anyone succeded on doing such a thing? phpclasses.org won&#

[PHP] Re: Trimming Text

2005-07-16 Thread Al
André Medeiros wrote: Greetings. I am trying to trim some text containing HTML tags. What I want to do is to trim the text without trimming the tags or html entities like   and such, wich completelly break the design. Has anyone succeded on doing such a thing? phpclasses.org won't help :( Than

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
Steve Buehler wrote: At 02:13 PM 7/11/2005, you wrote: Philip Hallstrom wrote: Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a simple text file. [e.g., directory

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
Philip Hallstrom wrote: The key word is "directory" chmod only works for files PHP5 has a ftp_chmod; but not 4.3.x It works on directories for me... % php -v PHP 4.3.4 (cli) (built: Jul 19 2004 14:52:27) Copyright (c) 1997-2003 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2003 Zen

Re: [PHP] Changing directory permissions???

2005-07-11 Thread Al
The key word is "directory" chmod only works for files PHP5 has a ftp_chmod; but not 4.3.x Philip Hallstrom wrote: Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a

[PHP] Changing directory permissions???

2005-07-11 Thread Al
Is there a way to change directory permissions with pre php5.0? Linux/Apache I'm designing a CM application and would like my code to enable non-techies to be able to create a simple text file. [e.g., directory temporarilly from 755 to 757 and then back again.] PHP5.0 has a chmod; but not, 4.3

[PHP] Re: text areas and line brakes

2005-06-23 Thread Al
Sunny Boy wrote: if someone writes something in a text box, how would I convert a line break in the text area to echo a ? I think i'll have to get the \n and convert it. can anyone tell me? Thanks. sunny I use a technique similar to Lynch's $value= preg_replace("/(\r\n|\r|\n)/", "\n", $va

[PHP] Re: Apache Webserver User Survey

2005-06-21 Thread Al
Why bother. http://news.netcraft.com/archives/web_server_survey.html Ian Holsman wrote: Hi. I am conducting a survey about what users want out of a webserver and how the Apache webserver ranks as far as fulfilling those needs. In order to get a better understanding of it, I thought I would a

[PHP] Re: resetting arrays

2005-06-21 Thread Al
in general, you should use "0" as your first key, not 1. It'll save trouble. array_values() will index from 0 $pos= 0; unset($ses_basket_items[$pos]) //will remove the first item. I. Gray wrote: Thanks Al, That's done it! unset($ses_basket_items[$pos]

[PHP] Re: resetting arrays

2005-06-21 Thread Al
I. Gray wrote: Hi. I am sure this is easy, but I can't get this work. Is there not a php function that can do this? I have an array- for example... [1] => Yellow [2] => Green [3] => Purple [4] => Blue [5] => Red [6] => Orange [7] => Cyan What happens, say if I delete [3] => Purple? I get..

[PHP] Re: Regex help

2005-06-06 Thread Al
RaTT wrote: Hi Guys, I am currently creating a once off text parser for a rather large document that i need to strip out bits of information on certain lines. The line looks something like : "Adress line here, postcode, country Tel: +27 112233665 Fax: 221145221 Website: http://www.urlhere.co

Re: [PHP] regex question

2005-05-17 Thread Al
Murry's solution here is ideal since it only captures the single occurrence. Since I want to use it for a preg_replace(), it is perfect. A couple of folks sent this pattern [EMAIL PROTECTED]@[EMAIL PROTECTED]; but, it doesn't work because I then have to remove the unwanted caracters on either si

[PHP] regex question

2005-05-16 Thread Al
What pattern can I use to match ONLY single occurrences of a character in a string. e.g., "Some text @ and some mo@@re and [EMAIL PROTECTED], etc @@@. I only want the two occurrences with a single occurrence of "@". @{1} doesn't work; there are 4 matches. Thanks -- PHP General Mailing List (ht

[PHP] Re: Matching Number of Times a Word Occurs...

2005-04-19 Thread Al
Russell P Jones wrote: Im trying to count the number of times a word occurs in a string - is the only way to do this preg_match_all? Russ Jones No, there are hundreds of other ways; but, preg_match_all() is probably the easiest. $number= preg_match_all("%$word%sm", $string, $matches); -- PHP Gen

[PHP] Re: strtotime() bug?

2005-04-04 Thread Al
Al wrote: Suddenly my strtotime() are goofy, anyone have any ideas? echo date('Y/m/d/H', time()). "";//2005/04/04/18 echo date('Y/m/d/H', strtotime("-1 day")). ""; //2005/04/03/18 echo date('Y/m/d/H', strtotim

[PHP] strtotime() bug?

2005-04-04 Thread Al
Suddenly my strtotime() are goofy, anyone have any ideas? echo date('Y/m/d/H', time()). ""; //2005/04/04/18 echo date('Y/m/d/H', strtotime("-1 day")). ""; //2005/04/03/18 echo date('Y/m/d/H', strtotime("last Sunday")). ""; //2005/04/02/23

RE: [PHP] FreeBSD php upgrade oddity - can't load dynamic librari es [RESOLVED]

2005-03-17 Thread Al Arzaga
For the sake of someone who may benefit from this info: I resolved this by removing the file /usr/local/etc/php/extensions.ini and then reinstalling the php5 base and then reinstalling php5-extensions -Original Message- From: Al Arzaga Sent: Wednesday, March 16, 2005 10:34 PM To: php

[PHP] FreeBSD php upgrade oddity - can't load dynamic libraries

2005-03-16 Thread Al Arzaga
ml.so" in Unknown on line 0 PHP 5.0.3 (cli) (built: Mar 16 2005 20:27:24) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies [kungpao:~]$ I've tried re-installing just the base install without any php configurations but to no avail. Can a

[PHP] session.use_trans_sid Question

2005-03-16 Thread Al
What are the pros and cons of session.use_trans_sid ON and OFF Just moved our site from one which had the php.ini, session.use_trans_sid=OFF to one with it ON Sure looks ugly having the PHPSESSID showing up for visitors. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Directory and file permissions on a virtual host

2005-03-14 Thread Al
Would some please provide me some simple rules for dealing with php scripts to fopen(), copy() and move_uploaded_file(). Environment is Linux, Apache on a virtual host I've spent a lot of time goggling, etc. and can find lot's of explanations for owner, group and world. They sound great; but do

[PHP] orphan functions, how can I find them?

2005-03-09 Thread Al
I'm cleaning up some old php scripts and find I'm creating some orphans. Anyone know of a tool, or a simple way, to identify all the unused functions in a script's functions include file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
Tom Rogers wrote: Hi, Thursday, March 3, 2005, 5:21:58 AM, you wrote: A> I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path A> for includes, etc. A> We just moved the site to a new virtual host and it doesn't work. print_r() A> gives me: $_SERVER['document_root']= /usr/

[PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path for includes, etc. We just moved the site to a new virtual host and it doesn't work. print_r() gives me: $_SERVER['document_root']= /usr/local/apache/htdocs $_SERVER['path_translated']= /home/user/public_html/ What d

[PHP] Re: FOPEN

2005-02-19 Thread Al
Diana Castillo wrote: How can I read the contents of a web page that uses basic authentication? I want to use fopen() but dont know how to do this and also send the username and password If the webpage is your script and it is going to check the authentication stuff, then simply use GET argu

[PHP] How can I read the output from a local php file [fopen()]?

2005-02-11 Thread Al
I have a script that needs to read the output, not the file itself, from a local php file using its absolute address. Normally I'd simply use $handle= fopen(http://www.whatever.com, 'rb') However, the webhost [Powweb] just changed their system to use "load balancing" servers. Now, my script mu

Re: [PHP] Re: stream_set_timeout() stream_get_meta_data() etc...

2005-02-09 Thread Al
tter. Seems as if fread() needs a little time after fopen(). ob_flush() is neat. It forces the client browser to render progress. I've always been told you can't make a progress bar or list with php. Well here it is, at least it works with IE6 and Mozilla. Skippy wrote

Re: [PHP] stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
Richard Lynch wrote: Al wrote: How can I detect that a remote server is hung up on transmitting a http page and gracefully handle it? The connect is made OK, all I want to do is to make certain that I receive the data stream in a given amount of time. For example, if the remote server is

[PHP] Re: stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
] {do something}; It appears to me there is a basic logic problem. The script must get past the fread() function before it gets to the stream_get_meta_data($fp). But, it hangs up on fread() and the script times out. Al Al wrote: How can I detect that a remote server is hung up on tran

[PHP] stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
e ref I found said there is no way to do this. Anyone have a suggestion? Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
x27;s fine and I have all errors on and nothing unusual shows up. php version is 4.3.10 Richard Lynch wrote: Al wrote: Hi Richard, thanks for the help. Note I have the timeout set for 1 microsec, have tried several values, eg, 100ms, 1 sec, etc. I even used a 4mb file and it did no

Re: [PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
nch wrote: Al wrote: Anyone see why stream_set_timeout() / socket_get_status() don't work? Perhaps you should explain what you think isn't working... Cuz it sure looks good to me... $fp= fopen($URL_full, 'r'); stream_set_timeout($fp, 0, 1); tried other values for microseconds

[PHP] stream_set_timeout() mystery

2005-02-01 Thread Al
Anyone see why stream_set_timeout() / socket_get_status() don't work? $fp= fopen($URL_full, 'r'); stream_set_timeout($fp, 0, 1); tried other values for microseconds $procque_str= fread($fp, 8096); print_r(socket_get_status($fp)) ; Print_r is: Array ( [wrapper_data] => Array

Re: [PHP] fopen, fsockopen on my virtual host

2005-02-01 Thread Al
Richard Lynch wrote: Al wrote: Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What?

Re: [PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
Richard Lynch wrote: Al wrote: I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. Can you define "no longer works" a bit more clearly... Error messages? Just times out? What?

[PHP] fopen, fsockopen on my virtual host

2005-01-31 Thread Al
I've got a script that fetches a stream from a file on our virtual host. Its been working fine; but, yesterday they changed something and it no longer works. $fp= fsockopen("www.oursite.org", 80, $errno, $errstr, 30); I can use any remote site and fscockopen works fine. Anyone have a suggestion a

Re: [PHP] Multiple jobs in crontab

2005-01-28 Thread Al
Richard Lynch wrote: Al wrote: I'm trying to run 3 jobs in a crontab and only one job will run. I can rearrange the order and only the first one runs. Try setting the MAILTO and check the output -- Perhaps that will tell you something useful... Super suggestion. It clearly showed I

[PHP] Multiple jobs in crontab

2005-01-28 Thread Al
I'm trying to run 3 jobs in a crontab and only one job will run. I can rearrange the order and only the first one runs. Here is my code, the command line may show wrapped, but it is not: #phpList PQ This job replaces its log and error files. Runs at 3:03am, 3:18, etc. 3,18,33,48 0 * * * /usr/lo

[PHP] Need best way to determine if cronjob or external browser called my script

2005-01-19 Thread Al
I'm working on a script that can be initiated by a cronjob or from a browser. I want the script to act differently depending on which one called it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: question about a cron job

2005-01-17 Thread Al
Al wrote: I've got a question about the following cronjob. #At 3:01 our time, run backups 1 0 * * * /usr/local/bin/php /www/r/rester/htdocs/auto_backup/back_em_up.php >/www/r/rester/htdocs/auto_backup/cron.log 2>&1 #At 3:02 clean up sessions folder 2 0 * * * (find /www/r/rester/

Re: [PHP] question about a cron job

2005-01-17 Thread Al
Michael Sims wrote: Erwin Kerk wrote: The CRON daemon only refreshes it's job list after a job in the current list is completed. Therefore, the CRON daemon won't notice the "every-minute" job until 3.01 pm. I'm not sure I understand what you're saying above. Can you provide a pointer to document

<    1   2   3   4   5   6   7   8   >