Re: [PHP] Cookies/Sessions and how they work

2009-03-09 Thread Chris
It brings up another question, though. Let's say that I have a session_start() call at the beginning of a bunch of pages. So that each time one of these pages is called, the call is made to session_start(). It seems like it would screw things up royally if each call to session_start() generated

Re: [PHP] [PHP & MySQL] Introduction to using relational databases

2009-03-10 Thread Chris
Bob McConnell wrote: From: Dirk Thilo Klein wrote: Dear readers, I am new to relational DB but not to MySQL & PHP in general. I created a RDB using Struggling with the program's complexity I managed to create a set of databases being interconnected via (foreign) keys. What I want t

Re: [PHP] Include File Errors with Comments

2009-03-10 Thread Chris
Patrick Moloney wrote: I have a simple web site with a simple page that all works well, although I have had a similar problem a couple of times that seems to be caused by Comment Lines in the included files. I wonder if I have it entirely right. All my files are .php files, but almost all the

Re: [PHP] Working directory of PHP pages?

2009-03-10 Thread Chris
Clancy wrote: It is my understanding that when you open a page the PHP server looks for index.php in the site root directory, and loads it. The web server (not php) looks for an index.php file (if configured to do so) based on the path. http://www.example.com/subdir/folder/ will look in su

Re: [PHP] Handling (very) large files with PHP

2009-03-10 Thread Chris
Anyway, so, I am going to convert it into a database, and I insist on using PHP for this. Wrong answer. Use the right tool for the job. I don't think php is it. Personally I'd go for perl for doing this. It's much better (IMO) at text processing, especially large files. As long as you know reg

Re: [PHP] Which hashing algorithm is best to check file duplicity?

2009-03-15 Thread Chris
Martin Zvarík wrote: I want to store the file's hash to the database, so I can check next time to see if that file was already uploaded (even if it was renamed). What would be the best (= fastest + small chance of collision) algorithm in this case? "Fastest" depends mostly on the size of the

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread Chris
PJ wrote: I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points the way how to extract va

Re: [PHP] preg_replace() question

2009-03-17 Thread Chris
PJ wrote: 1. What is the overhead on preg_replace? Compared to what? If you write a 3 line regex, it's going to take some processing. 2. Is there a better way to strip spaces and non alpha numerical characters from text strings? I suspect not... maybe the Shadow does ??? For this, preg_re

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread Chris
PJ wrote: Chris wrote: PJ wrote: I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points

Re: [PHP] how to make multiple sql run faster

2009-03-22 Thread Chris
Davi Vidal wrote: On 03/21/2009 10:19 AM, Andrea Giammarchi wrote: Hi all, I am inserting more than 5000 rows into sql database but its taking more than 30 mins to get it all the data inserted. I use union to insert multiple rows of 20 at a time. What is the best way to make insert sql statem

Re: [PHP] flushing AJAX scripts

2009-03-26 Thread Chris
jim white wrote: I am using jQuery AJAX request to run a script that can take several minutes to create a report. I want to start the script and immediately echo a response to close the connection and then let the script complete a report which I can get later. I have tried several thing such a

Re: [PHP] PHP and making a ZIP file

2009-03-26 Thread Chris
Ron Piggott wrote: Does anyone know how to make a ZIP file using PHP? This is for an application where the files the user selected will be put into a ZIP file and then the ZIP file made available for download. Ron http://www.php.net/zip would be a good place to start. Or http://pear.php.net/

Re: [PHP] Security Support

2009-03-30 Thread Chris
Grant Peel wrote: - Original Message - From: "Michael A. Peters" To: "Grant Peel" Cc: Sent: Sunday, March 29, 2009 10:00 PM Subject: Re: [PHP] Security Support Grant Peel wrote: Good Morning / Afternoon, We run several of our own servers: - Dell Power Edge 1U, Pentium, - FreeBSD

Re: [PHP] LOAD INFILE

