Re: [PHP] Re: help with multi dimensional arrays

2007-05-24 Thread Navid Yar
Hello Everyone, I have a problem with GET strings. I use $_SERVER["REDIRECT_QUERY_STRING"] to get the value-pairs in the URL. The problem is that there is a cID variable that keeps amending itself to the string continuously everytime someone clicks on a different category link on the website. For

Re: [PHP] Re: Send HTML from PHP scripts ...

2007-05-24 Thread Chris
If you are intending to send HTML email you must set the appropriate mime-type in the header. And the rest ;) It's pretty hard to get it all working properly. I'd suggest the OP check out http://phpmailer.sourceforge.net/ It does most of the work for you. -- Postgresql & php tutorials http:

[PHP] Re: help with multi dimensional arrays

2007-05-24 Thread Jared Farrish
Also, when I get PHP errors, if not obvious, I check the previous line also... If says something like "error on line 7" I will look at both line six and seven. I used the notepad-error-of-death method: 1. Use only notepad for php scripting (or some BASIC text editor, with exactly ONE undo). 2.

[PHP] Re: Uploading Files into MySQL

2007-05-24 Thread Jared Farrish
I am working on a script to upload files into MySQL db. The following script uploads to a file system how do I go about uploading the file into the DB? Where do I put the SQL statement in the code below? Let's see: script upload file mysql database Hmm, add php and you have Google php scr

Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Micky Hulse
Micky Hulse wrote: Looks like you are missing a comma on line 3. Doi, meant "semi-colon", not comma... Lol. Also, when I get PHP errors, if not obvious, I check the previous line also... If says something like "error on line 7" I will look at both line six and seven. Of course, depends on

[PHP] Uploading Files into MySQL

