[PHP] serverside restrictions

2002-07-13 Thread Liam MacKenzie
Hi guys, I have a function: $substring = substr($REMOTE_ADDR,0,9); if ($substring != '192.168.0') { echo "Access Denied"; exit; } If the user isn't from the local network, he's not allowed in. This works fine, but is there a way to get apache to do it for me instead? Like, this for exa

[PHP] Re: Dealing with spaces and punctuation in uploaded filenames (tjlq)

2002-07-13 Thread Richard Lynch
>$SAFEFILENAME = ereg_replace ("[[:punct:]]+[[:blank:]]+", "", $FILENAME); > >But that does not seem to be working, and I have not been able to figure >out why. It's better to specifically *ALLOW* certain characters than to try to list all the ones you do *NOT* allow: # Get rid of gnarly ch

[PHP] Re: Can this be done with mail()?

2002-07-13 Thread Richard Lynch
> >I need to query a database and return a resultset. A php script will then >sort through the data and send the data to the browser in the form of a table. > >Is it possible to gather the the results with html tags and store them in a >variable so that the results can be emailed to someone? If

[PHP] Re: New 2 PHP

2002-07-13 Thread Richard Lynch
>Hi Everyone. > >Yup.. another dummy who can't suss out php. > >I'm running win2000 server and have installed php (by the book), also have >mysql running. I just saw an article on Apache Today (http://www.apachetoday.com) about PHP on W2K installation. It seemed to be pretty clearly-written and

[PHP] Re: PHP install - what features?

2002-07-13 Thread Richard Lynch
>I have searched the archive for a message subject >something like "PHP Wish List" and was unsuccessful. Depends who does the wishing :-) The first time I compiled PHP, I tried to throw in almost everything that sounded remotely interesting. That was incredibly time-consuming and frustrating.

[PHP] Re: pgSQL Functions with results set to php?

2002-07-13 Thread Richard Lynch
>List, > I'm creating a PHP/pgSQL web site...I need to execute queries with a >cursor and get their result set into my PHP script. How can I make a >pgSQL procedure with logic that also returns a result set? I've >searched and searched but cannot find the answer. Does anyone got it? Any old

[PHP] Re: Encoding problem with command line PHP.exe

2002-07-13 Thread Richard Lynch
>Hello - My problem is as follows: >$data = mssql_result(mssql_query("SELECT Field FROM table WHERE >ID='1'"),0); >echo $data; >mysql_insert("INSERT INTO table2 VALUES('$data')"); >?> > >The data in the MSSQL table is: Æã I dunno what those characters are or what's

[PHP] Re: black becomes red w/ imagecreatefromjpeg

2002-07-13 Thread Richard Lynch
>It's been over a year since I've had to come to you for help, but your >insights and experience are too hard to resist... :-) > >I don't have a problem with any of the gd functions and they all works >fine except that when I try to fill a circle or draw onto an imported >image from imagecreate

[PHP] Re: Final Year Computer Science Project involving PHP

2002-07-13 Thread Richard Lynch
>The onus is on us to define the problem boundaries, to investigate possible > >solutions, and to present the results verbally, in writing and (possibly) to > >demonstrate in action. They like having projects that find solutions (or >improve a > >current sloution) real life problems. You may want

[PHP] Re: Write EXIF - is it possible?

2002-07-13 Thread Richard Lynch
>Is it possible to write to exif-headers in pictures? I don't think any PHP built-in function will do that. Your options include: 1. Looking at the PHP source and extending it to do what you want. (and contributing that back). 2. Using some external program to do it: http://php.net/exec 3. Di

[PHP] Re: Emulating Java Exceptions

2002-07-13 Thread Richard Lynch
>Hi All, > >I'm porting Java Code to PHP, my question is: What is the best approach >to emulate Java exceptions in PHP4? (I know ZE2 adds exceptions but I >can't wait). > >When a Java method "throws" an exception it is difficult to handle as a >"return" of an exception object since then I'd hav

[PHP] Re: A question of style ...

2002-07-13 Thread Richard Lynch
> An agent goes to an interface that reveals a list of customers from a >database. These customers have provided referrals which now reside in a >database. The agent selects a referral which is processed by an intermediary >script which sets a flag in the database saying that "this agent" is, ha

Re: [PHP] PHP meetup