2009-03-30 Thread Chris
Thijs Lensselink wrote: John Boy wrote: Hi I want to upload a .csv file from my local pc to a mysql server. My local machine is XP2. I have used the following but the file does not upload. When using php MyAdmin it returns the error 'file not found'. Can anyone help? Why not just use phpmya

Re: [PHP] PHP + MySQL - Load last inserts

2009-03-30 Thread Chris
haliphax wrote: On Mon, Mar 30, 2009 at 9:13 AM, Sebastian Muszytowski wrote: haliphax schrieb: [..cut...] Except when your primary key value rolls over, or fills a gap between two other rows that was left when a row was deleted/moved/etc... there has got to be a better way than grabbing rows

Re: [PHP] PHP + MySQL - Load last inserts

2009-03-30 Thread Chris
The physical order of the rows changed (as you can see) but it does not re-use the id's that were deleted. Ordering by the id will get you the last bunch inserted. If you're using innodb you'll have to be aware it's transaction specific, if you're using myisam it will be system wide. I'll ha

Re: [PHP] formulate nested select

2009-03-30 Thread Chris
PJ wrote: I cannot find anything on google or the manuals/tutorials that gives some kin of clear explanation of how to so nested selects with where or whatever. I have three tables: books, authors and book-authors. I need to retrieve only those books whose author's names begin with A. I have trie

Re: [PHP] formulate nested select

2009-03-30 Thread Chris
Jim Lucas wrote: Chris wrote: PJ wrote: I cannot find anything on google or the manuals/tutorials that gives some kin of clear explanation of how to so nested selects with where or whatever. I have three tables: books, authors and book-authors. I need to retrieve only those books whose

Re: [PHP] formulate nested select

2009-03-31 Thread Chris
PJ wrote: Ian wrote: On 31 Mar 2009 at 9:08, PJ wrote: I must be doing something wrong. Can't figure it out even though I've been searching the manuals & tutorials, it still does not work. Here is the exact code that I have tried; the first version is commented out and obviously does not wo

Re: [PHP] & and && and weird results

2009-04-01 Thread Chris
Thanks for that. I understand. Somehow, I had tried OR at one point but I got one of those orange boxes probably for some other error and in the confusion of my neurons I overlooked it. However, I am puzzled that using & (not &&) did give a lot of results, almost the whole db which is thankfully

Re: [PHP] Oracle's dump to MySQL

2009-04-02 Thread Chris
9el wrote: I found this command from one guy for importing Oracle's dump to MySQL Shell> mysql -uroot db_name -vvf < oracle_dump.dmp But, v is for verbose and f is for force continuation. Anyone worked with Oracle and MySQL? Yep, and there's no way that will ever work except for the very sim

Re: [PHP] PHP LDAP over SSL problems

2009-04-02 Thread Chris
Keith Lawson wrote: Hello, I have been working on this problem for some time now and I can't seem to resolve it. Everything I have found on google and php.net says I can connect to an LDAP server with SSL by setting "TLS_REQCERT never" in ldap.conf. I want to eliminate certs from the picture for

Re: [PHP] php5-mhash disabled...

2009-04-02 Thread Chris
Anders Norrbring wrote: I just saw that mhash is disabled in the spec file for php5 if SUSE version is 11.0 or higher. Simple question, does it do any harm? If they decided to do that it's best to ask suse (or on the opensuse lists if you're using that flavour). It may just be because it's d

Re: [PHP] syntax woes

2009-04-02 Thread Chris
aurfal...@gmail.com wrote: Hi all, I'm unsure how to describe this but I'll try. The following code works fine in its own PHP script; $mkdircmd = '/bin/mkdir /homes/'.$uid; exec($mkdircmd); But when placed in a larger PHP script being part of the ldap_provisioning module in Drupal, the Drupa

Re: [PHP] syntax woes

2009-04-02 Thread Chris
Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] [php] scheduled task in php