2007-05-24 Thread [EMAIL PROTECTED]
I am working on a script to upload files into MySQL db. The following script uploads to a file system how do I go about uploading the file into the DB? Where do I put the SQL statement in the code below? 10) { die("File exceeds allowed size.");

[PHP] Re: Scalable Site Architecture

2007-05-24 Thread Jared Farrish
On Wed, May 9, 2007 2:10 pm, bruce wrote: > In looking for what's required fo a site, I'm trying to find > docs/overview/mentors to talk to/etc,... > > Basically, I'm considering what's required in terms of > hardware/apps/functionality for each server to be able to support a > site/system of ~10

Re: [PHP] Scalable Site Architecture

2007-05-24 Thread Richard Lynch
On Wed, May 9, 2007 2:10 pm, bruce wrote: > In looking for what's required fo a site, I'm trying to find > docs/overview/mentors to talk to/etc,... > > Basically, I'm considering what's required in terms of > hardware/apps/functionality for each server to be able to support a > site/system of ~100,

Re: [PHP] RE: Bounty

2007-05-24 Thread Richard Lynch
On Tue, May 15, 2007 1:33 am, Brad Sumrall wrote: > As a person who has come here in the recent past asking free lancer > help and > received nothing but near-useless references even though I was asking > specific php coding related questions. Now I com to the list offering > legit > funding to my

Re: [PHP] ftp root dir?

2007-05-24 Thread Richard Lynch
On Tue, May 22, 2007 10:19 am, Al wrote: > I know that; but, I writing a script, that can be used on different > servers, which creates a directory and I want to > make certain it is created on the DOC ROOT. I don't want the user to > have to test the ftp connection with a ftp utility > program fi

Re: [PHP] ftp root dir?

2007-05-24 Thread Richard Lynch
On Tue, May 22, 2007 9:50 am, Al wrote: > Can I assume that all ftp_connect()s will make the current dir the > DOC_ROOT? Probably not. If I FTP connect to *my* webhosted servers, I'm put into a directory which contains 'www' and 'php' and 'private' which are set up by the host for 'DOCUMENT_ROOT'

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 5:37 am, Shannon Whitty wrote: > THanks, > > That's what I thought... > > I really only need to check for one value = "success" - anything else > should > redirect back to the form entry page and display whatever result has > been > returned from the remote site. > > cUrl sho

Re: [PHP] PHP Data Mining/Data Scraping

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 5:25 am, Shannon Whitty wrote: > THanks, > > I will have far to much data to append to a GET request so a POST is > the > best option I think. Also consider RSS, REST, RPC and SOAP as long-term solutions with increasing overhead/functionality. These have the advantage of havi

Re: [PHP] System wide variable

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 4:27 am, Darren Whitlen wrote: > John Comerford wrote: > Not thought about the memory engine actually. Will give that a try and > see how it turns out. Let us know. I'd have GUESSED that MySQL would have just cached something that small and oft-used in RAM anyway, so a MySQL

Re: [PHP] System log in problems

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 6:04 pm, Stut wrote: > Richard Lynch wrote: >> There are probably a dozen things more that could be going wrong... >> You'll have to dig deeper into what's happening to find out. > > I've just gotta ask which part of the following made you think IE... > > > Operating system is

Re: [PHP] convert numerical day of week

2007-05-24 Thread Richard Lynch
On Tue, May 22, 2007 11:46 am, Bosky, Dave wrote: > How can I convert the numerical day of week to the string version? > > Example, if the day of the week is 1 I would like to print out > 'Sunday'. $days = array(1=>'Sunday', 'Mondy', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); ech

Re: [PHP] problem with composing URL with GET Variables

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 1:39 am, Angelo Zanetti wrote: > Dear all. > > I have a script that is called by an AJAX popup. Now I use an image > file to get the path of an image for an tag > > eg: > > > > > the $getImageURL is composed as follows: > > $getImageURL = "getImage.php?imageid=". > $imageID.

Re: [PHP] System wide variable

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 4:08 am, Darren Whitlen wrote: > Stut wrote: >> Darren Whitlen wrote: >>> I have a PHP script that reads and updates either a small file or a >>> mysql database. This script is called from several places every .5 >>> seconds. >>> >>> I would like to move this file to a variab

Re: [PHP] System wide variable

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 3:52 am, Darren Whitlen wrote: > Hi, > I have a PHP script that reads and updates either a small file or a > mysql database. This script is called from several places every .5 > seconds. Errr. Okay. Seems kind of frequent to me... What/why is going on here? You may get a M

Re: [PHP] zend framework

2007-05-24 Thread Jochem Maas
Richard Lynch wrote: > On Wed, May 23, 2007 9:58 am, Greg Donald wrote: >> Has anyone looked at the Zend Framework lately? >> >> http://framework.zend.com/manual >> >> I've been playing with a few parts of it off and on the past couple of >> days. It seems really heavy overall and there is no Java

Re: [PHP] Form Validation Issues

2007-05-24 Thread Robert Cummings
On Thu, 2007-05-24 at 17:58 -0500, Richard Lynch wrote: > > On Wed, May 23, 2007 10:48 am, Robert Cummings wrote: > > On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote: > >> On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: > >> > [-- SNIPPITY SNIP SNIP --] > >> > != 'Texas' || $value!= 'TX' || $va

Re: [PHP] Embedded Image from Database

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 9:09 am, Bagus Nugroho wrote: > I was trying to put embedded image on HTML Mail using PHP Mailer, my > problem is my image does not located on filesystem but located within > MySQL Server. > > How I can put image from database into HTML Mail. Well, it's got to get attacehd to

Re: [PHP] php upload files

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 6:07 am, kats Ant wrote: > Hi all a i am running a windows 2003 server with IIS. I have created a > php script that uploads a file to a server. > > in the server i have users and a user1 has permission to folder1, > user2 has permissions to folder2. I want an administrator to

Re: [PHP] How to eject cd-rom with php code?

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 6:23 am, Chetan Graham wrote: > Hi all, > I am writing a script and need to eject the cd-rom drive at some > point. > Does anyone have an idea how to do this? > This is a simple command isn't it? > I greatly appreciate your help If you need to eject the CD ROM drive on the sam

Re: [PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.

2007-05-24 Thread Brett Davidson
Richard Lynch wrote: On Wed, May 23, 2007 3:36 pm, Brett Davidson wrote: Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3 CGI under SuExec in FastCGI mode. Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix permissions 600 (read and write for user only) r

Re: [PHP] Creating process and do actions with signals

2007-05-24 Thread Richard Lynch
exec() will not return control to PHP to "listen" to SIGs until it is done. get testing2.php to background itself or tack " &" on to the end of the exec command or... On Wed, May 23, 2007 6:59 am, [EMAIL PROTECTED] wrote: > Hi, > > I have this script testing.php that I run on a Linux machine thru

Re: [PHP] System log in problems

2007-05-24 Thread Stut
Richard Lynch wrote: There are several/many things it COULD be... First Guess: header("Location: logged_in_page.php"); Some versions of IE will figure out what you meant with the above WRONG code, but will NOT carry the Cookie for your session along with it, so you're bounced back as if you ne

Re: [PHP] Re: Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Stut
Richard Lynch wrote: Apache starts up as "root" process to do some god-like things and then immediately changes its user-ness to the setting in httpd.conf and spawns off its children after that. Not under Win32 it doesn't. How that interacts with the goofy Windows "Services" and settings in t

Re: [PHP] Form Validation Issues

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 10:48 am, Robert Cummings wrote: > On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote: >> On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: >> > [-- SNIPPITY SNIP SNIP --] >> > != 'Texas' || $value!= 'TX' || $value != 'Utah' || $value!= 'UT' >> || $value >> > != 'Vermont' || $v

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 4:50 pm, Stut wrote: > Richard Lynch wrote: >> On Thu, May 24, 2007 7:44 am, Stut wrote: >>> Darren Whitlen wrote: Stut.. I've only been here one day, and I think I'm right in saying that your the one around here that gets annoyed really easy ;) >>> Not re

Re: [PHP] System log in problems

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 4:51 pm, Rich Peterson wrote: > Let me start by saying I am not 100% sure this > is the correct board to post this to. I hope it is > because as i have watched this list it contains > some very helpful people. > > I have search for an answer to this and cannot > seem to find it

[PHP] Re: Include???

2007-05-24 Thread Jared Farrish
Perhaps there is some whitespace before/after the 'C'... echo "'$_POST[status_code]'\n"; You should then see some whitespace inside the '' so you'll know it's there. This is a VERY good debugging technique to adopt. :-) My own methodology is to use one of the following to peer into an array

