[PHP] Q about php with gd

2001-12-16 Thread Joelmon2001

Hello, just wondering if I want to get the most out of gd 2+ with php
does it require freetype 2+? Or can I get away with freetype 1.35?

Thanks

Joel



Re: [PHP] using variables

2001-12-16 Thread Tom Rogers

Hi
you need:
img src=?echo $ulo?
or
img src=?=$ulo?

Tom

At 05:39 PM 16/12/01, David Killingsworth wrote:
I'm trying to determing why this won't work.
I wish to assign graphics to variables then call them
within the HTML on my .php pages.
--test.php--
?
$ulo = /images/ulo.gif;
?

b8126e.jpg
---end test.php-
The resulting output viewing the html source from the
browser is:
html output--
b812e1.jpg
---end html output-

there is obviously a programming error here, but after
hours of trying things I'm just missing what it is.
the img src tag should read
img src=/images/ulo.gif

What am I missing?
   David.

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



php-general Digest 16 Dec 2001 08:49:09 -0000 Issue 1055

2001-12-16 Thread php-general-digest-help


php-general Digest 16 Dec 2001 08:49:09 - Issue 1055

Topics (messages 77827 through 77859):

Re: Newbie-student Database PHP Question
77827 by: Webleycity

Re: Need high bandwidth provider for my Asian community site
77828 by: Webleycity
77842 by: Webleycity

Webcam on websites? Ugh!!!
77829 by: Webleycity

Re: PHP list posting confirmation for [EMAIL PROTECTED]
77830 by: jtjohnston

include help
77831 by: jtjohnston

Web Based Control Panel for Hosting
77832 by: Jeremiah Jester

include
77833 by: jtjohnston
77834 by: jtjohnston

__
77835 by: jtjohnston

A primary practicall  for the pros- the easiest way to sort files in a directory by 
name or date.?
77836 by: php
77838 by: Michael Geier

Re: Is PHP up to task?
77837 by: Shane Wright

Email class
77839 by: Gerard Samuel
77847 by: Manuel Lemos

PHP4.1.0  Apache1.3.22 under WinXP
77840 by: Christian Calloway

i get a warning after upgrading to 4.1.0 (repost)
77841 by: Phillip Oertel
77853 by: John Lim

connect to a file outside the web space.
77843 by: Webleycity
77844 by: Jack Dempsey
77851 by: David

Brain dead - need help!
77845 by: Gaylen Fraley
77846 by: Jack Dempsey
77848 by: Gaylen Fraley

Re: Unable to return object references from functions
77849 by: Tom Rogers
77850 by: Tom Rogers

Opinions, please
77852 by: Gaylen Fraley

Re: Script like this for PHP
77854 by: Indera

Re: Searching for a new provider
77855 by: Indera
77856 by: R'twick Niceorgaw

using variables
77857 by: David Killingsworth
77859 by: Tom Rogers

Q about php with gd
77858 by: Joelmon2001.aol.com

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---


SQl
Refers to the generic database. Like PostSQl, Oracal etc.

mysql
1) Belongs to a group of people that create that database, specific vender
that distribute that database that runs on a specific form only.

2) Yes 



---
Mark Webley
Multimedia design and development

WebleyCity Limited 
London  United Kingdom

[EMAIL PROTECTED]
[EMAIL PROTECTED]
Mobile: 07980 213 627

Fax/Tel: 0208 678 1721
Pager 07654 581816
http://www.webleycity.co.uk
---




 From: Webleycity [EMAIL PROTECTED]
 Date: Fri, 14 Dec 2001 07:26:19 +
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Newbie-student Database PHP Question
 
 
 
 
 
 PLAY A GAME HERE ON
 http://www.webleycity.co.uk/theblitz.html
 
 
 
 
 | Website design and hosting. |
 | Your free website trial including design and webspace, contact: |
 [EMAIL PROTECTED]
 Visit: http://www.webleycity.co.uk/offers
 ---
 
 WEBLEYCITY CAN DESIGN YOUR WEBSITE TO YOUR EXISTING
 CORPORATE IDENTITY OR CREATE ONE FOR YOU
 
 A treat for Powermac users
 click below to download my screensaver
 http://www.webleycity.co.uk/mac.zip
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 ---
 Mark Webley
 Multimedia design and development
 
 WebleyCity Limited
 London  United Kingdom
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Mobile: 07980 213 627
 
 Fax/Tel: 0208 678 1721
 Pager 07654 581816
 http://www.webleycity.co.uk
 ---
 
 
 
 
 From: [EMAIL PROTECTED]
 Date: Wed, 12 Dec 2001 05:43:30 EST
 To: [EMAIL PROTECTED]
 Subject: [PHP] Newbie-student Database PHP Question
 
 I have downloaded Mysql to check out.
 
 1) Mysql vs SQL: What is the difference?
 
 2} Would a web-based Access database suffice with PHP?
 As I already know Access.
 
 Appreciate clarification for my newbie questions, thank you.
 
 Robin
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


---End Message---
---BeginMessage---

What bandwidth would you like?


| Website design and hosting. |
| Your free website trial including design and webspace, contact: |
[EMAIL PROTECTED]
Visit: http://www.webleycity.co.uk/offers
---

WEBLEYCITY CAN DESIGN YOUR WEBSITE TO YOUR EXISTING
CORPORATE IDENTITY OR CREATE ONE 

[PHP] DOM XML Issues with 4.1.0?

2001-12-16 Thread Mark


Hello.

I developed a pretty cool website whose content is entirely
specified in XML, and use PHP DOM to convert it to HTML (XSL would be
a bit painful).

Now, with PHP 4.0.6 and libxml2-2.4.7, everything worked fine,
except that there was a huge memory leak somewhere in the PHP or the
XML DOM code in PHP, and after viewing the website for about 10 minutes,
my SuSE linux machine would hang, and my FreeBSD apache server would
need to be restarted.

So, I tried upgrading to Apache 4.1.0 with libxml2-2.4.12.

Unfortunately, a lot doesn't work any more -- when I load in my
XML file, I can load it in using xmldocfile(), and I can iterate over
the nodes, but none of them have the name property any more.

Is there a combination of PHP 4.x and libxml2-2.y that is
known to work reasonably well and not leak memory like mad?

Thanks!

mark.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Web Based Control Panel for Hosting

2001-12-16 Thread xk8org

I have used Alabanza and also CPanel (cpanel.net).  Wouldn't touch Alabanza
again as it's very expensive.  I think there is a freeware one called webmin
out there somewhere too

Ade
--- i n o v i c a h o s t i n g . c o m --

Powerful hosting from www.inovicahosting.com



 -Original Message-
 From: Jeremiah Jester [mailto:[EMAIL PROTECTED]]
 Sent: 15 December 2001 22:11
 To: [EMAIL PROTECTED]
 Subject: [PHP] Web Based Control Panel for Hosting


 I want to implement a web based control panel for updating email accounts,
 checking account usage for all my hosted clients. Does anybody have any
 experience? Are there PHP freeware packages out there that do
 this? Licensed
 packages? Any recommendations. THanks!
 JJ


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] php snmp compile error

2001-12-16 Thread kancha

I've downloaded php 4.1.0 and ucd-snmp 4.2.3. I was able to compile snmp 
successfully. Then i tried to compile php with snmp support. Followign is my 
configure parameters

./configure  --with-apxs=/usr/sbin/apxs --enable-calendar --with-pgsql 
--with-snmp --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem 
--with-sysvshm --enable-inline-optimization --enable-ftp --with-gd 
--enable-gd-native-ttf --with-openssl

configure works fine but when i do a make i get following error:

Zend/.libs/libZend.al(default_store.o):/usr/local/ucd-snmp-4.2.3/snmplib/default_store.c:308:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_alarm_post_config':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: multiple definition of 
`init_alarm_post_config'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `set_an_alarm':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185: multiple definition of 
`set_an_alarm'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_snmp_alarm':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:60: multiple definition of 
`init_snmp_alarm'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:60: 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_update_entry':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:67: multiple definition of 
`sa_update_entry'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:67: 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `snmp_alarm_unregister':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:88: multiple definition of 
`snmp_alarm_unregister'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:88: 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_next':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:111: multiple definition of 
`sa_find_next'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:111:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `sa_find_specific':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:120: multiple definition of 
`sa_find_specific'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:120:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `run_alarms':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:131: multiple definition of 
`run_alarms'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:131:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `alarm_handler':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:164: multiple definition of 
`alarm_handler'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:164:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function 
`get_next_alarm_delay_time':/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:170: 
multiple definition of `get_next_alarm_delay_time'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:170:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `snmp_alarm_register':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:204: multiple definition of 
`snmp_alarm_register'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:204:
 
first defined here


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Why don't ...

2001-12-16 Thread Yoel Benitez Fonseca

Hi!

The following code fragment tries to read a sequence of digits from
a file but it doesn't work, only the first character is read,
Which is my error?.


   $str = ;
   while( ($c = fgetc($this-m_file))  ereg([0-9], $c) ){
   $str .= $c;
   }


Thank you in advance

-- 
Yoel Benitez Fonseca



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] sytax to remove specifc item in string-indexed array???

2001-12-16 Thread Vincent Ma

Hi everyone:

  I would like to know how to specific item in array.  For the add new item
to array, we know just :

   $array += array($key = $value);

How to remove specific item in array???

  I tried --  $array -= ($key = $value);
 Don't work... _.

Before, i saw some code in other website, they used...

  $array[$index] -= $value -- to remove???
 ### i think this just work to number-indexed array
   not for string-indexed array


Thank for you help

Vincent Ma




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sytax to remove specifc item in string-indexed array???

2001-12-16 Thread Michael Sims

At 05:53 PM 12/14/2001 +1100, Vincent Ma wrote:
Hi everyone:

   I would like to know how to specific item in array.  For the add new item
to array, we know just :

$array += array($key = $value);

How to remove specific item in array???

unset(array[specific_item_index]);

...has always worked for me.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] CHEEP WEBSPACE OFFERS HERE

2001-12-16 Thread Webleycity

good prices here on
http://www.webleycity.co.uk/offers/index.html



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP script not paring in CGI!!!

2001-12-16 Thread Thomas Edison Jr.

Hi,

I'm running a Solaris OS. I have written a CGO
function to call common header  footer for pages. All
HTML pages are running well with it, however, a PHP3
page is not!! It's contents are not showing up.
Nothing i showing up! What do i do?

T. Edison jr.


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] now who can help me about cach my query every certain time:(

2001-12-16 Thread Alawi

now who can help me about cach my query every certain time:( 
I mean the first user requst the page and php will run query for this first time 

after that I want other user to have the result that the first user have it !!

untill the ten minutes end I want the query to run again 



this advantge is available in asp and JSP  ColdFusion but not available in PHP why ?




Re: [PHP] now who can help me about cach my query every certain time:(

2001-12-16 Thread Jack Dempsey

Alawi wrote:

 now who can help me about cach my query every certain time:(
 I mean the first user requst the page and php will run query for this first time

 after that I want other user to have the result that the first user have it !!

 untill the ten minutes end I want the query to run again

 this advantge is available in asp and JSP  ColdFusion but not available in PHP why ?

it is possible...search google for php cache


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Webcam on websites? Ugh!!!

2001-12-16 Thread Hugh Bothwell


Webleycity [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 A client wants a webcam on his site. Does any body know what script is
used
 and how it works.

The camera should come with a prog to take a snapshot.
Write a batch file that takes a snapshot, then uploads it
to your web server.  Write a batch file that calls the first
batch file every 55 seconds, OR make it a timed job via
cron.

Add javascript to the web page to call the new
graphic every 60 seconds and swap it in after it is finished
loading.  The five-second difference is to ensure that
small delays will not cause the same picture to be reloaded
again.

If you have loads of space, you could keep an archive;
otherwise I suggest overwriting the existing image each
time or maybe alternating between two names.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: now who can help me about cach my query every certain time:(

2001-12-16 Thread Manuel Lemos

Hello,

Alawi wrote:
 
 now who can help me about cach my query every certain time:(
 I mean the first user requst the page and php will run query for this first time
 
 after that I want other user to have the result that the first user have it !!
 
 untill the ten minutes end I want the query to run again
 
 this advantge is available in asp and JSP  ColdFusion but not available in PHP why ?

That is a new thing and is not necessarily a good thing.

The reason because it does not exist in PHP is because you need to use a
abstraction layer like JDBC or ODBC so you don't have to provide caching
engines for each type of database.

Anyway, in general it is not a good idea to cache result sets of
arbitrary sizes because the time you take to save and load the cache the
data may not be worth it.

Usually it is better to cache the pages generated with the data from the
query.

Anyway, if you still insist on caching your queries to realize that is
not worthy, I recommend two things:

1) Only cache up to a limited number of initial result set rows (say no
more than 2 pages, ie, 20 rows).

2) Use a cache engine that is atomic, ie, it will not let itself
overwrite the same cached data by multiple concurrent accesses.

You may want to try this generic data cache class that stores cached
data in files and uses locks to prevent cache corruption. It is very
well documented and comes with an example of usage in the documentation
page.

http://phpclasses.upperdesign.com/browse.html/package/313

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] need some help

2001-12-16 Thread Melva Garcia

I am looking for a mentor to help me along with
using php and mysql

i am a designer for over 9 years now..and will
in return help you with anything pertaining to
layout and design

i have alot of dumb questions pertianing to
php and mysql dba can someone help me
i would appreciate any help I can get

thanks
Mel 

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-12-16 Thread Hugh Bothwell


Webleycity [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 If one creates a file outside the web space on a server. How doe's one
 connect to this from a HTML or PHP page?

 As I understand it. It is not as simple as normal html link.

From an HTML page, it's just a simple link
(the same goes for generated HTML from a
PHP page).

Calling external files from PHP code depends
first on the security settings and second on the
realization that it will slow things down dramatically;
unless it's absolutely necessary, keep files local.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why don't ...

2001-12-16 Thread Michael Sims

At 09:14 AM 12/16/2001 -0500, Yoel Benitez Fonseca wrote:
Hi!

The following code fragment tries to read a sequence of digits from
a file but it doesn't work, only the first character is read,
Which is my error?.


$str = ;
while( ($c = fgetc($this-m_file))  ereg([0-9], $c) ){
$str .= $c;
}

What happens when you do just this:

$str = ;
while($c = fgetc($this-m_file)){
 $str .= $c;
}

Does it still only read the first character?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Language detection and change

2001-12-16 Thread Gary Crighton

Hi,

I know the following code displays my page in the language set in the users 
browser.

?
$lang=substr($HTTP_ACCEPT_LANGUAGE,0,2);
?

However while I do initially want the page to load in the language of the 
browser setting I also need to be able to allow the user to change the 
language and the above does not allow for this.

Can anyone suggest code samples that might do this and perhaps set a cookie 
to remember the choice for future visits?

I've been dabbling with this a while now and never quite get it right.

All help / advice appreciated as this is new to me.

Cheers,

Gary



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why don't ...

2001-12-16 Thread Rasmus Lerdorf

Is your second character perhaps a 0?  That while loop is going to end as 
soon as it gets a character that evaluates to 0.  Write it like this 
instead:

while(!feof($this-m_file)) {
$c = fgetc($this-m_file);
if(is_numeric($c)) $str .= $c;
}

-Rasmus

On Sun, 16 Dec 2001, Yoel Benitez Fonseca wrote:

 Hi!
 
 The following code fragment tries to read a sequence of digits from
 a file but it doesn't work, only the first character is read,
 Which is my error?.
 
 
$str = ;
while( ($c = fgetc($this-m_file))  ereg([0-9], $c) ){
$str .= $c;
}
 
 
 Thank you in advance
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with Code

2001-12-16 Thread Phillip B. Bruce

Hi,

I have a couple of questions before I get to my problem.

   1. Is there any documentation that explains the differences between
the versions of PHP?

  2. Does it matter when writing php code that you specifiy the file
name in the following
   manner?  test.php3  test.php4 or whatever.  I'm assumming this is
version specific.

  My Problem:

   I have the following code:

# more headlines*
?php

include include_fns.php3;
include header.php3;

$conn = db_connect();


$pages_sql = select * from pages order by code;
$pages_result = mysql_query($pages_sql, $conn);

while ($pages = mysql_fetch_array($pages_result)) {

  $story_sql = select * from stories
where page = '$pages[code]'
and published is not null
order by published desc;
  $story_result = mysql_query($story_sql, $conn);
  if (mysql_num_rows($story_result)) {
$story = mysql_fetch_array($story_result);
print TABLE BORDER=0 WIDTH=400;
print TR;
print TD ROWSPAN=2 WIDTH=100;
if ($story[picture])
  print IMG SRC=\resize_image.php?image=$story[picture]\;
print /TD;
print TD;
print H3$pages[description]/H3;
print $story[headline];
print /TD;
print /TR;
print TRTD ALIGN=RIGHT;
print A HREF=\page.php3?page=$pages[code]\;
print FONT SIZE=1Read more $pages[code] .../FONT;
print /A;
print /TABLE;
  }
}

include footer.php3;
?
#

I have the following error:


Fatal error: Call to unsupported or undefined function include_once() in
include_fns.php3 on line 7

It seems to me that include_once is a legal function but I can't the
orgination of this funtion other
than that stupid include_fns.php3 file? Any ideas on this.

Configuration:

OS: Solaris 2.8 10/00 on Intel Hardware.
Apache: 1.3.9
PHP: 3.0.15
mysql: 3.23.46

My ISP is running:

OS: Irix 6.4
Apache: 1.3.9
PHP: 3.0.9
mysql: 3.22.23b

I do appreciate any help on this.



--

*** Phillip B. Bruce ***
*** http://pbbruce.home.mindspring.com   ***
*** [EMAIL PROTECTED]   ***
***  ***
*** Have you ever noticed? Anybody going slower than***
*** you is an idiot, and anyone going faster than you***
*** is a maniac. - George Carlin***





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTML to Plain TXT Parser (RegEx Help Needed)

2001-12-16 Thread ISE

Hello,

I am working on a a script that reads in an HTML file, and outputs formatted
plain text.  Not a significant task, but one area that I am having
difficulty with is gracefully converting the 'A' element.  The desired
outcome is text that maintains the link reference in brackets:


$body = pa href=\mailto:[EMAIL PROTECTED]\;first link/a/p
 pa href=\http://www.tao.ca/\;second link/a/p
 pa href=\http://www.tao.ca\;http://www.tao.ca/a/p
 pa href=\mailto:[EMAIL PROTECTED]\;[EMAIL PROTECTED]/a;

// Regex's for dealing with HTML elements here
// Most of them omitted for simplicity
$body = preg_replace ('/a href=(http:\/\/)(.*).*(.*)\/a/Usi', \\3
(\\1\\2), $body[$el]);
$body = preg_replace ('/a href=(mailto:)(.*).*(.*)\/a/Usi', \\3
(\\2), $body[$el]);

//---//
// output//
//---//

/*

first link ([EMAIL PROTECTED])
second link (http://www.tao.ca/)
http://www.tao.ca (http://www.tao.ca)
[EMAIL PROTECTED] ([EMAIL PROTECTED])

*/

--

The regex above deal fine for the first and second link, but leave redundant
text in the third and fourth.  Ideally, the regex expressions would not
include the text in brackets in the 3rd and 4th lines.  This is what I am
having difficulty with.  How can I incorporate such logic into my regex's?

Thank for your help,


Michael Caplan
Institute for Social Ecology
http://www.social-ecology.org/

1118 Maple Hill Road
Plainfield, VT, 05667 USA


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with Code

2001-12-16 Thread Jack Dempsey

1. http://www.php.net/ChangeLog-4.php

2. and yes, you have to specify the exact filename...your issue is that
include_once is not a function in php3, if that code is infact from a php3
file...

Phillip B. Bruce wrote:

 Hi,

 I have a couple of questions before I get to my problem.

1. Is there any documentation that explains the differences between
 the versions of PHP?

   2. Does it matter when writing php code that you specifiy the file
 name in the following
manner?  test.php3  test.php4 or whatever.  I'm assumming this is
 version specific.

   My Problem:

I have the following code:

 # more headlines*
 ?php

 include include_fns.php3;
 include header.php3;

 $conn = db_connect();

 $pages_sql = select * from pages order by code;
 $pages_result = mysql_query($pages_sql, $conn);

 while ($pages = mysql_fetch_array($pages_result)) {

   $story_sql = select * from stories
 where page = '$pages[code]'
 and published is not null
 order by published desc;
   $story_result = mysql_query($story_sql, $conn);
   if (mysql_num_rows($story_result)) {
 $story = mysql_fetch_array($story_result);
 print TABLE BORDER=0 WIDTH=400;
 print TR;
 print TD ROWSPAN=2 WIDTH=100;
 if ($story[picture])
   print IMG SRC=\resize_image.php?image=$story[picture]\;
 print /TD;
 print TD;
 print H3$pages[description]/H3;
 print $story[headline];
 print /TD;
 print /TR;
 print TRTD ALIGN=RIGHT;
 print A HREF=\page.php3?page=$pages[code]\;
 print FONT SIZE=1Read more $pages[code] .../FONT;
 print /A;
 print /TABLE;
   }
 }

 include footer.php3;
 ?
 #

 I have the following error:

 Fatal error: Call to unsupported or undefined function include_once() in
 include_fns.php3 on line 7

 It seems to me that include_once is a legal function but I can't the
 orgination of this funtion other
 than that stupid include_fns.php3 file? Any ideas on this.

 Configuration:

 OS: Solaris 2.8 10/00 on Intel Hardware.
 Apache: 1.3.9
 PHP: 3.0.15
 mysql: 3.23.46

 My ISP is running:

 OS: Irix 6.4
 Apache: 1.3.9
 PHP: 3.0.9
 mysql: 3.22.23b

 I do appreciate any help on this.

 --
 
 *** Phillip B. Bruce ***
 *** http://pbbruce.home.mindspring.com   ***
 *** [EMAIL PROTECTED]   ***
 ***  ***
 *** Have you ever noticed? Anybody going slower than***
 *** you is an idiot, and anyone going faster than you***
 *** is a maniac. - George Carlin***
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with Code

2001-12-16 Thread Attila Strauss

 Hi,
 
 I have a couple of questions before I get to my problem.
 
1. Is there any documentation that explains the differences between
 the versions of PHP?
sure. have a look at the changelog
http://www.php.net/ChangeLog-4.php

 
   2. Does it matter when writing php code that you specifiy the file
 name in the following
manner?  test.php3  test.php4 or whatever.  I'm assumming this is
 version specific.
 
   My Problem:
 
I have the following code:

[]

 
 I have the following error:
 
 
 Fatal error: Call to unsupported or undefined function include_once() in
 include_fns.php3 on line 7
 
 It seems to me that include_once is a legal function but I can't the
 orgination of this funtion other
 than that stupid include_fns.php3 file? Any ideas on this.
 
 Configuration:
 
 OS: Solaris 2.8 10/00 on Intel Hardware.
 Apache: 1.3.9
 PHP: 3.0.15
 mysql: 3.23.46
 
 My ISP is running:
 
 OS: Irix 6.4
 Apache: 1.3.9
 PHP: 3.0.9
 mysql: 3.22.23b
 
 I do appreciate any help on this.
 

include_once() was added in PHP 4.0.1pl2 

best regards
attila strauss


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem finding out original filename while using php to upload.

2001-12-16 Thread Neil M

I am using php to upload image files.

heres my code ..

?
if (is_uploaded_file($photo_file))
{

clearstatcache ();
 $size = filesize ( $photo_file ) ;
 if ( $size  1024000 )
 {
 print (BR ERROR - File is too big ! File uploads should be below 1024 k
( 1mb ) BR); exit ;
 }
 move_uploaded_file($photo_file, $upload_path$check_nick-nickname);
}
 else
{
 echo BR ERROR : File upload was not successfull , please try again
!BR;
}
?

--

the problem is that when i look for the original filename ( e.g.
myphoto.gif ) , $photo_file contains a random file name like 383hr93php

As i mentioned , its image files i am uploading , how do i know what type of
image the file was  ? like .jpg , .png etc.

Any help appreciatted , i am really stuck on this ;0)

Thanks

Neil M




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Can I do this (how?)?

2001-12-16 Thread jtjohnston

Can I do this? Can someone help please?

I have a mess of variables I HTML from a couple of different
scripts, so I combined them into fields_to_include.inc

And now, I do this:

  $news = mysql_query('select * from ccl where ... blah blah ...
order by AU asc');

  while ($data = mysql_fetch_object($news))
  {
  include fields_to_include.inc;
  }

Of course my $data-variables I now call in *.inc do not work. ...
So how do I make $data-AU find it's original value using that *.inc?

---This is my fields_to_include.inc file:
--
? php
/*
content of fields_to_include.inc
global $personne-AU; #dedfinitely does not work
I have read the FAQ.
*/

  if($data-AU != ){echotrtdblt;a
href=\javascript:displayHelp('codes.htm#AU');\
AU/agt;/b/tdtd.$personne-AU./td/tr\n;}

  if($data-ST != ){echotrtdblt;a
href=\javascript:displayHelp('codes.htm#ST');\
ST/agt;/b/tdtd.$personne-ST./td/tr\n;}

  if($data-SD != ){echotrtdblt;a
href=\javascript:displayHelp('codes.htm#SD');\
SD/agt;/b/tdtd.$personne-SD./td/tr\n;}

  if($personne-SC != ){echotrtdblt;a
href=\javascript:displayHelp('codes.htm#SC');\
SC/agt;/b/tdtd.$personne-SC./td/tr\n;}

?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 16 Dec 2001 21:16:17 -0000 Issue 1056

2001-12-16 Thread php-general-digest-help


php-general Digest 16 Dec 2001 21:16:17 - Issue 1056

Topics (messages 77860 through 77883):

DOM XML Issues with 4.1.0?
77860 by: Mark

Re: Web Based Control Panel for Hosting
77861 by: xk8org

php snmp compile error
77862 by: kancha

Why don't ...
77863 by: Yoel Benitez Fonseca
77875 by: Michael Sims
77877 by: Rasmus Lerdorf

Still need help with miscount
77864 by: Daniel Alsén

sytax to remove specifc item in string-indexed array???
77865 by: Vincent Ma
77866 by: Michael Sims

CHEEP WEBSPACE OFFERS HERE
77867 by: Webleycity

PHP script not paring in CGI!!!
77868 by: Thomas Edison Jr.

now who can help me about cach my query  every certain time:(
77869 by: Alawi
77870 by: Jack Dempsey
77872 by: Manuel Lemos

Re: Webcam on websites? Ugh!!!
77871 by: Hugh Bothwell

need some help
77873 by: Melva Garcia

Re: Need high bandwidth provider for my Asian community site
77874 by: Hugh Bothwell

Language detection and change
77876 by: Gary Crighton

Problem with Code
77878 by: Phillip B. Bruce
77880 by: Jack Dempsey
77881 by: Attila Strauss

HTML to Plain TXT Parser (RegEx Help Needed)
77879 by: ISE

problem finding out original filename while using php to upload.
77882 by: Neil M

Can I do this (how?)?
77883 by: jtjohnston

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---


Hello.

I developed a pretty cool website whose content is entirely
specified in XML, and use PHP DOM to convert it to HTML (XSL would be
a bit painful).

Now, with PHP 4.0.6 and libxml2-2.4.7, everything worked fine,
except that there was a huge memory leak somewhere in the PHP or the
XML DOM code in PHP, and after viewing the website for about 10 minutes,
my SuSE linux machine would hang, and my FreeBSD apache server would
need to be restarted.

So, I tried upgrading to Apache 4.1.0 with libxml2-2.4.12.

Unfortunately, a lot doesn't work any more -- when I load in my
XML file, I can load it in using xmldocfile(), and I can iterate over
the nodes, but none of them have the name property any more.

Is there a combination of PHP 4.x and libxml2-2.y that is
known to work reasonably well and not leak memory like mad?

Thanks!

mark.





---End Message---
---BeginMessage---

I have used Alabanza and also CPanel (cpanel.net).  Wouldn't touch Alabanza
again as it's very expensive.  I think there is a freeware one called webmin
out there somewhere too

Ade
--- i n o v i c a h o s t i n g . c o m --

Powerful hosting from www.inovicahosting.com



 -Original Message-
 From: Jeremiah Jester [mailto:[EMAIL PROTECTED]]
 Sent: 15 December 2001 22:11
 To: [EMAIL PROTECTED]
 Subject: [PHP] Web Based Control Panel for Hosting


 I want to implement a web based control panel for updating email accounts,
 checking account usage for all my hosted clients. Does anybody have any
 experience? Are there PHP freeware packages out there that do
 this? Licensed
 packages? Any recommendations. THanks!
 JJ


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




---End Message---
---BeginMessage---

I've downloaded php 4.1.0 and ucd-snmp 4.2.3. I was able to compile snmp 
successfully. Then i tried to compile php with snmp support. Followign is my 
configure parameters

./configure  --with-apxs=/usr/sbin/apxs --enable-calendar --with-pgsql 
--with-snmp --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem 
--with-sysvshm --enable-inline-optimization --enable-ftp --with-gd 
--enable-gd-native-ttf --with-openssl

configure works fine but when i do a make i get following error:

Zend/.libs/libZend.al(default_store.o):/usr/local/ucd-snmp-4.2.3/snmplib/default_store.c:308:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_alarm_post_config':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: multiple definition of 
`init_alarm_post_config'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:53: 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `set_an_alarm':
/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185: multiple definition of 
`set_an_alarm'
Zend/.libs/libZend.al(snmp_alarm.o):/usr/local/ucd-snmp-4.2.3/snmplib/snmp_alarm.c:185:
 
first defined here
/usr/local/lib/libsnmp.a(snmp_alarm.o): In function `init_snmp_alarm':

