Re: [PHP] App to put a whole PHP Site in CD/DVD

2010-03-02 Thread Sion Duncan
The way I've done this in the past it with XAMPP and a simple autorun.inf
file.

Code the autorun.inf file to start Apache and MySQL, then launch the users
web browser (I used IE for this, as i knew everyone would have it
installed).

The only problem, is that this method only works on windows systems.


On 2 March 2010 14:19, Bastien Koert phps...@gmail.com wrote:

 On Tue, Mar 2, 2010 at 6:11 AM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
  On Tue, 2010-03-02 at 08:12 -0300, Juan wrote:
 
  Hi,
  I need an application to run mysql/php/apache or similar in one cd, to
  make a presentation.
 
  The presentation itself is a php site that uses mysql to do some
  queries, to show data, and I would like to know how to embbed php and
  mysql to one cd for a presentation. I mean; one cd containing the
  whole site, and when the user inserts it on the cd/dvd reader it's
  able to use the website like if him/her would be using the http
  protocol. So, this application should let me put mysql/php/apache in
  the cd, then it should work from the cd.
 
  I would like to use some free software application, I would like to
  avoid using commercial branches because I need this for a commercial
  project that isn't able to pay licenses. Also I preffer Free Software.
 
  So, if you know some appplication that helps me to develop this, and
  also if I would be able to make the cd multiplatform for the principal
  OS ( Gnu/linux, win, mac ) even better.
 
  Thanks a lot.
 
  Juan
 
 
 
  If you want this sort of setup, then why not go with a live Linux CD/DVD
  that has the website on. You can lock the live OS down so that it is in
  what's called a kiosk mode, which should meet your requirements.
 
  Thanks,
  Ash
  http://www.ashleysheridan.co.uk
 
 
 

 Might wanna look at phpdock ( http://www.nusphere.com/products/phpdock.htm)

 --

 Bastien

 Cat, the other other white meat

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
~ Sion Duncan.

PHd in Sarcasm from the University of Smugness.

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning.


[PHP] PDO buffered query problem

2009-02-23 Thread Stewart Duncan

Hi there,

I'm having some serious problems with the PHP Data Object functions. I'm 
trying to loop through a sizeable result set (~60k rows, ~1gig) using a 
buffered query to avoid fetching the whole set.


No matter what I do, the script just hangs on the PDO::query() - it 
seems the query is running unbuffered (why else would the change in 
result set size 'fix' the issue?). Here is my code to reproduce the problem:


?php
$Database = new PDO(
'mysql:host=localhost;port=3306;dbname=mydatabase',
'root',
'',
array(
PDO::ATTR_ERRMODE = PDO::ERRMODE_EXCEPTION,
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY = true
)
);

$rQuery = $Database-query('SELECT id FROM mytable');

// This is never reached because the result set is too large
echo 'Made it through.';

foreach($rQuery as $aRow) {
print_r($aRow);
}
?

If I limit the query with some reasonable number, it works fine:

$rQuery = $Database-query('SELECT id FROM mytable LIMIT 10');

I have tried playing with PDO::MYSQL_ATTR_MAX_BUFFER_SIZE and using the 
PDO::prepare() and PDO::execute() as well (though there are no 
parameters in the above query), both to no avail.


Any help would be appreciated,

Stewart

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best way to get PHP5

2006-08-10 Thread Jonathan Duncan


On Wed, 9 Aug 2006, Chris W. Parker wrote:


Jonathan Duncan mailto:[EMAIL PROTECTED]
   on Wednesday, August 09, 2006 3:55 PM said:


If you want to really learn Linux, try Gentoo.  If you just want a
very good and easy to use Linux, go with SuSE.


To keep this related to the question I asked...

Do either of the latest builds of these distros have PHP5?


Thanks,
Chris.



I just checked the Gentoo portage tree and it has PHP 5.1.4 in it already. 
Having it in the portage tree means it is as good as installed.


I just checked the SuSE Linux 10.1 package listing and it comes with 
5.1.2:

http://www.novell.com/products/linuxpackages/suselinux/index_all.html

The answer to your question is yes.

Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best way to get PHP5

2006-08-09 Thread Jonathan Duncan


On Wed, 9 Aug 2006, Chris W. Parker wrote:


Hello,

Generally (well, actually 100%) I just use whatever version of PHP is
included with a certain distro (Redhat pre-Fedora, Fedora Core, CentOS).
None of the versions I've used have come with PHP5 and I'd really like
to get with the times and use PHP5.

I know that Fedora Core 5 offers PHP 5.1.2 but I've heard some negative
things about it in general (FC5).

I've never compiled PHP myself so admittedly I'm a bit skeered... Is the
recommended path to just go with whatever distro I prefer and then
download PHP5 from php.net and install it myself?

Thanks,
Chris.




Yes, I would recommend that.  If you are serious about using PHP for a 
while it would be benefitial to you to understand the installation aspect 
of the language.  If you are comfortable with the command line this should 
be pretty easy for you.  If not it will be a bit harder but still very 
possible.  Here are installation instructions from php.net:


http://www.php.net/manual/en/install.unix.php

Good luck!

Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Best way to get PHP5

2006-08-09 Thread Jonathan Duncan


On Wed, 9 Aug 2006, Chris W. Parker wrote:


Jack Gates mailto:[EMAIL PROTECTED]
   on Wednesday, August 09, 2006 10:16 AM said:


On Wednesday 09 August 2006 12:02, Chris W. Parker wrote:

I know that Fedora Core 5 offers PHP 5.1.2 but I've heard some
negative things about it in general (FC5).


What sort of negative things have you heard in general about (FC5)?


Honestly I don't remember. But I've now got a generally negative view of
FC5 versus previous versions (last one I used was 4 I think).

If you're aware of any FUD that's been spread about it, feel free to
speak the truth.



If you want to really learn Linux, try Gentoo.  If you just want a very 
good and easy to use Linux, go with SuSE.


Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] shebang line drive me nuts.

2006-08-07 Thread Duncan Hill
On Monday 07 August 2006 09:11, Jochem Maas wrote:
 hi Robert,

 thanks for thinking with me 

If the FS permissions to the binary are correct, odds are the file system is 
actually mounted noexec.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Newbie Form Question

2006-08-04 Thread Duncan Hill
On Friday 04 August 2006 13:27, Jay Blanchard wrote:
 [snip]
 I was wondering how simple it would be to set up a script to provide a
 subscribe/unsubscribe form for a list serve. The form would send an
 email to
 the subscribe address or unsubscribe address as selected.
 [/snip]

 I wondered about that the other day myself and came to the conclusion
 that it would be really simple. It must be, others have done it.

Not terribly difficult at all.  One SMTP library for PHP and you're away.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] writing to fild on another server

2006-08-04 Thread Duncan Hill
On Friday 04 August 2006 15:50, blackwater dev wrote:
 I have a web server and an images server.  My web server doesn't have
 enought space for the images, hence the images server.  I have to download
 properties from a realty database hourly and the data goes in to a db on my
 webserver while the image needs to be taken from a MSSQL db and written to
 the images server as an actual .jpg or .gif file.  Fopen, however, won't
 let me write using the http protocol.  How can I open and write files

NFS/CIFS mount?

Write locally, scripted FTP across?

Write locally, scripted rsync across?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Frameworks - Opinion

2006-08-03 Thread Jonathan Duncan


On Tue, 1 Aug 2006, Gabe wrote:

What's the common consensus as to a solid PHP framework to use for 
application development?  There seems to be a number of them out there, but 
I'm not sure which one's are the most robust, actively developed, secure, etc 
etc.


Thoughts?




I echo others in that there is not yet a common consensus.  I have 
started putting together my own framework as just a common directory 
structure and code repository from projects that I have worked on.  I 
prefer my own code because I have this bit of OCD about using code that I 
did not write if I do not fully understand every aspect of it, unless I 
fully trust the source.  I trust PEAR and often use some code from there.


Anyway, you asked about frameworks.  I have been spending some cycles 
looking at TYPO3 (http://typo3.com/) and so far it is pretty impressive. 
I have heard from others that it is quite robust and almost a CMS in 
itself.  However I have not fully explored all of it so I will hold my 
opinion on it until then.  I also hear the learning curve for TYPO3 is 
very steep but well worth the climb.


Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP Frameworks - Opinion

2006-08-03 Thread Jonathan Duncan


On Fri, 4 Aug 2006, Jens Kleikamp wrote:


Matt Todd wrote:


Because of this, I determined to build my own framework. This was a
few months ago, and Canvas[1] was the result of my labor. I produced
this framework while working on numerous projects at the university I
work at. This allowed me to build an application concurrently with the
framework and give it a good benchmark for usability, feature,
performance, etc.


M.T.

1. http://c.anvas.es/



Please do not recommend stuff like this.
It is a funky framework!




What do you mean by funky?  And why should he not recommend it?

Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fatal error: Call to undefined function mysql_create_db()

2006-05-27 Thread Duncan Hill
On Sat, May 27, 2006 11:02, Mark Sargent wrote:
 Hi All,


 I get the following,


 *Fatal error*: Call to undefined function mysql_create_db() in
 */usr/local/apache2/htdocs/createmovie.php* on line 6

Sounds like you don't have the MySQL component of PHP installed.  If
you're using the packaged version for your OS (of PHP), check that you
installed the php-mysql package (your package manager should let you
search for it).

If you're using a self-compiled PHP, sounds like you didn't compile in
MySQL(i) support.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] file Upload - checking file size before uploading

2006-05-10 Thread Duncan Hill
On Wednesday 10 May 2006 13:39, Jay Blanchard wrote:
 [snip]
 Is there anyway to check the size of a file before it starts uploading
 it?
 For instance, if the file is huge, and takes ages to upload, and is then
 rejected by the server, the user will be somewhat annoyed!
 [/snip]

 PHP is server-side and cannot check anything client-side. You cold use
 something client-side, like JavaScript, to check the file size and then
 deliver a warning if the file is too large.

Alternately ... This service only accepts files up to 10 MB.  Uploading 
anything larger will fail.

Assumes comprehension unfortunately.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] private $foo

2006-03-29 Thread Duncan Hill
On Wednesday 29 March 2006 15:43, Philip Thompson wrote:
  Of course, I remember programming with rocks and that was before we  
  had zero's. We only had one's and that was a programming nightmare.  
  You new guys at least have 1's and 0's to work with.
  tedd

 I laughed my head off about your 'rocks' statement! Thanks for that.  
 For those of you who didn't pick up on my sarcasm previously, do so  
 now. =D I'm not *that* young. Hehe