Re: [PHP] Re: Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 5:29 pm, Jared Farrish wrote: >> >> This *might* be correct with PHP as an Apache Module, but I doubt >> it. >> >> I think it's more like: >> >> Whatever -> PHP -> stdio.h File System calls >> >> "Whatever" will affect what user is running PHP and thus what >> permissions they

Re: [PHP] Form Validation Issues

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 7:41 am, kvigor wrote: >if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' || This mess will *ALWAYS* evaluate to TRUE, because the $value is ALWAYS only one value, and thus the other 99 values are going to evaluate to TRUE and you have || between them... So y

Re: [PHP] Include???

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 10:53 am, Daniel Brown wrote: > don't need a space in your include command. Just type it out as if it > were > a function: include('complete_save.php'); You don't need the parens either -- It's NOT a function at all. It's a language construct. The space should probably be l

Re: [PHP] Include???

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 9:24 am, Dan Shirah wrote: > Okay, I think I'm doing everything right, but for whatever reason my > include > isn't working. > > echo $_POST['status_code']; Perhaps there is some whitespace before/after the 'C'... echo "'$_POST[status_code]'\n"; You should then see some whi

Re: [PHP] zend framework

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 9:58 am, Greg Donald wrote: > Has anyone looked at the Zend Framework lately? > > http://framework.zend.com/manual > > I've been playing with a few parts of it off and on the past couple of > days. It seems really heavy overall and there is no Javascript > integration anywhere

[PHP] Re: Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
This *might* be correct with PHP as an Apache Module, but I doubt it. I think it's more like: Whatever -> PHP -> stdio.h File System calls "Whatever" will affect what user is running PHP and thus what permissions they have, but that's about it. Is it then: Whatever['Apache.exe'] (owns) Sys