2009-04-02 Thread Chris
Andrew Williams wrote: I want to created a window schedule a task that will run every 2 minutes and run my php script(www.domain.com/script.php). But I need to know how to create a php.exe that I can select as a window schedule a task so that the php.exe file can execute www.domain.com/script.ph

Re: [PHP] syntax woes

2009-04-02 Thread Chris
Shawn McKenzie wrote: Chris wrote: Wow, it does chown and chmod as well, thats friggen cool. chown will only work if the script is running as root which I doubt your drupal site will be. Or if the script is running as a user/group that has write permissions to the dir/file that your trying

Re: [PHP] phpMyAdmin, suhosin, proper solutions

2009-04-05 Thread Chris
Yes, I read the documentation on how to make them play nice, and to me it is unacceptable to change suhosin settings intended to protect my users and my site from a malicious user so that I can use a web app that is not open to the public. No idea what the problems are (couldn't find a list of

Re: [PHP] PHP module ignores ldap.conf

2009-04-06 Thread Chris
Keith Lawson wrote: Hello, I'm trying to connect to and LDAP server using PHP over SSL. I compiled Openldap from source, installed it and then compiled PHP against that install. I have a tiny PHP script for testing that I have been calling from the command line (php scriptname). Before adding "T

Re: [PHP] Best Practices for Hiding Errors

2009-04-06 Thread Chris
but they give the following warning: "This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet)." Am unclear what that means - is it okay to add: It's about "information disclosure". Errors/warnings/notices

Re: [PHP] Best Practices for Hiding Errors

2009-04-06 Thread Chris
Igor Escobar wrote: Becarefull, error supression is slow. If it's the only way to stop an error from showing up, what's the problem? php will still generate the warning/notice even if display_errors is disabled - which will be even slower. Plus I never said use it everywhere, I said use it

Re: [PHP] PHP require_once() opens some files but not others in same library

2009-04-06 Thread Chris
Here are the warnings and the error that I get: Warning: Zend_Loader_PluginLoader::require_once() [function.Zend-Loader-PluginLoader-require-once]: couldn't resolve host name in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389 Why is this trying to load something via

Re: [PHP] Out of the blue question..

2009-04-06 Thread Chris
bruce wrote: Hi Ladies/Gents of the list... I've got an issue/question and figured I'd fire it to the list. Over time, I've had a few projects that I've worked on, where I've required someone with skills way beyond mine for a given area. And rather than spend hours trying to figure it out, I've

Re: [PHP] PHP require_once() opens some files but not others in same library

2009-04-06 Thread Chris
Henning Glatter-Gotz wrote: Chris, At no point am I using a URL. Under normal circumstances the code includes (require_once) things like "Zend/Loader/blablabla". Because this does not resolve in the local directory it is supposed to consult the PHP include_path to look this up. And it

Re: [PHP] difficult select problem

2009-04-06 Thread Chris
PJ wrote: I've searched the web, the tutorials, etc. with no luck and have asked on MySql list with no luck and have even posted here with no replies. So, let's try again: I am trying to limit the search for books to only those that start with "A" (does not have to be case sensitive); but within

Re: [PHP] PHP bandwidth control

2009-04-06 Thread Chris
I guess there are multiple ways to engage this problem. It depends how "deep" you want to log the traffic. If you just want to count the traffic of each image, video etc you could just wrap up each image and video to go through php first with file_get_contents() (look in the php manual there are

Re: [PHP] difficult select problem

2009-04-07 Thread Chris
PJ wrote: Gentlemen, First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: 1) which books have a secon

Re: [PHP] PHP and Send Mail

2009-04-08 Thread Chris
Alejandro Esteban Galvez wrote: Hi!, I am making a web system and i need known how send a mail using PHP http://www.php.net/manual/en/function.mail.php -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] codeigniter 'secure, non-secure content' pop up message in IE7

2009-04-08 Thread Chris
Hello Experts, I badly need your help. My developed site's some pages are HTTPS, and other parts are HTTP. When I try to access the HTTPS page in IE it comes up with "secure & non-secure content " warning. I search on google to find out the solution. but almost every site suggest to change the

Re: [PHP] count() total records for pagination with limit

2009-04-14 Thread Chris
PJ wrote: I seem to recall that it is possible to count all instances of a query that is limited by $RecordsPerPage without repeating the same query. I believe that COUNT() had to called immediately after the SELECT word but I neglected to bookmark the source. Dummy! You're probably thinking of

Re: [PHP] redirect to a page the fist time a site is accessed

2009-04-14 Thread Chris
Don wrote: Hi, I have some code in my index.php file that check the user agent and redirects to a warning page if IE 6 or less is encountered. 1. I'm using a framework and so calls to all pages go through index.php 2. The code that checks for IE 6 or less and redirects is in index.php I know

Re: [PHP] ftp_put issues

2009-04-15 Thread Chris
James wrote: Hi, I'm trying to upload a pdf file from a local drive to the server using a php routine. I've done it server to server before with no issues but this just keeps failing on me. This is the function I'm calling, it connects and logs in just fine, but it will not upload the file. T

Re: [PHP] How do I access a local variable?

2009-04-19 Thread Chris
abdulazeez alugo wrote: Hi guys, I have a function inside which I set alocal variable to store a result. Can I access this variable in another function? if yes then how? No, you can't. You either need to pass it back (recommended) or make it global (not recommended). function tbl1($entryt

Re: [PHP] DATE / strtotime

2009-04-19 Thread Chris
Ron Piggott wrote: Where $date_reference is 2009-04-18 the following code gives me a day of 1969-12-30. How do I get it to be 2009-04-17? $previous_date = strtotime("-1 days", $date_reference); $previous_date = date('Y-m-d', $previous_date); Slightly wrong syntax. $previous_date = strtotime

Re: [PHP] escape your variables

2009-04-20 Thread Chris
How does one deal with that? Do you use mysql_real_escape_string? e.g. Inputs are user supplied. Are you saying that I don't need to sanitize the variables above - $db_host, $db_user, $db_pwd, $database, $table ? No - they are essentially hardcoded. A user (through a form or any other

Re: [PHP] 800 pound gorilla

2009-04-20 Thread Chris
Maybe it's time the PHP dev team start thinking about supporting a database side project of their own. I would do well to have an open source database engine that integrates well with the system under contact development. The PHP group already did that. They pushed SQLite when MySQL started

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Chris
kranthi wrote: of u are sure that the mail was not received as spam... check the log files of the mail server on the server to be sure that the mail actually reached the mail server from the http server Somehow I doubt AT&T gives out that sort of access ;) The idea is right if you have access

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris
Any light anyone can throw on the 'nob...@myserver.com' address would be most welcome. It is using the apache user @ your host name as the default. Try this: ini_set('sendmail_from', 'whate...@wherever.com'); I will try this but I do not understand why it should work. I have a 'From:...'