[PHP] large object problem

2001-12-16 Thread David H

Hi all,

I am trying to findout what is wrong with this script
can anyone help?


$dbconn = pg_connect (cnnection string)
   
 or die ( Error: .pg_errormessage
($dbconn)) ;

pg_exec ($dbconn, begin) ;
$oid = pg_locreate ($dbconn) ;
$fd = pg_loopen ($dbconn, $oid, w) ;
pg_lowrite ( $fd, $img ) ;
pg_loclose ( $fd ) ;
$strqry = INSERT INTO tblImg ( myname, mytype,
myimg, myfilesize ) VALUES ( '$img_name', '$img_type',
'$oid', $img_size );
$result = pg_exec ( $dbconn, $strqry ) ;
pg_exec ($dbconn, commit) ;
pg_exec ($dbconn, end) ;

The output that I am getting is this

/tmp/phpQPUyx2

by pg_loreadall function. 

Thanks,
David

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] URL checking

2001-12-16 Thread trx

Hi, I'm very much a newbie!
I'm trying to set up a site which will automatically test links in a large
link directory and show date and time of last check and whether or not a
link to the external URL was dead or alive at the time.
On looking at the PHP manual it is not completely obvious which function I
should be using, does fopen achieve this; how does it handle a site such as
http://www.bloggs.com where the default file might be index.htm or
default.php and what does it do if a 404 error is encountered, does it
recognize that in fact no file has been found?
I hope this makes sense and that someone can point me in the right direction
:}
Many thanks,
TonyK



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Question for you MySQL gurus...