Rocks!  You had rocks!?

When I was a programmer, we had nothing but primeval chaos to program with.  
Worse than herding cats, and prone to returning random values whether your 
cat was dead or alive.  We would have killed to have rocks (let alone one's)!

:)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Why Should I Use Zend Optimizer?

2006-03-27 Thread Jonathan Duncan
I posted this on the Zend.com forums but have not been able to get a 
response yet.  So I decided to ask the people that know.


I do not understand the need for an optimizer.  What exactly is Zend 
Optimizer optimizing?  If it is changing my code, then how about if I just 
learn how to code better?  Is that all that Zend Optimizer is doing? 
Making my code better?


Instead of making a program to fix all the dumb things that programmers 
like me do, why not show us what is not working.  If post-incrementing is 
slower than pre-incrementing then I will just start pre-incrementing. 
What if I already write perfect code?  Would I still benefit from having 
Zend Optimizer on my system?


In other words, is Zend Optimizer a program designed to help poor coders 
have faster running code despite their lack of skill?  Or is it also 
optimizing other things?  If so, why are those things not already 
optimized?


Can anyone help me unfold this mystery?  I have read quite a bit about 
what Zend Optimizer is and perhaps I have missed the point.  So if there 
is a document that explains this, please direct me to it.


Thanks,
Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: setcookie security concerns [medium]

2006-03-17 Thread Duncan Hill
On Friday 17 March 2006 15:10, Kevin Davies - Bonhurst Consulting wrote:
 I just picked up this thread, so excuse me if I'm repeating or have totally
 missed the point.

 Another concern I picked up from a PHP security book is using '--' - which
 simply comments out the remainder of the line (with MySQL anyway).
 Therefore if your SQL is SELECT * FROM table WHERE user = '$user' AND pass
 = '$pass' a malicious visitor could enter a valid username followed by '--
 which may allow them entry to that person's account by creating the
 following:

 SELECT * FROM table WHERE user = 'valid_user'--' AND pass = '$pass'

A benefit to using something like PEAR::DB is access to the quotesmart() 
function, which quotes the input for you.  Your query can then look like

SELECT * FROM table WHERE user=$q_user AND pass=$q_pass

q_user and q_pass are derived from form input which is passed to quotesmart().  
Even if funky characters like ' and -- are included, the quoting should help 
prevent injection.

Validating input helps, but some input literally can be most characters under 
the sun.  It's easier to defend the entire system with some general purpose 
protections than try to guess every attack (imo).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] loop Q

2006-02-24 Thread Duncan Hill
On Friday 24 February 2006 10:34, William Stokes wrote:
 What does this do in a for loop?

 $counter+=1

Increments $counter.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Altering subject of email in a pop3 mailbox

2006-02-23 Thread Duncan Hill
On Thursday 23 February 2006 11:49, IG wrote:
  IG wrote:
  Is it possible to alter a subject line (or body for that matter) of an
  email in a pop3 mailbox?

 Thanks- I completely see your point.

 How do antispam filters work on client's computers? They seem to have no
 problem with adding to subjects. Also our hosting provider uses a spam
 filter which adds it to the subject line. However I am finding that not
 particularly good.

ISP Mailbox - POP3 over TCP/IP - client filter app - client pc mailbox

Once the data is in mid-stream across the net, the filtering app can affect it 
any way it likes.

Ditto for the ISP method, they just tend to do it as the mail is received and 
before it gets written to the mail spool.

You can change things on a POP server, if you have access to the OS on the POP 
server and can edit the mail spool.  Not normally available to anyone but the 
system administrator(s).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Routing downloads through PHP

2006-02-15 Thread Duncan Hill
On Wednesday 15 February 2006 11:05, J_K9 wrote:
 Here's the exact 500 error I'm getting:

Standard Apache error.  Look in your error log for more details like it 
suggests?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Routing downloads through PHP

2006-02-15 Thread Duncan Hill
On Wednesday 15 February 2006 11:35, J_K9 wrote:
 Duncan Hill wrote:
  On Wednesday 15 February 2006 11:05, J_K9 wrote:
  Here's the exact 500 error I'm getting:
 
  Standard Apache error.  Look in your error log for more details like it
  suggests?

 I would, but I can't find it. I thought it was under /var/log, but
 having taken a good look I just can't find the logs. And the fact that I
 can't use slocate to find them because I can't get root access to run
 updatedb doesn't help either ;)

If you have read access to the apache configuration files, the ErrorLog 
statement (+ServerRoot) should tell you where your logs are.

(There's no need to CC me, I get the list :p)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's a Blog?

2006-02-14 Thread Duncan Hill
On Monday 13 February 2006 21:55, Sam Smith wrote:
 I have a client who wants to blog or he wants a blog on his website. I
 don't know anything about these blogs except it's sort of a fad I think.

 Isn't a blog just a simple web form with a big textarea on the blogger's
 side writing to a database and then the data is displayed in chronological
 order on the readers side of a website? I could create that in under an
 hour.

 What don't I know? I searched up some scripts, some were free some were
 $500!

 Somebody like to point me at a good script that would enlighten me?

Web log.  Web journal.  Take your pick of name.

WordPress is free, has a neat WYSIWYG editor in version 2, and has a good 
support community.  5 minutes to install vs an hour to code a basic interface 
- I'd take the 5 minutes :p

If he just wants to blog, he could consider the external hostings such as 
wordpress.com, livejournal.com etc.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's a Blog?

2006-02-14 Thread Duncan Hill
On Tuesday 14 February 2006 16:18, Kim Christensen wrote:
 On 2/14/06, Duncan Hill [EMAIL PROTECTED] wrote:
  WordPress is free, has a neat WYSIWYG editor in version 2, and has a good
  support community.  5 minutes to install vs an hour to code a basic
  interface - I'd take the 5 minutes :p

 That being said, get lost from the PHP user list! :-)

No point continually re-inventing the wheel :)  There are PHP (and other 
language) packages that potentially solve the problem faster than coding it.  
Leaving the spare time to code uber-nifty things instead!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Downloading very large files

2006-02-13 Thread Jonathan Duncan
I have an application that delivers files to the client browser.  These 
files a very large video files.  250mb+ each.  I have two options:  1) I 
could have PHP deliver the file with fread, or 2) I could have PHP 
present a link to the file.  However, for security purposes, I would 
rather not have the actual files available.  I suppose I could have PHP 
create temporary symbolic links on the file system that link to the files 
in question and then remove the links, thus requiring the users to go 
through an authentication process to retrieve files that are assigned to 
them.


Anyway, downloading such large files causes PHP to balk with size 
limitation errors.  I could increase the size limit and memory limit 
settings in php.ini, but for file sizes that large, is it recommended? 
Are there best practice limits on these settings:  max_input_time, 
memory_limit, max_execution_time, etc.?


Thanks,
Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Downloading very large files

2006-02-13 Thread Jonathan Duncan
Thank you for the input.  For now we are just using PHP to create symbolic 
links to the video files and the links are removed when they are done 
viewing the video.  We are open to other suggest still, but for now, this 
fills our needs and bypasses putting so much stress on PHP as to put 
hundreds of mb of files through it.


Why secure?  A combination of all those reason.

Thanks,
Jonathan


On Mon, 13 Feb 2006, Rory Browne wrote:


I've seen this problem many times before, but I'm not sure what solution was
found.

Possible solutions:

Encrypt the file, make it publicly available, and then give the right people
the encryption key.

Put it behind a .htaccess file allowing only the IP of the correct person -
remove the .htaccess entry after a certain lengh of time.

Why are the videos secure? Copyright? Privacy? Bandwidth?


On 2/13/06, Jonathan Duncan [EMAIL PROTECTED] wrote:


I have an application that delivers files to the client browser.  These
files a very large video files.  250mb+ each.  I have two options:  1) I
could have PHP deliver the file with fread, or 2) I could have PHP
present a link to the file.  However, for security purposes, I would
rather not have the actual files available.  I suppose I could have PHP
create temporary symbolic links on the file system that link to the files
in question and then remove the links, thus requiring the users to go
through an authentication process to retrieve files that are assigned to
them.

Anyway, downloading such large files causes PHP to balk with size
limitation errors.  I could increase the size limit and memory limit
settings in php.ini, but for file sizes that large, is it recommended?
Are there best practice limits on these settings:  max_input_time,
memory_limit, max_execution_time, etc.?

Thanks,
Jonathan



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php.ini version changed, code broke

2006-02-08 Thread Duncan Hill
On Wednesday 08 February 2006 16:16, [EMAIL PROTECTED] wrote:
 What displays???  Just ttt of course.  What exactly could have changed to
 make this simple script fail?

register_globals probably

http://uk.php.net/register_globals

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] forwarding from virtual email account to real email account

2006-01-25 Thread Duncan Hill
On Wednesday 25 January 2006 15:04, Binay(Local) wrote:
 Hi

 I think i've been misunderstood here. I meant whether this is achievable
 using PHP or not? I  know and can be done very easily on server with either
 control panel or manual intervene but its integration with PHP is my main
 concern. I hope you understand what i mean.

It's probably do-able in B - all you're doing is feeding a data stream from 
the MTA to a program.

If, however, you're doing it without involving and MTA, you may have problems.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP not seeing MySQL functions

2006-01-16 Thread Jonathan Duncan
I just got a new web server with RedHat Enterprise Linux 4 on it.  It came 
with MySQL 4.1.x and PHP 4.3.9 on it.  I uninstalled the MySQL 4 and put 
MySQL 5 on it.  When I run a PHP script that has a DB connection in it I 
get:


Fatal error: Call to undefined function: mysql_connect() in 
/var/www/html/mysqltest.php on line 5


I check the PHPINFO and see:

Configure Command has '--with-mysql=shared,/usr'

And dbx supported databases has 'MySQL'

However, there is no MySQL section.

I checked in the '/etc/php.ini' file and see:

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off


What is missing that would keep me getting the missing functions error?  I 
restarted apache of course.


Thanks,
Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Graphically displayed number to confirm user is a human

2006-01-04 Thread Duncan Hill
On Wednesday 04 January 2006 16:56, Dave M G wrote:

   First, is there a term for these kinds of images, or that kind of
 verification system? What would be the best search terms to look for
 source scripts?

captcha

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Managing upload files in multiple servers(pawns)

