Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 you need to be root to add users - and your web server is most likely not runings as root (certainly shouldn't be!!) To make this work, add the user apache runs under to /etc/sudoers (look at the sudo man page), then change the command you have

Re: [PHP] Adding users to a linux system?

2002-10-15 Thread Shane Wright
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Custom Programming Web Programming community discussion http://www.inter-apps.com - Original Message - From: Shane Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 15, 2002 9:36 AM Subject: Re: [PHP] Adding users to a linux system

[PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi One of my pages opens ~100 files, reads from them, and closes them, (only one file open at a time). The problem is that the page just dies mid-way through execution - no errors, no segfault, it just dies and returns a blank page to the user.

Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright
On Wednesday 18 September 2002 12:01 am, Tyler Longren wrote: How long does the script tend to run before it just quits? Perhaps a timeout is set too low in php.ini. Take a look at max_execution_time in php.ini tyler On Tue, 17 Sep 2002 23:14:46 +0100 Shane Wright [EMAIL PROTECTED] wrote

Re: [PHP] strange bug(?) when opening lots of files

2002-09-17 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi my ISP keeps a little behind the curve - sometimes thats a good thing, but sometimes not. :( We could install our own PHP, but unless this is a known issue that has been fixed since I'd rather not risk any others by installing a new version

Re: [PHP] Dos Paths

2002-07-10 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I have a problem that's somewhat related to this - I can get short filenames from the OS but I really need long filenames. Does anyone know how to do this? Thanks Shane On Wednesday 10 July 2002 1:14 pm, BB wrote: I've got an application

[PHP] get pwd on windows

2002-06-11 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Ok, I need to write this little script to run on a Windows box (don't ask...), but I'm getting completely shafted by the inconsistent use of long filenames. I need to get the current directory, but it must have long filenames and not be

Re: [PHP] Number formatting

2002-06-06 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi $aprTemp = number_format($apr, 2); which in the case of 3.05 will return 305.00 and 300.00 for 3%. Anyone have a snippet to test and display properly so that 3% would be 3.00, etc. you could try this... $val = sprintf(%0.02f, $val); Cheers

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi This may sound silly - but is there enough free disk space on whatever partition /tmp is mounted on? Alternatively, as a workaround, you could create a new directory and give the web server user permission to write to it and tell PHP to

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread Shane Wright
is: $bgcolor.; ? argggh! * dan radom ([EMAIL PROTECTED]) wrote: I've just tried that. /foo is owned by nobody and is mode 777. there's 135M available on that partition. * Shane Wright ([EMAIL PROTECTED]) wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not really. You either have to init your variables or turn off notices in error_reporting() (or otherwise suppress them; i.e. display_errors = off). initialising them with safe defaults is the thing to do - the point of the error is to warn

Re: [PHP] Undefined variables

2002-03-30 Thread Shane Wright
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sorry, didnt get that that was your prefered method - didnt mean to step on your toes :) S On Sunday 31 March 2002 2:50 am, Lars Torben Wilson wrote: On Sat, 2002-03-30 at 17:43, Shane Wright wrote: -BEGIN PGP SIGNED MESSAGE- Hash

[PHP] sessions concurrency

2002-03-13 Thread Shane Wright
Hi If I set up a session while generating a page, and I store some data in it, when does that data become available for other connections from the same user (same session)? I.e. If I have a complex page with some session data that is used to dynamically generate some of the images in the

Re: [PHP] Uploading a file

2002-01-25 Thread Shane Wright
Hi Jason You have set the form's ENCTYPE attribute to 'multipart/form-data' haven't you? FORM ENCTYPE='multipart/form-data' -- Shane On Friday 25 Jan 2002 2:08 pm, Todd Cary wrote: Jason - Using the recommended HTML, everything works *except* the file does not become part of the

Re: [PHP] strange behaviour of mysql_pconnect()

2002-01-22 Thread Shane Wright
Actually, I'd be interested to know why the same connection is used for two connections to the same database? I'm guessing people could fall over this trying to do, say, unbuffered queries through one to fetch a huge result set, and normal queries through another to make changes Of

Re: [PHP] RTFM

2002-01-18 Thread Shane Wright
Hi Maybe this list should be split - kindof into a php-newbies and a php-advanced ? -- Shane On Friday 18 Jan 2002 9:39 pm, Richard Crawford wrote: Consider yourself fried. ;-) Seriously, though, I think that there are more advanced PHP lists that would probably be more to your liking.

Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Shane Wright
Use 64bit integers! They'll count up to a much higher number and will last way beyond 2038. In the database, set the correct type (INT8 in PostgreSQL, dont know about the others). Dont worry about PHP as I'm sure there'll be a few newer versions supporting wider int formats before then (if

Re: [PHP] PHP vs. ASP

2002-01-09 Thread Shane Wright
Hi Something I dont think anyone's mentioned yet is that PHP is also great for running stuff from the command line - e.g. for background scripts for a site or mailing scripts or whatever... In case that doesnt sound so useful, it measn you can use all the same libraries for the online site

Re: [PHP] PostgreSQL query taking a long time

2001-12-21 Thread Shane Wright
Hi, You dont have the book field in the asv_bible table indexed. Use this to index it CREATE INDEX myindexname ON asv_bible(book); (the primary key fields are ok because PostgreSQL creates a unique index to implement the PRIMARY KEY constraint). Hope that helps :) -- Shane I have a

Re: [PHP] PHP ssi

2001-12-21 Thread Shane Wright
Hi Nick, No, this isnt possible - but the constructs in PHP should allow you to do anything you can do with SSI just as easily. -- Shane On Friday 21 Dec 2001 5:45 pm, Nick wrote: Is it possible to have a .php file parse SSI's? I tried adding .php as a SSI file but it overwrote the php

Re: [PHP] PHP / SSL

2001-12-20 Thread Shane Wright
Hang on, correct me if I'm wrong, but isn't 56bit DES significantly different from 40-bit SSL (which uses a 40bit key for the public key crypto and something like a 3000bit key for the symmetric cipher used for the actual data transfer). What I mean is, DES is significantly weaker than the

[PHP] compressed content and output buffering

2001-12-20 Thread Shane Wright
Hi The way output buffering and output compression work, all the output is buffered until script termination, at which point it's compressed and then all sent to the browser. Is there any way having it compressed but not buffering it? gzip is a stream based algorithm, so there shouldn't be

Re: [PHP] 'Select All'

2001-12-18 Thread Shane Wright
=mycheckbox[] input type=checkbox name=mycheckbox[] /form Martin -Original Message- From: Shane Wright [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 4:55 AM To: [EMAIL PROTECTED] Subject: [PHP] 'Select All' Hi I'm having somewhat of a problem :( I have my banks

[PHP] 'Select All'

2001-12-17 Thread Shane Wright
Hi I'm having somewhat of a problem :( I have my banks of checkboxes, all named 'mycheckbox[]' with the values as different IDs. The user happily checks a few of them and my scripts happily process the resulting arrays. But... how do I get Javascript to do a 'select all' on them?? I cant

Re: [PHP] 'Select All'

2001-12-17 Thread Shane Wright
6:06 pm, Charles Williams wrote: Shane, is this meant for initial settings of the form only or as a button, or some such, to allow someone to select all the boxs? chuck - Original Message - From: Shane Wright [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001

Re: [PHP] [PHP/Apache] Transparent Subdomains ?

2001-12-15 Thread Shane Wright
If there are no other virtual hosts on your box, you could leave Apache as is (unrecognised hostnames will go to the default site), and do the dynamic processing in PHP using the $REQUEST_URI variable... as for the crazy-page.php thing, you could set up a custom error handler page that

Re: [PHP] Logout problem - help me out....!

2001-12-15 Thread Shane Wright
HTTP authentication (which is what you're using) is controlled by the browser. Some browsers even keep the login/password after the window is closed until the user logs out (Konqueror on Linux for one...) If you want more control over logins and the ability to do a logout, you should make

Re: [PHP] Is PHP up to task?

2001-12-15 Thread Shane Wright
Or... what you can do though it 'post-load' them. Same idea, but stick images that are on other pages in some JS at the _end_ of the HTML and they'll load after the images on that page are complete. That way, the browser is essentially preloading images for the next page the users is

Re: [PHP] Need high bandwidth provider for my Asian community site

2001-12-13 Thread Shane Wright
For a UK based server, have a look at dsvr.co.uk - they do great hosting and bandwidth is pretty cheap (AFAIK for a dedicated box its ~£300 p/month for 40-50Gb of storage and 25Gb/month bandwidth) Its worked out the best deal for us anyways :) (PHP4 with loads of extensions compiled in,

Re: [PHP] Performance

2001-12-13 Thread Shane Wright
another resounding YES vote on this corner [anything so I dont have to do it all myself] -- Shane On Thursday 13 Dec 2001 5:45 pm, Jim Lucas wrote: the site that I design for has converted all of the echo; print() and any other printing function of php into a simple breakout into

Re: [PHP] Need high bandwidth provider for my Asian community site

2001-12-13 Thread Shane Wright
but it can understand br [ive never had any problems anyways...] -- Shane On Thursday 13 Dec 2001 6:14 pm, l0t3k wrote: Sunny, AFAICR, br / is for Netscrape, which apparently cant understand br/ for some reason.. Sunny At Wde [EMAIL PROTECTED] wrote in message [EMAIL

Re: [PHP] Connecting MS SQL

2001-12-13 Thread Shane Wright
Hi you're getting MS SQL messages so you have the MS SQL library installed ok (otherwise you'd be getting 'undefined function' or thereabouts...) The problem is most likely with MS SQL itself - is the username/password set up and is access allowed from the machine your making the connection

Re: [PHP] flushing contents to the browser

2001-12-12 Thread Shane Wright
Hi The most practical thing to do is to do the big db operation in a background process and have an independent page on the browser that automatically refreshes and changes when the job is done. There are 2 issues... 1 - running the background process, there are quite a few ways of doing

Re: [PHP] How to get week number from date

2001-12-11 Thread Shane Wright
Actually, this is in PHP 4.1.0 which has just been released... ..here's the line from the changelog: Added 'W' flag to date() function to return week number of year using ISO 8601 standard. (Colin) -- Shane On Tuesday 11 Dec 2001 3:37 pm, Nick Ward wrote: Hello, First of all I am very

Re: [PHP] php as cron

2001-12-10 Thread Shane Wright
Hi You probably need to set the path to your PHP binary in crontab. Alternatively (this is probs a better way), wrap the whole lot up in a simple shell script and get cron to run the shell script. It's easier than it sounds... #!/bin/bash cd /path/to/php/scripts php myscript.php /dev/null

Re: [PHP] Running WML (WAP services) under PHP

2001-12-09 Thread Shane Wright
Hi i think that php sends out headers showing that the page is html.not sure bout this, but you might have to send a diff header.. This is true - you should send a content type of either text/x-wap.wml or text/vnd.wap.wml (for WML 1.0 and 1.1 respectively)... header('Content-Type:

Re: [PHP] Stripping slashes from db-insert?

2001-12-01 Thread Shane Wright
Addslashes() is probably getting called twice on the data on the insert... if you have magic_gpc on, any inputted data already has the necessary escapes - so you shouldnt need to call it again... Hope that helped :) -- Shane On Saturday 01 Dec 2001 1:14 pm, Daniel Alsén wrote: Hi, i know

[PHP] APC and memory troubles

2001-11-29 Thread Shane Wright
Hi List, I'm having some troubles with APC and was wondering if anyone else had seen this and perhaps knew of a solution... Basically, random pages at random times cause the script to run out of memory. This first happened with the default 8Mb limit, so I upped it to 20Mb but the problem

Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 Netscape!

2001-11-27 Thread Shane Wright
Hi Kris Thats because you've wrapped the time() call and the addition inside a pair of doublequotes. Remove those and it'll work fine... Regards -- Shane On Saturday 29 Dec 2001 6:35 pm, Kris Wilkinson wrote: Just recently I've noticed an issue with setcookie. My scripts which normall

Re: [PHP] setcookie BUG w/ IE 5.5, 6.0 Netscape!

2001-11-27 Thread Shane Wright
Oh yeah, about the lifetime of the cookie - with no valid expiry time it is created as a session cookie - which is supposed to only live as long as the browser does. [opening a new independent browser window does not share the session, but window.open() calls do, as do other 'browser created

Re: [PHP] cookies

2001-11-27 Thread Shane Wright
Hi Urb Can you not just set the cookie again [using the updated expiry date]. If I remember correctly, this should work.. -- Shane On Tuesday 27 Nov 2001 5:45 pm, Urb LeJeune wrote: Speaking of cookies, is there a way using session control to modify the expiration date of a cookie? I would

Re: [PHP] Standalone PHP Application

2001-11-19 Thread Shane Wright
is proprietary and I need to protect the code. __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com The world is waiting, are you ready? -+___+- On Sun, 18 Nov 2001, Shane

Re: [PHP] Quiz questions on PHP

2001-11-18 Thread Shane Wright
Hi Have a look at the PHP tests on Brainbench.com - they're of a different ilk but may be useful (I think they're still free)... [dunno about the copyright though - but it should say on the site, if nothign else it might help with some pointers] -- Shane On Sunday 18 Nov 2001 12:43 pm,

Re: [PHP] Changing var value from int to string

2001-11-18 Thread Shane Wright
Hi Nope, this is fine [not necessarily good programming practise mind, but thats a different story...] -- Shane On Sunday 18 Nov 2001 6:13 am, phantom wrote: Is there any inherit danger or taboos against changing the value of a variable from an integer to a string? example: if

Re: [PHP] Standalone PHP Application

2001-11-18 Thread Shane Wright
Hi You could have a look at the GTK+ bindings for PHP - AFAIK they let you write standalone apps. There's info on the PHP web site ( www.php.net ). -- Shane I'm looking for information on using PHP for standalone applications. Specifically, I need to create a PHP-based application that

Re: [PHP] select+uploading multiple files

2001-11-02 Thread Shane Wright
Hi fitiux I'm sure the list will correct me if I'm wrong, but what you're talking about isnt possible, at least not in this way. This isn't a limitation of PHP - its a limitation of the HTML form element that handles the uploads. You could consider a client-side applet to achieve the result

Re: [PHP] How to get Usernames

2001-11-02 Thread Shane Wright
Hi Michael How about explode()ing it using '/' as the seperator, then finding the element in the resulting array that begins with '~', strip that first character using substr() and bod's your uncle... I'd write the code but I've had a long day... Shane On Friday 02 November 2001 6:11 pm,

Re: [PHP] How to get Usernames

2001-11-02 Thread Shane Wright
Okz, Hows this... $myarray = explode('/', $REQUEST_URI); for ($i=0; $icount($myarray); $i++) { $mystr = $myarray[$i]; if ($mystr[0] = '~') { $username = substr($mystr, 1); $i = count($myarray); }; }; and presto, username in $username

Re: [PHP] A way to simulate modem speeds?

2001-10-31 Thread Shane Wright
duno about for windows, but there's quite a bit around on packet shaping for Linux and *BSD which amounts to the same thing - could be worthwhile sticking an old server in the middle with some different rules on different ports (i.e. port 81 set up for 14k4 equiv, 82 for 28k8 equiv, etc..)