Re: [PHP] Form Processing Question - Empty Fields

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 11:40 am, Stephen wrote: > I have a script to process the post from a form. > > The form is used to upload photos and has fields for the filename, > alt text, caption and a checkbox to indicate if this photo is the > main page image rotation. > > I wanted to build a gener

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread David Giragosian
On 5/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, May 23, 2007 1:46 pm, Rahul Sitaram Johari wrote: > Apache 2.2, PHP5 & mySQL 5 on Windows 2003. > I have some files sitting on a Network Drive accessible on the Windows > 2003 > Server. But my php script is not able to open the files.

Re: [PHP] format date field

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 11:45 am, Mike Ryan wrote: > I am reading in a date field from a mysql database the field on the > screen > shows up as 2007-05-01 on the screen I would like the field to show > 05-01-2007 currently I am issueing the following command print > $row['open']; how can I format t

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 10:43 am, Jared Farrish wrote: > For the advanced PHP gurus on the list, is it accurate to characterize > PHP > as relying on Apache for file manipulation? Is it accurately described > as: > > Process Request->PHP->Apache->[File System > Poof!]->Apache->PHP->Process This *migh

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 10:29 am, Rahul Sitaram Johari wrote: > > You may have something here. > Problem is, I don¹t know how to mess with how & under what user Apache > is > running ­ and no one else here does either so basically I have to > figure > this one out! I would like to, as you suggested, t

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 1:46 pm, Rahul Sitaram Johari wrote: > Apache 2.2, PHP5 & mySQL 5 on Windows 2003. > I have some files sitting on a Network Drive accessible on the Windows > 2003 > Server. But my php script is not able to open the files. > > Let¹s say there¹s a database on X:\Transfer\test.dbf

Re: [PHP] Weird behaviour with move_uploaded_file on CGI version of PHP.

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 3:36 pm, Brett Davidson wrote: > Platform : FreeBSD 6.2 Release with Apache 2.0.59 running PHP 5.2.1_3 > CGI under SuExec in FastCGI mode. > > Issue: move_uploaded_file ALWAYS crfeates uploaded files with Unix > permissions 600 (read and write for user only) regardless of > own

Re: [PHP] System log in problems

2007-05-24 Thread Stut
Rich Peterson wrote: Hi All Let me start by saying I am not 100% sure this is the correct board to post this to. I hope it is because as i have watched this list it contains some very helpful people. I have search for an answer to this and cannot seem to find it. We have a subscription based s

Re: [PHP] Include file questions

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 3:48 pm, Stephen wrote: > 1) Does the filename extension matter? I prefer *.inc? It seems to > work fine, but I only see others using *.php >From a strictly "will it work" stand-point, the extension can be anything you want or none at all. HOWEVER, there are various security

Re: [PHP] Question about using ftp_put() for copying files

2007-05-24 Thread Al
What puzzles me is that one path must be absolute and the other relative to the root. And, I've got chdir to the destination dir. I know about ftp having its own root. In my code, I have a check to make certain the ftp root is the same as the $_SERVER[document_root]. Richard Lynch wrote: O

[PHP] System log in problems

2007-05-24 Thread Rich Peterson
Hi All Let me start by saying I am not 100% sure this is the correct board to post this to. I hope it is because as i have watched this list it contains some very helpful people. I have search for an answer to this and cannot seem to find it. We have a subscription based site that is developed

Re: [PHP] help with multi dimensional arrays

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 9:59 pm, James Lockie wrote: > I get a syntax error on strlen. > > > $newTypes = array(); > $newTypes[0] = array(); > $newTypes[0][0] = "Starting with" > $newTypes[0][1] = strlen( $newTypes[0][0] ); If you are missing the ; in the line before, PHP gets pretty

Re: [PHP] Database error: Invalid SQL:

2007-05-24 Thread Richard Lynch
On Wed, May 23, 2007 11:42 pm, wisuttorn wrote: > > I have a problem please help me > when i loged in to egroup this show " > Database error: Invalid SQL: SELECT DISTINCT > egw_cal_repeats.*,egw_cal.*,cal_start,cal_end,cal_recur_date FROM > egw_cal > JOIN egw_cal_dates ON egw_cal.cal_id=egw_cal_da

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Stut
Richard Lynch wrote: On Thu, May 24, 2007 7:44 am, Stut wrote: Darren Whitlen wrote: Stut.. I've only been here one day, and I think I'm right in saying that your the one around here that gets annoyed really easy ;) Not really, I just tend to be a bit more vocal about it. I daresay every reg

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 7:44 am, Stut wrote: > Darren Whitlen wrote: >> Stut.. >> I've only been here one day, and I think I'm right in saying that >> your >> the one around here that gets annoyed really easy ;) > > Not really, I just tend to be a bit more vocal about it. I daresay every regular has

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 6:23 am, Jean-Christophe Roux wrote: > Hello, > I have folder A with the following php script: > session_start(); > $_SESSION['dummy']=10; > echo $_SESSION['dummy']; > ?> > in folder B (same level as A), there is > session_start(); > echo $_SESSION['dummy']; > ?> > when run

Re: [PHP] php hosting-mediatemple/dreamhost

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 8:04 am, blackwater dev wrote: > Forgive me if this is a bit off topic but I currenly have several > sites > hosted with dreamhost, it's cheap and well prone to be slow. Does > anyone > have experience with mediatemple? I would just be running php/mysql > sites. I found Medi

Re: [PHP] Creating an executer

2007-05-24 Thread Richard Lynch
I only skimmed this, but afaik the only way to get the child PID is to "fork" rather than to "exec". On Thu, May 24, 2007 10:10 am, [EMAIL PROTECTED] wrote: > Hi, > > Summary: > > 1. I execute script1 that will run in the background (daemon) > 2. script1 needs to execute script2 and capture STDERR

Re: [PHP] Protecting MySQL Injection from PHP form

2007-05-24 Thread Richard Lynch
Yes, prepared statements protect from SQL injection because the "data" is clearly separated from the SQL code, and MySQL knows what to do with "data" The rest of your code has absolutely NOTHING to do with SQL injection, but with data validation and business logic. On Thu, May 24, 2007 11:10 am,

[PHP] Re: Developer / Client Documents

2007-05-24 Thread Jared Farrish
I am trying to start a small (Read: Tiny) web development company from home, which will handle only a few light contracts. I have been spending some time searching Google for common documents used by developers and their clients to help layout all the goals and features the site might have. Unfor

Re: [PHP] Check if Record was Entered Today.

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 12:42 pm, Rahul Sitaram Johari wrote: > > Ave, > > I have a dbase (dbf) database and I¹m using PHP¹s dbase function to > open & > search the database. > Each row in the database contains an Account Number and the Date it > was > inserted. > > I want to search this database for

Re: [PHP] Question about using ftp_put() for copying files

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 2:37 pm, Al wrote: > Can anyone explain what's going on. > > If I assign $source= $source_dir . $file; > $source_dir is the absolute path i.e., > /home/x/public_html/EditPage/ > > And $dist= $dist_dir . $file; > $dist_dir is simply relative to $_SERVER[document_root]; i.e

Re: [PHP] Did I find a bug in PHP 5.2.2?

2007-05-24 Thread Richard Lynch
On Thu, May 24, 2007 3:15 pm, Patrick Baldwin wrote: > > First off, I'd like to explain I'm not a PHP programmer, so please > bear with me. I'm trying to configure a Horde/IMP server. It worked > yesterday. I installed rsync via packages, rebooted, and now no one > can log into my Horde/IMP insta

[PHP] Developer / Client Documents

2007-05-24 Thread Anthony Hiscox
First my problem, then a tiny bit of background information. I am trying to start a small (Read: Tiny) web development company from home, which will handle only a few light contracts. I have been spending some time searching Google for common documents used by developers and their clients to help

RE: [PHP] Did I find a bug in PHP 5.2.2?