2005-12-31 Thread Duncan Hill
On Saturday 31 December 2005 02:06, Srinadh Sannidhanam wrote:
 Hi All,

 We have a site in php and two web servers(pawns) to balance the load.
 There is a page in the site through which user can upload images.

 When a user uploads an image, the request goes to only one of the two
 servers.
 So the image will be uploaded to only one server.

Use a shared file system such as NFS for upload storage.

Use some form of session management/balancing that ensures a client browser 
that upload ends up on the same server immediately afterwards, and use 
something like rsync to keep the image area in sync.

Shared storage is probably the better bet - perhaps with clever code that 
tries a local disk first, then the shared storage if not found on local.  If 
found shared and not local, pull to local.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2005-12-15 Thread Jonathan Duncan


On Tue, 6 Dec 2005, Eric Gorr wrote:


Quoting Torgny Bjers [EMAIL PROTECTED]:

I recommend Zend Studio if you can afford it since it has a GUI for both 
Windows and Linux


FlameBateAnd for those interested in using a real computer/FlameBate, 
it's

GUI also runs under MacOSX.

http://zend.com/store/products/zend-studio/requirements.php


Actually, it does not.  I installed it on my Mac, hoping to try it out and 
it would not run because it did not have the move recent Java JRE which is 
not available for Mac OSX (or was not at the time).  I still do not have 
it running.  Although it installed without a hitch.


I would be interested in what people use to program PHP on Mac.

I currently use TextWrangler and I have tried TextMate, but I am not 
completely sold on either of them.  I use vim quite a bit also.


Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2005-12-15 Thread Jonathan Duncan



On Thu, 15 Dec 2005, Richard Davey wrote:


On 15 Dec 2005, at 18:31, Jonathan Duncan wrote:

FlameBateAnd for those interested in using a real computer/FlameBate, 
it's

GUI also runs under MacOSX.

http://zend.com/store/products/zend-studio/requirements.php


Actually, it does not.  I installed it on my Mac, hoping to try it out and 
it would not run because it did not have the move recent Java JRE which is 
not available for Mac OSX (or was not at the time).  I still do not have it 
running.  Although it installed without a hitch.


It was available at the time in a beta format from the Apple web site (a 2 
second Google found it for me), and is now available in full release format. 
I downloaded it prior to installing Zend 5 on my Mac and it works fine. The 
full update came in via Apple Software Update last week, and it still works 
fine.


There is no reason why Mac owners could not run ZS5 from the day of release. 
I know that I did.


Cheers,
Rich



One more reason to upgrade to Tiger.  I am still on MacOSX 10.3.9  =(

Jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 1 ip address go here all others go here

2005-12-13 Thread Duncan Hill
On Tuesday 13 December 2005 16:13, Jay Blanchard wrote:
 $_SERVER['REFERER'] will give you the referer mosy of the time. More info
 from TFM can be found here;

REFERER is the URL the client came from though, not the local IP address of 
the client.  Methinks the OP wants REMOTE_ADDR.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 1 ip address go here all others go here

2005-12-13 Thread Duncan Hill
On Tuesday 13 December 2005 16:33, Dave Carrera wrote:
 $_SERVER['REMOTE_HOST']

 but i think i should of said how do i compare any address starting with
 192.168.

REMOTE_HOST contains the resolved DNS name of an IP address.  This value is 
dependent on your web server doing DNS resolution (and most people configure 
it not to due to the speed impact).

REMOTE_ADDR contains the IP.

preg_match() probably does what you want.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Browser Control Help

2005-12-05 Thread Duncan Hill
On Monday 05 December 2005 16:36, Chirantan Ghosh wrote:
 As you suggested, I really would love to get a watermark which is invisible
 with initial viewing but activated once a copying/printing command ( Can be
 Ctrl+C or Alt+Printscreen) is used.

Once the browser has the content, it's out of PHP's hands.  It's on the disk 
of the remote client, and they can do what they like with it.  To print an 
image or web page that's in my disk cache, I don't need to use my web browser 
- I can just go to the cache in my file manager and print it.

Unless you write a dedicated viewing application that must be used to view the 
content, you're not going to have much luck.

If you want a watermark on print, just watermark the image anyway.

Steganography might help, but only in the digital world.

Are you sure you're tackling the right problem from the right angle?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IP Geographical

2005-08-11 Thread Duncan Hill
On Thursday 11 August 2005 16:37, John Taylor-Johnston typed:
 I have a field in my counter that collects IP addresses. Now the powers
 that be want be to collect that data and sort it geographically etc.
 Is there anyone who has done this? Where would I find some OS code? I've
 heard of it done.
 John

maxmind.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Konqueror does not like my Website

2005-07-22 Thread Duncan Hill
On Friday 22 July 2005 16:33, Michelle Konzack typed:
 Am 2005-07-22 10:12:17, schrieb John Nichel:
  You mean the 'posting a totally non-php question to a php list' bug?

 Because the page is generated by a couple of PHP scripts and
 ONLY THIS PAGE is not working.

 So I was thinking there is a problem with the file-extension
 *.php and Konqueror can not handel this... (It is KDE 3.4)

Konqueror cares not for your extension, it cares for what the data itself is.  
If you've got buggy javascript or similar, you should see a red bug in the 
bottom right.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] db insert question

2005-07-21 Thread Duncan Hill
On Thursday 21 July 2005 15:02, Jim Moseby typed:
 As far as I know, there is no way to insert 20 unique rows of data into a
 MySQL table without executing 20 queries.  Maybe someone else here does(?).
 Perhaps drop a note over on the MySQL list, since this is really more an
 SQL question than PHP. Sorry I couldn't help.

Yes, MySQL supports an extended insert syntax of insert into foo (...) values 
(...), (...), (...).

Building that kind of query is left as an excercise for the user.  I believe 
the PEAR DB abstraction layer can accept an array to generate that kind of 
query.

-- 
My mind not only wanders, it sometimes leaves completely.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] db insert question

2005-07-21 Thread Duncan Hill
On Thursday 21 July 2005 15:23, Jim Moseby typed:

  Yes, MySQL supports an extended insert syntax of insert into
  foo (...) values
  (...), (...), (...).

 Interesting!  Consulting the manual, I see that you are correct.  So the OP
 would do something like:

 $sql=insert into foo values ;
 foreach($formdata as $thisdata){
   $sql.=($thisdata,...,...,...),;
 }
 $result=mysql_query($sql);

 (of course the above code is broken, because it would leave an extra comma
 at the end, but this is the general idea, no?)

Vaguely, yes.  The trick here is that any single failure in one of the columns 
can leave you with inconsistent data.  Thus, use this with InnoDB table and 
transactions enabled so you can rollback on failure :)

For sake of correctness, the data should be checked for validity first.  Then, 
assuming that all of the form data is going into the same table as the same 
fields, you could push ($variable1, $variable2) into an array, and 
join(',', $that_array)

Presto, no extra comma.  Should use the mysql escape stuff too if not using an 
abstraction layer that deals with it for you.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Rasmus' 30 second AJAX Tutorial - [was Re: [PHP] AJAX PHP]

2005-07-21 Thread Duncan Hill
On Friday 22 July 2005 02:46, Richard Lynch wrote:
 If you NEED it to work, JS is simply not the right way to go, even with
 today's landscape.

I think that depends on whether you have a closed environment, such as an 
intranet, or an open environment like a public web server.  In the public 
case, I'd agree that relying on JS is a bad idea.  On a controlled closed 
environment, there's a good chance that it's an OK idea (and perhaps a good 
idea).

I'm working in a closed environment - I can see some really useful tricks with 
the JS based 'go check this and come back' method for some of the input 
fields I need.  Will I actually do it?  I dunno, I have other things to write 
first :

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ouput HTML w/PHP

2005-06-30 Thread Duncan Hill
On Thursday 30 June 2005 13:50, Rick Emery typed:
 the validator doesn't parse the PHP to get the HTML output (which is
 why I wonder if I'm not better writing the HTML and sticking PHP where
 it's needed). Is there a way for me to maybe use the PHP tidy functions
 on the string containing the HTML ouput to validate it?

When I do this, I browse each page, doing File  Save.  Then using the form 
upload of the W3C validator, validate each page.  Since I use templates, 
fixing each template tends to fix lots of other pages.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Something is messing up the php output

2005-06-22 Thread Jonathan Duncan
I have a site that has this problem every once in a while, and seemingly 
randomly.  It is a database driven site, as indicated by the error.  This 
same page when loaded numerous times will sometimes work just fine, and then 
sometimes it will give an error message like this:

-
Warning: mysql_connect(): Unknown MySQL Server Host
'hostn[]me.domain.com' (1) in
/usr/local/apache/htdocs/filename.php on line 8
Unknown MySQL Server Host 'hostn[]me.domain.com' (1)
-

Notice that in the word hostname the 'a' is not an 'a'.  It is one of the 
empty boxes that usually indicates an unknown character.  Here I represent 
it with square brackets for visual effect.

When the source is check, there is absolutely nothing wrong with the 
hostname in the mysql_connect function.  As I mentioned, if this page is 
reloaded it may be fine.  After a while it may not have anymore problems for 
weeks.  Or it may come back the next day.  When It is happening I do not 
notice any major server process usage.

The mis-interpreted character problem sometimes truncates a word, or just 
messes up a cerain random characters.

I have had this happen on more than one site on more than one server.

Does anyone have any idea what this may be?  I am even accepting wild 
guesses at this point.

Thanks,
Jonathan 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Something is messing up the php output

2005-06-22 Thread Jonathan Duncan
I see where you are coming from and it is a good idea.  However, in this 
particular problem it is not so much DNS related.  If I were to use an IP 
then the error could very well just say this:

-
Warning: mysql_connect(): Unknown MySQL Server Host '192.1[]8.0.1'
(1) in /usr/local/apache/htdocs/filename.php on line 8 Unknown MySQL Server
Host '192.1[]8.0.1' (1)
-

Thanks,
Jonathan


