[PHP] Re: PHP Complex Data Structures

2005-05-17 Thread Jason Barnett
Zzapper wrote: Hi, I seem to remember that you access/use PHP data in the same/similar way to Perl data and that you can create complex data structures ie arrays of arrays, arrays of records etc. For once Google let me down so can any one point at any doc info. class A { } /** Initialize the arr

Re: [PHP] server taking long time to make graph

2005-05-18 Thread Jason Barnett
Balwant Singh wrote: Hi I am making graph in PHP using JPGRAPH. I am not taking big data, my data is only 48 points. Through TOP command in linux, I found that httpd is taking lot of time to make the simple x-y graph. I found that the graph size is 47.75kb only. May pls suggest if any set

Re: [PHP] hey dip shit

2005-05-18 Thread Jason Barnett
John Nichel wrote: Jason Motes wrote: HAH This list could really use an active moderator. Did Mr. Nichel just volunteer for that task... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Applications?

2005-05-18 Thread Jason Barnett
Evert | Rooftop wrote: Chris Shiflett wrote: Danny Brow wrote: > Zend sells a compiler to speed up your PHP code. Since it's compiled, > it also does not contain the source code in readable form. You should > visit the Zend website. Any free ones? http://pecl.php.net/package/APC APC won't work for

Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Jason Barnett
Brian V Bonini wrote: On Mon, 2005-05-16 at 22:10, Richard Lynch wrote: Let him fight with phpIniDir some other day. Something interesting maybe: http://gfx.gfx-design.com/session_test.php Hit your browsers refresh button. I would think SID is NOT supposed to change with every page refresh..?? Exc

Re: [PHP] Re: why are session only working with cookies?

2005-05-18 Thread Jason Barnett
Please keep questions regarding PHP problems on the list instead of in my inbox. Thanks. Brian V Bonini wrote: > On Wed, 2005-05-18 at 12:58, Jason Barnett wrote: > >>Brian V Bonini wrote: >> >>>On Mon, 2005-05-16 at 22:10, Richard Lynch wrote: >>> >&

[PHP] Re: gather reply from POST

2005-05-18 Thread Jason Barnett
Jeremy Reynolds wrote: I received this useful bit of code for storing a page into a variable instead of loading it as an include. But how can I modify this to submit some parameters to a page and collect the returned page / HTML into a variable?? Jeremy -- $text = file_get_content

Re: [PHP] Responses in my email.

2005-05-18 Thread Jason Barnett
Rory Browne wrote: This is primarly a mailing list. Not a news group. The whole idea of a mailing list is that you get every message mailed to you. I use this solely as a news group. The news group seems to lag the email responses a little, but not too badly. For those that are interested I use

[PHP] Re: array_diff odities

2005-05-19 Thread Jason Barnett
Pablo Gosse wrote: Howdy folks. I'm running into something strange with array_diff that I'm hoping someone can shed some light on. I have two tab-delimited text files, and need to find the lines in the first that are not in the second, and vice-versa. There are 794 records in the first, and 724 in

[PHP] Re: Forwarding to another PHP page

2004-04-09 Thread Jason Barnett
Ash.. wrote: Hello, Thanks John (Holmes) for the clue on form-param-reading. Simple one, but shows I got a lot of basics to learn yet. Here I have another doubt I cant resist asking help for. What are the various ways of forwarding to another page. I tried header().. based on an example I found

[PHP] Re: php 5 install

2004-04-12 Thread Jason Barnett
Andy B wrote: if i install php5 will it affect any of the php4.3.3 code that i have running at all...?? i want to install 5 and see what they have new going on and stuff but i dont want to crash my 4.3.3 running code any and where would i be able to read a list of stuff that is new in 5?? You _

[PHP] Re: commercial autoresponses (was "Re: [PHP] Wanted: ...")

2004-04-12 Thread Jason Barnett
David T-G wrote: Hi again, all -- ...and then David T-G said... % ... % Any recommendations? I was amazed to receive from this - an entirely-in-German post apparently wishing me a happy Easter - a note from Credit Suisse letting me know they'd process my request - a promise from Astral Se

[PHP] Re: How do you handle device detection?

2004-04-12 Thread Jason Barnett
Yep, I'd agree with the above comments. If you're interested in one solution, check out HAWHAW, it has a proxy server for detecting/serving web pages via regular browsers and mobile devices. I haven't tried it in a long time though, so it might need updating but can still show you an example

Re: [PHP] php language grammar

2004-04-20 Thread Jason Barnett
Huha wrote: hi everyone, i have to write work abaut "formal gramatic in language php". As i understand it is the way as compiler works. e.g. if i write "function", then php compiler looks for funcion name, then for "(" and so on.. Find out more about tokens/tokenizing and lexical scanner. http://w

[PHP] Re: redirection with PHP and closing windows?

2004-04-20 Thread Jason Barnett
Andre wrote: I want to be able to process a PHP script and then if successful redirect to another page. Is there a good way to do this with PHP or do I need to stick to Javascript? You should check out the header() function. http://www.php.net/header There are some common pitfalls with this, most

[PHP] Re: A question about PHP-MySQL'basic operation

2004-04-20 Thread Jason Barnett
Phplist wrote: > php-general,您好! > > I've a PHP-MySQL site now. > I've a empty database named 'dsx'. > I'd like to creat a table named 'test' and insert some data in order > to test the database can use now. > Can any one give me some code abou

[PHP] Re: mysql_connect

2004-04-20 Thread Jason Barnett
Lasse Motroen wrote: Help again please. Im trying to connect to MySQL server, using the PHP function: mysql_connect('localhost', 'someuser', 'somePword'); I run it, and what I get is: *Fatal error*: Call to undefined function: mysql_connect() It sounds like you don't have support for the MySQL fun

[PHP] Re: eval() question

2004-04-21 Thread Jason Barnett
Orangehairedboy wrote: I would like to use eval() to evaluate another PHP file and store the output of that file in a string. Personally, I try to avoid using eval(). It can be very useful, but there are also potential security issues depending on your setup. Based on what you said in another

[PHP] Re: SQL like processing on array of keyed arrays ?

2004-04-21 Thread Jason Barnett
Richard A. Devenezia wrote: Suppose I don't have access to a database server. I have any indexed array of like keyed arrays, essentially mimicing a database table. Are there any libraries or functions that I can use to 'query' the array in a SQL like manner ? e.g. $data = array (array(a=>1,b=>2,c

[PHP] Re: Problems with patterns

2004-04-21 Thread Jason Barnett
What kinds of phrases are you looking for? If you want to know whether an *exact* phrase is going to appear in a block of text, just use strstr() or strpos(), they tend to be faster than regexes anyway. http://www.php.net/strpos function valid_phrase ($phrase, $search = 'text to search for') {

[PHP] Re: objects in sessions again

2004-04-21 Thread Jason Barnett
[EMAIL PROTECTED] wrote: Hi there, needing some more advise, is this function correct ? function create_object($class_name,$dir = null, $serialize = null) { $dir ? $dir = $dir."/" : $dir = ""; require_once("".CLASS_PATH.$dir.$class_name.".php

[PHP] Re: includes and classes

2004-04-21 Thread Jason Barnett
Dubreuilmedia wrote: Hi I was wondering about includes and classes. I have a class in which depending on a member variable, i should load the proper include, which is really the proper config file for that moment. How does a member variable control this? E.g. you set the member variable in the

Re: [PHP] Re: objects in sessions again

2004-04-21 Thread Jason Barnett
Yes thats fine, there is a DB and auth and template class i instance globally, these are across pages aswell should i do the same ?? I dont wont to go overboard and slow the system down, I'd really want to make it scalable. These dont store any data as such though like the rest. The others i instan

[PHP] Re: SQL Hell

2004-04-21 Thread Jason Barnett
So far I've made multiple statements pulling out all the data and using PHP to formulate the information. But I know there is a better way using mysql. Only thing is I haven't got the faintest idea how to do it in one query and keep overheads low. I start to get lost when I'm doing select statement

[PHP] Re: Automatically send auth info

2004-05-12 Thread Jason Barnett
Motorpsychkill wrote: Hi all, Some of my webpages are no longer working with the IE browser after MS implemented some security patches which disable sending authentication info through the URL: http://user:[EMAIL PROTECTED] This no longer works with IE, but is fine with most other browsers. Doe

[PHP] Re: Error Passing Command in URL

2004-05-13 Thread Jason Barnett
We'll probably need source code to help you out with this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables Help

2004-05-13 Thread Jason Barnett
Is there any way to get JUST the user-defined variables in PHP? Problem with get_defined_vars() is that it contains everything, including server and environment vars, and there's no easy way to keep just the user-defined vars part of the array created by get_defined_vars. Monty Why not just unset t

[PHP] Re: PHPSESSID Being Stubbornly Persistent

2004-05-13 Thread Jason Barnett
Out of curiosity, how were you planning on passing session id's? Through POST variables? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variables Help

2004-05-13 Thread Jason Barnett
//bunch of PHP code... $current_vars = get_defined_vars(); $user_defined_vars = array_diff($current_vars,$starting_vars); ... ---John Holmes... Oh I like that... wish I would have suggested that one! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/u

Re: [PHP] variable-length arguments passed by reference... how?

2004-04-29 Thread Jason Barnett
A bit like this $num_args = func_num_args(); $arg_list = func_get_args(); $vars = 'function_to_call('; for ($i = 0; $i < $num_args; $i++) { $vars .= ($i > 0)? ',':''; $varname = 'variable'.$i; $$varname =& $arg_list[$i]; $vars .= "\$$varname"; } $vars .= ');'; //that leaves you with a stri

[PHP] Re: how to verify PHP has been installed with ldap?

2004-04-29 Thread Jason Barnett
So my question is how to verify PHP has been installed with ldap support? Thanks in advance for any help, Bing or, more specifically: $loaded = extension_loaded('ldap'); echo 'The ldap extension is ' . $loaded ? 'loaded' : 'not loaded'; ?> -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: call_user_func possible bug in PHP5Rc1 PHP5RC2, am I crazy?

2004-04-29 Thread Jason Barnett
In light of this statement and further testing in PHP4, I'm not sure if an object was being instantiated or not. It certainly didn't pipe up with an error. Unfortunately, no (http://www.php.net/call_user_func): "Object methods may also be invoked statically using this function by passing array

[PHP] Re: variable-length arguments passed by reference... how?

2004-04-29 Thread Jason Barnett
Aric Caley wrote: I want to create a function similar to the MySqli extensions' mysqli_stmt_bind_param() function. I assume that this function takes its arguments passed by reference. Now, I know how to do variable length argument lists in a function with func_get_arg(s) but how do I tell it

[PHP] Introduction to Reflections: describe.php

2004-04-29 Thread Jason Barnett
I'm getting off the computer, so I figured I'd go ahead and just send this to you. As my subject suggests, this class shows all of the Reflections_* classes at work. One warning though: describe.php cannot describe the Reflections API itself, this causes the server to crash. Enjoy. Jason ht

Re: [PHP] re-keying an array

2004-05-04 Thread Jason Barnett
Justin Patrin wrote: Richard Harb wrote: Uh, I was wrong... Foreach evaluates only once at initialisation... You can even unset the array once into the loop and it still works perfectly well (not that I recommend this as good practice or whatever, just did some checking to be sure :) Richard That

[PHP] Re: word to pdf via web server ??

2004-05-04 Thread Jason Barnett
John Doe wrote: hello, does any know how to conver microsoft word document to pdf via on the server using php language?? i try to implementing the feature that allow user to upload microsoft word document to the web server, after the upload, it automatic covert to pdf file ??? any one done that

[PHP] Re: Asking for data during a script

2004-05-04 Thread Jason Barnett
germán m. rivera wrote: Hi all! Let's say I have a PHP script that needs the user to input some data during its execution. At the point the data is needed the browser could be redirected to a new page with a form where the user could enter the data. But thus is necessary to save the script st

[PHP] Re: PHP & Apache Version

2004-05-04 Thread Jason Barnett
Mike R wrote: Is there a version of Apache 2+ that now works with PHP? Last I checked, the were incompatible, but recently someone I ran into claimed that the bugs have been for such a setup. :) Thanks, -MIke I've been using PHP + Apache 2 for a long time now. http://www.php.net/install.apache2 --

[PHP] Re: Customer Session Handlers Using MySQL

2004-05-25 Thread Jason Barnett
1) Does this mean that I cannot use the $_SESSION[] variable to enter information into the session? Sure you can. When you use a custom session handler then setting / getting the $_SESSION[] variables will use sess_write and sess_read in order to write/read that information. I think the only

[PHP] Re: test

2004-05-25 Thread Jason Barnett
Sherri wrote: Woah! Signed up litterally 1 minute ago and I'm already getting spam. From "Advance Credit Suisse Bank" Great. Thanks php.net. Guess you can't even trust the well known sites not to slam you with spam. The problem is this list has no active moderator (at least none that makes themsel

[PHP] Re: Parse XML

2004-05-25 Thread Jason Barnett
I'm surprised that no one else already replied to this?!?! Anyhow, my answers are below. Phil Dowson wrote: Hi, I am having a couple of difficulties with a script to parse XML. This may well be because my 16 month kid was up all night, but I'm banging my head against a wall right now. OT: And th

[PHP] Re: Perfect Squares

2004-05-25 Thread Jason Barnett
John Kaspar wrote: Try taking the square root of the variable $sqrt = sqrt($var); then compare the number of decimal places. if (strlen(strstr($sqrt,".")) <= strlen(strstr($var,"."))) { // perfect } Just guessing of course. I'd do something similar, but a little different: $sqrt = sqrt($var); i

[PHP] Re: Perfect Squares

2004-05-25 Thread Jason Barnett
Stephen Craton wrote: I'm in a bit of a pickle. I need to find out if a variable is a perfect square or not, and this needs to test for decimal numbers as well, such as 2.25. The thing is, the only function I've found in PHP is gmp_perfect_square() which isn't supported on my web server, and I don'

[PHP] Re: can myapp.exe run on Win ce or pocket pc?

2004-05-27 Thread Jason Barnett
Shelby wrote: Hi, I would like to develope a desktop application using PHP. I was wondering can the .exe program run on Win CE/Pocket PC? Please don't spam the list, we saw the message the first time. Well in order to run the application on a pocket PC you'd need a PHP binary for your specific p

[PHP] Re: Getting the name of the Class

2004-05-27 Thread Jason Barnett
Since you're invoking this as a static method the only solution that comes to mind is to use the PHP5 builtin class Reflection_Method and/or Refelction_Class. Perhaps something like: Class Test { function Test() { echo 'Test'; } } Class MyClass extends Test { function Debug() { p

[PHP] Re: Putting an image or logo on another image.

2004-05-27 Thread Jason Barnett
I haven't done image manipulation much, but for good source code on how to do it look at JpGraph. It creates image canvases and draws graph images on top of a canvas, it's really quite impressive. http://www.aditus.nu/jpgraph/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP] Re: Changing environment variables ? (stupid question)

2004-05-27 Thread Jason Barnett
Oooh, wish you'd said Windows, I coulda given you a walkthru there. The environment variable that you want to set cannot (AFAIK) be changed by Apache. You'll need to change the variable in Solaris itself. So sayeth google: http://docs.sun.com/db/doc/806-7612/6jgfmsvrt?a=view -- PHP General Mai

[PHP] Re: Keep PHP variable values between script calls - XML RPC

2004-05-27 Thread Jason Barnett
Sounds like a pretty run-of-the-mill storage issue; or did you want to save XML messages? In any case, storing the information in a session is probably the easiest and most straightforward way to do this. Or store the information in a database. Jason -- PHP General Mailing List (http://www.ph

Re: [PHP] Keep PHP variable values between script calls - XML RPC

2004-05-27 Thread Jason Barnett
If you're trying to prevent hitting the database then just cache the page result and store it as a temporary html file. Then serve the temporary file whenever people visit (and update every 15 minutes). Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] Re: handle E_STRICT with own error handler

2004-05-27 Thread Jason Barnett
Bert Slagter wrote: Hi, I tried to use my own error handler to handle all non-fatal errors. But to my surprise it seems to be impossible to handle E_STRICT level notices. I don't know whether this is by design, not yet implemented or a know bug that I overlooked - but it seems rather strange :).

[PHP] Re: Regular expression question

2004-05-27 Thread Jason Barnett
This should work: ^\\ # Don't match if a backslash precedes \[ # Open bracket ([^\]]+?) # Text, including whitespace \] # Close bracket By the way, using a tool called The Regex Coach I solved your problem in about 10 seconds. For those having regex problems you might

[PHP] Re: junk after document element

2004-06-11 Thread Jason Barnett
Richard Davey wrote: Hi guys, Does anyone know what the most common cause for the following error from the XML parser built into PHP 4.3.6: "junk after document element" I am parsing data that has been returned to me via https, this is stage 6 in a multi-step process and the first stages went okay

[PHP] Re: PDA / Normal Browser

2004-06-11 Thread Jason Barnett
Shaun wrote: Hi, Is it possible to use PHP to detect the type of browser accessing my site. For example if a PDA is using it I would prefer not to include large graphics... Many thanks for your help Yes you can do this. ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

[PHP] Re: I don't want to use include

2004-06-22 Thread Jason Barnett
Qt wrote: Dear Sirs, When I use include, my script is waiting included script results. But I just want to run another local script without wait result. Which command I should to use? Best Regards Are you hoping to set up a task as part of a batch for later processing? There are several ways you c

[PHP] OT? Getting peer reviews for an entire application

2004-06-22 Thread Jason Barnett
I have a netiquette question here. I haven't finished it yet (nor am I even at a prototype level) but eventually I'd like some people to review something that I'm working on. After all isn't this what open source is all about? :) However, I wasn't sure if this list would be an appropriate p

[PHP] Re: Benchmarking a script

2004-06-23 Thread Jason Barnett
Well you could put all of your function definitions into a separate file. Then, just include the function file before you loop through the code that uses the functions. Or as an alternative you could also do: But this really isn't a good idea. Try to put the function definitions into a sepa

[PHP] Re: session_is_registered gets session values only after doing some output first !?

2004-06-23 Thread Jason Barnett
Frank Rust wrote: I try to check if a session is registered. This works fine if I first do some output echo "abc"; if (!session_is_registered('userid')) { do_something(); } else { redirect_to_somewhere(); } and I can't redirect to another page ... If I comment out the echo statement I get alw

[PHP] Re: I don't want to use include

2004-06-23 Thread Jason Barnett
Qt wrote: Dear sirs, Actually I am using virtual server and I think I have no write to use crontab/ But this methods become to me interesting. I will try to learn more about how to use crontab and where can I find that in my virtual server? This isn't exactly a PHP issue, it's your operating system

[PHP] PHP-based XML utilities

2004-06-23 Thread Jason Barnett
Hey all, I've been working a lot more with XML recently and it seems like there's been a fair number of other people using XML too (based on the moderate number of XML-based problems showing up on this list). So, I thought I might build a form with PHP that helps people trying to work with XML

[PHP] Re: Create a function

2004-07-01 Thread Jason Barnett
$pages = array('index.html' => 'Home', 'search.html' => 'Search'); function menu($pages) { foreach ($pages as $page => $desc) { if (stristr($_SERVER['SCRIPT_FILENAME']), $page) { echo '' . $desc . ''; } else { echo '' . $desc . ''; } } Home"; }else{ echo "Home"; }

[PHP] Re: Create a function

2004-07-01 Thread Jason Barnett
Jason Barnett wrote: $pages = array('index.html' => 'Home', 'search.html' => 'Search'); function menu($pages) { foreach ($pages as $page => $desc) { if (stristr($_SERVER['SCRIPT_FILENAME']), $page) { sheesh, $desc should be

[PHP] Re: Help needed

2004-07-03 Thread Jason Barnett
Completely new? Well, there are a lot of articles on the web that will get you started... just try googling for "MySQL PHP tutorial". If you're willing to put in the time you can do it yourself... but there are a lot of PHPers out there that can do it for you right now. -- PHP General Mailing

[PHP] Re: Strange Session Problem

2004-07-03 Thread Jason Barnett
I don't think your problem is with the sessions at all... rather, I think you need to change the include command: [snip] include("$CFG->usersdir"); // ***This line causes session problems*** exit; } [/snip] try changing this to: [snip] include($CFG->usersdir); exit; } [/snip] Ever tried p

[PHP] Re: web page output "as we go"

2004-07-03 Thread Jason Barnett
Is there any way I can tell the web browser to start trickling the data onto the page? TIA & HAND :-D As Torsten so kindly pointed out to me before, your friend is the flush() function: http://www.php.net/flush Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP] frames compatibility

2004-07-03 Thread Jason Barnett
Hey all, I'm working on a project and considering splitting up the pages into frames. I'm mostly wondering are the frames implementations across browsers relatively similar? I'm thinking that I'd use 3 frames split like this: 1. Filelist of documents to edit 2. A document editor 3. A help in

[PHP] Re: PHP doesnt work!

2004-07-03 Thread Jason Barnett
Gmo Baez wrote: Hello, I have a Freebsd server 5.2.1 with Apache 2.0.48 and PHP 4.3.4. After the installation everything looks normal, but after i created some PHP web files to test it, I found that PHP is not working. When i open de PHP document with the browser i only receive a blank page. But i

[PHP] Re: user-defined superglobals

2004-07-04 Thread Jason Barnett
About the only user-defined superglobals are constants. If you really want to get the value of a global variable while inside of a function, you could just use GLOBAL. Or if you REALLY wanted to, you could store the variables in the $_SESSION superglobal array. But I'm curious, why do you wa

Re: [PHP] user-defined superglobals

2004-07-04 Thread Jason Barnett
every script. For performance reasons it would be much better if certain values or code could be cached, as is the case with the ASP global.asa file. If the files and scope was limited to an application, or Web site, then a certain level of security should be possible. Well if you're looking fo

[PHP] Re: Including files within a class definition

2004-07-04 Thread Jason Barnett
include (extended_methods_stuff.php); } I know that I can probably extend this class to add the extra functionality however the other generated classes rely on the name of this class so I cannot just extend this class and it's name cannot change. Is there any way to have an include prior to the c

[PHP] Re: Including files within a class definition

2004-07-04 Thread Jason Barnett
I really ought to check my code before posting... but you get the idea :) class generatedFoo { public function __autoload($class) { include "/path/to/class/$class.php"; } // other stuff } ?> http://www.php.net/zend-engine-2.php -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] Re: problems linking a DLL to Zend symbols like

2004-07-05 Thread Jason Barnett
Try php.internals -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sending PHP to different targeted frames

2004-07-06 Thread Jason Barnett
Robert Frame wrote: I've created a web page utilizing 3 frames (header, index, main). In the frame named 'main' I have a form setup for logging into a MySQL database. On a successful login I want to change the html in 'index' and 'main'. The active frame 'main' is easy, as the new html code will g

[PHP] parse_ini_file VS. constructor with many parameters

2004-07-06 Thread Jason Barnett
I have a class definition that has a lot of private properties. These properties don't need to change often, in fact a user could probably just change the values once and forget about most of them. So this makes me think that I should use parse_ini_file and a configuration file to let users "

Re: [PHP] custom tags

2004-07-06 Thread Jason Barnett
Eric Emminger wrote: Hi George, How about this? parse the html as xml and replace the component tags with whatever php/html code output that result to a file include the file from previous step There's actually a PEAR package which can help you with this as well: http://pear.php.net/package/XML_HTM

Re: [PHP] parse_ini_file

2004-07-07 Thread Jason Barnett
I'd prefer the text file. It's easier to open that and change values plus they don't have to worry about PHP syntax as much. Haven't tried, but you should be able to import them as private variables for your class... Thanks for the advice John. OK, so extending this a bit: would it be better

Re: [PHP] parse_ini_file VS. constructor with many parameters

2004-07-07 Thread Jason Barnett
John W. Holmes wrote: I'd prefer the text file. It's easier to open that and change values plus they don't have to worry about PHP syntax as much. Haven't tried, but you should be able to import them as private variables for your class... Thanks for the advice John. OK, so extending this a bit

[PHP] Re: PHP Sessions Question

2004-07-08 Thread Jason Barnett
Ed Lazor wrote: What kind of problems could be happening server-side that would result in PHP sessions randomly disappearing? And, is there a way to log or track this information? Oh, and best of all, any recommendations on solutions? To try logging this, you probably need to make your own sessio

Re: [PHP] Creating Rows and Columns Using for() Loops

2004-07-08 Thread Jason Barnett
I populated the guest's name statically so I can see how the loop works. The looping is wrong and it only yields 7 rows. In the first row it has 1 column of data, the second row has two columns of data, the third one has three columns of data, and so on. How do I fix it to where each date column h

Re: [PHP] Re: PHP Sessions Question

2004-07-08 Thread Jason Barnett
On garbage collection, it happens sometimes within seconds and sometimes within minutes. It tends to occur in batches with lulls of 20 to 30 minutes. So, for example, I can login, navigate through 11 different pages to generate the problem, navigate 2 pages to generate the problem, and then not s

[PHP] Re: php mls and realtor.com

2004-07-08 Thread Jason Barnett
Edward Peloke wrote: I have a site where the user currently enters their data into a local db, then goes to another site and enters it for the state mls, then uses realtor.com to enter it for that mls, they want one form where they can enter the date and have it go to all three. Has anyone worked

[PHP] Re: search string / query format

2004-07-11 Thread Jason Barnett
You might try checking out the Codewalkers.com previous contests. They did one a while back that was for accessing google through PHP scripts. I doubt any of them would have database support built-in, but it would give you a head start on the input fields. -- PHP General Mailing List (http://

Re: [PHP] How to use multiple cookie statements

2004-07-12 Thread Jason Barnett
Or if you feel lazy... then you can use serialize / unserialize. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Exceptions

2004-07-12 Thread Jason Barnett
public function execute($query) { if (!$this->dbh) { $this->connect(); } // My $query has quotes in it // I try to escape the quotes $query = mysql_escape_string($query); // It causes an error $ret = mysql_query($query, $this->dbh)

[PHP] Re: PHP and HTML Conventions

2004-07-12 Thread Jason Barnett
Harlequin wrote: Hi all. I just wondered if the general convention was to use entirely PHP and simply encase HTML TAGs within that or use a mix and simply use PHP TAGs when required. It depends on the project, but when possible I prefer to have as much static content as possible for better perfor

[PHP] Re: [Q] Using $_SERVER['DOCUMENT_ROOT'] correctly

2004-07-12 Thread Jason Barnett
Is your common script in the server root? If so then you can use something like this in the file: define('WWWROOT', basename(__FILE__)); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Dynamic to Static

2004-07-14 Thread Jason Barnett
Ed Lazor wrote: Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? Thanks, Ed Hey Ed, there are a couple of ways that you can do it de

[PHP] Re: [Q] PHP 101 -- How to check for session existence?

2004-07-14 Thread Jason Barnett
Hey Michael, I think you really only need to check the $_SESSION array, not necessarily each index. if (!isset($_SESSION)) { // login header('Location: ' . MEMBER_LOGIN_PAGE); } else { // session exists } However, if you want to have non-empty values for your session variables you should u

[PHP] Re: New object model

2004-07-14 Thread Jason Barnett
Troy S wrote: Is there an ini-file setting so that objects are passed by value as in PHP 4? If so, how long is this likely to be supported? Thanks, Troy Although you can turn on zend engine 1 compatibility, if you intend to distribute your code you cannot expect this on most servers. Another wa

[PHP] Re: Site Planning

2004-07-14 Thread Jason Barnett
Ee wrote: Can anyone point me to a good article about site planning before coding. I searched the net but couldn't find a good one? This question is too broad - as usual it depends on your needs. Ask a more specific question, or hire someone to plan out your site for you. -- PHP General Mailing

[PHP] RE: php vs. cgi app

2004-07-14 Thread Jason Barnett
Bruce, you need to start new threads when you ask a new question... a lot of people don't bother to check out a thread that's already got responses, and it really makes more logical sense to start a new one anyway (original post is below my response)... When you say cgi vs. php, I'm going to as

[PHP] Re: including external C header files and libraries

2004-07-16 Thread Jason Barnett
Jeremy Booker wrote: I have a 3rd party SDK written in C. It includes a compiled .a file and a header file (.h). Is there any way that I can call the functions included in the SDK from within a php script? Regards, Jeremy Yes you can extend the Zend engine. You'll need to write an extensio

[PHP] Re: How to tell if the file is already locked with flock()???

2004-07-16 Thread Jason Barnett
Scott Fletcher wrote: Hi! How do we tell if the file is already locked when someone use a flock() on the file?? FletchSOD Do you mean within PHP code? If that's the case then this is taken care of by the flock() function... it checks the file's status and based on the parameter(s) that you u

[PHP] Re: How To capture WebCam

2004-07-16 Thread Jason Barnett
Please search google for tutorials, you can often find them when you use the right keywords. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Jason Barnett
That will try and find a file in these locations in order: /var/www/html/projects/include/db.inc ./db.inc /php/includes/db.inc And will use the first one found. I would not suggest using ini_set() inside you're scripts to adjust your paths. Curt Hey Curt, why do you suggest we don't use ini

[PHP] Re: finding a substring

2004-07-16 Thread Jason Barnett
C.F. Scheidecker Antunes wrote: Hello all, I need to read lines within a text file that might have a " value='somevalue' " string the position of "value=" varies from line to line but there's only one "value=" in each line. So what I need to do is to parse the file and find the "value=" and put

[PHP] Re: How can I tell if a path is absolute?

2004-07-17 Thread Jason Barnett
Anyway it's looking a lot like I'll have to detect the Win32 build of PHP at runtime, and choose the method based on that. All because PHP doesn't have an is_absolute function or anything similarly convenient. :-/ TX A, methinks I have a competitor for a FileSystem Manager :) Perhaps I misu

[PHP] .lnk extension for windows files / shortcuts

2004-07-18 Thread Jason Barnett
Trejkaz, I'll make you a deal. I'll test out some code for you on my windows box and you test out my code on your linux box. I'm also building unit tests into the package so it should be easy to test everything. In any case, I started testing this out a little more on my box and noticed a few

[PHP] Re: Is "Function Constants" the Correct Term?

2004-07-18 Thread Jason Barnett
function dblogin($login,$pass,$db) { $mysql = mysql_connect("localhost",$login,$pass); mysql_select_db($db,$mysql); } ?> If you're trying to protect your login credentials, you could create a class for performing mysql actions. Then put the credentials into private/protected members

[PHP] Re: Using and Echoing Session Variables

2004-07-18 Thread Jason Barnett
Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']="yes"; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't

Re: [PHP] Book Required

2004-07-18 Thread Jason Barnett
This - I think - highlights the problem. *I* have been programing for 25+ years, but only switched to PHP last year. I decided not to worry I would love to hear why you switched... although some might consider it "off topic". too much about PHP4, and have only run with the Beta PHP5. PEAR DB w

<    1   2   3   4   5   6   7   >