2001-12-16 Thread Deron

I have a huge project I am in the midst of developing (something similar to
www.allmusicguide.com except exclusively for Metal/Hard Rock). I have set up
my MySQL tables/PHP code for the most part. My question is 2 part:

Of you all, do you use a GUI platform such as MySQL Manager or MySQLGUI,
etc. or do you hard core it via Telnet and command line?

Secondly, I hope I can explain this easy enough Comparing to like Access
DB... you know if you have multiple tables, you can take one table... put in
your data... then in subsequent tables... you can set it up so that certain
fields create dropdowns and display the data from the first table's field,
so that you don't have to use any guesswork and so that if you change the
data in the first table, it updates subsequent other tables (I hope that
makes sense). Is there anythin in/for MySQL that acts like that? I have read
up on the join table command in MySQl but that isn't exactly what I am
referring to. Any help/knowledge on this appreciated!

Pretty much... I have around 12 tables or so.. band, album, producers,
logos, etc.. and I have recurring fields between themm such as a field
called bandname. I am just looking to see if I have to manually add this
field's data to it or if there is a solution to tie these other tables to
one source table. thanks!

Deron
www.metalages.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Question for you MySQL gurus...

2001-12-16 Thread Deron

Let me add that I do currently use PHPMyAdmin. As cool as it is I juts want
to see what others are using to make sure I am not missing out on anything!