Matt Babineau [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I bet if you connect using the IP directly it will solve your problem.



 Thanks,

 Matt Babineau
 Criticalcode
 858.733.0160
 [EMAIL PROTECTED]
 http://www.criticalcode.com

 -Original Message-
 From: Jonathan Duncan [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 22, 2005 6:27 PM
 To: php-general@lists.php.net
 Subject: [PHP] Something is messing up the php output

 I have a site that has this problem every once in a while, and seemingly
 randomly.  It is a database driven site, as indicated by the error.  This
 same page when loaded numerous times will sometimes work just fine, and 
 then
 sometimes it will give an error message like this:

 -
 Warning: mysql_connect(): Unknown MySQL Server Host 'hostn[]me.domain.com'
 (1) in /usr/local/apache/htdocs/filename.php on line 8 Unknown MySQL 
 Server
 Host 'hostn[]me.domain.com' (1)
 -

 Notice that in the word hostname the 'a' is not an 'a'.  It is one of 
 the
 empty boxes that usually indicates an unknown character.  Here I represent
 it with square brackets for visual effect.

 When the source is check, there is absolutely nothing wrong with the
 hostname in the mysql_connect function.  As I mentioned, if this page is
 reloaded it may be fine.  After a while it may not have anymore problems 
 for
 weeks.  Or it may come back the next day.  When It is happening I do not
 notice any major server process usage.

 The mis-interpreted character problem sometimes truncates a word, or just
 messes up a cerain random characters.

 I have had this happen on more than one site on more than one server.

 Does anyone have any idea what this may be?  I am even accepting wild
 guesses at this point.

 Thanks,
 Jonathan

 --
 PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
 http://www.php.net/unsub.php 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Something is messing up the php output

2005-06-22 Thread Jonathan Duncan
Yes, it has happened on different servers, none of them is bleeding edge, 
still using Apache 1.x and PHP 4.3.x.  The sites are not using any character 
sets other than default.  The machines are in a heat controlled environment 
and monitored for change so I would know if there was that kind of problem. 
One of the sites that I have seen it on is an osCommerce site.  Another site 
is a custom built site.  I am inclined to think that because it happens so 
rarely and when it does happen it is so random that there must be some 
combination of events that are hard to track as being part of the same 
problem.

Thanks for the brainstorm, you did give me some things to think about.  It 
has since subsided again so I will have to wait for it to happen again 
before I can troubleshoot more.  This makes it very hard.

Thanks everyone.  If anyone has more ideas I am still open to them.

Jonathan


Richard Lynch [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

 WILD GUESS ALERT!
 Until you said on more than one server I was thinking a heat-related
 intermittent hardware error corrupting the file read, so a turned into
 some not-quite-random character...  You *SURE* it's on multiple
 servers?...

 Are all machines running the same software versions?

 Are you using multi-byte strings?  Those are not quite as pounded on as
 much as one might like...

 Have you done anything funky to force libc-glibc upgrade?

 Or a kernel upgrade?

 Are you running anything bleeding/leading edge? (Apache 2, PHP 5, mysqli
 etc)  Can you rollback for awhile and test?

 If you are using Apache 2, are you in that pre-fork mode, or is it running
 threaded?

 What PHP Modules are you running?

 Aha!  My wild guesses have lead me to a hypothesis:

 You *are* using Apache 2 in threaded environment and some PHP Module (or
 other software) is not thread-safe.

 *WHICH* one[s] are not thread-safe is totally open to question...

 It could even be some weird interaction between *TWO* Modules that very
 rarely exhibits itself by random changing of memory bits.  Ugh!

 Are there any Modules you could get rid of completely and just change the
 applications to do without?

 Do you have a test Development box that exhibits this behaviour?  Run it
 and ab stress test it and pound on it with as many different requests in
 as random an order you can achieve.

 If you can get the dev box to mis-behave somewhat reliably, try getting
 rid of one PHP Module after another, and re-test incessantly.

 Could you roll back to Apache 1.x or at least do that pre-fork thing so
 you are not using threads on the production server, and see if it goes
 away?

 Some of the above questions/implications are mutually exclusive. :-)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: security question...??

2005-06-21 Thread Duncan Hill
On Tuesday 21 June 2005 16:05, bruce typed:
 if i'm the server app, and you tell me that you're IE, v.6, i'd like the
 ability to somehow be able to gather information from you, such that i can
 then check with msoft to see if your answers match what msoft claims the
 answers should be. if you give wrong answers, i can then make a
 determination as to whether i want to talk with you, or perhaps limit the
 amount/type of information i allow you to access...

Stop and think about that.

I'm FooBrowser 1.0, but my coder has read what MS says IE 12.1 will do when 
asked certain questions.  I, therefore, have the ability to claim to be IE 
12.1 and answer in the correct manner.

Technology is not a panacea, and cannot solve this problem for you.  If one 
entity can publish a specification of some sort so another entity can 
validate against it, nothing stops a third entity from using the same 
information - whether they gain it legally or illegally.

The one way it could be solved is a centrally controlled net with centrally 
controlled software.  Good luck getting that.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to confirm subscriptions by e-mail on a PHP site ?

2005-05-20 Thread Duncan Hill
On Friday 20 May 2005 09:21, Mário Gamito typed:
 Hi,

 I'm making this middle-range site (i. e., not so little, bit not so big,
 either), and i want users that subscribe to my site to have their
 confirmation made by email.

 Does anyone sugests a simple, yet effective way to do this ?

When the user subs, generate a token in a DB table.

Send the token to the user via email with a URL to click.  Use 
mime/alternative if you want to send html and plain text so their client can 
choose the rendering method.

If you get the click where the token matches (and perhaps first name or 
similar), they've confirmed their desire to subscribe.  Do what you need to 
do with the confirmation and remove the token from the table.  Record a 
history of IP etc to show that they DID indeed confirm their sub.  Gives you 
proof that they asked for it if they contend it's spam.

-- 
My mind not only wanders, it sometimes leaves completely.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP5 binaries

2005-05-20 Thread Duncan Hill
On Friday 20 May 2005 17:58, Marcus Bointon wrote:
 It seems that none of the current major Linux distros provide PHP5  
 binary installation packages. By major I mean, RedHat, Fedora (it  
 will be in F4 when released), Mandriva, Debian, Ubuntu, possibly  
 others. Seriously, none have standard PHP5 packages, even optional  
 ones. Does no-one use PHP5??? It's not exactly bleeding edge, having  
 made a final release nearly a year ago.

Kubuntu (ie, Ubuntu with KDE as default) has php5 available as a standard i386 
package according to aptitude.  No amd64 binary package by the looks though.

And depending on whether you consider gentoo 'major' or not.. php5 has been 
the default for the past 3 releases or so.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP and PayPal

2005-05-18 Thread Duncan Hill
On Wednesday 18 May 2005 16:33, Robert Meyer wrote:

 Here is one way I would like it to work:

 1) User fills out a form (user email address, etc.) then clicks the Buy
 Key button.
 2) User, along with a link, unique ID (not Key), cost, and form data is
 sent to PayPal.

Paypal document this in their developer SDK.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] str_replace on words?

2005-05-11 Thread Duncan Hill
On Wednesday 11 May 2005 17:13, Merlin wrote:
 Hi there,

 I am trying to strip some words from a sentence. I tried it with
 str_replace like described here:
 http://www.totallyphp.co.uk/code/find_and_replace_words_in_a_text_string_us
ing_str_replace.htm

 Unfortunatelly it does not work the way I want, because if I want to
 replace the word in all passages containing the characters in are
 replaced. For example Singapore.

You need to tokenize your input and do exact matching.  Alternately, 
preg_match / preg_replace may work with \b to specify word boundries.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Between Query (0T)

2005-05-08 Thread Duncan Hill
On Sunday 08 May 2005 14:20, Ryan A wrote:
 Hi,
 Sorry I know this is OT but I'm hoping someone will still help...it should
 be quite simple :-)
 I have a field in the database called age which is a DATE field.

http://dev.mysql.com/doc/mysql/en/comparison-operators.html

'BETWEEN'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Replacement Question.

2005-04-20 Thread Duncan Hill
On Wednesday 20 April 2005 15:22, Bob Palma typed:
 I have a database field that I need to read and do some conversion on.
 Here is what the raw data from the database looks like:

 --
 1084751309jpenaDisney Vignette Fleximon disk utilization
 alert C:\ at 85%1084799703bpalmafixed.1084799713bpalmaclosed
 --

Are the group delimiters different from the field delimiters?

Ie, can you do:
$array_of_groups = explode('group_delim', $in_string);
foreach ($array_of_groups as $i) {
 $array_of_fields = explode('field_delim', $i);
 $date = date('m/j/y g:i:a', $array_of_fields[0]);
 print $date {$a_o_f[1]}br /{$a_o_f[2]}br /br /\n;
}

YMMV of course.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Replacement Question.

2005-04-20 Thread Duncan Hill
On Wednesday 20 April 2005 16:01, Bob Palma typed:
 Wow!  Thanks.. That works great.  Just one small hitch though.  After it
 prints all of the data properly, it adds one more '$date' on the end
 which gets printed as '12/31/69 7:00:pm'.  Is there a way to do all
 groups - 1 ?

No reason for it to do that unless your data is a bit weird.

Use print_r() or var_dump to see what each array contains - you might find you 
have a blank entry being tacked on somehow (which you could detect with an 
if).

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Last visitors