2002-07-13 Thread Richard Lynch
>I just signed up for this, as I would LOVE to be able to talk and interact >(in person) with some PHP Developers. As I'm still learning (as we all >are), it would be a great opportunity for me to be able to meet up and >discuss this wonderful language with my peers. Hopefully that'll come to

[PHP] Re: xml and max size of xml doc

2002-07-13 Thread Richard Lynch
>Hi y'all > >Has anyone found any problems with the xml parsing functions when the xml >document gets quite large. eg, a doc with about 5000 lines (about 200KB) > >The problem that's occurring is that some of the elements are being broken >in two parts > >If you require more details, please ask, a

Re: [PHP] HTTP_USER_AGENT?

2002-07-13 Thread Richard Lynch
>In article <[EMAIL PROTECTED]>, >[EMAIL PROTECTED] says... >> For example in a book discussing PHP 3 it says: >> >> > phpinfo(); >> ?> >> >> This works just fine. In a book that discusses PHP 4 it says: >> >> > php_info() >> ?> >> >> This gives "Fatal error: Call to undefined function: php

[PHP] Re: Problems with apache and php

2002-07-13 Thread Richard Lynch
>I have a small problem, >I can make the cgi version of php fine, it runs and installs perfectly, but >when I try to make the apache module (i.e. --with-apxs=/path/to/apxs) php >crashes apache. can anyone give me any insight on this? What error messages are in Apache log? Do you get a core dump?

[PHP] Re: how can this be? GET instead of POST -> db error

2002-07-13 Thread Richard Lynch
>Hi everybody, > >I am just trying to find out how some db errors happened during a user was >browsing my web app. > >This is out of the Apache log: > >GET /subapp_profiles/act_upload_image.php HTTP/1.1" 200 160 >POST /subapp_profiles/act_upload_image.php HTTP/1.1" 302 5 > >I do not have a clue wh

[PHP] Re: Can not delete files that were uploaded

2002-07-13 Thread Richard Lynch
>I use PHP to upload files to the web server via web browser. However, I can >not delete the files later cause the Redhat linux server running on safe >mode. Do I have to changed the owner of the file during the file uploading >time? > >Please let me know how to solve this problems. The files ar

Re: [PHP] Setting include_path

2002-07-13 Thread Jason Wong
On Sunday 14 July 2002 07:36, Tim Thorburn wrote: > Hi, > > I'm having some difficulties setting the include path for two of my > sites. I had this working previously on a PHP3 server with the command in > the .htaccess file: > > php3_include_path ".:/path/to/account/root/" > > However, I seem to

Re: [PHP] Dealing with spaces and punctuation in uploaded filenames (tjlq)

2002-07-13 Thread Jason Wong
On Sunday 14 July 2002 09:20, Tim Luoma wrote: > and this is what I was trying to use to remove the space and punctuation > (all one line, might wrap in email): > > $SAFEFILENAME = ereg_replace ("[[:punct:]]+[[:blank:]]+", "", $FILENAME); > > But that does not seem to be working, and I have not b

[PHP] TOC protocol (AOL Instant Messenger)

2002-07-13 Thread SpamSucks86
I'm interested in coding something in PHP which uses the TOC protocol to connect to AOL Instant Messenger (AIM). Has there been anything done like this in PHP? I'm also looking for more information on the TOC protocol. I have the protocol specs, but it doesn't say where the server is to connect to

Re: [PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
I found figured it out. I am a n00b BTW. the snippet was caught inside anouther if statment so it was only displaying if the file was under a Meg in size! -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTE

Re: [PHP] Newbie question

2002-07-13 Thread Alberto Serra
ðÒÉ×ÅÔ! Cal Evans wrote: > ++ is an incrementor. He may also consider the position of the inc/decrementor. Example (note that the first element of an array has index 0): $a = Array(1,2,3,4,5); $i = 1; executing echo $a[++$i] will output 3 2 echo $a[$i++] will output 2 2 In both cases $i ge

Re: [PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
It *still* didn't work. I will increment all table cells using a single update query to do them all. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Still doesn't work. > > I'll have to think abou

Re: [PHP] PHPDiscuss.com

2002-07-13 Thread Jeff Lewis
I think there is always a need for more resources. Some people prefer forums and the ability to actually go a bit off topic in some boards as opposed to strictly answering questions. It's a matter of preference I suppose. Anything that further helps PHP spread I'm for it :) Jeff - Original M

Re: [PHP] PHPDiscuss.com

2002-07-13 Thread Justin French
Aren't there already hundreds of these things out there? I can't imagine why I'd use a clumsy, slow web interface to a forum that I have to keep checking/returning to when I can satisfy 99% of my problems with this mailing list. It's as simple as sending, checking and replying to emails :) Jus