Deron
www.metalages.com


Deron [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a huge project I am in the midst of developing (something similar
to
 www.allmusicguide.com except exclusively for Metal/Hard Rock). I have set
up
 my MySQL tables/PHP code for the most part. My question is 2 part:

 Of you all, do you use a GUI platform such as MySQL Manager or MySQLGUI,
 etc. or do you hard core it via Telnet and command line?

 Secondly, I hope I can explain this easy enough Comparing to like
Access
 DB... you know if you have multiple tables, you can take one table... put
in
 your data... then in subsequent tables... you can set it up so that
certain
 fields create dropdowns and display the data from the first table's
field,
 so that you don't have to use any guesswork and so that if you change the
 data in the first table, it updates subsequent other tables (I hope that
 makes sense). Is there anythin in/for MySQL that acts like that? I have
read
 up on the join table command in MySQl but that isn't exactly what I am
 referring to. Any help/knowledge on this appreciated!

 Pretty much... I have around 12 tables or so.. band, album, producers,
 logos, etc.. and I have recurring fields between themm such as a field
 called bandname. I am just looking to see if I have to manually add this
 field's data to it or if there is a solution to tie these other tables
to
 one source table. thanks!

 Deron
 www.metalages.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Searching for a new provider

2001-12-16 Thread Indera

Ah,

I thought that I may have missed something when I was reviewing the features.

Thank you.
Indera




R'Twick Niceorgaw wrote:

 Just name of one of Aletia's servers
 ---
 R'twick Niceorgaw
 98C Cedar Lane
 Highland Park, NJ 08904
 USA
 732-246-1434 (R)
 732-801-3826 (M)
 

 -- Original Message --
 From: Indera [EMAIL PROTECTED]
 Date: Sat, 15 Dec 2001 23:33:39 -0500

 Hello,
 
 This may sound like a weird question, but since I've seen two posts on it, I have 
to ask, what is a
 stingray server?
 
 Indera
 
 
 
 R'Twick Niceorgaw wrote:
 
  cool.. I'm also on stingray:)
  - Original Message -
  From: Nuitari [EMAIL PROTECTED]
  To: PHP LIST [EMAIL PROTECTED]
  Sent: Thursday, December 13, 2001 2:19 PM
  Subject: RE: [PHP] Searching for a new provider
 
   I switched to Aletia in April I believe, and have been pleased.  I asked
  for
   pdflib to be compiled on the server my site is on (stingray), and they
  did.
   It took about 3 days.  My server has been up for 52 days 15 minutes, so
  that
   is good...however, 2 times in the last 6 months I have been denied access
   because the server had run out of harddrive space...It seemed like the
   matter was taken care of relatively promptly though.
  
   All in all, Aletia is good bang for the buck.  I'm going to stick with
  them.
  
   -Jamison.
  
   -Original Message-
   From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, November 13, 2001 12:35 AM
   To: 'Indera'; [EMAIL PROTECTED]
   Subject: RE: [PHP] Searching for a new provider
  
  
   Welcome abroad Indrea.
  
   But, their support is not the very best in industry. Lately I have seen
  some
   detoriation but usually my emails are answered in 1-2 days. Earlier I used
   to find them almost 24x7 on ICQ and AIM but haven't seen them on line for
   almost a month now. But all my emails are answered in a day or two. One
  more
   thing, I'm very happy with their server up time though. My server has been
   up for more than 51 days now :)
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP object-oriented features

2001-12-16 Thread Colin Tucker

Hi there,

Just wondering if there is any plans for more work on the PHP OO features,
and/or the parser in relation to these features.  Generally I find the PHP
OO features to be quite useful, but there is some major limitations which
often frustrate me at times, for example:

$result = $object-method()-returnedObject-anotherMethod();

That won't work with PHP as it is now.  Instead, you'd have to do this:

$returnedObject = $object-method();

$result = $returnedObject-anotherMethod();

:(

Seems like a simple annoyance, right?  Well some code I'm working on would
work best like this:

$object-getSomething()-getSomething()-getSomething()-addSomething(foo)
;

Instead, all you can do is this:

$result = $object-getSomething();

$result = $result-getSomething();

$result = $result-getSomething();

$result-addSomething(foo);

Again, not good.  :(

Another thing is multiple inheritance, or 'implementing' an object, rather
than extending just one.  Like this:

class Foo extends Bar implements Eep
{

}

Foo is a subclass of Bar, but *uses* the methods/attributes of Eep.

Yeah, I know, PHP is not at heart an OO language, but I really LIKE PHP!  I
don't want to use JSP or something because I think Java is slow and over
complicated.  So, is there any chance that these features could be added in
the future at some stage?  Please?  ;)

Cheers,

Colin.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] using variables

2001-12-16 Thread Gerard Onorato

David,

Your code should read:

html
body
img src=? echo($ulo); ?
/body
/html

-Original Message-
From: David Killingsworth [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 16, 2001 2:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] using variables


I'm trying to determing why this won't work.
I wish to assign graphics to variables then call them
within the HTML on my .php pages.
--test.php--
?
$ulo = /images/ulo.gif;
?

html
body
img src=?$ulo?
/body
/html
---end test.php-
The resulting output viewing the html source from the 
browser is:
html output--
html
body
img src=
/body
/html
---end html output-

there is obviously a programming error here, but after
hours of trying things I'm just missing what it is.
the img src tag should read 
img src=/images/ulo.gif

What am I missing?
  David.

__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP object-oriented features

2001-12-16 Thread Martin Towell

I totally agree with you!!

From what someone told me, the new version of the Zend engine will fully
support OOP (but don't quote me on this as I haven't had time to look at the
Zend site to confirm this) - I'm looking forward to seeing it. This would
make PHP a really powerful language then!!

Martin