2005-04-19 Thread Duncan Hill
On Tuesday 19 April 2005 14:27, Ryan A typed:

 SELECT * FROM profile_visits WHERE user='adam' ORDER by time_of_visit
 DESC LIMIT 10
 As for cleaning up... that's the bit that I can't figure out myself :(.
 */

 Hey,
 Thanks for replying.

  ah! i see. sorry for misunderstanding you.

 No problem, I guess i didnt explain it well enough, and you dont have to
 help me but you are trying, so thank you.

  As for cleaning up... that's the bit that I can't figure out myself :(.

 exactly, I came to the same part as youbut then i would have a LOT of
 wasted records without the cleanup... just cant figure it out.

Create a cron job that gets a list of profiles, and selects the # of records 
associated with that profile.  If the number is  10, identify the 10th 
record and delete records older than that record.

Once a week, optimize your tables to reclaim the space.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Simple Problem

2005-04-12 Thread Duncan Hill
On Tuesday 12 April 2005 16:24, PartyPosters typed:
 $sql=SELECT products.productID, products.title, products.number_per_box,
 products.stock_level, products.image, users.username, users.email,
 users.userID FROM users, products WHERE products.userID = $userID;
 $mysql_result=mysql_query($sql,$connection);
 $num_rows=mysql_num_rows($mysql_result);

You don't specify how the query should join the tables users and products.

WHERE products.userID = users.userID and users.userID = $userID

I'll assume you do validation on the userID ahead of time to ensure that it's 
the right format.

-- 
My mind not only wanders, it sometimes leaves completely.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sprintf and arrays.

2005-04-07 Thread Duncan Hill
On Wednesday 06 April 2005 18:05, Brent Baisley typed:
 You want to have sprintf look at the contents of the variable instead
 of the variable itself. Anytime you want to do something like this you
 use the eval() function to evaluate the contents of the variable.

Woot!

$begin_string = 'htmlentities(sprintf($tmp[0],';
foreach ($p_sub_values as $k = $v) {
 $mid_string[] = \$p_sub_values[$k];
}
$mid_string = join(',', $mid_string);
$end_string = '), ENT_QUOTES);';
// Eval will stick the three strings together and then execute them.  Neat 
trick, hint from
// [EMAIL PROTECTED]
eval (\$r = $begin_string$mid_string$end_string);

Works a treat.  Thanks Brent.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Web Site Security Hole

2005-04-07 Thread Duncan Hill
On Thursday 07 April 2005 14:55, Don typed:
 I was feeling pretty secure until a friend reminded me you can download
 complete sites by importing them with such tools as FrontPage and
 Dreamweaver. That way, the protection provided by the PHP server is
 non-existant.

This is only possible in limited cases, normally when WEBDAV is enabled.  Any 
other attempts to scrape the site will just get the parsed output, not the 
raw code.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] sprintf and arrays.

2005-04-06 Thread Duncan Hill
I have a snippet of code that looks something like:
if (is_array($p_sub_values)) {
foreach ($p_sub_values as $i = $v) {
 $p_sub_values_str[$i] = '$v';
}
$s = join(',', $p_sub_values_str);
$r = htmlentities(sprintf($tmp[0], $s, ENT_QUOTES);
}

$tmp[0] in this case contains a string like 'Fred likes %1$s on his %2$s', 
taking advantage of positional substitution with sprintf.

The function call to this snippet can have an optional array passed.  My 
need/desire is to substitute each element of the array into the appropriate 
position with sprintf.  So far I've tried:
$r = htmlentities(sprintf($tmp[0], $s, ENT_QUOTES);
$r = htmlentities(sprintf($tmp[0], ${$s}, ENT_QUOTES);

and a few other bits and pieces, all to no avail (error is about not enough 
arguments).

Is there any way to accomplish this in PHP, or do I need to roll my own 
substitution code?  The array can obviously be anything from a single value 
to 'unlimited' (though in practice will probably be less than 5).

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] secure document : solution wanted

2005-04-06 Thread Duncan Hill
On Wednesday 06 April 2005 16:23, Charles Hamel typed:
 Hi

 I am bulding a secure intranet.(php, mysql, apache)
 I am using a session and Mysql to handel the user accounts. Everythying
 works fine with that.

 The client now needs to share word/pdf document with the registered user. I
 created a secure directory using .htaccess for this purpose and it works as
 well  the user are promt to enter a username password.

 I was expecting this to work ...
 http://username:[EMAIL PROTECTED]/safeDir/Word.doc  but it isn't.

IE dropped support (or severely neutered it) for username:password in URLs a 
while back.

One way to handle this is to write a wrapper script that accepts the file name 
as a parameter.  The script verifies that the user is allowed to access the 
file, and sends back the file with appropriate content type etc.  Files can 
then be stored outside of the document root, preventing access even if you 
guess the file name.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] secure document : solution wanted

2005-04-06 Thread Duncan Hill
On Wednesday 06 April 2005 16:32, Eric Gorr typed:
 Perhaps, https?

HTTPS is a transport security layer, not an authentication or access control 
layer.

-- 
My mind not only wanders, it sometimes leaves completely.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] secure document : solution wanted

2005-04-06 Thread Duncan Hill
On Wednesday 06 April 2005 17:02, Charles Hamel wrote:
 Duncan Hill [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  One way to handle this is to write a wrapper script that accepts the file
  name
  as a parameter.  The script verifies that the user is allowed to access

 Can you provide a little more infos about wrapper scripts ... first time
 earing about this expession.

 Can this script be written in php ... or it is some kind of cgi?  Any

http://lists.evolt.org/archive/Week-of-Mon-20011224/064591.html has some 
sample code to do with forcing IE to download a file where it can't determine 
the mime type properly.  This forms the core of being able to feed a file to 
a browser when a .php file is called.

The rough flow of the code would be:
1) Check that the user is authenticated.  Kick them out if they aren't.
2) (Optional) Check that the user is allowed to access the file being 
requested.  This might be a MySQL DB lookup, a secret word request, whatever.
3) Check that the file exists.  Even better, rather than feed a file name, 
store a mapping of a unique ID to real file name in a data source of some 
type, and throw the ID around.  You can enforce the format of the ID etc to 
avoid attacks against your system.
4) If all is good, use the code linked above (in some form) to feed the file 
to the browser.  The user will get a Save dialog box in pretty much any 
browser.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] sprintf and arrays.

2005-04-06 Thread Duncan Hill
On Wednesday 06 April 2005 16:40, Brent Baisley wrote:
 For one, you are missing a right parenthesis ) in all of your examples.
 htmlentities(  sprintf( $tmp[0], $s, ENT_QUOTES )

Meh, syntax blip from the cut and paste.

 Second, the string you are trying to format only has one variable
 argument: $s.
 Fred likes %1$s on his %2$s

The source array in this case has two entries.  My whole aim is to pass an 
array of n entries, unroll the array into a string and somehow interpolate 
the string into the sprintf call so that life is groovy.  I realise $s looks 
like a single variable to PHP at that point sprintf() is called, and this is 
what I'm trying to work around - some way to get sprintf to realise that $s 
is actually two strings.  Ie, I need a double level of interpolation on the 
$s value so that sprintf($tmp[0], $s) turns into sprintf(tmp[0], $array[0], 
$array[1]).  I'm starting to get the feeling that this will be impossible.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
I am trying to run a shell command with backticks.  However, I get a parse 
error.  Is it because I have an array variable in there?

$result = `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first'] 
$user['name_last']`;

Do I need to assign the value to a regular variable before I put it in 
there?  Like this?

$pword=$user['password']
$fname =$user['name_first']
$lname =$user['name_last']
$result = `adduser -l=$dist_id -p=$pword --f=$fname $lname`;

Thanks,
Jonathan 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
Ah, that is a good idea, putting the command in a variable and then 
executing the variable.  I have doen that before but did not think of it 
now.  Too many things going on.  Thanks!

Jonathan

Rory Browne [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 I'm not sure about variable expansion with backticks(I don't use
 backticks, if necessary I use shell_exec() instead). I'm just after
 installing a fresh SuSE 9.1, and php is giving me a segfault at the
 minute, with that particular code, but if you were using double quotes
 you could:

 $command = adduser -l=$dist_id -p={$user['password']}
 --f=\{$user['name_first']} {$user['name_last']}\;

 bearing in mind that the variables have been {}'ed, and your double
 quote around $user['name_first'] and ['name_last']) has been escaped
 to \

 you can use shell_exec($command), which is identical to the backtick 
 operation.

 Having that said, you should consider using alternative program
 execution instead, instead of using the shell. What do you need the
 shell for? You might(albeit unlikely) also come across a situation
 where the shell is something like /bin/false, or /bin/falselogin, or
 /bin/scponly, or basicly something that doesn't particularly work that
 well as a shell.

 Rory

 On Sat, 11 Dec 2004 18:09:17 -0700, Jonathan Duncan [EMAIL PROTECTED] 
 wrote:
 I am trying to run a shell command with backticks.  However, I get a 
 parse
 error.  Is it because I have an array variable in there?

 $result = 
 `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first']
 $user['name_last']`;

 Do I need to assign the value to a regular variable before I put it in
 there?  Like this?

 $pword=$user['password']
 $fname =$user['name_first']
 $lname =$user['name_last']
 $result = `adduser -l=$dist_id -p=$pword --f=$fname $lname`;

 Thanks,
 Jonathan

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
The quotes are only for the shell command which does not use quotes around 
password.  Thanks for the feedback.

Jonathan