2007-05-24 Thread Jim Moseby
> It worked yesterday. I don't have any idea what could cause your problem, but with your permission I think I'll have some t-shirts printed up with this slogan. ;-) JM --- "It worked yesterday." - unknown -- PHP General Mailing List (http://www.php.net/) T

[PHP] Did I find a bug in PHP 5.2.2?

2007-05-24 Thread Patrick Baldwin
First off, I'd like to explain I'm not a PHP programmer, so please bear with me. I'm trying to configure a Horde/IMP server. It worked yesterday. I installed rsync via packages, rebooted, and now no one can log into my Horde/IMP install. Why am I posting here? Well, when I look in httpd-error.

[PHP] Re: Check if Record was Entered Today.

2007-05-24 Thread Jared Farrish
I believe you need a "while" instead of an "if". The "if" will only run until the first occurance is true. Whereas a "while" will run to find all results that are true until it goes thru all of the result rows.. No, I think he's checking to make sure that $db contains a resource id and not

[PHP] Re: php hosting-mediatemple/dreamhost

2007-05-24 Thread Jared Farrish
I use MediaTemple, and what I like is that it's a company geared towards a category of developers, and not ANY person who wants a website. So the services and support are commensurate for a company that offers services primarily aimed at professional design-oriented firms and/or developers, and no

[PHP] Question about using ftp_put() for copying files

2007-05-24 Thread Al
Can anyone explain what's going on. If I assign $source= $source_dir . $file; $source_dir is the absolute path i.e., /home/x/public_html/EditPage/ And $dist= $dist_dir . $file; $dist_dir is simply relative to $_SERVER[document_root]; i.e., just plain /test To get ftp_put() to work, I must

Re: [PHP] php hosting-mediatemple/dreamhost

2007-05-24 Thread Robert Cummings
On Thu, 2007-05-24 at 09:04 -0400, blackwater dev wrote: > Forgive me if this is a bit off topic but I currenly have several sites > hosted with dreamhost, it's cheap and well prone to be slow. Does anyone > have experience with mediatemple? I would just be running php/mysql sites. One of my cus

Re: [PHP] Check if Record was Entered Today.

2007-05-24 Thread Dan Shirah
Ave, I have a dbase (dbf) database and I¹m using PHP¹s dbase function to open & search the database. Each row in the database contains an Account Number and the Date it was inserted. I want to search this database for to see if the Account number ($thekey) was inserted today (using date() to fi

RE: [PHP] Check if Record was Entered Today.

2007-05-24 Thread Jim Moseby
> -Original Message- > From: Rahul Sitaram Johari [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 24, 2007 1:42 PM > To: PHP > Subject: [PHP] Check if Record was Entered Today. > > > > Ave, > > I have a dbase (dbf) database and I¹m using PHP¹s dbase > function to open & > search the

[PHP] Check if Record was Entered Today.

2007-05-24 Thread Rahul Sitaram Johari
Ave, I have a dbase (dbf) database and I¹m using PHP¹s dbase function to open & search the database. Each row in the database contains an Account Number and the Date it was inserted. I want to search this database for to see if the Account number ($thekey) was inserted today (using date() to fi

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-24 Thread Jared Farrish
Also, you should be checking against type (expecting a number? a boolean value? a string?) and then checking against expected length requirements (such as firstname can only be 80 characters long max, so maybe check for if (strlen($var) > 80) { do something; } In unit testing, you build you

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-24 Thread Darren Whitlen
Jason Pruim wrote: Hi Everyone, I think I have found away to prevent SQL code injection into my database and just wanted to get everyones comments on my method. if (!isset($_POST['FName']) || empty($_POST['FName'])) $errmsg .="Please enter your name"; if (!isset($_POST['LName']) || empty($_P

Re: [PHP] Protecting MySQL Injection from PHP form

2007-05-24 Thread Stephen
Jason Pruim <[EMAIL PROTECTED]> wrote: Hi Everyone, I think I have found away to prevent SQL code injection into my database and just wanted to get everyones comments on my method. Am I correct in thinking that I'm fairly safe from the bad people and the stupid users? You ne

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-24 Thread Jared Farrish
I'm not sure exactly what kind of sanitization you think you're doing, but if all you do is check to see if it's empty (empty() implements isset(), empty() checks to see if it's set, then if it evaluates to an empty variable), that's not much sanitization. What you need to do is check for SQL inj

[PHP] Protecting MySQL Injection from PHP form

2007-05-24 Thread Jason Pruim
Hi Everyone, I think I have found away to prevent SQL code injection into my database and just wanted to get everyones comments on my method. if (!isset($_POST['FName']) || empty($_POST['FName'])) $errmsg .="Please enter your name"; if (!isset($_POST['LName']) || empty($_POST['LName'])) $

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
On 5/24/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote: You may have something here. Problem is, I don't know how to mess with how & under what user Apache is running – and no one else here does either so basically I have to figure this one out! I would like to, as you suggested, try and "g

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Rahul Sitaram Johari
You may have something here. Problem is, I don¹t know how to mess with how & under what user Apache is running ­ and no one else here does either so basically I have to figure this one out! I would like to, as you suggested, try and ³get Apache to run as a service under a user that can access the

[PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
On 5/24/07, Rahul Sitaram Johari <[EMAIL PROTECTED]> wrote: I think you got a little confused with a previous post of mine. Mac OS X is Not in this scenario at all!!! So completely Eradicate it from this current Scenario. This is a complete PHP/Apache on Windows 2003 Scenario. That's it! So wh

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Rahul Sitaram Johari
On 5/24/07 11:04 AM, "Jared Farrish" <[EMAIL PROTECTED]> wrote: > Well, I'll say you've dramatically upped the ante by having an Apache server > on a windows box attempt to mount and read a file on a MacOS machine. Yipes! > > So let me get this straight: > > * Apache is on Windows Server 2003.

[PHP] Re: SOAP: xsd:choice maxOccurs=unbounded, and element order

2007-05-24 Thread Caroline Maynard
Simon Detheridge wrote: Incidentally, the full-blown (and rather complicated I'm afraid) schema/wsdl for what I'm *actually* trying to do is at http://www.widgit.com/cml/symgate.wsdl if that helps. 404 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
Well, I'll say you've dramatically upped the ante by having an Apache server on a windows box attempt to mount and read a file on a MacOS machine. Yipes! So let me get this straight: * Apache is on Windows Server 2003. * PHP is running on Apache. * A folder containing scripts/data/both is on a

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Rahul Sitaram Johari
Ave, Instead of going back & forth on various function & path tests, I wrote a small code containing different suggested combinations of PATH and also the gettype() as Jim had requested. Following is the Code and the Output. Code: $filename = 'X:\send\Transfer\LIVE\live.txt'; echo gettype($filen

[PHP] Re: ftp_put() problem??

2007-05-24 Thread Al
Can anyone explain what's going on. This works; but, I don't understand it. Two folks pointed out I had my $remote and $local files reversed. I fixed that; but, it still didn't work. This does work: $source_dir is the absolute path i.e., /home/x/public_html/EditPage ftp_chdir($dist_dir);

[PHP] Creating an executer

2007-05-24 Thread lists
Hi, Summary: 1. I execute script1 that will run in the background (daemon) 2. script1 needs to execute script2 and capture STDERR, STDOUT and exitcode from script2 if script2 exits before SIGTERM is received. 3. If I send SIGTERM to script1 it should kill script2, and write to DB (or log fi

Re: [PHP] Project Management

2007-05-24 Thread Dan McCullough
On 5/24/07, Christian Haensel <[EMAIL PROTECTED]> wrote: Hi Edward, thanks for your comment. I use a lab book too... And already fille two of them in the last 8 weeks I just wanna use the project management thing to collect my ideas, and write a howto for "future generation developers" who

Re: [PHP] Re: Form Validation Issues

2007-05-24 Thread Tijnema
On 5/23/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: On Thursday 24 May 2007 00:51, Greg Donald wrote: > As I watch PHP de-evolve into Java, I find myself wanting something > lighter weight and with a smaller syntax. PHP has long since spawned into something uncontrollable. Compare the numbe

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Stut
Jean-Christophe Roux wrote: Stut wrote >What you're wanting to do can be achieved by setting the path on the >session cookies. You may be able to do this by calling ini_set to change >session.cookie_path before calling session_start. ini_set('session.cookie_path', '/A/'); session_start(); Tha

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Jean-Christophe Roux
Stut wrote >What you're wanting to do can be achieved by setting the path on the >session cookies. You may be able to do this by calling ini_set to change >session.cookie_path before calling session_start. ini_set('session.cookie_path', '/A/'); session_start(); That's a good solution; it works f

Re: [PHP] php hosting-mediatemple/dreamhost

2007-05-24 Thread Tijnema
On 5/24/07, blackwater dev <[EMAIL PROTECTED]> wrote: Forgive me if this is a bit off topic but I currenly have several sites hosted with dreamhost, it's cheap and well prone to be slow. Does anyone have experience with mediatemple? I would just be running php/mysql sites. Thanks! I don't ha

RE: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Ford, Mike
On 24 May 2007 13:22, Jean-Christophe Roux wrote: > Hello, > > Thank you for the answers. The issue is that the same codes > are in folders A and B. When they are run from two different > browsers, I am getting the behavior I 'd like to see with two > session ids being created and therefore no sh

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Stut
Rahul Sitaram Johari wrote: How exactly do you run Apache manually as your own user on Windows 2003? You read the Apache documentation for the version your're using on Windows at http://httpd.apache.org/ -Stut On 5/24/07 5:32 AM, "Stut" <[EMAIL PROTECTED]> wrote: Does the user Apache is

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Rahul Sitaram Johari
How exactly do you run Apache manually as your own user on Windows 2003? On 5/24/07 5:32 AM, "Stut" <[EMAIL PROTECTED]> wrote: > Does the user Apache is running as have permission to access the network > at all? It's fairly common for services to lack that access for > (shockingly for Windows)

Re: [PHP] Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Rahul Sitaram Johari
Ave, UNC paths didn't work, i.e., ("server\\share\\Transfer\\test.dbf"). I have no clue how to Run Apache as a particular User on Windows! I installed Apache using the Installer available - but I really don't know anything else 'user' related about Apache. Both "SYSTEM" and the Computer I'm

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Jochem Maas
Darren Whitlen wrote: > Stut wrote: ... > > Stut.. > I've only been here one day, and I think I'm right in saying that your > the one around here that gets annoyed really easy ;) when he goes quiet - that's when it's time to worry ;-) -- PHP General Mailing List (http://www.php.net/) To unsub

[PHP] php hosting-mediatemple/dreamhost

2007-05-24 Thread blackwater dev
Forgive me if this is a bit off topic but I currenly have several sites hosted with dreamhost, it's cheap and well prone to be slow. Does anyone have experience with mediatemple? I would just be running php/mysql sites. Thanks!

RE: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Edward Kay
> Stut.. > I've only been here one day, and I think I'm right in saying that your > the one around here that gets annoyed really easy ;) I don't think Stut gets annoyed more than any of the others on this list. Please remember though that a) Stut's answers tend to be very high quality and b) Top

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Stut
Darren Whitlen wrote: Stut.. I've only been here one day, and I think I'm right in saying that your the one around here that gets annoyed really easy ;) Not really, I just tend to be a bit more vocal about it. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Darren Whitlen
Stut wrote: Jean-Christophe Roux wrote: Thank you for the answers. The issue is that the same codes are in folders A and B. When they are run from two different browsers, I am getting the behavior I 'd like to see with two session ids being created and therefore no sharing of $_SESSION variabl

Re: [PHP] two php scripts with same $_SESSION variables

2007-05-24 Thread Stut
Jean-Christophe Roux wrote: Thank you for the answers. The issue is that the same codes are in folders A and B. When they are run from two different browsers, I am getting the behavior I 'd like to see with two session ids being created and therefore no sharing of $_SESSION variables. But when

  1   2   >