Re: [PHP] ! and !=

2009-04-22 Thread Chris
George Langley wrote: Hi all. Maybe I'm just getting confused by all the languages I'm trying to work with! But, isn't: if(!$var1 == $var2){ the same thing as if($var1 != $var2){ #1 doesn't work, #2 does. Thanks! No. The second is seeing if $var1 is not equal to $v

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris
Edward Diener wrote: Chris wrote: Any light anyone can throw on the 'nob...@myserver.com' address would be most welcome. It is using the apache user @ your host name as the default. Try this: ini_set('sendmail_from', 'whate...@wherever.com'); I will try th

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris
9el wrote: Does ini_set actually change the php.ini file in any way ? The reason I ask is that after putting in: Yes it does. :)you should have refered to the manual before using the line. It does not. It changes a setting for the script only. It does not change the physical php.ini fil

Re: [PHP] @$_POST[...]

2009-04-22 Thread Chris
Luke wrote: 2009/4/22 PJ Could somebody explain to me the meaning of @ in $var = @$_POST['title'] ; where could I find a cheat sheet for those kinds of symbols or what are they called? Sorry for my ignorance, but maybe this will take the fog filter our of my neurons. :-\ I believe placing an

Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-23 Thread Chris
the ini_set (or you can set the 5th param to the mail() function) is a return-path. If the message bounces (recipient's mailbox full, server down, whatever the reason) it gets delivered to that address. They serve different purposes. The dirty little secret that nobody seems to know is th

Re: [PHP] MySQL -- finding whether there's a transaction started

2009-04-23 Thread Chris
Bogdan Stancescu wrote: Hello list, I'm developing a library and would need to know if the code calling my library has already started a MySQL transaction or not. I want to know whether I should start one or use savepoints instead -- starting a transaction if one is already in progress commits t

Re: [PHP] MySQL -- finding whether there's a transaction started

2009-04-26 Thread Chris
Bogdan Stancescu wrote: On 24-Apr-09 03:45, Chris wrote: I don't think mysql has any way of finding that out. If you're using an abstraction layer, it's easy enough in code - though rollback's are a little harder - should they do a complete rollback or just to a savepo

Re: [PHP] Developing PHP extensions on Windows with VC++, linking problems

2009-04-28 Thread Chris
Eugenio Tacchini wrote: Hi all, I had to create a PHP extension and I read this article: http://www.talkphp.com/vbarticles.ph...php-extensions Everything worked fine if I keep "Debug" as "Active

Re: [PHP] utf-8 ?

2009-04-30 Thread Chris
The consensus seems to be that the proposed "ifset()" and "ifempty()" functions are more effort than they are worth. What I'd like to know is, why "empty()" still exists when every time I turn around, the mentors I turn to locally tell me not to use it, to use "isset()" instead. Because empty()

[PHP] Re: problem with mysql_real_escape_string()

2006-12-28 Thread Chris
You need to have established a database connection before using that function, see manual. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi to all! > > I moved my website from one php4/mysql4 based server to new hosting > company and php5/mysq5 based server. > Everything worked

Re: [PHP] Removing UTF-8 from text

2007-01-03 Thread Chris
Dotan Cohen wrote: On 03/01/07, Richard Lynch <[EMAIL PROTECTED]> wrote: Instead of trying to strip the UTF stuff out, try to capture the part you want: preg_match_all('|<[^>]>|ms', $emails, $output); var_dump($output); Richard, I do have a working script now, but I'm intrigued by your regex

Re: [PHP] Database Question

2007-01-04 Thread Chris
Ashley M. Kirchner wrote: Someone's going to tell me to go buy a book, I just know it. I'll ask anyway: I'm starting to log weather data to a database and I'm trying to figure out what's the best way to create the tables. The reports are coming in every minute, of every hour, 24 hou

Re: [PHP] Syntax Error

2007-01-07 Thread Chris
JD wrote: Can someone help me figure out why I can't run this on MySQL. I get a syntax error. list($qh,$num) = dbQuery("SELECT password AS passwd1, $DATABASE_PASSWORD_FUNCTION('$password') AS passwd2 ". "FROM $USER_TABLE WHERE username='$username'"); $data = dbResult($qh); You've already

Re: [PHP] Syntax Error

2007-01-07 Thread Chris
bruce wrote: chris... sure there is.. alot of people don't subscribe to other lists. if you're one who does, simply ignore his post. And if the poster looked at either of the responses he received and replied to the questions asked, then he'd get a much better r

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Chris
Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me that infinite recursion within PHP is a bug. Shouldn't the interpreter catch this sort of th

Re: [PHP] Table contents not updated

2007-01-08 Thread Chris
Wikus Moller wrote: Hi. I am new to uising html forms with php and I am having a problem with database contents not being updated although it seems my coding is correct. Is it getting into the function? What is the exact database query that is being run? Does that return an error when you run

Re: [PHP] Confused on the status of a "bogus" bug report

2007-01-08 Thread Chris
Robert Cummings wrote: On Tue, 2007-01-09 at 10:01 +1100, Chris wrote: Bill Moran wrote: With reference to: http://bugs.php.net/bug.php?id=40067 I'm confused as to why this was marked bogus, and the message that marked as such doesn't give much insight. It would seem to me tha

Re: [PHP] unzip openDocument in safe mode

2007-01-09 Thread Chris
Jochem Maas wrote: Bernhard Zwischenbrugger wrote: I try to unzip openDocument files with pclzip. At my laptop this is no big problem, but the target server has "safe mode" switched on (no way to change that). The problem with safe mode and unzipping openDocument ist, that a openDocument zip fi

Re: [PHP] given up of iis now trying apache

2007-01-10 Thread Chris
Ross wrote: Everything seems to be working but when I try and run a php file. It offer the download dialogue box. I remeber doing something where you tick a box to enable scripts and execute them or something in the manager. Can anyone help? AFAIK apache doesn't have a manager that has a bun

Re: [PHP] Stored Procedure returns nothing on ROLLBACK

2007-01-10 Thread Chris
Philip Thompson wrote: Hi. I have been experiencing MSSQL woes lately. I have a stored procedure that I call in PHP using mssql_* functions. In my procedure, I have a transaction that rolls back on failure and commits on success (of course). If it commits, I get the proper return value (int)

Re: [PHP] Extending session timeouts manually

2007-01-10 Thread Chris
Ryan Fielding wrote: I'm using a session to save cart contents within a store, and this session follows the user as they proceed through the checkout. My problem is, if a customer orders say 10 items, they have the option to input 10 different addresses that these items will be delivered to. I'

Re: [PHP] Extending session timeouts manually

2007-01-10 Thread Chris
Ryan Fielding wrote: Ryan Fielding wrote: Chris wrote: Ryan Fielding wrote: I'm using a session to save cart contents within a store, and this session follows the user as they proceed through the checkout. My problem is, if a customer orders say 10 items, they have the option to inp

Re: [PHP] Extending 'include' behavior in a function

2007-01-10 Thread Chris
Eli wrote: Hi, I want to create a function that does some stuff, and then includes another file in the place from where it was called. The idea is to run the included file not in the function, but in the place of the caller in the caller's environment (not in the function environment). For e

Re: [PHP] mssql_* overhead

2007-01-10 Thread Chris
bruce wrote: hi phillip... just to clarify regarding having the mysql resource ID in a session var. are you saying that you're able to more or less, do a mysql_connect and store the resourceID in a session var, which can then be used on any given page within your site, without having to recall t

Re: [PHP] Imap certificate error?

2007-01-10 Thread Chris
MIKE YRABEDRA wrote: When using imap_open to access my email server, I keep getting a invalid certificate error. The cert on the email server is issued from Geotrust and is quite common (Rapidssl). The error comes from it not being listed in the root certificates list (bundle). My question

Re: [PHP] Stored Procedure returns nothing on ROLLBACK

2007-01-11 Thread Chris
Philip Thompson wrote: On Jan 10, 2007, at 6:36 PM, Chris wrote: Philip Thompson wrote: Hi. I have been experiencing MSSQL woes lately. I have a stored procedure that I call in PHP using mssql_* functions. In my procedure, I have a transaction that rolls back on failure and commits on

Re: [PHP] uploaded fiel size limitiation

2007-01-11 Thread Chris
[EMAIL PROTECTED] wrote: Hi, I have a little script that was working fine when uploaded files up tp 16MB. I moved to other hosting company and use the same form/script. Not, I can't upload eitherr 2MB file. If you can't upload *any* files check that the upload_tmp_dir is set and see if that's

Re: [PHP] Re: Progressiv display with IE7

2007-01-11 Thread Chris
131 wrote: Btw, why is there those so ugly dbls quotes at each side of my so sweet nickname ? Your mail program is doing that. No idea about answering your original question. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] password protecting files, only allowing authorized users