Sebastian [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 well $user['password'] has no double quotes around it.

 - Original Message - 
 From: Jonathan Duncan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, December 11, 2004 8:09 PM
 Subject: [PHP] php variables in a backtick command


 I am trying to run a shell command with backticks.  However, I get a 
 parse
 error.  Is it because I have an array variable in there?

 $result =
 `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first']
 $user['name_last']`;

 Do I need to assign the value to a regular variable before I put it in
 there?  Like this?

 $pword=$user['password']
 $fname =$user['name_first']
 $lname =$user['name_last']
 $result = `adduser -l=$dist_id -p=$pword --f=$fname $lname`;

 Thanks,
 Jonathan

 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php variables in a backtick command

2004-12-11 Thread Jonathan Duncan
So I tried it that way and it worked, that is annoying though, having to add 
extra lines to the code and assign the contents of one variable to another. 
Any way around this?

Jonathan


Jonathan Duncan [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am trying to run a shell command with backticks.  However, I get a parse 
error.  Is it because I have an array variable in there?

 $result = 
 `adduser -l=$dist_id -p=$user['password'] --f=$user['name_first'] 
 $user['name_last']`;

 Do I need to assign the value to a regular variable before I put it in 
 there?  Like this?

 $pword=$user['password']
 $fname =$user['name_first']
 $lname =$user['name_last']
 $result = `adduser -l=$dist_id -p=$pword --f=$fname $lname`;

 Thanks,
 Jonathan 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Page that checks if a user exists on a remote system

2004-12-06 Thread Jonathan Duncan
Richard,
Very good point, and you are correct, I am not looking to hire an army and 
spend tons of time and money on it.

I have since rethought this, thanks in part to this thread.  I have 
decided to go with something more secure.  Since I have a database of 
users already for the site on ServerA, I will just set up a cron job on 
ServerB that runs a script that queries that database and then adds, 
edits, removes users accordingly.  That way the access of the shell is 
being done always by a trusted system only user.  I will put an extra 
table in my database called something like 
user_email_account_management_requests and the remote script with check 
that for any tasks it needs to do.

Thanks again to all those who helped me with this.  I have learned quite a 
bit and enjoyed it.

Best regards,
--
Jonathan Duncan
http://www.nacnud.com
On Mon, 6 Dec 2004, Richard Lynch wrote:
I am looking to do like Hotmail, or Yahoo!, or Mail.com, or any of the
other places do.  I can go sign up on their site and immediately have an
e-mail account that I can start using.  No admin has to take the time to
create my account for me.
You do understand that these hosts have MAJOR PROBLEMS and invest
inordinate amounts of resources to users who abuse their services.
You're going to be spending a HUGE amount of money/time if you have
something as wide-open as those.
Their whole schtick is Free Email so it's worth it to them to invest in
an army of people to handle the problems.
Is it worth it to you?
HIGHLY unlikely.
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Page that checks if a user exists on a remote system

2004-12-03 Thread Jonathan Duncan
Ok, so this is what I have done:

*-*-*-*-*-*-*-*-*-*-*
$idResults = `sudo -u admin ssh [EMAIL PROTECTED] id usertocheck 21`;
echo id: (.$idResults.)\r\n.\r\n;
if (ereg(no such user, $idResults)) {
 echo 'id blah!';
}
*-*-*-*-*-*-*-*-*-*-*

And, here are the results that I get when I access the above code with my 
browser:

*-*-*-*-*-*-*-*-*-*-*
id: (id: alain: no such user
)

id blah!
*-*-*-*-*-*-*-*-*-*-*

I have added the webserver user to sudoers which gives that user only the 
ability to sudo to the admin user and run the ssh command which then allows 
the webserver user to ssh to the remote machine without a password since I 
setup secure keys for that user.

So what I wanted to do is now working.  My question now would be, are there 
any security concerns with how I am doing this?  Aside from doing an id 
check I will also be doing a remote command to add a user to the remote 
system (ServerB) from the same PHP script.  I will of course escapeshellarg 
any information my users submit to the script.

Thanks,
Jonathan

Richard Lynch [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Gryffyn, Trevor wrote:
 If it's a un*x system and you have permissions to connect to the SMTP
 server, you could use the VRFY command to check to see if their email
 address exists or not maybe:

 Example of Verifying a User Name

  Either

 S: VRFY Smith
 R: 250 Fred Smith [EMAIL PROTECTED]

  Or

 S: VRFY Smith
 R: 251 User not local; will forward to [EMAIL PROTECTED]

  Or

 S: VRFY Jones
 R: 550 String does not match anything.

  Or

 S: VRFY Jones
 R: 551 User not local; please try [EMAIL PROTECTED]

  Or

 S: VRFY Gourzenkyinplatz
 R: 553 User ambiguous.

 (examples taken from: http://www.ietf.org/rfc/rfc0821.txt   Page 8)

 I believe that, for performance and security reasons, many/most SMTP
 servers these days will out and out *LIE* to you about this...

 The real answer is:  There is *NO* *WAY* to do this on a general basis,
 unless you control the remote machine, or know enough about its setup, to
 be certain that it will respond correctly.

 ServerA and ServerB

 Ah.  The original poster probably has control of ServerB.

 Life is now simplified immensely.

 This, of course, is because the script is being run as www
 who has no
 place to put ssl keys.

 Could this be solved by having www su to a user who has
 remote access
 privileges?  Something like this:

 $idResults = `su admin | ssh [EMAIL PROTECTED] id bigbob 21`;

 su simply won't let you do that.  su requires a TTY to avoid you doing
 something so incredibly dangerous as this.

 So, no, that won't work.  And you shouldn't be trying to do that anyway.

 Anyone else doing or done something like this?

 Sure.

 I've never done it, but many many many have.

 One fairly simple thing is to create the 'www' user on ServerA so that
 they *do* have a home directory where they can store SSH keys.  You may
 need to su to 'www' once, and do some ssh work -- ssh-key-gen or whatever
 it is.

 That, however, increases your risk in the event that the www user is
 compromised on ServerA.

 Probably the best answer is to attack this from the side of ServerB.

 You want ServerB to:
  Only allow ServerA to even ask.
  Tell ServerA if user X is a valid username.

 From the point of ServerB, making sure that ServerA is the one asking is
 fairly simple.  You could check the IP (which can be spoofed, but that's
 fairly difficult) or provide some other means of authentication (SSH/SSL)
 that ensures that ServerA is really ServerA.

 Then, ServerB can just check /etc/passwd usernames.  Or be even simpler to
 use a shell command like 'user' (?) or 'groups' to verify that a user is
 valid.

 In other words, instead of writing some hacky code on ServerA to try to
 poke at ServerB to get the answer you want, write some nice clean code on
 ServerB to provide the answer, WHEN APPROPRIATE.

 -- 
 Like Music?
 http://l-i-e.com/artists.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Page that checks if a user exists on a remote system

2004-12-03 Thread Jonathan Duncan
Christophe,
I see where you are coming from with that, but the purpose of this script 
is to remove me from the picture completely.  I want someone to be able to 
come sign up on my site and automatically be added as a mail user and 
other things so that I do not need to do that kind of thing.

I am looking to do like Hotmail, or Yahoo!, or Mail.com, or any of the 
other places do.  I can go sign up on their site and immediately have an 
e-mail account that I can start using.  No admin has to take the time to 
create my account for me.

Does that make sense?  Does that explain better why I am trying to do 
this?  Has not anyone else wanted that functionality also?

Thank you,
Jonathan Duncan
On Fri, 3 Dec 2004, Christophe Chisogne wrote:
Jonathan Duncan wrote:
I will also be doing a remote command to add a user to the remote system 
(ServerB) from the same PHP script.
If you want to manage a server via web interface, dont reinvent
the wheel. Use webmin, by example.
Webmin runs a mini webserver as root (on port 1),
and uses modules for managing users, proftp, apache, etc
Of course, I dont know what you want to do.
Christophe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Page that checks if a user exists on a remote system

2004-12-03 Thread Jonathan Duncan
This is in reply to both Stefan and Richard,
I gave it some brief thought in the past, but brushed it off as not as 
convenient.  However, rethinking about it, it may actually be more 
secure.  H, darn it, now you have me thinking again.  Security is a 
big concern for me.  As it is now, the web user has the ability to sudo. 
But that user can only sudo to one other user, who is limited, and can 
only run 2 commands as that user.  Sooo... while the web user is certainly 
limited, and the PHP script will be outside of the document root of the 
web server, and access to that script will be through an include on an SSL 
connection, there could still be something that I am not thinking of. 
Adding the people to a database first and having a script run by cron (or 
some other trigger) running on ServerB that accesses the database that is 
on ServerA would be a nice firewall and the web user would not need any 
access rights or the need to sudo.  Ok, I am going to break this down and 
rethink my strategy.  Thanks to everyone.  Richard, I consider myself a 
highly security conscious person, but you are making me 
think more like a criminal, and that is good.  Security is very important.

I will post back with my results.
Thanks,
--
Jonathan Duncan
http://www.nacnud.com
On Fri, 3 Dec 2004, Stefan wrote:
Hi!
Have you thougt of writing the userdata to a database and running a perl
script by cron to do the rest? This would be an interesting opinion for
security purpose.
Stefan
-Ursprüngliche Nachricht-
Von: Jonathan Duncan [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 3. Dezember 2004 18:55
An: [EMAIL PROTECTED]
Betreff: Re: [PHP] Page that checks if a user exists on a remote system
Christophe,
I see where you are coming from with that, but the purpose of this script
is to remove me from the picture completely.  I want someone to be able to
come sign up on my site and automatically be added as a mail user and
other things so that I do not need to do that kind of thing.
I am looking to do like Hotmail, or Yahoo!, or Mail.com, or any of the
other places do.  I can go sign up on their site and immediately have an
e-mail account that I can start using.  No admin has to take the time to
create my account for me.
Does that make sense?  Does that explain better why I am trying to do
this?  Has not anyone else wanted that functionality also?
Thank you,
Jonathan Duncan
On Fri, 3 Dec 2004, Christophe Chisogne wrote:
Jonathan Duncan wrote:
I will also be doing a remote command to add a user to the remote
system
(ServerB) from the same PHP script.
If you want to manage a server via web interface, dont reinvent
the wheel. Use webmin, by example.
Webmin runs a mini webserver as root (on port 1),
and uses modules for managing users, proftp, apache, etc
Of course, I dont know what you want to do.
Christophe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Page that checks if a user exists on a remote system

2004-12-03 Thread Jonathan Duncan
Jason,

Such as?  I assume you have something in mind.

That would certainly be nice.  I am not against considering it.  Although I 
am somewhat tied to sendmail as that is what my hosting provider supports 
and also what I am familiar with.

Jonathan


Jason Wong [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Saturday 04 December 2004 02:47, Jonathan Duncan wrote:

 [snip]

 rethink my strategy.  Thanks to everyone.  Richard, I consider myself a
 highly security conscious person, but you are making me
 think more like a criminal, and that is good.  Security is very 
 important.

 In that case may I suggest that you use an MTA which does not require 
 system
 accounts for each and every mail box?

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 Take that, you hostile sons-of-bitches!
 -- James Coburn, in the finale of _The_President's_Analyst_
 */ 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Page that checks if a user exists on a remote system

2004-12-02 Thread Jonathan Duncan
Well, I can honestly say I had not thought of doing it that way.  I will 
keep that as an option.  Thanks.

Jonathan
On Thu, 2 Dec 2004, Gryffyn, Trevor wrote:
If it's a un*x system and you have permissions to connect to the SMTP
server, you could use the VRFY command to check to see if their email
address exists or not maybe:
   Example of Verifying a User Name
Either
   S: VRFY Smith
   R: 250 Fred Smith [EMAIL PROTECTED]
Or
   S: VRFY Smith
   R: 251 User not local; will forward to [EMAIL PROTECTED]
Or
   S: VRFY Jones
   R: 550 String does not match anything.
Or
   S: VRFY Jones
   R: 551 User not local; please try [EMAIL PROTECTED]
Or
   S: VRFY Gourzenkyinplatz
   R: 553 User ambiguous.
(examples taken from: http://www.ietf.org/rfc/rfc0821.txt   Page 8)
Just a thought.
-TG
-Original Message-
From: news.php.net [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004 7:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Page that checks if a user exists on a remote system
I have two servers: ServerA and ServerB.  One server serves
web pages, the
other serves mail.  I am making a web page on ServerA that
will access
ServerB to find out if a users exists and if not then add
that user to
ServerB with information collected from the web page on ServerA.
I have this in a php file:
$idResults = `ssh [EMAIL PROTECTED] id bigbob 21`;
echo id: (.$idResults.)\r\n.\r\n;
if (ereg(no such user, $idResults)) {
echo 'username is available!';
}
When I access the page I get:
Could not create directory '/nonexistent/.ssh'.
Host key verification failed.
This, of course, is because the script is being run as www
who has no
place to put ssl keys.
Could this be solved by having www su to a user who has
remote access
privileges?  Something like this:
$idResults = `su admin | ssh [EMAIL PROTECTED] id bigbob 21`;
echo id: (.$idResults.)\r\n.\r\n;
if (ereg(no such user, $idResults)) {
echo 'username is available!';
// function addUserToServerB(vars);
}
Anyone else doing or done something like this?
Thanks,
--
Jonathan Duncan
http://www.nacnud.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
Perhaps this gets more into server administration, but it is mixed so much 
into the php script, which is why I am asking it here.

Yes, sudo was one of my first thoughts.  As far as the implementation goes 
though.  How do you work the remote access bit?  Using ssh do you use the 
ssl cert switch so that the www user can shell into a remote machine?  Or 
does the sudo process actually make www the root user for a certain command 
and can then shell into a remote machine using the root ssl cert?  Or can 
sudo make www into a user that can shell into a remote machine?  I am still 
becoming familiar with sudo.

Thanks,
Jonathan


Greg Donald [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 On Wed, 1 Dec 2004 17:57:28 -0700, news.php.net [EMAIL PROTECTED] 
 wrote:
 Anyone else doing or done something like this?

 I use sudo when my web server needs temporary elevated permissions.


 -- 
 Greg Donald
 Zend Certified Engineer
 http://gdconsultants.com/
 http://destiney.com/ 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
I have put this in my sudoers file using visudo to edit it:

www   ALL = NOPASSWD: /usr/local/bin/sudo puser, (puser) NOPASSWD: 
/usr/bin/ssh /usr/bin/id

However the www user is still being asked for a password.

Is this too off topic for this list?

Jonathan

Jonathan Duncan [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Perhaps this gets more into server administration, but it is mixed so much 
 into the php script, which is why I am asking it here.

 Yes, sudo was one of my first thoughts.  As far as the implementation goes 
 though.  How do you work the remote access bit?  Using ssh do you use the 
 ssl cert switch so that the www user can shell into a remote machine?  Or 
 does the sudo process actually make www the root user for a certain 
 command and can then shell into a remote machine using the root ssl cert? 
 Or can sudo make www into a user that can shell into a remote machine?  I 
 am still becoming familiar with sudo.

 Thanks,
 Jonathan


 Greg Donald [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 On Wed, 1 Dec 2004 17:57:28 -0700, news.php.net [EMAIL PROTECTED] 
 wrote:
 Anyone else doing or done something like this?

 I use sudo when my web server needs temporary elevated permissions.


 -- 
 Greg Donald
 Zend Certified Engineer
 http://gdconsultants.com/
 http://destiney.com/ 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
Looks like I was missing a comma after the ssh command and before the id 
command.

Jonathan


Jonathan Duncan [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I have put this in my sudoers file using visudo to edit it:

 www   ALL = NOPASSWD: /usr/local/bin/sudo puser, (puser) NOPASSWD: 
 /usr/bin/ssh /usr/bin/id

 However the www user is still being asked for a password.

 Is this too off topic for this list?

 Jonathan

 Jonathan Duncan [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 Perhaps this gets more into server administration, but it is mixed so 
 much into the php script, which is why I am asking it here.

 Yes, sudo was one of my first thoughts.  As far as the implementation 
 goes though.  How do you work the remote access bit?  Using ssh do you 
 use the ssl cert switch so that the www user can shell into a remote 
 machine?  Or does the sudo process actually make www the root user for a 
 certain command and can then shell into a remote machine using the root 
 ssl cert? Or can sudo make www into a user that can shell into a remote 
 machine?  I am still becoming familiar with sudo.

 Thanks,
 Jonathan


 Greg Donald [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
 On Wed, 1 Dec 2004 17:57:28 -0700, news.php.net [EMAIL PROTECTED] 
 wrote:
 Anyone else doing or done something like this?

 I use sudo when my web server needs temporary elevated permissions.


 -- 
 Greg Donald
 Zend Certified Engineer
 http://gdconsultants.com/
 http://destiney.com/ 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Yet another Apache 2 question

2004-09-20 Thread Duncan Maitland
I'm currently using a PHP/Apache 2.0 (prefork) combination which seems to be 
running reasonably well, however I've just become familiar with the 
potential issues with PHP/Apache 2.0 so I intend to roll back to Apache 1.3 
some time soon.

I have a question about a particular error I have received with this setup:

Many of the virtual hosts on my server have custom php_value settings. A 
user has reported that a particular error occurred in a PHP script, and the 
message indicated to me that the script had actually been loaded as if it 
were in another virtual host (ie. the specific php_value settings for the 
other virtual host were loaded instead).

Both the user and I have never been able to replicate it and I have received 
no reports of similar errors. Could this be one of those unpredictable 
errors which the FAQ describes, or could this be attributed to some other 
problem?

If anyone could shed some light on this it would be much appreciated!

Many thanks,
Duncan. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to do this?

2004-04-10 Thread Duncan Hill
On Saturday 10 April 2004 14:36, Mike Mapsnac wrote:

 So I need to gather the information about each entry and update database. I
 cannot access the variable from $_POST because parameter is not static and
 $_POST is not working like this $_POST['$id'];

$_POST[$id]

 does variable substitution, ' does not.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] (new question on this) http referer

2004-04-08 Thread Duncan Hill
On Thursday 08 April 2004 17:31, Joe Szilagyi wrote:
 Just a follow up on this one--I've seen where consistently that
 $HTTP_REFERER will only show local referers, but not stuff from other
 sites/hostnames. This is on mod_php... any workaround for that?

Referrer is a function of the browser.  If it chooses to not give it to you, 
you don't get it.  Proxomitron, at one point, shipped with a setting that 
gave the browser as SpaceBison, and the referrer as the URL being visited.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Auto-acks on posting.

2004-04-08 Thread Duncan Hill
Anyone else getting auto-acks from [EMAIL PROTECTED] and 
[EMAIL PROTECTED], originating on host76.ipowerweb.com 
when they post here?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Auto-acks on posting.

2004-04-08 Thread Duncan Hill
On Thursday 08 April 2004 17:35, Arthur Radulescu wrote:
 Yes I get the same emails here

Ho hum, then into the bit bucket they go.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Extension problem

2004-04-05 Thread Duncan Hill
On Monday 05 April 2004 10:37, Enrico Comini wrote:
 I use php without problem, but my file is processed by php only if the
 extension is .php , why ?
 If I have for example a index.html with ?php at the beginning , this
 file is not parsed by php and I have to rename in index.php
 Thanks, Enrico

Apache (and other webservers) have a config option that maps file extensions 
to parsers (ie, .php to mod_php).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Hinding URL

2004-03-31 Thread Duncan Hill
On Wednesday 31 March 2004 14:38, Will wrote:
 Hello all,

 I am hoping someone can help me.

 When someone brings up a page in the browser, is there a way to hide the
 URL in the browser bar to a set URL??

Why should a remote server have control over what a local client can display?

The closest you can come is to hide the entire location bar by using 
javascript to open a new window with no location bar, but that'll fail on any 
client that has JS disabled, or has rules set to override JS messing around 
with the browser (like my browsers are configured to do).

Alternately, you can use frames, but that's a whole other can of worms.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re:

2004-03-30 Thread Duncan Hill
On Tuesday 30 March 2004 09:40, Ketvin wrote:
 Dear all,


 i just move my previous php script to a new server and found that it is not
 working on the new machine. funny thing is that previously, say i am
 putting form items like

 input type=text name=item1

Manual: Register globals.  $_POST, $_GET

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] API Documentation Via Comments

2004-03-24 Thread Duncan Hill
On Wednesday 24 March 2004 11:37, Hawkes, Richard wrote:
 Hi,

 As you may be aware, languages like Java allow you to add comments in a
 certain format, which can then be translated into a full HTML API Document
 later. Does PHP have a facility like this? If not, has anyone written
 anything to do something similar? I hope so?!

phpdoc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what is the best idea to make mirror for mysql database

2004-03-22 Thread Duncan Hill
On Monday 22 March 2004 23:20, QT wrote:
 do you know best mysql newsgroup address?

http://lists.mysql.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Blank Page instead of Errors

2004-03-19 Thread Jonathan Duncan
I am baffled.  I really hope someone can save me.

(PHP 4.3.4)

I am getting blank pages (or partial blank pages if my HTML comes before the
PHP) instead of errors.  I know there are errors on the page because I have
specifically put parse errors in my code to see if the server would give me
errors, but instead all I get are blank pages.

I have checked the PHP.INI file and I see this:

error_reporting  =  E_ALL  ~E_NOTICE
display_errors  =  On

I have included different renditions of error_reporting at the top of my
script:

error_reporting(E_ALL)
error_reporting(E_ALL | E_PARSE | E_NOTICE)
error_reporting(E_ALL  E_PARSE  E_NOTICE)

... and some others.  Still nothing.

Is there something that I am missing?  Why can I not see any error messages?

Thank you,
Jonathan Duncan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Take post values

2004-03-17 Thread Duncan Hill
On Wednesday 17 March 2004 09:07, Tassos T wrote:
 Hello,

 I use a simple form and I cannot take the values when I do submit. I use
 post method.

 How I take te post values ?


 Thanks

 Tassos t

http://www.php.net/manual/el/language.variables.predefined.php
http://www.php.net/manual/el/reserved.variables.php#reserved.variables.post

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Cron Jobs and php as apache module

2004-03-17 Thread Duncan Hill
On Wednesday 17 March 2004 11:03, Daryl Meese wrote:
 Hello all,

 Ok,  I run php as an apache module but need to have some php scripts called
 from a cron.  Since you can't have php installed as a cgi  apache module I
 don't know how to do this.

 Any help would be appreciated.

 TIA

 Daryl Meese

PHP CLI executable.  Builds whenever I do a manual install.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: hello

2004-02-23 Thread Duncan Hill
On Monday 23 February 2004 17:27, Ben Ramsey wrote:
 I would advise against sending attachments to the list with the message
 read it immediately.  Chances are, it won't be opened or looked at.
 Please include a description of the problem you are facing, as well as
 the code you are using in your message body--not in an attachment.

Even better chances that that was a neutered virus.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] post variables

2004-02-19 Thread Duncan Hill
On Thursday 19 February 2004 13:32, julian haffegee wrote:
 Hi all,


 I solved this today. It seems odd.

 If you define an action it DOES NOT work, but if you skip that entirely the
 POST variables are sent!

 so
 form  method='POST' works
 form  method='POST' action ='something.php' doesn't work.

I have -never- seen that behaviour.  In fact, I use explicit actions all the 
time, and have no problem with $_POST.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ob_start() and session_start() conflicts

2004-02-17 Thread Duncan
Hi,

I am currently working on a download script, where I use a session 
variable to make sure that the downloaded file cannot be linked directly.
However, this protection is not mandatory, so that a download can also 
be created, which can be initiated via a direct link.

So, I'm using the following for the file download:

   ob_start();
   $filename = $sql_result[0];
   $type = $sql_result[1];
   $path = $sql_result[2];
  
   header(Content-Type: $type);
   header(Content-Disposition: attachment; filename=$filename);
   readfile($path);
   ob_end_flush();

...which is working just fine as a standalone, but as soon as I add

session_start();

before the ob_start() call, then the download is no longer working properly.
The following happens in such a case:
if the browser window was used to click through the script and initiate 
the download, then the file can be downloaded properly.
if a new browser window gets opened and you try to access the file 
download via a direct link, then you get the filename presented for 
download without type and path info, e.g.:

Filename: index.php?cmd=downloadid=12
Type:
Path:
As soon as I comment the session_start(); it's working just fine, though 
and the file can be downloaded properly via direct access.

Am I right to assume, that since the session_start(); is sending headers 
as well, the ob_start cannot work properly anymore?
And since it only happens when you're opening a new window and try to 
access it directly, I assume it's related to the fact, that the session 
gets set at the user end with a cookie and therefor causes the problem?
Would preventing session cookies and using trans_id maybe help here?

Thanks,
Duncan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Whoa!!! e-Mail virus from bugs.php.net!

2004-02-06 Thread Duncan Hill
On Friday 06 February 2004 14:06, Scott Fletcher wrote:
 Whoa!!  Just got an email today right from bugs.php.net and it was
 intercepted by the Spam Firewall because it contain the Worm.SCO.A virus
 and was removed before being send to me.  The email goes like this here

 --snip--
 Title: VIRUS (Worm.SCO.A) IN MAIL TO YOU (from [EMAIL PROTECTED])


That's mydoom - forging virus.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to search for a date

2004-02-05 Thread Duncan Hill
On Thursday 05 February 2004 15:45, Brian Dunning wrote:
 Sorry this is such a basic question - but I couldn't find it online.

 I have a date field in MySQL: -00-00. I'm trying to insert or
 search for the current date, and I can't find the way to state that in
 the SQL. This is wrong, can someone please tell me what's correct?

INSERT INTO mytable (dateField) VALUE (CURRENT_DATE);

SELECT * FROM mytable WHERE dateField = CURRENT_DATE;

NOW() is the mysql function for the current date.  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] loosing var in class / function

2004-02-04 Thread Duncan Hill
On Wednesday 04 February 2004 17:52, Harry.de wrote:
 How can i save a variable in a function?
 The lower example doesn't work.
 The var is always an empty string!
 Anyone any solution?

 ---

 $some_var = foobar;

 require('something.php');

 class SOMECLASS
 {
 function SomeFunction()
 {
 $this-AnotherFunction($some_var);
 }
 }

$this-AnotherFunction($this-some_var);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Checking if a host is online

2003-11-29 Thread Duncan
Jason Giangrande said:

 command (ping -c 1 $host), and while I could get that to work, since it
 returns non-zero status if the host can not be contacted, it takes quite
 a while to execute for even a few hosts at once.

fping may help.

Running a background job that just monitors ping status and updates a record
somewhere is probably the best way.  The PHP script needs only read the
records to understand the status of the 'world'.  As mentioned, this is what
big brother does, to a certain extent.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Does anyone have Upload meter php codes?

2003-11-28 Thread Duncan Hill
On Thursday 27 November 2003 18:21, Ryan A wrote:
  http://pear.php.net/package/HTML_Progress

 Very nice,
 But seems to have a problem with Netscape Communicator 4.75

Quote: Your browser should accept DHTML feature.

Last I checked, Netscape 4.x weren't very good at that.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Add Reply-To to this list(s)

2003-11-26 Thread Duncan Hill
On Wednesday 26 November 2003 10:04, Nigel Jones wrote:

 IMHO we'd be better off having a PHP Forum on php.net and scrub the Mailing
 List altogether. That would just about suit everyone. You get to subscribe
 to Topics you want to, you can subscribe to whole forums if you want to,
 less Privacy Issues.

Meep!

That would instantly see me not reading, or posting.  Having the system 
delivered to my door, not bogged down by markup etc is wonderful.  Moreover, 
the data is archived world wide with e-mail.  Web forums don't (imo) lend 
themselves to that as easily.

However, propose away :)  I just wouldn't use it.  E-mail + threading + no 
markup bloat is my choice of receiving the info from the list.

If you really want a forum interface, work out how to tie in a web based NNTP 
interface that'll do that :

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] when to use \n in forms

2003-11-25 Thread Duncan Hill
On Monday 24 November 2003 04:02, Nigel Jones wrote:
 Not to offend anyone BUT

 What the  is DHTML and JS (and VB for that matter) meant to do, we can
 use  PHP instead who needs onLoad=Gimmethedampopups() - not me anyway i

http://www.kryogenix.org/code/browser/sorttable/ is a neat bit of JS (and 
posssibly DHTML) that alleviates DB engine hits when sorting data.

JS is also useful for client-side validation.  Don't rely on it, but it does 
provide a first-level of defence against users.

As for DHTML - http://www.quirksmode.org/ is all I'll say :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Duncan Hill
Thomas Svenson said:
 Hi,

 It would be nice if the moderator of this, and the other PHP-lists could fix
 so the listserver automatically add a Reply-To header to all the mails.

 When I hit Reply my message would then automatically reply to the list and
 not the author. Less hassle for me when replying and less risk of forgetting
 it.

Much better to just switch to a mail client that understands the list headers
in the mail, and supports reply to list.  KMail (KDE) and Squirrelmail (web)
are two that spring to mind.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] SSH and php

2003-11-17 Thread Duncan Hill
On Monday 17 November 2003 15:02, Ryan A wrote:
 So I guess my question gets cut down to basically any good place/program
 to learn/use SSH?

No such thing as an 'ssh command' really.. apart from the command used to 
invoke SSH.  SSH (crudely) is an encrypted form of telnet.

You need a beginner's guide on unix shell commands - cd, ls, etc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] create dropdown menu from returned $result

2003-11-16 Thread Duncan
Currently you create 1 selectbox for each loop through the while loop 
(leaving aside that the select is in and the /select outside the 
very same).

By taking a quick look at it I recommend that you put the

echo SELECT NAME='$tablename';

line outside  above the while loop.

...Hendrik

PAUL FERRIE wrote:

What am i overlooking?

?
include('common.php');
$result = mysql_list_tables(***_vinrev);
$i = 0;
while ($i  mysql_num_rows ($result)) {
   $tb_names[$i]= mysql_tablename ($result, $i);
echo SELECT NAME='$tablename';
 echo OPTION VALUE=\.$tb_names[$i].\.
 $tb_names[$i]. /OPTION ;
 echo $tb_names[$i] . BR;
  $i++;
 }
  echo /SELECT;
?
When tested
heres what i get
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/table_list.php
There are 2 tables within the DB 'reviews', 'albums'
Cheers
Paul
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Errors running PHP from command line

2003-11-13 Thread Jonathan Duncan
Thanks. Turns out I just needed to comment some things out of my php.ini.

Jonathan


Jake McHenry [EMAIL PROTECTED] said:

  -Original Message-
  From: Jonathan Duncan [mailto:[EMAIL PROTECTED] 
  Sent: Friday, November 07, 2003 7:04 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Errors running PHP from command line
  
  
  I run a php script from my shell prompt and get these errors, 
  although the script still seems to function properly.  Any 
  idea why?  (PHP Version 4,
  FreeBSD)
  
  localhost # ./scriptfile.php
  PHP Warning:  Function registration failed - duplicate name - 
  textdomain in Unknown on line 0 PHP Warning:  Function 
  registration failed - duplicate name - gettext in Unknown on 
  line 0 PHP Warning:  Function registration failed - duplicate 
  name - _ in Unknown on line 0 PHP Warning:  Function 
  registration failed - duplicate name - dgettext in Unknown on 
  line 0 PHP Warning:  Function registration failed - duplicate 
  name - dcgettext in Unknown on line 0 PHP Warning:  Function 
  registration failed - duplicate name - bindtextdomain in 
  Unknown on line 0 PHP Warning:  Function registration failed 
  - duplicate name - ngettext in Unknown on line 0 PHP Warning: 
   Function registration failed - duplicate name - dngettext in 
  Unknown on line 0 PHP Warning:  Function registration failed 
  - duplicate name - dcngettext in Unknown on line 0 PHP 
  Warning:  Function registration failed - duplicate name - 
  bind_textdomain_codeset in Unknown on line 0 PHP Warning:  
  gettext:  Unable to register functions, unable to load in 
  Unknown on line 0 PHP Warning:  Unknown(): Unable to load 
  dynamic library 
  '/usr/local/lib/php/extensions/current/chasen.so' - Cannot 
  open 
  quot;/usr/local/lib/php/extensions/current/chasen.soquot; 
  in Unknown on line 0 PHP Warning:  Unknown(): Unable to load 
  dynamic library 
  '/usr/local/lib/php/extensions/current/kakasi.so' - Cannot 
  open 
  quot;/usr/local/lib/php/extensions/current/kakasi.soquot; 
  in Unknown on line 0 PHP Warning:  Unknown(): Unable to load 
  dynamic library 
  '/usr/local/lib/php/extensions/current/namazu.so' - Cannot 
  open 
  quot;/usr/local/lib/php/extensions/current/namazu.soquot; 
  in Unknown on line 0 localhost #
  
  Thanks,
  Jonathan Duncan
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 I used to get this, I would have a page and a half (about 3 times what
 you posted here) of errors when I would try to run from the command
 line. I never did figure it out, but they disappeared when I upgraded
 php. Sorry, not much of a help.
 
 
 
 Thanks,
 
 Jake McHenry
 Nittany Travel MIS Coordinator
 http://www.nittanytravel.com
 
 
 
 
 



-- 
Jonathan Duncan
Administrator
801.376.7796
JKD Web Magic
http://www.jkdwebmagic.com
Web Site Hosting and Design





Brought to you by nacnudMail using TWIG.  http://www.nacnud.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] _GET arguments question

2003-11-11 Thread Duncan
Hi,

just a quick question:
I'm writing a script, where arguments get added to a dynamicaly created URL.
The only problem is that if there are no arguments in the URL already I 
get the following:
http://localhost/dir_to_my_script/test.php?arg1=1arg2=2
notice the ? bit.
I'm just curious, since it's working just fine in any major browser, are 
there any known problems which could occur by using the  right after 
the ? character?

Regards,
Hendrik
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   3   >