Re: [PHP] problem with cookies and some browsers

2002-07-13 Thread Justin French
on 13/07/02 7:35 AM, Andy ([EMAIL PROTECTED]) wrote: > I am wondering if there is a possiblity that some browsers like IE 5.1 do > not accespt cookies by default. I am working on a session management system > and some users report that they have not been able to login because the > cookie has bee

Re: [PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
Still doesn't work. I'll have to think about it. I may raise all the values in the plevel colomn by one. It may work then. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Cal Evans" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > off the top of my head, I

RE: [PHP] How come this will echo No or nothing?

2002-07-13 Thread Cal Evans
off the top of my head, I'd suggest : if(intval($row['plevel']) == 0){ Grasping at straws here but you've moved beyond a simple question into a debigging process. (Which doesn't work too well for email.) Sorry I couldn't be of more help. =C= * * Cal Evans * The Virtual CIO * http://www.calevans

RE: [PHP] Newbie question

2002-07-13 Thread Cal Evans
++ is an incrementor. $i=1; $i++; echo $i; =C= p.s. -- is a decrementor. * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Jay [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 13, 2002 8:32 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question

[PHP] Newbie question

2002-07-13 Thread Jay
I have just started to teach myself php so I am reading through several scripts to see how the language is "spoken". I came across the following at phpworld.com $i = 1; while ($i <= 10) { print $i++ Its a little script that counts from 1 to 10, but what does $i++ mean. What does the ++ do

Re: [PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
The value of plevel is "0" according to var_dump. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Cal Evans" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Have you done a var_dump on $row to make sure that plevel exists? > > =C= > > * > * Cal Evans > * The

[PHP] Dealing with spaces and punctuation in uploaded filenames (tjlq)

2002-07-13 Thread Tim Luoma
I am using this basic example (from the manual iirc) for uploading files Upload this file: What I am trying to do then is to remove any spaces or punctuation that might be in the filename. This is what I am using for the filename: $FILENAME = $_FILES['userfile']['name']; and

Re: [PHP] objects in an array

2002-07-13 Thread Alberto Serra
ðÒÉ×ÅÔ! Alexander Ross wrote: > I have an array filled with objects. Each object has a method called > "display". > > I have > > $var = $arr[0]; > $var->display(); > > but I keep getting an error. What am I doing wrong? > (I do a print_r of the array immediately before this code and there is

RE: [PHP] How come this will echo No or nothing?

2002-07-13 Thread Cal Evans
Have you done a var_dump on $row to make sure that plevel exists? =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 11:11 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] How come this

Re: [PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
I tried that. same result. Here is my (new) snippet: if($row['plevel'] == 0){ echo 'No'; } else { echo 'Yes'; } "Cal Evans" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > because $row['plevel'] is NEVER == '0' It is probably == 0 though. (note >

RE: [PHP] How come this will echo No or nothing?

2002-07-13 Thread Cal Evans
because $row['plevel'] is NEVER == '0' It is probably == 0 though. (note the missing quotes. ) :) HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Friday, July 12, 2002 11:01 PM To: [EMAIL PROTECT

[PHP] How come this will echo No or nothing?

2002-07-13 Thread JJ Harrison
here is the portion of the script: if($row['plevel'] == '0'){ echo 'No'; } else { echo 'Yes'; } here is my table structure dump: # # Table structure for table `docs` # CREATE TABLE docs ( id int(11) unsigned NOT NULL auto_increment, name varchar(200) NOT NULL default '', note v

Re: [PHP] How do I get the name of the script?

2002-07-13 Thread David Duong
Thnx for hte help, I wanted to keep register globals off, its a security hazard. "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10207140050140.63499-10@localhost">news:Pine.BSF.4.10.10207140050140.63499-10@localhost... > > You have many options. Do a call to phpinfo() a

Re: [PHP] How do I get the name of the script?

2002-07-13 Thread Philip Olson
You have many options. Do a call to phpinfo() and note all the predefined variables, such as PHP_SELF. There is also the __FILE__ constant, print that too. Why do you request a function? If it's because $PHP_SELF is not set, that's because the PHP directive register_globals = off. Go throu

Re: [PHP] Can't Install on Mac OS X

2002-07-13 Thread Liam MacKenzie
What extras are you compiling in with it? Compile PHP and Apache with the bare minimum only, no fancy stuff. Try it then. I sucessfully compiled several machines using the latest source code yesterday. - Original Message - From: "Brandon Pearcy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTE

[PHP] Setting include_path

2002-07-13 Thread Tim Thorburn
Hi, I'm having some difficulties setting the include path for two of my sites. I had this working previously on a PHP3 server with the command in the .htaccess file: php3_include_path ".:/path/to/account/root/" However, I seem to be unable to set the include path with two new sites - one ru

[PHP] How do I get the name of the script?

2002-07-13 Thread David Duong
Is their a function that returns an equivalent of $PHP_SELF? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Can this be done with mail()?

2002-07-13 Thread John Holmes
> I need to query a database and return a resultset. A php script will then > sort through the data and send the data to the browser in the form of a > table. > > Is it possible to gather the the results with html tags and store them in > a variable so that the results can be emailed to someone?

[PHP] Can't Install on Mac OS X

2002-07-13 Thread Brandon Pearcy
Hi Everyone, In the past I have setup many Mac OS X web servers successfully. Now I'm trying to setup another OS X web server, but PHP will not work. I'm having massive problems getting PHP to "make", and I'm all out of ideas. After I configure PHP (./configure), and try to make it, I get the

[PHP] Re: recusive functions

2002-07-13 Thread Jome
"Alexander Ross" <[EMAIL PROTECTED]> skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Does exit() in a recursive function exit the entire function, of does it > only exit that iteration of teh function?? Thanks exit terminas the whole script and not just a function. Read more

[PHP] Animated GIFs

2002-07-13 Thread Peter
I know GIF support was dropped from the GD library, but can you make animated GIFs in any version of GD? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general Digest 13 Jul 2002 18:40:35 -0000 Issue 1462

2002-07-13 Thread php-general-digest-help
php-general Digest 13 Jul 2002 18:40:35 - Issue 1462 Topics (messages 107495 through 107536): Re: safe_mode 107495 by: Liam MacKenzie Re: Convert MySQL table into Access or Excell format 107496 by: Alex Shi 107497 by: Darren Young 107498 by: Darren Young

[PHP] Install 2 php

2002-07-13 Thread Pierre
Hi, I want to install 2 different php4 on my webserver (RH 7.1) for having 2 different php.ini (to stop some function for some vhost) and call him with different extension with the addhandler directive in the vhost of apache. ( I have php in cgi and suexec ) Thanks for your responses, Pierre

[PHP] objects in an array

2002-07-13 Thread Alexander Ross
I have an array filled with objects. Each object has a method called "display". I have $var = $arr[0]; $var->display(); but I keep getting an error. What am I doing wrong? (I do a print_r of the array immediately before this code and there is an object at array[0]) Thanks Alex -- PHP Ge

Re: [PHP] how to defend this atack?

2002-07-13 Thread Chris Shiflett
This looks like a variant of the code red worm and will only bother you if you are running IIS, which I would hope you are not. :-) 218.5.149.77 is apparently running an infected IIS Web server. You might want to let them know. Happy hacking. Chris andy wrote: >Hi there, > >I am getting fro

[PHP] Re: Can this be done with mail()?

2002-07-13 Thread Peter
Yes. I'm sure you could just mail out the table in an email. You'd have to do it as a multipart email (i think that's what it's called) as just mailing out the html code wouldn't show as a table in a mail client. Here's the source of a HTML spam I got this morning - should give you an idea how to

[PHP] how to defend this atack?

2002-07-13 Thread andy
Hi there, I am getting from time to time such GET requests. I think this is kind of a atack against the webserver. DNS maybe. Here is the log entry: 218.5.149.77 - - [13/Jul/2002:19:57:09 +0200] "GET /default.ida?NNN NNN

Re: [PHP] php + javascript hard day together ?

2002-07-13 Thread David D
I hack js no need to change in php :