-Original Message-
From: Colin Tucker [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 17, 2001 11:42 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP object-oriented features


Hi there,

Just wondering if there is any plans for more work on the PHP OO features,
and/or the parser in relation to these features.  Generally I find the PHP
OO features to be quite useful, but there is some major limitations which
often frustrate me at times, for example:

$result = $object-method()-returnedObject-anotherMethod();

That won't work with PHP as it is now.  Instead, you'd have to do this:

$returnedObject = $object-method();

$result = $returnedObject-anotherMethod();

:(

Seems like a simple annoyance, right?  Well some code I'm working on would
work best like this:

$object-getSomething()-getSomething()-getSomething()-addSomething(foo)
;

Instead, all you can do is this:

$result = $object-getSomething();

$result = $result-getSomething();

$result = $result-getSomething();

$result-addSomething(foo);

Again, not good.  :(

Another thing is multiple inheritance, or 'implementing' an object, rather
than extending just one.  Like this:

class Foo extends Bar implements Eep
{

}

Foo is a subclass of Bar, but *uses* the methods/attributes of Eep.

Yeah, I know, PHP is not at heart an OO language, but I really LIKE PHP!  I
don't want to use JSP or something because I think Java is slow and over
complicated.  So, is there any chance that these features could be added in
the future at some stage?  Please?  ;)

Cheers,

Colin.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] php.ini

2001-12-16 Thread Jeremiah Jester

Does it matter where my php.ini file is located on a windows2000 system?
Does it always need to be on the root of the volume where the files are
being served or can it be located on another volume?
Thanks,
JJ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mysql_query() problem

2001-12-16 Thread Brian Rue

Hi,

I'm getting the error
Warning: Supplied argument is not a valid MySQL result resource

from this code:

function validateUser($username,$password) {
 $conn = connectToMySQL();
 mysql_select_db($db_name,$conn);
 $query=select * from members where username='.$username.' AND
password='.$password.';
 $result = mysql_query($query,$conn);
 if (mysql_num_rows($result) != 0) { //*this is the line that returns the
error*
   return true;
 } else {
   return false;
 }
}

I've checked that the connection works, and that the query is what it should
be, and the query works when I type it into the terminal. Any ideas?

Thanks,
Brian Rue



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: i get a warning after upgrading to 4.1.0 (repost)

2001-12-16 Thread Phillip Oertel

John Lim wrote:

 This is a known bug with persistent database connections. Switching to
 non-persistent connections or ISAPI avoids this problem.
thanks !


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: php.ini

2001-12-16 Thread jtjohnston

In Win98 at least it should be in C:\Windows.
php.ini could also be run out of the directory where the *.php is running.

Jeremiah Jester wrote:

 Does it matter where my php.ini file is located on a windows2000 system?
 Does it always need to be on the root of the volume where the files are
 being served or can it be located on another volume?
 Thanks,
 JJ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: pictures width and height

2001-12-16 Thread Phillip Oertel

Tommy Straetemans wrote:


 Is there a way to check the height and width from a picture that I upload?


yes, easy.

but you need gdlib installed. 

?php phpinfo(); ? 

will tell you.

from the documentation:
 The GetImageSize() function will determine the size of any GIF, JPG, 
PNG, SWF, PSD or BMP image file and return [in an array] the dimensions 
along with the file type and a height/width text string to be used 
inside a normal HTML  IMG tag.

please also consult the php documentation for other (image) functions, 
it's excellent.

phil.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] picture gallery

2001-12-16 Thread Jeremiah Jester

does anyobody have a simply php image gallery script they could share with
me? Using for my personal site.
Thanks,
JJ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Opinions, please

2001-12-16 Thread Ray Gaylog

Well,

One way is to log that the user is online into a database...or a flat file.
I have done this before using a database (very easy), however I have not
used a file yet..but it is possible. Use fopen() routines and fclose() for
the low level file access.


Another method is to use cookies..the user can turn this off..and it can
still be compromised.


In the end if you can't use sessions, then use a flat file, or a database.
If you don't have either of these, then I would like to hear what you
solution is.

As I'm interested in how you would overcome this problem...

PS: You could also use URL rewriting?..but then, thats not to secure...(or
pass the variable(s) to each page via a GET submission..just tag on the
variable to the end of your next page link)




  -Ray


Ray Gaylog
[EMAIL PROTECTED]





- Original Message -
From: Gaylen Fraley [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 15, 2001 11:49 PM
Subject: [PHP] Opinions, please


 A security question, concerning PHP and overall best practice.

 I have an application that is used by users that have no control over what
 version of PHP is on their server.  Some versions do not support sessions.
 So, I am attempting to modify the code to accommodate this and minimize,
if
 not eliminate, the risk of a break-in.

 Basically, index.php (pageA) can call admin.php (pageB).
 pageB accepts a userid and password ($user/$pass).  At this point, these
are
 form variables that will be passed, via $HTTP_POST_VARS.
 pageB calls pageC, which verifies the user/pass against a security file.
If
 validated, then pageC is accessed.  If not, user is kicked out.

 No problem so far and no variables have been exposed.  But, from pageC,
you
 can go down several paths.  Now to the question/opinion.  How do I
validate,
 w/o sessions, that pageD or pageE has been entered from pageC and not
 forged?  I can pass the user/pass via a hidden field on the form of pageC,
 but that exposes it.  Philosophically, this may not be a problem, since
the
 user has to go through pageC to get to the other ones anyway.  Use
referer?
 That seems like that could easily be forged.

 Your thoughts?


 --
 Gaylen
 [EMAIL PROTECTED]
 Home http://www.gaylenandmargie.com/
 PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem finding out original filename while using php to upload.

2001-12-16 Thread Ray Gaylog

Well..to determine the format the file file..you may find some sort of
routine to check..but why not create one?

I mean, in windows, the extension determines the file format right?
So do a loop that starts from the last character, and goes back one until
you reach the . (dot).

Based on that you can determine the format type..

Of course, if the user renamed a .bmp to a .jpeg then you won't be able to
tell that this was originally a .bmp file...


Ray Gaylog
[EMAIL PROTECTED]





- Original Message -
From: Neil M [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 16, 2001 3:22 PM
Subject: [PHP] problem finding out original filename while using php to
upload.


 I am using php to upload image files.

 heres my code ..

 ?
 if (is_uploaded_file($photo_file))
 {

 clearstatcache ();
  $size = filesize ( $photo_file ) ;
  if ( $size  1024000 )
  {
  print (BR ERROR - File is too big ! File uploads should be below 1024
k
 ( 1mb ) BR); exit ;
  }
  move_uploaded_file($photo_file, $upload_path$check_nick-nickname);
 }
  else
 {
  echo BR ERROR : File upload was not successfull , please try again
 !BR;
 }
 ?

 --

 the problem is that when i look for the original filename ( e.g.
 myphoto.gif ) , $photo_file contains a random file name like 383hr93php

 As i mentioned , its image files i am uploading , how do i know what type
of
 image the file was  ? like .jpg , .png etc.

 Any help appreciatted , i am really stuck on this ;0)

 Thanks

 Neil M




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] printf()?

2001-12-16 Thread Ray Gaylog

Hi..

I've been using PHP for just a little while, however I have noticed somthing.

In the doc's I've noticed you can do this: 
printf(line1 \n line2 \n);

Now..this should (like C) print two seperate lines..however It doesn't. To print this 
on seperate lines I must put a BR in there.

Any ideas?

I'm using PHP 4.06

Ray Gaylog
[EMAIL PROTECTED]








RE: [PHP] printf()?

2001-12-16 Thread Jason Murray

HTML doesn't pay attention to line breaks, thats why you're 
needing a BR...

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

 -Original Message-
 From: Ray Gaylog [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 17, 2001 3:49 PM
 To: PHP_Mailing_List
 Subject: [PHP] printf()?
 
 
 Hi..
 
 I've been using PHP for just a little while, however I have 
 noticed somthing.
 
 In the doc's I've noticed you can do this: 
 printf(line1 \n line2 \n);
 
 Now..this should (like C) print two seperate lines..however 
 It doesn't. To print this on seperate lines I must put a BR 
 in there.
 
 Any ideas?
 
 I'm using PHP 4.06
 
 Ray Gaylog
 [EMAIL PROTECTED]
 
 
 
 
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] printf()?

2001-12-16 Thread Mark Charette

 -Original Message-
 From: Ray Gaylog [mailto:[EMAIL PROTECTED]]
 I've been using PHP for just a little while, however I have
 noticed somthing.

 In the doc's I've noticed you can do this:
 printf(line1 \n line2 \n);

 Now..this should (like C) print two seperate lines..however It
 doesn't. To print this on seperate lines I must put a BR in there.

 Any ideas?

Yes, and not facetiously - read the HTML specs.

If you look at the PHP output, you'll see separate lines. If you read the
HTML spec, you'll find out how HTML is supposed to handle whitespace, and
you'll discover a whole lot more, too.

Mark C.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: URL checking

2001-12-16 Thread Phillip Oertel

Trx wrote:

 Hi, I'm very much a newbie!
 I'm trying to set up a site which will automatically test links in a large
 link directory and show date and time of last check and whether or not a
 link to the external URL was dead or alive at the time.


the curl library will let you do this. query the link, and then evaluate 
the server's response. but first of all check if you have curl enabled. 
?php phpinfo(); ?

then check out the example, two functions i happened to write a few days 
ago, no kidding. ;-)
make sure you are prepared for that the remote server doesn't respond at 
all.