2007-01-11 Thread Chris
Dave wrote: Hello, I'm using php and apache2 on a freebsd box. I know about .htaccess that the web server can provide, but i'm looking for something php can do, i want it to pop up a page when a user requests certain files, asking for a username and password. http://www.php.net/features.h

Re: [PHP] Hello

2007-01-14 Thread Chris
Edward wrote: How do I create a php document so that people in my nonprofit can vote on issues online through the organization's website? Search google for 'php voting script' or some such variant, I'm sure there are lots of them available. -- Postgresql & php tutorials http://www.designmagi

Re: [PHP] Hash/checksum for an image?

2007-01-15 Thread Chris
Brian Dunning wrote: I want to make sure that a jpg uploaded by the user is unique. I was thinking about storing a hash code for each image in its MySQL record (got a db record for each uploaded image already). Is there an easy way to generate such a string? an md5 should suffice. http://www

Re: [PHP] I lied, another question / problem

2007-01-16 Thread Chris
Beauford wrote: This is a bad way to test for a value also, unless you expecting only TRUE or FALSE and you are sure that it will always be set. Otherwise you should do something like this if ( isset($formerror) && $formerror != '' ) { // Display Error } The problem here is this. for

Re: [PHP] odbc_execute

2007-01-16 Thread Chris
ANZOLA Silvio wrote: Hi; I'm e newbie in PHP. I have to reda data from an AS400 system; I use an ODBC connection and I have to read data from a table with This the SQL Statement " $query_stm = "SELECT * " . "FROM cordo.plavt " . "where atcdim = ? " . "and atdtvf = 9

Re: [PHP] Where can I get the Printer extension?

2007-01-17 Thread Chris
Chuck Anderson wrote: It thought it would be bundled with my Windows version pf Php 4.4.1, but it is not. I've searched for it and can't find it at php.net. You didn't search very hard. On this page: http://php.net/printer Read the bit under "Installation". "This PECL extension is not bun

Re: [PHP] Where can I get the Printer extension?

2007-01-17 Thread Chris
Chuck Anderson wrote: Chris wrote: Chuck Anderson wrote: It thought it would be bundled with my Windows version pf Php 4.4.1, but it is not. I've searched for it and can't find it at php.net. You didn't search very hard. On this page: http://php.net/printe

Re: [PHP] Include files beneath pointed directory

2007-01-18 Thread Chris
Wikus Moller wrote: Hi. I have a windows server and I know this issue has been dealt with before but I can't find it, I want to include a file from a directory beneath or aside my home directory. Can I use the C:\directory\anotherdirectory\file.php in the include function like include "C:\direc

Re: [PHP] Displaying Results on different rows in tables

2007-01-18 Thread Chris
Dan Shirah wrote: The code above displays no information at all. What I want to do is: 1. Retrieve my information 2. Assign it to a variable 3. Output the data into a table with each unique record in a seperate row As Brad posted: echo ""; while ($row = mssql_fetch_array($result)) { $id

Re: [PHP] Storing dynamic attribute data in a db

2007-01-18 Thread Chris
Chris W. Parker wrote: Hello, This is now my 3rd attempt at writing this email. :) The first two were pretty long... I'm currently working on trying to find a solution that is both simple and flexible for storing the data of a complicated set of dynamic options for some of our product

Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-18 Thread Chris
esteban wrote: I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session variables to validate users, each page have something like this: if($_SESSION["validated"]==0){ header("Location: index.php"); exit; } This worked fine when i had only one domain, but when i began to u

Re: [PHP] nuSoap -method '' not defined in service

2007-01-18 Thread Chris
blackwater dev wrote: I have the following code but when I hit the page, I get the xml error of method '' not defined in service. I don't have a wsdl or anything defined. Is there more I need to do to get the SOAP service set up? Try the nusoap mailing list. They would have a lot more experien

Re: [PHP] Oracle Execute Function

2007-01-18 Thread Chris
Brad Bonkoski wrote: Brad Bonkoski wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500: Hello All, I have this Oracle function, and within my code I call it like this: $sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;"; $s

Re: [PHP] problems with sessions variables and virtual domains in apache

2007-01-21 Thread Chris
esteban wrote: The don't want to pass the session variable across domains. The problem is in the main domain, i don't know what happens, the session variable lost the value or is distroyed. Track down where is happens with lots of 'error_log' and 'print_r' calls. Work out where it breaks then

Re: [PHP] Php coding help - Newbie question

2007-01-22 Thread Chris
Sorry for troubling all again. I am trying to use the Pear DB_ldap for the above scripts. Does any one have any sample code for ldap_connect () ldap_search etc. http://php.net/ldap_connect http://php.net/ldap_search Both pages have examples. If you have a specific problem then post it. --

Re: [PHP] where match question

2007-01-22 Thread Chris
Don wrote: I have a db field that contains zip codes separated by comas. I am trying to get php to return all of the rows that contain a particular zip code. $query = "SELECT * FROM info WHERE MATCH (partialZIP) AGAINST ('$zip')"; $result = mysql_query($query) or die ("could not connect t

Re: [PHP] using return in include files

2007-01-22 Thread Chris
Aaron Axelsen wrote: I'm trying to figure out what the desired behavior is of using the return function to bail out of an include page. I did some testing, and this is what I concluded. First, I created the following file: "; ?> I then called it as follows: include('test.php'); include('test.

Re: [PHP] where match question

2007-01-22 Thread Chris
Don wrote: I appreciate your quick response, but I think the problem I'm having is in the query. Is WHERE MATCH () the proper format to use for getting multiple rows from the DB? Or is there something else I'm missing? Please don't top post, it's hard to follow what's going on and who's replie

Re: [PHP] having trouble with is_file() and is_dir() on 5.1.2

2007-01-22 Thread Chris
jekillen wrote: Hello php developers: I am having a problem with the following code: OS: FreeBSD v6.0 Apache 1.3.34 php 5.1.2 -> $cont is an array produced from opening and reading a directory: for($i = 0; $i < count($cont); $i++) { print $cont[$i].''; if(is_file($cont[$i]))

Re: [PHP] To many connections error message

2007-01-23 Thread Chris
Pintér Tibor wrote: @, or ask your hoster to disable display_errors That can be done in the script ;) ini_set('display_errors', false); -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] php installation problem

2007-01-23 Thread Chris
Ross wrote: Just installed apache and am looking at an error Warning: session_start() [function.session-start]: open(C:\DOCUME~1\Ross\LOCALS~1\Temp\php\upload\sess_ob822kp9sqlndjvu089r845e50, O_RDWR) failed: No such file or directory (2) in C:\Apache\Apache2\htdocs\ssn\editor.php on line 4

Re: [PHP] where match question

2007-01-23 Thread Chris
I appreciate all the input. I would definitely like to use a separate table for the zips, but I cannot figure out how make the form that stores them user friendly each entry can have any number of zips - from many to just a few. Also, the site is in development, so there is no existing data..

[PHP] HTML Input - Auto Format URL's

2007-01-24 Thread Chris
Hi, I'm currently looking into the best way to approach this. Users will be allowed to enter HTML, but I want to add the ability to automatically format URL's and e-mail addresses. The problem here is before formatting URL's we need to ignore URL's that are already used in HTML tags and that ar

Re: [PHP] Sporadic MSSQL connection error

2007-01-28 Thread Chris
[EMAIL PROTECTED] wrote: Hi I'm having a sporadic connection problem with MSSQL. I have a php script which is called by a folder scanning application and sometimes it can run for hours without problem but other times it will run for just a few minutes and return connection errors. I tried usi

<    1   2   3   4   5   6   7   8   9   10   >