phil.

?php

echo getHttpStatusCode(http://www.phillipoertel.com/index.html;);

function getHttpHeader($url) {

ob_start(); // send all output to a buffer instead of being displayed
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
// you could probably achieve the same with the following line.
# curl_setopt($ch, CURLOPT_CUSTOMREQUEST, HEAD / HTTP/1.0);

curl_exec($ch);
curl_close ($ch);

// put all buffered output into $header
$header = ob_get_contents();
ob_end_clean();

return $header;
}

function getHttpStatusCode($url) {

$header = getHttpHeader($url);
// grab only first line of the header
list($status) = explode(\n,$header);
$code = explode( ,$status);
return $code[1];

}

?

HTTP Status Codes:
*
100 Continue
101 Switching Protocols
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily / Found
303 See Other
304 Not Modified
305 Use Proxy
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
407 Proxy Authentication Required
408 Request Time-Out
409 Conflict
410 Gone
411 Length Required
412 Precondition Failed
413 Request Entity Too Large
414 Request-URL Too Large
415 Unsupported Media Type
500 Server Error
501 Not Implemented
502 Bad Gateway
503 Out of Resources
504 Gateway Time-Out
505 HTTP Version not supported



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Problem with Code

2001-12-16 Thread Phillip Oertel

Phillip B. Bruce wrote:


 1. Is there any documentation that explains the differences between
 the versions of PHP?

php4 : much more fun ! go use it !
the documentation will tell you on each function page in which php 
version the fuction was first available.


 2. Does it matter when writing php code that you specifiy the file
 name in the following manner?  test.php3  test.php4 or whatever. 

since you have PHP v3, .php4 and .php will not be parsed at all (you 
will see your code plaintext in the browser).
the webserver can be set up to still have .php3 handled by PHP v3 and 
.php4 by PHP v4.
in any case, i think you should ask your ISP to upgrade  to PHP v4 ... 
3.0.9  when was that ?


 I have the following error:
 Fatal error: Call to unsupported or undefined function include_once() in
 include_fns.php3 on line 7
from http://www.php.net/manual/en/function.include-once.php :
include_once() was added in PHP 4.0.1pl2

phil.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] how to reinitialise an MySQL_fetch_array

2001-12-16 Thread Frederick L. Steinkopf

Use the function mysql_data_seek(result variable, row number)
so in your case it would be: mysql_data_seek($result2, 0);
You should also consider suppressing the warning for an empty set by placing
a '@' in front of the function

- Original Message -
From: Ivan Carey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 15, 2001 7:32 AM
Subject: [PHP] how to reinitialise an MySQL_fetch_array


Hello,
I would like to reinitialise an MySQL_fetch_array. That is, once it has gone
through I would like to be able to go back to the start again.

for eg
while ($myrow=MySQL_fetch_array($result2))
{
 $befid=$myrow[beforeid];

 while($myrow5=MySQL_fetch_array($result5))
 {
  $aftid=$myrow[afteridid];
  if ( $befid == aftid)
  {
  do something;
  }
 } //while($myrow5=MySQL_fetch_array($result5))

//now that the inner loop has finished I would like to be able to
restart the inner loop by reinitailsing the MySQL_fetch_array

} //while ($myrow=MySQL_fetch_array($result2))

Regards,
Ivan





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Unable to return object references from functions

2001-12-16 Thread Manuel Lemos

Hello,

Tom Rogers wrote:
 
 Hi again
 Got a bit sidetracked ... here is your original code :)

Thanks, I managed to make it work for me similarly to that.

Now, a different problem, I already have array variable with a object.
Is there a way to make a function return a reference to that object in a
variable passed by reference to a function?

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: large object problem

2001-12-16 Thread Manuel Lemos

Hello,

David H wrote:
 
 Hi all,
 
 I am trying to findout what is wrong with this script
 can anyone help?
 
 $dbconn = pg_connect (cnnection string)
  
   or die ( Error: .pg_errormessage
 ($dbconn)) ;
 
 pg_exec ($dbconn, begin) ;
 $oid = pg_locreate ($dbconn) ;
 $fd = pg_loopen ($dbconn, $oid, w) ;
 pg_lowrite ( $fd, $img ) ;
 pg_loclose ( $fd ) ;
 $strqry = INSERT INTO tblImg ( myname, mytype,
 myimg, myfilesize ) VALUES ( '$img_name', '$img_type',
 '$oid', $img_size );
 $result = pg_exec ( $dbconn, $strqry ) ;
 pg_exec ($dbconn, commit) ;
 pg_exec ($dbconn, end) ;
 
 The output that I am getting is this
 
 /tmp/phpQPUyx2
 
 by pg_loreadall function.

Similarly, you need to do pg_loopen on a OID returned by a select query.

Anyway, if you want to try something that works with easier to
understand interface, maybe you would like to try Metabase which is a
database abstraction PHP package that provides a single and portable
interface to BLOBs that supports PostgreSQL among many other databases.

Metabase is free and you may download it from here:

http://phpclasses.UpperDesign.com/browse.html/package/20

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Unable to return object references from functions

2001-12-16 Thread Tom Rogers

Hi
What is the scope of the array that holds the object ?
Maybe a bit of code to show what you are after :)
Tom

At 03:37 PM 17/12/01, Manuel Lemos wrote:
Hello,

Tom Rogers wrote:
 
  Hi again
  Got a bit sidetracked ... here is your original code :)

Thanks, I managed to make it work for me similarly to that.

Now, a different problem, I already have array variable with a object.
Is there a way to make a function return a reference to that object in a
variable passed by reference to a function?

Regards,
Manuel Lemos

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: problem finding out original filename while using php to upload.

2001-12-16 Thread Daniel Grace


Neil M [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am using php to upload image files.

 heres my code ..

 ?
 if (is_uploaded_file($photo_file))
 {

 clearstatcache ();
  $size = filesize ( $photo_file ) ;
  if ( $size  1024000 )
  {
  print (BR ERROR - File is too big ! File uploads should be below 1024
k
 ( 1mb ) BR); exit ;
  }
  move_uploaded_file($photo_file, $upload_path$check_nick-nickname);
 }
  else
 {
  echo BR ERROR : File upload was not successfull , please try again
 !BR;
 }
 ?

 --

 the problem is that when i look for the original filename ( e.g.
 myphoto.gif ) , $photo_file contains a random file name like 383hr93php

 As i mentioned , its image files i am uploading , how do i know what type
of
 image the file was  ? like .jpg , .png etc.

 Any help appreciatted , i am really stuck on this ;0)

 Thanks

 Neil M


$photo_file will map to the name of the temporary file on the server's HD --
it is NOT the name of the original file. You'll want to use $photo_file_name
to determine the original filename, or better yet, $photo_file_type to
determine the content type. (a gif is image/gif, for instance).

See http://www.php.net/manual/en/features.file-upload.php

--
Daniel Grace
echo make_witty_sig($foo) . \n;



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTP Authentication problems

2001-12-16 Thread Daniel Grace

Hello,

I'm working on a website for what will eventually be free
PHP/MySQL/Apache/DNS/etc hosting (see: http://hosting.venura.net , no
requests for accounts will be entertained right now), and am having problems
trying to get HTTP Authentication working. I had it working a month or so
ago, but then I put the project on hold for awhile and came back to a mess
that wasn't -- don't know how unless I somehow broke it just before I quit
working on it.

Anyways, I'm running PHP 4.1.0 (had same problems with 4.0.6 earlier so I
know it's not some weird bug with the new version), Apache 1.3.22+mod_ssl
and Linux 2.4. I'm working (for now) with a small test script containing
this (and running on SSL, which I had no problems with earlier.)

---
?php

header(HTTP/1.0 401 Unauthorized);
header(WWW-Authenticate: Basic realm=\hosting.venura.net Member Services
U:
. $PHP_AUTH_USER
. , P:
. $PHP_AUTH_PW
. \
);

?
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
title[secure]venura.net :: Unauthorized/title
/head
body
?php phpinfo(); ?
/body
/html
---

The idea being that I can see the username/password entered in the
authentication box itself.

Anyways, though the 401 part works and actually brings up the typical Enter
Username/Password box, $PHP_AUTH_USER and $PHP_AUTH_PW are not being set.
Neither is $REMOTE_USER.

There are no .htaccess files in the directory (or any parent dirs for that
matter), and no AuthType directives all in my httpd.conf file. I have been
unsuccessful in determining what is wrong, and am flat out of ideas.

My php.ini and httpd.conf files are available at
http://hosting.venura.net/fixme/

Any ideas?

-- Daniel Grace



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Unable to return object references from functions

2001-12-16 Thread Manuel Lemos

Hello,

Tom Rogers wrote:
 
 Hi
 What is the scope of the array that holds the object ?

global

 Maybe a bit of code to show what you are after :)

It is to implement another function that will return a reference (not a
copy) of a object stored in a global array passing the index of the
array. It would be like this, except that this code does not work as I
need:

$objects=array();

Function CreateObject($index)
{
global $objects;

$index=count($objects);
$objects[$index]=new my_class;
}

Function GetObject($index,$object)
{
global $objects;

$object= $objects[$index];
}

CreateObject($index);

GetObject($index,$my_object);

Regards,
Manuel Lemos


 Tom
 
 At 03:37 PM 17/12/01, Manuel Lemos wrote:
 Hello,
 
 Tom Rogers wrote:
  
   Hi again
   Got a bit sidetracked ... here is your original code :)
 
 Thanks, I managed to make it work for me similarly to that.
 
 Now, a different problem, I already have array variable with a object.
 Is there a way to make a function return a reference to that object in a
 variable passed by reference to a function?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] picture gallery

2001-12-16 Thread steph

Jester,

did you try hotscripts.com?? They have plenty of gallery scripts there.

Steph

- Original Message -
From: Jeremiah Jester [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, December 16, 2001 8:44 PM
Subject: [PHP] picture gallery


 does anyobody have a simply php image gallery script they could share with
 me? Using for my personal site.
 Thanks,
 JJ


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] User Authentication

2001-12-16 Thread Daniel Grace

Hello,

I'm working on a website for what will eventually be free
PHP/MySQL/Apache/DNS/etc hosting (see: http://hosting.venura.net , no
requests for accounts will be entertained right now), and am having problems
trying to get HTTP Authentication working. I had it working a month or so
ago, but then I put the project on hold for awhile and came back to a mess
that wasn't -- don't know how unless I somehow broke it just before I quit
working on it.

Anyways, I'm running PHP 4.1.0 (had same problems with 4.0.6 earlier so I
know it's not some weird bug with the new version), Apache 1.3.22+mod_ssl
and Linux 2.4. I'm working (for now) with a small test script containing
this (and running on SSL, which I had no problems with earlier.)

---
?php

header(HTTP/1.0 401 Unauthorized);
header(WWW-Authenticate: Basic realm=\hosting.venura.net Member Services
U:
. $PHP_AUTH_USER
. , P:
. $PHP_AUTH_PW
. \
);

?
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
title[secure]venura.net :: Unauthorized/title
/head
body
?php phpinfo(); ?
/body
/html
---

The idea being that I can see the username/password entered in the
authentication box itself.

Anyways, though the 401 part works and actually brings up the typical Enter
Username/Password box, $PHP_AUTH_USER and $PHP_AUTH_PW are not being set.
There are no .htaccess files in the directory (or any parent dirs for that
matter), and no AuthType directives all in my httpd.conf file. I have been
unsuccessful in determining what is wrong, and am flat out of ideas.

My php.ini and httpd.conf files are available at
http://hosting.venura.net/fixme/

Any ideas?

-- Daniel Grace



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Question for you MySQL gurus...

2001-12-16 Thread David

 have you tried MySQL Front? it\'s a really nice win32 client, check it out from: 
http://www.anse.de/mysqlfront/

screenshot: http://www.anse.de/mysqlfront/images/mysqlfront.gif

I have a huge project I am in the midst of developing (something similar to 
www.allmusicguide.com except exclusively for Metal/Hard Rock). I have set up 
my MySQL tables/PHP code for the most part. My question is 2 part: 

Of you all, do you use a GUI platform such as MySQL Manager or MySQLGUI, 
etc. or do you hard core it via Telnet and command line? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP4.1.0 Apache1.3.22 under WinXP

2001-12-16 Thread Daniel Grace


Christian Calloway [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi everyone,

 I'm having troubles getting Apache to recognize .php files, and thus parse
 them. I followed the instructions included with the PHP4.1.0 distribution,
 and have PHP loaded as an Apache module, checking my services confirms
this
 as its description reads Apache/1.3.22 (Win32) PHP/4.1.0. But when I
 attempt to load a .php file, I will get the entire file, unparsed. I added
 the following two lines to my httpd.conf file:

 LoadModule php4_module C:\Apache.MySQL.PHP\PHP\sapi\php4apache.dll
 AddType application/x-httpd-php .php

 Am I missing something? Thanks,

 Christian



I don't see anything missing, taking a look at my own (working as far as
that goes) config at http://hosting.venura.net/fixme/httpd_conf.txt

Are you sure that you have short_open_tags or the asp style tags enabled in
your php.ini file [if you're using them.] If you don't have them enabled but
are using them in your pages, it'll seem to not work.

The easiest way to check to see if that's the problem, short of checking
php.ini, is to make a quick and dirty test page:

?php
phpinfo();
?
?
/* If you can see this, then short_open_tags = off. Of course, if phpinfo()
is displayed above, this should be fairly obvious */
?
%
/* If you can see this, then asp_style_tags = off. Of course, if phpinfo()
is displayed above, this should be fairly obvious */
%

--
Daniel Grace

No ASP, ever.
- from the venura.net announcement of hosting.venura.net's hosting services.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mysql_query() problem

2001-12-16 Thread Yasuo Ohgaki

Brian Rue wrote:

 Hi,
 
 I'm getting the error
 Warning: Supplied argument is not a valid MySQL result resource
 
 from this code:
 
 function validateUser($username,$password) {
  $conn = connectToMySQL();
  mysql_select_db($db_name,$conn);
  $query=select * from members where username='.$username.' AND
 password='.$password.';
  $result = mysql_query($query,$conn);
  if (mysql_num_rows($result) != 0) { //*this is the line that returns the
 error*
return true;
  } else {
return false;
  }
 }
 
 I've checked that the connection works, and that the query is what it should
 be, and the query works when I type it into the terminal. Any ideas?
 
 Thanks,
 Brian Rue
 
 
 

I suppose it is fixed in 4.1.1-dev.

-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Goofy interactions between $this and vars in classs. 4.1.0

2001-12-16 Thread Mark


Hi!

I'm having some goofy interactions between $this pointers in 
classes and variables.

Case in Point:

if I have the following code:

?php
class Y
{
var $children;

function addValue($in_value)
{
$this-children[] = $in_value;
}

function Y()
{
}

function Zabba()
{
$this-addValue(asdfasdfasdf);
}
}



$abc = new Y();
$abc-Zabba();
var_dump($abc-children);
?


I will correctly get on output, an array with one item in it.

However, if I Change the Zabba function to:


function Zabba()
{
$localVariable = $this;
$localVariable-addValue(asdfasdfasdf);
}

Then I will get on output, a NULL array.

Why is this?  Is there any particular reason this happens?

thanks,
mark.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] TN3270?

2001-12-16 Thread brendan

does anyone know of how or where I can find info on, accessing a IBM 
mainframe which uses the TN3270 protocol via a socket?
TN3270 isnt ordinary telnet so I assume the existing telnet socket info 
isnt helpful
ta
brendan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP as a web browser?

2001-12-16 Thread David Yee

Is it possible to have PHP act like a web browser, accept cookies and post
data (for login)?  I'm not sure exactly where to start- I know you can use
fopen/file to retrieve url's but I'm not too sure about the other steps.  I
would like to write and run such a php script as a cron job and have it do
something like log into my web-based email account, retrieve emails, process
them, save them locally, and then delete them on the server.  Thanks for any
help.

David


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]