[PHP] Going Mad

2002-11-30 Thread Andy
Can someone please help, i think i am going mad.
I have just installed Apache, php and Mysql, it all seems to be fine, the
Apache server says it is ok, i think i have set the config file correctly,
and Mysql look to be correct, but when i typed the code (My first code)

and save it test.php when i look at it in explorer all i see the preceding
html code.  hat have i done wrong?
I am using windows 2000 pro.

Thank you



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




Re: [PHP] Going Mad

2002-11-30 Thread Andy

"Chris Hewitt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Andy Davey wrote:
>
> >Hi Chris
> >
> >I have added AddType application/x-httpd-php .php to the httpd config
file,
> >and restarted it, but still no luck.
> >
> >Andy
> >
> Hmm. I take it the file you are trying to get at (via http:// as Phil
> says) has got a php extension? I assume there are no  or
>  or  tags around the line that are not applicable.
>
> Is the httpd.conf you are editing the one being looked at by apache? To
> test this I usually put some rubbish into httpd.conf, restart apache and
> check that it groans and won't start.
>
> Just some thoughts, hoping they help.
>
> Chris
> PS Please copy replies to the list.
>

There are two, one of which is the default  assume that is the one I edit?




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




Re: [PHP] Going Mad

2002-11-30 Thread Andy

"Chris Hewitt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Andy Davey wrote:
>
> >There are two httpd config files, one of which is default, i take it that
is
> >the one you edit?
> >I know it is something simple, which is why i cannot se it!
> >
> There should only be one. I suggest you put some rubbish into one and
> restart apache. If it does not complain then it is not the one apache is
> looking at.
>
> If you have php compiled as a DSO then you will also need the LoadModule
> line.
>
> HTH
> Chris
> PS Please copy replies to the list.
>

Can i type anything into the file or should it be code, you will have to
treat me a a total novice, i only started reading the book yesterday so i am
not sure of the jargon yet.

Also compiled as a DSO?
Hmm.. not typed LoadModule...
but the book which is PHP & MySQL for dummies BTW, whcih is about right,
says nothing about that.

Andy



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




Re: [PHP] Going Mad

2002-12-01 Thread Andy
OK, so I have located the httpd.config file but still no joy, I know it is
something very simple and silly.
I will explain in detail what I have done, I think this will give a better
idea of where I am going wrong.

Loaded Apache from the CD first in its default location c:/program
files/apachegroup/apache/htdocs.
Then loaded MySQL which as far as I can tell is OK.  Then I loaded PHP and
was told to configure the httpd file
Then in start/programs/apache it gave me the config file to edit, this i did
with the following as instructed in the book:
I found the ScriptAlias which gave a path to the apache folder and replaced
it with ScriptAlias /php/ "c:/php/"
Then i added Action application/x-httpd-php /php/php.exe under the Action
section followed by AddType application/xhttpd-php .php under the AddType
section.

According to the book i would now be ready to go!

I was then told to write the following code in my webspace, so i used
Dreamweaver MX, then tried Notepad:
 etc etc This is a HTML line 


I save the file and go to view it in Explorer but i see just the html text
not the php?
Now from what i can see everything looks ok other than that, when i run the
test on apache it says that the syntax is ok so i assume that it is set
correctly.
Now what i cannot understand is, am i saving the php files in the right
place (if there is one?) and should i be running the browser as localhost
which see's the apache page ok when i type http://localhost/ into the
address bar.
One other thing, i tried typing localhost/where the file is located on my
harddrive/ and was given a forbidden page "contact administrator"??

Is there something here that standsout?

Thank you for trying to help.

Andy

"Chris Hewitt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Phil Driscoll wrote:
>
> >There's your problem.
> >Assuming you haven't messed about too much with the apache config, your
php
> >file needs to live inside apache's htdocs directory. Can't remember
exactly
> >where that would be on a windows box - something like c:/program
files/apache
> >group/apache/htdocs maybe.
> >
> Yes, Phil has it. I'd assumed this, I should not have. The directory is
> given by the "DocumentRoot" line in httpd.conf. You did not say exectly
> what error you were getting, I'd assumed that you were just seeing the
> source of your file and that the only problem was php not parsing it.
> Presumably you were getting "Document not found" errors?
>
> Chris
>
>



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




[PHP] Going Mad Result

2002-12-01 Thread Andy
Well, I did it :o)

I am using IIS and got it right, thank you for all who helped me in my hour
of need.

The answer to the question was where i am placing the files (not in the root
folder), just did it on the PC with IIS and there it was in all its glory!

Now i am going to try it on the laptop with apache with all the original
installations and configurations i was having trouble with.

Don't suppose this will be the last you hear of me as i will need more help
no doubt.

Thank you

Andy



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




[PHP] Viewing PHP pages

2003-03-24 Thread Andy
Can someone help?

I have uploaded my PHP pages, created in Dreamweaver MX to my hosting server
but when I try to access the page the only option I get is to download it.

What am I doing wrong?

I have created the forms and guestbooks that mail information to me but
these do not work, they are OK when I test them locally but not when they
are uploaded.

Thank you

Andy



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



Re: [PHP] Viewing PHP pages

2003-03-24 Thread Andy
Hi Ben
They say that the server is set up for PHP4, and they say it is something to
do with my scripts.
Not sure I believe them.
My pages have the extension .php

Andy

"Ben Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Server is probably set up wrong or your extensions are wrong.  Check with
> the ISP wether you have PHP facilities, the extension is .php normally but
> sometimes .php3.
>
> At 03:55 24/03/2003 +, Andy wrote:
>
> >Can someone help?
> >
> >I have uploaded my PHP pages, created in Dreamweaver MX to my hosting
server
> >but when I try to access the page the only option I get is to download
it.
> >
> >What am I doing wrong?
> >
> >I have created the forms and guestbooks that mail information to me but
> >these do not work, they are OK when I test them locally but not when they
> >are uploaded.
> >
> >Thank you
> >
> >Andy
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>
> 
> * Ben Edwards  +44 (0)117 968 2602 *
> * Critical Site Builderhttp://www.criticaldistribution.com *
> * online collaborative web authoring content management system *
> * Get alt news/views films online   http://www.cultureshop.org *
> * i-Contact Progressive Video  http://www.videonetwork.org *
> * Smashing the Corporate image   http://www.subvertise.org *
> * Bristol Indymedia   http://bristol.indymedia.org *
> * Bristol's radical news http://www.bristle.org.uk *
> * PGP : F0CA 42B8 D56F 28AD 169B  49F3 3056 C6DB 8538 EEF8 *
> 
>






>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003
>



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



Re: [PHP] Viewing PHP pages

2003-03-24 Thread Andy
Hi Thijs

It would seem it was a problem with the server, and they have now corrected
this.  Even though they said it was my scripts.
Thank you for your help all.

Andy

"Thijs Lensselink" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hey andy,

I had this problem a while ago.
And this is a server problem.
This is what happens if the server is
unable to execute the .php files.

I can't look at my docs right now so can't give
you a clue in how to fix this.
Will have a look when i'm at home.

Thijs


-Oorspronkelijk bericht-
Van: Andy [mailto:[EMAIL PROTECTED]
Verzonden: maandag 24 maart 2003 4:55
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Viewing PHP pages


Can someone help?

I have uploaded my PHP pages, created in Dreamweaver MX to my hosting server
but when I try to access the page the only option I get is to download it.

What am I doing wrong?

I have created the forms and guestbooks that mail information to me but
these do not work, they are OK when I test them locally but not when they
are uploaded.

Thank you

Andy



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




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



[PHP] Help needed

2003-04-01 Thread Andy
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



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



Re: [PHP] Help needed

2003-04-01 Thread Andy
Hi Clint
OK hope this is not too much and there are likely to be more errors in it.
Thank you
Andy

 0)  // password is correct  {
   $auth="yes";
   $logname=$fusername;
   $today = date("Y-m-d h:m:s");
   $sql = "INSERT INTO Login (username,loginTime)
   VALUES ('$logname','$today')";
   mysql_query($sql) or die("Can't execute query.");
   header("Location: Member_page.php");
 }
 else// password is not correct
 {
   unset($do);
   $message="The Username, '$fusername' exists,
 but you have not entered the correct
 password! Please try again.";
   include("login_form.inc");
 }
  }
  elseif ($num == 0)  // login name not found
  {
 unset($do);
 $message = "The Username you entered does not
 exist! Please try again.";
 include("login_form.inc");
  }
break;

case "new":
  foreach($HTTP_POST_VARS as $key => $value)
  {
if ($key != "phone")
{
  if ($value == "")
  {
unset($do);
$message_new = "Required information is missing.
Please try again.";
include("login_form.inc");
exit();
  }
}
if (ereg("{company)",$key))
{
 if (!ereg("^[A-Za-z' -]{1,50}$",$key))
 {
   unset($do);
   $message_new = "$company is not a valid name.
Please try again.";
   include("login_form.inc");
   exit();
 }
}
if (ereg("{name)",$key))
{
 if (!ereg("^[A-Za-z' -]{1,50}$",$key))
 {
   unset($do);
   $message_new = "$name is not a valid name.
Please try again.";
   include("login_form.inc");
   exit();
 }
}
if (ereg("{address)",$key))
{
 if (!ereg("^[A-Za-z' -]{1,50}$",$key))
 {
   unset($do);
   $message_new = "$address is not valid.
Please try again.";
   include("login_form.inc");
   exit();
 }
}
if (ereg("{town)",$key))
{
 if (!ereg("^[A-Za-z' -]{1,50}$",$key))
 {
   unset($do);
   $message_new = "$town is not a valid town.
Please try again.";
   include("login_form.inc");
   exit();
 }
}
if (ereg("{county)",$key))
{
 if (!ereg("^[A-Za-z' -]{1,50}$",$key))
 {
   unset($do);
   $message_new = "$county is not valid.
Please try again.";
   include("login_form.inc");
   exit();
 }
}
$$key = strip_tags(trim($value));
  }
  if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode))
  {
unset($do);
$message_new = "$postcode is not a valid postcode.
Please try again.";
include("login_form.inc");
exit();
  }
  if (!ereg("^[0-9)(xX -]{7,20}$",$phone))
  {
unset($do);
$message_new = "$phone is not a valid phone number.
Please try again.";
include("login_form.inc");
exit();
}
  }
  if (!ereg("[EMAIL PROTECTED]",$email))
  {
unset($do);
$message_new = "$email is not a valid email address.
 Please try again.";
include("login_form.inc");
exit();
  }
  /* check to see if login name already exists */
  $connection = mysql_connect($host,$user,$password)
or die ("Couldn't connect to server.");
  $db = mysql_select_db($database, $connection)
or die ("Couldn't select database.");
  $sql = "SELECT username FROM Members
WHERE username='$newname'";
  $result = mysql_query($sql)
or die("Couldn't execute query.");
  $num = mysql_numrows($result);
  if ($num > 0)
  {
unset($do);
$message_new = "$newname already used. Select another
 username.";
include("login_form.inc");
exit();
  }
  else
  {
$today = time("Y-m-d");

Re: [PHP] Help needed

2003-04-01 Thread Andy
Same error clint. I think the error is between
case "new": foreach($HTTP_POST_VARS as $key => $value)
and
  /* check to see if login name already exists */
I copied the code from PHP for Dummies (while trying to learn it) and
changed the code between the above to add in the extra fields for my form, i
think this is where the error is but i cannot see it!

Andy


"Clint Tredway" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Please post more of your code. It is difficult for us to help you without
> seeing your code.
>
> Clint
>
> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 01, 2003 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Help needed
>
>
> Hi all
>
> Can someone help?
> I am new to PHP and need some help, i have tried to build a members only
> section to my website but i am finding it very hard.
>
> I get this error when i go to the login page:
>
> Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
> on line 201
>
> But the only thing on line 201 is:
> default:
>
> I don't understand?
> I get the feeling i will need more help even if someone solves this for me
> :o)
>
> Thank you
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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



Re: [PHP] Help needed

2003-04-01 Thread Andy
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = "$phone is not a valid phone number etc

which one should i delete?
}
  if (!ereg("^[0-9)(xX -]{7,20}$",$phone))
{
unset($do);
$message_new = "$phone is not a valid phone number.
Please try again.";
include("login_form.inc");
exit();

Andy

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 16:27 01.04.2003, Andy spoke out and said:
> [snip]
> >Hi Clint
> >OK hope this is not too much and there are likely to be more errors in
it.
> >Thank you
> >Andy
> [snip]
>
> At the line
> if ($num == 1)  // login name was found{
> you have the curly bracket after the comment slashes - this is
> diesregarded. Put it before the comment slashes.
>
> At the line
> if ($num2 > 0) // password is correct  {
> you have the curly bracket after the comment slashes - this is
> diesregarded. Put it before the comment slashes.
>
> After this construct
> $message_new = "$phone is not a valid phone number.
> Please try again.";
> include("login_form.inc");
> exit();
> you have a closing curly brace that doesn't belong here. Remove it.
>
>
> Now your code should run without errors (syntax errors, that is)
>
> Hint: You should make a habit of using a more clear indentation (if your
> code is actually as it is in the mail). A single column indentation is not
> enough to make block levels clear at the first sight. You better use 4 or
8
> columns indentation width.
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>



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



[PHP] Re: Help needed

2003-04-01 Thread Andy
Thank you to all who helped, I have it working, well sort of.

I now get the form but when I fill it in I get
URL cannot be found on this server.
The pages are there but it looks like i am not communicating with the
database and the email is not being sent.
I am now getting cross-eyed looking at all this code.  Maybe I should get
someone to do my website and I should stick to solving windows problems
instead.

"Andy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all
>
> Can someone help?
> I am new to PHP and need some help, i have tried to build a members only
> section to my website but i am finding it very hard.
>
> I get this error when i go to the login page:
>
> Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
> on line 201
>
> But the only thing on line 201 is:
> default:
>
> I don't understand?
> I get the feeling i will need more help even if someone solves this for me
> :o)
>
> Thank you
>
>



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



[PHP] Zip to postcode

2003-04-02 Thread Andy
Can someone please tell me how i change the following code:
if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode))

to a UK postcode QQ1 1QQ
When i fill out the form it tells me that the postcode is not valid and i
think it is because it is in zip code format.

Thank you

Andy



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



[PHP] Re: Zip to postcode

2003-04-02 Thread Andy
Looks like i have it sussed thank you to all.
HOWEVER :o(
I have two small problems that i cannot solve, and seeing as you are all
gods in my opinion maybe you can help me further before i throw myself out
the window.

I am getting this error when i am taken to the member page after correctly
fill out the form:
Warning: extract() expects first argument to be an array in
/home/.sites/112//New_member.php on line 23

Also even though i am taken into the members area the mysql database is not
updating itself.  Why?

Here is the code for the error message:

$sql = "SELECT name FROM members
 WHERE username='$logname'";
  $result = mysql_query($sql)
   or die("Couldn't execute query 1.");
  $row = mysql_fetch_array($result,MYSQL_ASSOC);
  extract($row);
  echo "

Thank you for your help i take my hat off to all of you, how you understand
all this is byond me!

Andy


"Andy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can someone please tell me how i change the following code:
> if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode))
>
> to a UK postcode QQ1 1QQ
> When i fill out the form it tells me that the postcode is not valid and i
> think it is because it is in zip code format.
>
> Thank you
>
> Andy
>
>



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



[PHP] Warning Extract

2003-04-02 Thread Andy
Help AGAIN!!!

Thank you for all the help so far, i am close to getting this members
section working correctly now i think!
I think i would have given up by now if it were not for the help i get from
you all, thank you.

I have a warning that i don't understand:
Warning: extract() expects first argument to be an array in
/home/.sites//New_member.php on line 23

I also find that although i get through to the new members page OK when
filling in the form it does not write to the mysql database with the new
details, yet if i enter a username that already exists it tells me, so the
php and mysql must be interacting.

Here is the code for the warning message, hope it helps:

$connection = mysql_connect($host, $user,$password)
   or die ("Couldn't connect to server.");
$db = mysql_select_db($database, $connection)
   or die ("Couldn't select database.");
$sql = "SELECT name FROM members
   WHERE username='$logname'";
$result = mysql_query($sql)
   or die("Couldn't execute query 1.");
$row = mysql_fetch_array($result,MYSQL_ASSOC);
  extract($row);
  echo "
New Member Welcome etc

Thank you all again

Andy



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



Re: [PHP] Warning Extract

2003-04-02 Thread Andy
logname is not in my database.
It is a session variable used to hold the members login name.
In the form it is session_register('logname'); which is then set to a
variable with this code:
if ($num2 > 0) { // password is correct
   $auth="yes";
   $logname=$fusername;
   $today = date("Y-m-d h:m:s");
   $sql = "INSERT INTO login (username,loginTime)
   VALUES ('$logname','$today')";

does that make any sense?

Andy

"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>
> Andy wrote: (and Marek fixed)
>
> >$connection = mysql_connect($host, $user,$password)
> >   or die ("Couldn't connect to server.");
> >$db = mysql_select_db($database, $connection)
> >   or die ("Couldn't select database.");
> >$sql = "SELECT name FROM members
> >   WHERE username='$logname'";
> >$result = mysql_query($sql)
> >   or die("Couldn't execute query 1.");
> >if($row = mysql_fetch_array($result,MYSQL_ASSOC))  extract($row);
> >
> if $logname is not in members table, then your query returns zero rows
> and mysql_fetch_array returns false. First argument to extract (see
> manual) must be an array, but is false in your case, and php warns you
> about that.
>
> >  echo "
> >New Member Welcome etc
> >
> >Thank you all again
> >
> >Andy
> >
> >
> >
> >
> >
>



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



[PHP] searching an array for words starting with 'p'

2002-07-30 Thread andy

Hi there,

I am wondering how to search an array for words starting with a certain
character.

E.G:

$word = array('alpha', 'beta', 'php');

I would like to check if there is a word in the array starting with p

Is there alrready a function for this?

Thanx, Andy



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




[PHP] Problems with PEAR

2002-08-01 Thread andy

Hi there,
I am having trouble to install pear. This seems to be needed by a webmailer
called horde. somehow the pear comming with php4.2.2 does not contain a
certain log class. Here is what the faq says about this problem:
http://horde.org/faq/admin/trouble/index.php#t51
5.1.21 "Fatal error: Undefined class name 'log' in ..."
[Horde 2.x]: Your PHP PEAR implementation is missing the PEAR Log package.
This is a common problem with the PHP 4.2.1 PEAR for example. You can
install it via the network if you have a standalone php/pear command. See
the file horde/docs/INSTALL for more information on how to install the
required PEAR packages this way. Otherwise you can download the Log package
(e.g. from http://pear.php.net/get/Log) and manually install them inside
your PEAR directory. You may also need to install the modules Mail_Mime and
Net_Socket as well.

For more detailed instructions on install PEAR modules, see the PEAR
documentation at http://pear.php.net/manual/.

-
Ok... so far so good :-(
I did take a look at the pear php page and this takes me to another step to
install a webinstaller:

http://pear.php.net/manual/en/installation.web.php

So I did try this to :-(
But this results in following error msg:

capc11-35:/home/andy/sw/horde # lynx -source http://pear.php.net/go-pear |
sh
sh: ?php: No such file or directory

YOU NEED TO RUN THIS SCRIPT WITH PHP NOW!

Try this: lynx -source http://pear.php.net/go-pear | php -q

capc11-35:/home/andy/sw/horde # lynx -source http://pear.php.net/go-pear |
php -q
bash: php: command not found
capc11-35:/home/andy/sw/horde #


Has anybody an idea how to get this thing running? It just drives me cracy.

Thanx for any help,

andy




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




[PHP] PEAR with lots of trouble

2002-08-01 Thread Andy

Hi there,

I am trying to install PEAR. Horde - a webmailer - requires a certain log
modul which seams not to come with the recent php installation. I installed
a second php version as standalone php version to be able to install the
pear class like stated on the php.net site. However I do still get this
message:

a.. Log - No
a.. Make sure you're using a recent version of PEAR which includes the Log
class

Can anybody give me a hint on how to install this PEAR successfully on my
php version (I guess now it is installed inside the other php standalone
version)

Thanx for any help

Andy







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




[PHP] alternative to phpadsnew?

2002-08-03 Thread Andy

Hi there,

I am searching for a way to track advertisment, clickrates on my site. So I
tryed out phpadsnew http://sourceforge.net/projects/phpadsnew/

Unfortunatelly the current beta 7 works only with register globals set to
on. I cant install it in this case, because my application requires this to
be off.

Has anybody a good recomendation on another software to track adds?

Thank you for any hint on that.

andy








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




Re: [PHP] alternative to phpadsnew?

2002-08-03 Thread Andy

what do u mean by that. I would like to install this software on the same
server. I guess you mean installing it on another server - remotly?

Andy


"Maxim Maletsky" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
001601c23afe$8e0df9e0$1113fe17@dominanta">news:001601c23afe$8e0df9e0$1113fe17@dominanta...
>
> You can track ads with phpAdsNew also remotely, not necessarily via
> view() function.
>
>
> Maxim Maletsky
>
> PHP Beginner
> www.phpbeginner.com
>
>
>
> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 03, 2002 4:44 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] alternative to phpadsnew?
>
> Hi there,
>
> I am searching for a way to track advertisment, clickrates on my site.
> So I
> tryed out phpadsnew http://sourceforge.net/projects/phpadsnew/
>
> Unfortunatelly the current beta 7 works only with register globals set
> to
> on. I cant install it in this case, because my application requires this
> to
> be off.
>
> Has anybody a good recomendation on another software to track adds?
>
> Thank you for any hint on that.
>
> andy
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




[PHP] sucking news out of the usenet

2002-08-08 Thread andy

Hi guys,

I am trying to build a usenet gateway which is collecting usenet posts and
puts them into a phpbb forum. Same other way around. So I did read an
excelent article on that published by Armel Fauveau at:
http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is where
the code underneath is from. So getting the articles works.

My problem is how to glue all the articles together which are relies. I am
sure there is a way to find out which reply belongs to a post. I would like
to feed the phpbb database with it.

This is an example of an article including the header:

Newsgroups: php.general Path: news.php.net Xref: news.php.net
php.general:111709 Return-Path: Mailing-List: contact
[EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
[EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8 Aug
2002 18:28:33 - Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] Reply-To: "sebastian" Date: Thu, 8 Aug 2002
20:27:21 +0200 Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced
By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176 Subject:
streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @ all!
i´m looking for an algorithm or class to stream mp3-audiofiles, such as easy
as it can be. i found nothing on php.net and downloaded some phpscripts from
hotscripts and sourceforge but they were all very cryptical and bad
documentated. please help me, many thanks sebastian .


Lots of text.. puhh! I hope this is somehow possible. Maybe one of you guys
has a good idea on that. You can just cut and past the code underneath and
try it out by yourself.

Thanx for any help on that.

Andy

-
http://www.OZforum.info
Australia Information Forum




http://www.phpbuilder.com/columns/armel20010427.php3?page=3

$cfgServer= "news.php.net";
$cfgPort= 119;
$cfgTimeOut= 10;

// open a socket
if(!$cfgTimeOut)
// without timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort);
else
// with timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
$cfgTimeOut);

if(!$usenet_handle) {
echo "Connexion failed\n";
exit();
}
else {
echo "Connected\n";
$tmp = fgets($usenet_handle, 1024);
}

###
# page 2

//$cfgUser= "xx";
//$cfgPasswd= "yy";
$cfgNewsGroup= "php.general";

// identification required on private server
if($cfgUser) {
fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
$tmp = fgets($usenet_handle, 1024);

fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
$tmp = fgets($usenet_handle, 1024);

// check error

if($tmp != "281 Ok\r\n") {
echo "502 Authentication error\n";
exit();
}
}

// select newsgroup

fputs($usenet_handle, "GROUP ".$cfgNewsGroup."\n");
$tmp = fgets($usenet_handle, 1024);

if($tmp == "480 Authentication required for command\r\n") {
echo "$tmp\n";
exit();
}

$info = split(" ", $tmp);
$first = $info[2];
$last = $info[3];

print "First : $first\n";
print "Last : $last\n";

###
# page 3

$cfgLimit= 10;

// upload last articles

$boucle=$last-$cfgLimit;

while ($boucle <= $last) {

set_time_limit(0);

fputs($usenet_handle, "ARTICLE $boucle\n");
#fputs($usenet_handle, "BODY $boucle\n");

$article="";
$tmp = fgets($usenet_handle, 4096);

if(substr($tmp,0,3) != "220" AND substr($tmp,0,3) != "222") {
echo "+--+\n";
echo "Error on article $boucle\n";
echo "+--+\n";
}
else {
while($tmp!=".\r\n") {
$tmp = fgets($usenet_handle, 4096);

   $article = $article.$tmp;
}

echo "+--+\n";
echo "Article $boucle\n";
echo "+--+\n";
echo "$article\n";
}

$boucle++;


}

// close connexion

fclose($usenet_handle);

?>






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




Re: [PHP] sucking news out of the usenet

2002-08-08 Thread andy

that sound somehow more complicated that I have expected :-( I guess this is
a lot of work. May have to skip that for another time. Thanx for your help,

andy

-
http://www.OZforum.info
Australia Information Forum

"Ilia A." <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Andy,
>
> I've recently written an newsgroup (NNTP) gateway between FUDforum and
> newsgroup, which allows read/write data sharing between the two. The
solution
> for tracking down the reply to is done via 2 headers X-Reply-To or
> In-Reply-To or most commonly References headers. There are a number of
mail
> clients that break the convention and send no such data, in which case you
> need to do match replies based on subject. The latter occurs only very
rarely
> and in most cases you have a header with a unique ID against which you can
> match messages.
>
> --
> Ilia Alshanetsky
> [EMAIL PROTECTED]
> http://fud.prohost.org/forum/
>
> On August 8, 2002 04:10 pm, andy wrote:
> > Hi guys,
> >
> > I am trying to build a usenet gateway which is collecting usenet posts
and
> > puts them into a phpbb forum. Same other way around. So I did read an
> > excelent article on that published by Armel Fauveau at:
> > http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is
where
> > the code underneath is from. So getting the articles works.
> >
> > My problem is how to glue all the articles together which are relies. I
am
> > sure there is a way to find out which reply belongs to a post. I would
like
> > to feed the phpbb database with it.
> >
> > This is an example of an article including the header:
> >
> > Newsgroups: php.general Path: news.php.net Xref: news.php.net
> > php.general:111709 Return-Path: Mailing-List: contact
> > [EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
> > [EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8
> > Aug 2002 18:28:33 - Message-ID:
> > <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
> > Reply-To: "sebastian" Date: Thu, 8 Aug 2002 20:27:21 +0200 Lines: 11
> > X-Priority: 3 X-MSMail-Priority: Normal
> > X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE:
Produced
> > By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176
Subject:
> > streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @
all!
> > i´m looking for an algorithm or class to stream mp3-audiofiles, such as
> > easy as it can be. i found nothing on php.net and downloaded some
> > phpscripts from hotscripts and sourceforge but they were all very
cryptical
> > and bad documentated. please help me, many thanks sebastian .
> >
> >
> > Lots of text.. puhh! I hope this is somehow possible. Maybe one of you
guys
> > has a good idea on that. You can just cut and past the code underneath
and
> > try it out by yourself.
> >
> > Thanx for any help on that.
> >
> > Andy
> >
> > -
> > http://www.OZforum.info
> > Australia Information Forum
> >
> >
> >
> >
> >  > # http://www.phpbuilder.com/columns/armel20010427.php3?page=3
> >
> > $cfgServer= "news.php.net";
> > $cfgPort= 119;
> > $cfgTimeOut= 10;
> >
> > // open a socket
> > if(!$cfgTimeOut)
> > // without timeout
> > $usenet_handle = fsockopen($cfgServer, $cfgPort);
> > else
> > // with timeout
> > $usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
> > $cfgTimeOut);
> >
> > if(!$usenet_handle) {
> > echo "Connexion failed\n";
> > exit();
> > }
> > else {
> > echo "Connected\n";
> > $tmp = fgets($usenet_handle, 1024);
> > }
> >
> > ###
> > # page 2
> >
> > //$cfgUser= "xx";
> > //$cfgPasswd= "yy";
> > $cfgNewsGroup= "php.general";
> >
> > // identification required on private server
> > if($cfgUser) {
> > fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
> > $tmp = fgets($usenet_handle, 1024);
> >
> > fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
> > $tmp = fgets($usenet_handle, 1024);
> >
> > // check error
> >
> > if($tmp != "281 Ok\r\n") {
> > echo "502 Authentication error\n";
> > exit();
> > }
> > }
> >
> > // select newsgroup
&

[PHP] posting news via php - 535 error

2002-08-08 Thread andy

Hi there,

I am trying to write a script which is posting news to a newsserver.
Unfortunatelly I do get a 535 error back which is not reported in:
http://www.faqs.org/rfcs/rfc977.html Section 3.10.2

Maybe someone of you guys has a clue of an idea what is going wrong.
connecting works, so I did not include the connect code. The code for
posting is underneath.

Thanx for any help on that.

Andy


$cfgServer= "news.php.net";
$cfgNewsGroup= "php.general";
$subject='Test';
$header='
 Newsgroups: '.$cfgNewsGroup.'
 Path: '.$cfgServer.'
 Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
 Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
 From: [EMAIL PROTECTED] (Jerry Schwarz)
 Subject: '.$subject.'
 Message-ID: <[EMAIL PROTECTED]>
 Date: Friday, 10-Aug-2002 16:14:55 EST
 Followup-To: '.$cfgNewsGroup.'
 Expires: Saturday, 1-Jan-2003 00:00:00 EST
 Date-Received: Friday, 10-Aug-2002 16:59:30 EST
 Organization: Bell Labs, Murray Hill
';

$body='\n
This is a test.
';

$message=$header.$body;

$put = fputs($usenet_handle, "POST $message\n");

echo $put;




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




Re: [PHP] posting news via php - 535 error

2002-08-09 Thread Andy

> Try to put a "." when you finished at the new line. And use utf7
> encoding.

I did already put this . after the message. This is described in the spec,
but I might have put it into the wrong spot?!
What do u suggest to put it? What is utf7 encoding? Can you make an example?

Andy

--
-
http://www.ozforum.info



"Latex Master" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello andy,
> Try to put a "." when you finished at the new line. And use utf7
> encoding.
>
> Friday, August 9, 2002, 10:11:44 AM, you wrote:
>
> a> Hi there,
>
> a> I am trying to write a script which is posting news to a newsserver.
> a> Unfortunatelly I do get a 535 error back which is not reported in:
> a> http://www.faqs.org/rfcs/rfc977.html Section 3.10.2
>
> a> Maybe someone of you guys has a clue of an idea what is going wrong.
> a> connecting works, so I did not include the connect code. The code for
> a> posting is underneath.
>
> a> Thanx for any help on that.
>
> a> Andy
>
>
> a> $cfgServer= "news.php.net";
> a> $cfgNewsGroup= "php.general";
> a> $subject='Test';
> a> $header='
> a>  Newsgroups: '.$cfgNewsGroup.'
> a>  Path: '.$cfgServer.'
> a>  Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
> a>  Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
> a>  From: [EMAIL PROTECTED] (Jerry Schwarz)
> a>  Subject: '.$subject.'
> a>  Message-ID: <[EMAIL PROTECTED]>
> a>  Date: Friday, 10-Aug-2002 16:14:55 EST
> a>  Followup-To: '.$cfgNewsGroup.'
> a>  Expires: Saturday, 1-Jan-2003 00:00:00 EST
> a>  Date-Received: Friday, 10-Aug-2002 16:59:30 EST
> a>  Organization: Bell Labs, Murray Hill
> a> ';
>
> a> $body='\n
> a> This is a test.
> a> ';
>
> a> $message=$header.$body;
>
> a> $put = fputs($usenet_handle, "POST $message\n");
>
> a> echo $put;
>
>
>
>
>
>
> --
> Best regards,
>  Latexmailto:[EMAIL PROTECTED]
>



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




[PHP] Re: compile PHP --with-imap, on OS X: progress, but...

2002-08-09 Thread Andy

Hi Michael:

Í have done this on suse72 and after a while I did get it running. The
problem was that I did forget to move the 3 directories to their spot as
described in the docu. You have also to change some lines in another file
which I do not know if this is available on X (cant remember the name
though, but I guess you know which file I mean)

Good luck,

Andy

--
--
http://www.globosapiens.net
Global Travellers Network!

http://www.ozforum.info
Discussing Australia Forum



"Michael Geary" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi folks,
>
> I am desperately trying to get PHP (4.2.2) --with-imap running on OS X,
> so I can run the IMP web-mail client. I already have IMAP installed, and
> have downloaded and compiled the U-W c-client. I have also followed the
> directions on the PHP.NET website under IMAP.
>
> Here is my PHP configure line:
>
> ./configure --prefix=/mg --with-apxs=/mg/sbin/apxs \
> --with-config-file-path=/mg/etc --with-gettext=/sw \
> --with-xml --enable-ftp --with-imap=/usr/local/src/imap-2002.RC2 \
> --with-imap-ssl
>
> I can configure PHP just fine, that is, I don't get any errors. However,
> when I run "make", I get a message:
>
> *** Warning: This library needs some functionality provided by
> -lc-client.
> *** I have the capability to make that library automatically link in when
> *** you link to this library.  But I can only do this if you have a
> *** shared version of the library, which you do not appear to have.
> *** The inter-library dependencies that have been dropped here will be
> *** automatically added whenever a program is linked with this library
> *** or is declared to -dlopen it.
>
> I do still get a libphp4.dylib file, but when I rename this to
> libphp4.so and place it in the appropriate apache directory, i get the
> following error from apache:
>
> Syntax error on line 239 of /mg/etc/httpd.conf:
> Cannot load /mg/libexec/httpd/libphp4.so into server: (reason unknown)
>
> on line 239 of httpd.conf I have:
>
> LoadModule php4_module  libexec/httpd/libphp4.so
>
> Can anyone make any sense of this? I would really appreciate some help.
>
> regards,
>
> michael geary
>



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




[PHP] security concern with curl

2002-08-09 Thread Andy

Hi everybody,

I am planing to install oasis a management tool for ads. This software
requires to install curl http://curl.haxx.se/

My concern is that this would open a serious security whole on my server.
Curl is stating out that:

Curl is a command line tool for transferring files with URL syntax,
supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl
supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos,
HTTP form based upload, proxies, cookies, user+password authentication, file
transfer resume, http proxy tunneling and a busload of other useful tricks.

So I fear that someone would be able to tranfer files on / off my server.

Has anybody some experiance on that, or can give a comment on that?

Thanx for any hint,

Andy



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




Re: [PHP] security concern with curl

2002-08-10 Thread andy

> > So I fear that someone would be able to tranfer files on / off my
server.
> >
> > Has anybody some experiance on that, or can give a comment on that?
>
> Ehhh, PHP already has enough capabilities to transfer files to/from your
> server from/to the rest of the world without using curl. Or are you
> (healthy) paranoied about oasis?

well it is just that I have to install an aditional pice of software and it
does something I am not familar with it.

All I want to know if this could be security issue and a reason not to
install oasis. How about oasis itself? This pease of SW will run on my
server and could do anything what php is allowed to do (maybe delete some
files or transfer them, open a gateway to some other user to take over my
server, send spam over my server and so on)

Are there any rummors about oasis, or is this a reputable software? Right
now I just know what the site is telling me.

Thanx for all your comments on that.

Andy


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




[PHP] Posting news via php

2002-08-11 Thread Andy

Sorry for reposting, but I am still having this problem and the post is back
to far that someone looks at it.
Thank you for any help on this. I appreciate it.

Andy


Hi there,

I am trying to write a script which is posting news to a newsserver.
Unfortunatelly I do get a 535 error back which is not reported in:
http://www.faqs.org/rfcs/rfc977.html Section 3.10.2

Maybe someone of you guys has a clue of an idea what is going wrong.
connecting works, so I did not include the connect code. The code for
posting is underneath.

Thanx for any help on that.

Andy


$cfgServer= "news.php.net";
$cfgNewsGroup= "php.general";
$subject='Test';
$header='
 Newsgroups: '.$cfgNewsGroup.'
 Path: '.$cfgServer.'
 Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
 Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
 From: [EMAIL PROTECTED] (Jerry Schwarz)
 Subject: '.$subject.'
 Message-ID: <[EMAIL PROTECTED]>
 Date: Friday, 10-Aug-2002 16:14:55 EST
 Followup-To: '.$cfgNewsGroup.'
 Expires: Saturday, 1-Jan-2003 00:00:00 EST
 Date-Received: Friday, 10-Aug-2002 16:59:30 EST
 Organization: Bell Labs, Murray Hill
';

$body='\n
This is a test.
';

$message=$header.$body;

$put = fputs($usenet_handle, "POST $message\n");

echo $put;
--






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




[PHP] problems with php.ini

2002-08-18 Thread Andy

Hi everybody:

I am trying to switch register_argc_argv to on. So I did edit php.ini
located where phpinfo() told me. I switched it to on and uncommented the
line. Then I restarted apache.

phpinfo() still tells me that the fallue is off.

What am I doing wrong? Can anybody give me a hint on how to tern this on?

Thanx,

Andy



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




Re: [PHP] Web Based Mail

2002-08-18 Thread Andy

Horde is really great. I can definatelly recommend it to.

But why not stick with sendmail? It does a great job and is easier to
install with horde.

Andy


--
--
http://www.globosapiens.net
Worldwide Travel Community



"Met" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000f01c246e7$ce853020$6901a8c0@SURVIVAL">news:000f01c246e7$ce853020$6901a8c0@SURVIVAL...
> IMP and SquirrelMail both do the job for me.
>
> IMP = http://www.horde.org/imp/
>
> SquirrelMail =  http://www.squirrelmail.org/
>
> ~ Matthew
>
>
> -Original Message-
> From: Chill [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 18, 2002 2:35 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Web Based Mail
>
>
> Can anyone recommend a good Web-Based Mail System for php?  I know that
> there are a few out there but I was wondering which was the best (and
> easiest to setup)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>



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




[PHP] tracking visitors till registration?

2002-08-19 Thread Andy

Hi there,

I am wondering if following scenario would be possible:

- Create a unique referer id to make sure that the visitior has been refered
by a particular person. (e.g. server.com?ref=20)
- The visitor enters the site and browses around, but the ref=20 should not
be stored inside the url, but in a coockie
- If the visitor signs up and there is a referer id assign the person who
refered it some points.

The problem I see, is how to make sure that the refered id does not get lost
and in case the person comes back another day still be able to asign the
person who refered it the points.

Has anybody a good suggestion on that?

Thanx for any hint,

Andy






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




[PHP] installing php with register globals off and on?

2002-08-19 Thread Andy

Hi there,

I am running php 4.2.2 with register globals set to off. Now I am planing to
install oasis (a add tracking sw). Their current version requires a php
build with register globals set to on!?

Is there a way out of this dilema running only one server?

Thanx for any advice,

Andy





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




[PHP] still problems with register globals set to on

2002-08-21 Thread Andy

Hello everybody,

I am still having problems to run php scripts inside a directory with
register globals on.

This is what I did put inside the httpd.conf file right after the  close tag.


php_value register_globals on


It does not change anything. I restarted apache of course.

Do u have an idea where the error could live?

Andy


"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sure, turn register_globals on only for the oasis directory.  In your
> httpd.conf add:
>
> 
> php_value register_globals on
> 
>
> -Rasmus
>
> On Mon, 19 Aug 2002, Andy wrote:
>
> > Hi there,
> >
> > I am running php 4.2.2 with register globals set to off. Now I am
planing to
> > install oasis (a add tracking sw). Their current version requires a php
> > build with register globals set to on!?
> >
> > Is there a way out of this dilema running only one server?
> >
> > Thanx for any advice,
> >
> > Andy
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>






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




Re: [PHP] still problems with register globals set to on

2002-08-21 Thread Andy

thanx tom, but this doen not seem to have anything to do with it.

Regards,

Andy



"Tom Rogers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Wednesday, August 21, 2002, 5:34:35 PM, you wrote:
> A> Hello everybody,
>
> A> I am still having problems to run php scripts inside a directory with
> A> register globals on.
>
> A> This is what I did put inside the httpd.conf file right after the
 />> close tag.
>
> A> 
> A> php_value register_globals on
> A> 
>
> A> It does not change anything. I restarted apache of course.
>
> A> Do u have an idea where the error could live?
>
> A> Andy
>
>
> A> "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> A> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> Sure, turn register_globals on only for the oasis directory.  In your
> >> httpd.conf add:
> >>
> >> 
> >> php_value register_globals on
> >> 
> >>
> >> -Rasmus
> >>
> >> On Mon, 19 Aug 2002, Andy wrote:
>
>
> You may need to add in the directory section (never used it so it is a
> guess)
>
> AllowOverride Options
>
> --
> regards,
> Tom
>



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




Re: Re[3]: [PHP] still problems with register globals set to on

2002-08-21 Thread Andy

Yeeahhh! Thanks Tom. Works great. It was just a small error causing this
much trouble.

For turning register globals on it is:  php_flag register_globals on

Cheers,

Andy





"Tom Rogers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> Wednesday, August 21, 2002, 10:53:48 PM, you wrote:
> TR> Hi,
>
> TR> Wednesday, August 21, 2002, 9:32:43 PM, you wrote:
> A>> thanx tom, but this doen not seem to have anything to do with it.
>
> A>> Regards,
>
> A>> Andy
>
>
>
> A>> "Tom Rogers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> A>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>> Hi,
> >>>
> >>> Wednesday, August 21, 2002, 5:34:35 PM, you wrote:
> >>> A> Hello everybody,
> >>>
> >>> A> I am still having problems to run php scripts inside a directory
with
> >>> A> register globals on.
> >>>
> >>> A> This is what I did put inside the httpd.conf file right after the
> A>>  >>> />> close tag.
> >>>
> >>> A> 
> >>> A> php_value register_globals on
> >>> A> 
> >>>
> >>> A> It does not change anything. I restarted apache of course.
> >>>
> >>> A> Do u have an idea where the error could live?
> >>>
> >>> A> Andy
> >>>
> >>>
> >>> A> "Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> >>> A> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>> >> Sure, turn register_globals on only for the oasis directory.  In
your
> >>> >> httpd.conf add:
> >>> >>
> >>> >> 
> >>> >> php_value register_globals on
> >>> >> 
> >>> >>
> >>> >> -Rasmus
> >>> >>
> >>> >> On Mon, 19 Aug 2002, Andy wrote:
> >>>
> >>>
> >>> You may need to add in the directory section (never used it so it is a
> >>> guess)
> >>>
> >>> AllowOverride Options
> >>>
> >>> --
> >>> regards,
> >>> Tom
> >>>
>
> TR> I eventually got it to work with the following:
>
> TR> 
> TR> AllowOverride All
> TR> Order allow,deny
> TR> Allow from all
> TR> php_flag register_globals   on
> TR> 
> In the httpd.conf you can get away with just:
>
>
> 
> php_flag register_globals   on
> 
>
> --
> regards,
> Tom
>



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




[PHP] Tricky question - referrer from ousite, or from intern?

2002-08-26 Thread Andy

Hi there,

I have a tricky problem which I honestly think is not possible to solve.
However maybe I am wrong.

As you all know it is possible on php.net to pass a function name just
behind the adress (e.G. php.net/function-name) this will redirct to the
propper page. I did the same thing with member sites (e.G
server.com/member-name) Now I am starting a referrer programm. Every member
who follows a link like from anywhere on the net and registeres will be
tracked and the referrer gets a point. Now I did forget that I do have
several of this links on my site itself :-) Which means that they have been
aquired on my site by accident :-)

My question is how can I make sure that they do come from outside and are
not surfing my site already. I do set a coockie as soon as someone enteres
this adress, but it would be fantastic if I could do a if statement on
something to make sure he does not come from my own site. I would like to
keep all the links like that, just to find a way to track the origin of the
user.

Thank you so much for any idea on this tricky task,

Andy







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




[PHP] PHP - Chat?

2002-08-26 Thread Andy

HI there,

I am wondering if a Chat coded in PHP would be sufficiant for a medium sized
site. Maybe someone has a working example online. It would be no problem to
get a ircdeamon working, just the client is in question.

Thank you for your suggestions,

Andy








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




Re: [PHP] Tricky question - referrer from ousite, or from intern?

2002-08-27 Thread Andy

Thanx for your answer. This is exactly the problem. I do not want to pass
something like this.

The user gets a URL like: server.com/user-name
He passses it around and someone follows this link to my site. In case this
person registeres I am tracking this. But the same links are inside my own
site. The URL should stay the same since it is a nice one with the username
and without any ?=... stuff.

I could reduce my question to the following:

How can I find out (in PHP) that someone is comming from a different site.
Some variable like $_HTTP[referrer] might track this. I hope there is
something like this :-)

So I could do something like this:


if ($_HTTP[referrer] != myserver.com){
//set a cookie
}

You get the idea?

Andy



"Hugh Danaher" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000c01c24d97$4c9f3d60$017f@localhost">news:000c01c24d97$4c9f3d60$017f@localhost...
> IFF they just left one of your other sites, then you should be able to
pass
> a variable in the other site's header such as:
>
> php.net/function-name?variable=from_somewhere_I_own
>
> if the variable isn't set, then they came from a site you don't own.
>
> or you could send them to a unique function-name where you can then record
a
> hit on that function-name.
>  function unique_name()
> {
> $hit="came from my other site";
> pseudo code -- store $hit;
> function run_me(you really want to run)
> }
> ?>
> - Original Message -
> From: "Andy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 26, 2002 10:58 PM
> Subject: [PHP] Tricky question - referrer from ousite, or from intern?
>
>
> > Hi there,
> >
> > I have a tricky problem which I honestly think is not possible to solve.
> > However maybe I am wrong.
> >
> > As you all know it is possible on php.net to pass a function name just
> > behind the adress (e.G. php.net/function-name) this will redirct to the
> > propper page. I did the same thing with member sites (e.G
> > server.com/member-name) Now I am starting a referrer programm. Every
> member
> > who follows a link like from anywhere on the net and registeres will be
> > tracked and the referrer gets a point. Now I did forget that I do have
> > several of this links on my site itself :-) Which means that they have
> been
> > aquired on my site by accident :-)
> >
> > My question is how can I make sure that they do come from outside and
are
> > not surfing my site already. I do set a coockie as soon as someone
enteres
> > this adress, but it would be fantastic if I could do a if statement on
> > something to make sure he does not come from my own site. I would like
to
> > keep all the links like that, just to find a way to track the origin of
> the
> > user.
> >
> > Thank you so much for any idea on this tricky task,
> >
> > Andy
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



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




[PHP] Re: Tricky question - referrer from ousite, or from intern?

2002-08-27 Thread Andy

All righty! I found the solution:

It might be for help to some other folkes. Here is the code which solves the
problem:


#make sure he is not referred by our  one website
if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){
#set referer cookie
setcookie('referrer', $user_id, 0);
}
#redirect


Cheers,

Andy



"Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> I have a tricky problem which I honestly think is not possible to solve.
> However maybe I am wrong.
>
> As you all know it is possible on php.net to pass a function name just
> behind the adress (e.G. php.net/function-name) this will redirct to the
> propper page. I did the same thing with member sites (e.G
> server.com/member-name) Now I am starting a referrer programm. Every
member
> who follows a link like from anywhere on the net and registeres will be
> tracked and the referrer gets a point. Now I did forget that I do have
> several of this links on my site itself :-) Which means that they have
been
> aquired on my site by accident :-)
>
> My question is how can I make sure that they do come from outside and are
> not surfing my site already. I do set a coockie as soon as someone enteres
> this adress, but it would be fantastic if I could do a if statement on
> something to make sure he does not come from my own site. I would like to
> keep all the links like that, just to find a way to track the origin of
the
> user.
>
> Thank you so much for any idea on this tricky task,
>
> Andy
>
>
>
>
>
>



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




[PHP] Re: Tricky question - referrer from ousite, or from intern?

2002-08-27 Thread Andy

Hello Justin,

I just saw that you have been faster than me :-)

However.. you think it might be not sure that this workes for every browser?
PUh... thats bad. Do u have examples for that? It workes with IE on PC.

Cheers Andy



"Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> All righty! I found the solution:
>
> It might be for help to some other folkes. Here is the code which solves
the
> problem:
>
>
> #make sure he is not referred by our  one website
> if (!ereg($HTTP_HOST, $_SERVER[HTTP_REFERER])){
> #set referer cookie
> setcookie('referrer', $user_id, 0);
>     }
> #redirect
>
>
> Cheers,
>
> Andy
>
>
>
> "Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi there,
> >
> > I have a tricky problem which I honestly think is not possible to solve.
> > However maybe I am wrong.
> >
> > As you all know it is possible on php.net to pass a function name just
> > behind the adress (e.G. php.net/function-name) this will redirct to the
> > propper page. I did the same thing with member sites (e.G
> > server.com/member-name) Now I am starting a referrer programm. Every
> member
> > who follows a link like from anywhere on the net and registeres will be
> > tracked and the referrer gets a point. Now I did forget that I do have
> > several of this links on my site itself :-) Which means that they have
> been
> > aquired on my site by accident :-)
> >
> > My question is how can I make sure that they do come from outside and
are
> > not surfing my site already. I do set a coockie as soon as someone
enteres
> > this adress, but it would be fantastic if I could do a if statement on
> > something to make sure he does not come from my own site. I would like
to
> > keep all the links like that, just to find a way to track the origin of
> the
> > user.
> >
> > Thank you so much for any idea on this tricky task,
> >
> > Andy
> >
> >
> >
> >
> >
> >
>
>



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




Re: [PHP] sending email to a mailing list

2002-08-28 Thread Andy

I do not agree. First off all (in my case) I do want to send personalized
e-mails. And even if I cancel this wish.. how about adresses which fail? You
will never ever find out how many adresses failed by putting them into the
all in  bcc. And.. isn't there a restriction? What happens if you put 1
adresses into the header? I am pretty sure this will fail.

I guess the only really good solution is to let the MTA do the job for ya. I
just do not know how, but I am positive that this is the best solution
(since the MTA is made for such things while php is not)

Andy



"Justin French" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 28/08/02 1:38 AM, Raphael Hamzagic ([EMAIL PROTECTED]) wrote:
>
> > I'm with a little doubt about the best way to send a mail message to a
large
> > mailing list using PHP. I'm not interested  in existing mailing list
> > managers, or source codes.
> > I dont know if the best way to send emails is to use a repeat loop with
> > mail() function, or use some other structure to send emails with
timeouts
> > intervals...
>
> yes, and yes, providing you want to send personalised emails, which costs
> huge performance problems and a lkoad on the server... possibly leads to
> timeouts of the script, timeouts of the browser, etc etc.  Not good!
>
> the real easy solution is to send ONE email with everyone in the Bcc
field.
> Quick and simple.  Won't piss off your host, won't load the server, etc.
>
> Justin
>
>



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




[PHP] working with ssl

2002-08-29 Thread Andy

Hi there,

I would like to serve some php pages crypted with ssl. Now I am wondering
what ssl sw to install. I found openssl but this seams to be in alpha
stadium. How do I install ssl with php anyway. Can somebody give me a hint
on that?

Thanx in advance,

Andy




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




[PHP] coockie expiration problems

2002-09-02 Thread andy

Hi there,

I am trying to save a var inside a cookie for a certain time (in this
example 10s):
 setcookie('referrer', $user_id, time()+10); //expires in one hour

Now I would like to get the value, but only if the coockie is valid (if
cockie not older than 10 s in this example)
echo 'referrer: '.$_COOKIE[referrer];

Unfortunatelly this does not work, the cockie value is always valid, even
after expiration time.

What am I doing wrong?

Thanx for any help on that,

Andy



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




[PHP] Re: coockie expiration problems

2002-09-02 Thread andy

OK, I found the reason, but not the solution yet:

The cookie time during setting is the time taken from the server. The time
for checking the coockie is the time of the local machine!!

So what can I do if I would like to last the coockie for 1 hour and the
person is sitting on the other site of the world running 10 hours time
difference? Puhh.. maybe I am wrong, but this is how it seems to be.

Any ideas?

Andy

<[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> I see really nothing wrong in your example. Did you tried to verify
with
> isset() if the cookie is still here or not?
> And well, you should use double quote on setcookie("referrer",
$user_id,
> time()+10);
> You call should be also $_COOKIE['referrer'] and not
$_COOKIE[referrer].
>
> --
> Merci de nous avoir choisi. - Thanks you for your choice.
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> www.GroupAKT.com - Hébergement Group.
> www.WorldAKT.com - Hébergement de sites Internet
> "Andy" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > Hi there,
> >
> > I am trying to save a var inside a cookie for a certain time (in this
> > example 10s):
> >  setcookie('referrer', $user_id, time()+10); //expires in one hour
> >
> > Now I would like to get the value, but only if the coockie is valid (if
> > cockie not older than 10 s in this example)
> > echo 'referrer: '.$_COOKIE[referrer];
> >
> > Unfortunatelly this does not work, the cockie value is always valid,
even
> > after expiration time.
> >
> > What am I doing wrong?
> >
> > Thanx for any help on that,
> >
> > Andy
> >
> >
>
>



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




[PHP] unix timestamp

2002-09-06 Thread andy

Hi everybody,

I am trying to create a unix timestamp which dates back a certain amount of
days. Lets say I would like to have a unix timestamp from 7 days ago.

what I tryed is just to subtract values since this are counted s since the
start of the unix epoche, but this does not work in cases like the switch of
months. Has anybody an idea how to do that?

Thanx, Andy



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




[PHP] Re: unix timestamp

2002-09-06 Thread andy

Hi everybody,

here is the code which does unfortunatelly not work as I want. The goal is
to produce a unix timestamp which is a date 7 days ago and one 14 days ago
and so on.

code:

 switch ($ts){
  case 1: // today
   $timestamp = mktime (0,0,0,date("m")  ,date("d"),date("Y"));
   break;

  case 2: // yesterday
   $timestamp = mktime (0,0,0,date("m"),date("d")-1,  date("Y"));
   break;

  case 2: // last week
   $timestamp = mktime (0,0,0,date("m"),date("d")-7,  date("Y"));
   break;
}

Maybe someone can see the error?

Thank you for any help on that.

Andy



<[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You should use mktime()
>
> mktime
> (PHP 3, PHP 4 )
>
> mktime -- Get UNIX timestamp for a date
> Description
> int mktime ( int hour, int minute, int second, int month, int day, int
year
> [, int is_dst])
>
> www.php.net/mktime
>
> --
>
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
>
> "Andy" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > Hi everybody,
> >
> > I am trying to create a unix timestamp which dates back a certain amount
> of
> > days. Lets say I would like to have a unix timestamp from 7 days ago.
> >
> > what I tryed is just to subtract values since this are counted s since
the
> > start of the unix epoche, but this does not work in cases like the
switch
> of
> > months. Has anybody an idea how to do that?
> >
> > Thanx, Andy
> >
> >
>
>



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




[PHP] wrong timestamp?

2002-09-06 Thread andy

Hi there,

this is a add on a post I did a few hours ago regarding timestamp.

I was able to locate the error, but not to fix it. The code :

   $timestamp = date('YmdGis',(mktime (0,0,0,date("m")
,date("d")-1,date("Y") ) ) );

produces a string like this: 200209050

There is one 0 missing. Because of this my querry is not working, How come
this timestamp is wrong?

Thanx for any help,

Andy



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




[PHP] file upload > 2 MB

2002-09-09 Thread andy

Hi there,

I am trying to configure php inside the httpd.conf to allow file uploads
inside a special directory with more than 2 MB.

Somehow the syntax is wrong, since I do get the errormsg that there are 2
arguments required. Here is the code:

# special settings for webmailer

   php_flag upload_max_filesize = 50M


Does anybody has an idea?

Thanx for any help,

Andy



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




[PHP] counting guest users

2002-09-21 Thread Andy

Hi there,

I am wondering how some pages count guest users. An example is phpbb. They
always know how many guest users are browsing the site. Are they using
cookies or db for this, or both? Maybe there is a code snipped out for this
already?

Thank you for any hint on that.

Andy



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




[PHP] freetype - problems with true type and transprency

2002-09-23 Thread andy

Hi there,

I am trying to put text into an image. There are some problems where I do
not find a solution for.

The image is a jpg and stored on the filesystem. Now I would like to create
a stamp in trutype font
verdana with a name. Just the text on the image.

I experianced following problems:
o The text has a white background which covers the other image
o It does not work with truetype. I tryed imagettftext but results in a
broken image.

Here is the code which should do the job, but does not:

$label = imagecreate(200,50);
$white = imagecolorallocate($label,255,255,255);
$black = imagecolorallocate($label,0,0,0);

Imagestring($label,1,0,0,'andy',$black);
#Imagettftext($label, 30,0,10,33,$black,'verdana.ttf',$number);

$photoImage = ImageCreateFromJPEG('card_city.jpg');
$pos_x = 5;
$pos_y= 220;
$label_w= 200;
$label_h = 50;
ImageCopy($photoImage, $label, $pos_x, $pos_y, 0, 0, $label_w, $label_h);

header("Content-type: image/jpeg");
imagejpeg($photoImage);

Has anybody an idea how to solve this prob?

Thanx in advance for any help.

Andy







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




[PHP] freetype - could not open font problem

2002-09-24 Thread andy

Hi there,

I am trying to use freetype, but do always get the message

Warning: Could not find/open font in test.php on line 18

The font is available and ok. I double checked it.

What could cause this error exept of the given reason? I am trapped ;-)

Thanx for any help on that.

Andy



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




[PHP] impossible in php?

2002-09-24 Thread andy

Hi there,

I am trying to do something real dynamic. It looks like this is impossible
in php because the parser would not work for the two cases.

Following idea.
- Create a dynamic image ( a card with a given text inside). I call it
v-card.jpg and a .htaccess file takes care that the .jpg is parsed via php
So the v-card.jpg is a php file outputting a jpg. This workes pretty good.

- Create a pdf with lots of this v-cards inside. The function works with
images from the filesystem, but not with the dynamic v-card.jpg image.

Now I am wondering if this is possible in php, since both files are parsed
in the same time. Maybe there is a work around or any hint you could give
me. I am kind off stuck.

Thanx in advance,

Andy




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




[PHP] pdflib output reolution higher than 72 dpi possible?

2002-09-25 Thread andy

Hi there,

I would like to output a pdf with pdflib with 300 dpi

How could I define the output resolution? Default seems to be 72 dpi

Thanx for any hint,

Andy







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




[PHP] help on regex

2002-10-04 Thread andy

Hi everybody,

I am trying to learn regex and could need some help.

There are 2 function I would need. 1 which returns false if the data does
contain anything else than numbers or fullstops

I tryed this:
function validate_phone ($phone) {
 return (ereg('^[0-9][:punct:]', $phone));
}

The next one is to return fals if the data does not contain a number inside
the string ("street 893" would be valid)
I tryed this:
function validate_street ($street) {
 return (ereg('^[0-9]', $street));
}

Unfortunatelly this does not work like I want ;-)

Thank you for any help on this,

andy



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




[PHP] working with pspell

2002-10-06 Thread Andy

Hi everybody,

I just installed pspell and would like to get behind of the whole concept of
spellchecking with php.

As far as I understand, I have to check it word by word. Is there an
algorithm which allowes to give a sentence to check and highlight all the
words mispelled. On clickin the mispelled word to open a popup with
suggestions and by clicking on the proper word to automaticly replace the
wrong word.

This sounds very complicated. Has anybody a good suggestion, or article to
recommend on this topic?

Thanx for your help,

Andy



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




[PHP] Re: MySQL back up

2002-10-08 Thread Andy

Why don't you just do a hard backup of the files from the db. Find out the
location of the data folder where thd db saves its tables, perform a tar
cvzf data_folder and then pipe it directly to the user for download via
http.

Havent tryed it that way, but should work. Another thing would be reoback
which is a perl script. You should be able to perform this backup via ftp
controled by a daily cron job.

Hope this helps,

Andy

--
--
http://www.globosapiens.net
Worldwide Travel Community



"Ken" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All!
>
> Anyone know how to code the MySQL command in PHP to make the database
script
> download to your local hard disk, without writing 100 lines of code?
>
> I tried the mysqldump without any luck, but I think there is an easy way
to
> do it, just not sure how to code it.
>
> Thanks in advance!
>
>
>



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




[PHP] HTML forms & php 4.2.3 - how to get cvs fix applied

2002-11-09 Thread andy

I recently updated from 4.2.0 to 4.2.3 - since doing so values submitted 
to php from HTML forms using keys  - value="foo[bar]" - get truncated in 
php - example: if I submit "[EMAIL PROTECTED]" it will come out as 
"eight13.com" with a print_r($_POST)

I found these bug reports which say what appears to be the same bug has 
been "fixed in CVS":

http://bugs.php.net/bug.php?id=20024
http://bugs.php.net/bug.php?id=19829

I'm wondering where to go from this point. I have a production server 
which I need this fixed on.

Is my only choice to checkout the entire branch for the latest version 
4.2.x? (I'm assuming its branched - I've not looked at any of this yet)

Is there not a patch? Could I just checkout the applicable files?

http://snaps.php.net/ wasn't avilable at the time of writing this - 
possibly it would have given me more information.


Apache 1.3.20
php from source as module
Mandrake 8


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



[PHP] Ho to write output of sql query to txt file?

2002-06-04 Thread andy

Hi there,

I am trying to get only records out of a table mathing a query. This should
be piped into a textfile. My problem is that I have to transmit this records
to a new machine. So the output should be a kind of sql commands which I
could run with phpadmin or similar to import them to the other db on the
other machine.

Is this possible?

Thank you for any help,

andy




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




Re: [PHP] Ho to write output of sql query to txt file?

2002-06-04 Thread andy

Original question:

> [snip]
> I am trying to get only records out of a table mathing a query. This
should
> be piped into a textfile. My problem is that I have to transmit this
records
> to a new machine. So the output should be a kind of sql commands which I
> could run with phpadmin or similar to import them to the other db on the
> other machine.
>
> Is this possible?
> [/snip]


Thank you for your help.

I did read on mysql.com and your article. Than I tryed to transfer the
datasets.
Export worked ok. The textfile contains the records.
Import message:
Query OK, 35 rows affected (0.04 sec)
Records: 35  Deleted: 0  Skipped: 0  Warnings: 630

The warning already tells it. the datasets are totally empty. Only default
of the columns is set.

do u have an idea why?

Thanx, Andy


- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "'andy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 04, 2002 4:07 PM
Subject: RE: [PHP] Ho to write output of sql query to txt file?


> [snip]
> I am trying to get only records out of a table mathing a query. This
should
> be piped into a textfile. My problem is that I have to transmit this
records
> to a new machine. So the output should be a kind of sql commands which I
> could run with phpadmin or similar to import them to the other db on the
> other machine.
>
> Is this possible?
> [/snip]
>
> from: http://www.mysql.com/doc/S/E/SELECT.html
>
> The SELECT ... INTO OUTFILE 'file_name' form of SELECT writes the selected
> rows to a file. The file is created on the server host and cannot already
> exist (among other things, this prevents database tables and files such as
> `/etc/passwd' from being destroyed). You must have the file privilege on
the
> server host to use this form of SELECT. SELECT ... INTO OUTFILE is mainly
> intended to let you very quickly dump a table on the server machine. If
you
> want to create the resulting file on some other host than the server host
> you can't use SELECT ... INTO OUTFILE. In this case you should instead use
> some client program like mysqldump --tab or mysql -e "SELECT ..." >
outfile
> to generate the file. SELECT ... INTO OUTFILE is the complement of LOAD
DATA
> INFILE; the syntax for the export_options part of the statement consists
of
> the same FIELDS and LINES clauses that are used with the LOAD DATA INFILE
> statement. See section 6.4.9 LOAD DATA INFILE Syntax. In the resulting
text
> file, only the following characters are escaped by the ESCAPED BY
character:
> The ESCAPED BY character
> The first character in FIELDS TERMINATED BY
> The first character in LINES TERMINATED BY
> Additionally, ASCII 0 is converted to ESCAPED BY followed by 0 (ASCII 48).
> The reason for the above is that you must escape any FIELDS TERMINATED BY,
> ESCAPED BY, or LINES TERMINATED BY characters to reliably be able to read
> the file back. ASCII 0 is escaped to make it easier to view with some
> pagers. As the resulting file doesn't have to conform to the SQL syntax,
> nothing else need be escaped. Here follows an example of getting a file in
> the format used by many old programs.
> SELECT a,b,a+b INTO OUTFILE "/tmp/result.text"
> FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
> LINES TERMINATED BY "\n"
> >FROM test_table;
>
> HTH!
>
> Jay
>
>


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




Re: [PHP] Secure File Upload

2002-06-05 Thread andy

// original question:


 I would like to be able to really PREVENT uploads, let's say
> > bigger than 10 MB?!
> >
> Add this to your HTML form:
>
> 
>
> HTH



I tryed this, too. But this does not work at all! I use IE 5.5 and it did
not make any difference. Is there something else we have to take care off?

Andy








"Lowell Allen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > From: Christoph Starkmann <[EMAIL PROTECTED]>
> >
> > Hi There!
> >
> > When uploading a file with PHP, AFAIK I can only control what will be
stored
> > on the server. So if someone sends me 100 MB, these will be deleted
> > immediately. But, unfortunately, the traffic is produced nevertheless.
Is
> > there any way to check the file size before uploading the file or any
other
> > way to keep the traffic under a certain limit? Last think I would like
to
> > have is a script that disables all uploads after a certain traffic has
been
> > produced, I would like to be able to really PREVENT uploads, let's say
> > bigger than 10 MB?!
> >
> Add this to your HTML form:
>
> 
>
> HTH
>
> --
> Lowell Allen
>



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




[PHP] Converting non latin characters

2002-06-04 Thread Andy

Hi there,

I have a table containing cities of the world. Now I am running into
problems because people are starting to complain that some mayor cities are
not in the db like Tokyo. After checking my table I discovered that there
lots of cities are written with some non latin characters.

Tokyo is written like this: Tðkyð

Should, and if how, I convert this characters into latin ones. And what
happens if somebody from Japan with a different keyboard tries to find
Tokyo? Anyway what type of character is this 'ð' anyway? It does not look
Japanese to me :-)

Thank you for any help on that,

Andy


http://www.globosapiens.net
Global Travellers Network!



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




[PHP] date problem

2002-06-05 Thread andy

Hi there,

I would like to count the users out of a mysql db who registered after a
certain date.

The column I have in the db is a char and I do not want to change this
anymore.
This is how a typical entry looks like: May 29, 2002

This is how I tryed it:

// while '10...' is unix timestamp june 1, 02
SELECT COUNT(*) AS c
FROM users_table
WHERE UNIX_TIMESTAMP( user_regdate ) > '1022882400'

Thanx for any help on that,

andy





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




[PHP] Returnpath for mail

2002-06-06 Thread andy

Hi there,

I am wondering if it is possible to send email via the mail function with
lets say adress_1 and then if the recipient clicks on return he will adress
his email automaticly to adress_2.

I found this in my docs, but does not work though:

$mailHeaders .= "Return-Path: <".$adress_return.">\n";  // Return path for
errors

does anybody have an idea how to do that?

Thanx,

Andy



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




[PHP] Re: populating list menus with mysql and for statements

2002-06-09 Thread Andy

seperate your layers. Create a database, display and action layer. For
example:

include qry_users.inc;
include dsp_users.inc;

in qry_users.inc get your data and store them into an array var:

while($row->user)
user[] = $row->user;
}

Then in dsp_users get them out again:

foreach ($user AS $value)
echo $value;
}

Of course you have to built your code around the foreach in dsp_user;

Hope this helps

Andy

--

http://www.globosapiens.net
Global Travellers Network!





"Electroteque" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am populating a list menu with mysql , i would like to find a way to
> populate a form with more than one of the same list menus in a for loop
>
>  
>while ($sample = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
>$typeID=$sample["typeID"];
>$description=$sample["description"];
> $sample_type[$sample['typeID']] = $sample["description"];
> echo "\n$description";
> }
> ?>
> 
>
> i have this within a for loop but the list only shows up once and the
second
> one is empty because the select from the database is finished ,
>
> is there a way to put the information from mysql into arrays so i can use
it
> more than once and then i could do multiple populated list boxes ? let me
> know
>
>
>
>



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




[PHP] Re: MyCC Problem

2002-06-09 Thread Andy

maybe you do not have the propper rights set. Check your grant privillegs on
the db.

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"César l . aracena" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
002a01c20e80$743a3650$14ed0dd1@gateway">news:002a01c20e80$743a3650$14ed0dd1@gateway...
Hi all. I know that this isn't probably the best place to make this
question, but I uses that some of you uses MyCC to connect to a remote
MySQL DB. My connection is no problem, but when I issue a SQL command,
which tells the DB to INSERT multiple rows into one table, It gives me
an error every time. Imagine what it takes to pass a 1000 rows to the
"live" DB one each time. Does anyone who uses MyCC had this problem
before? Know how to solve this?

Thanks in advance,

Cesar <mailto:[EMAIL PROTECTED]>  Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621





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




[PHP] addslashes for db search?

2002-06-11 Thread andy

Hi there,

I have some db records starting with a ' E.g:  'Aimburu

Now I am wondering how to retrieve this records. without a addslashes it
returns an error. So I did add a slash, but then it does not find this
record.

I tryed this query:

...like '\'Aimburu %' ...

Do I have to change this db entries, and if how? How should they look like
and is there a good method to change all this thousands of records at once?

Thanx in advance,

Andy



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




[PHP] comparing strings does not work

2002-06-11 Thread andy

Hi there,

I would like to compare 2 strings.

I do always get a 0 return (not equal) but they are difinatelly equal,  I
double checked it. They are just in two different vars.

Here is how I did it:

 if (strcmp($city, $city_new) != 0) $error = true;

Does anybody see the error? Or am I going the wrong way?

Andy



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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy






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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy








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




[PHP] dumping only selected records into another table

2002-06-11 Thread andy

Hi there,

I have some data in one table which I have to move to another. No I thought
of a mysqldump with a where clause. The problem though is, that it also
tryes to insert the ID which is a autoinc. primary key and already in use by
another record. How can I produce a insert statement withouth the ID
included?

This is how I tryed it:
mysqldump -p "--where= country='us'" -t data beaches > beaches_us.sql

This is a line of output:
INSERT INTO beaches VALUES (2345,'Carrabelle Beach','US','9');

This is how I would like to have the output:
INSERT INTO beaches VALUES ('','Carrabelle Beach','US','9');

does anybody know how to do this?

Thanx for any help, Andy











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




[PHP] sending 1000 emails to subscribed members via php?

2002-06-12 Thread andy

Hi there,

I am wondering whats wrong with my php script. I am trying to write a
newsletter to 150 members. Therefore I did seperate the adresses with a ,
After about 1 minute php gave up telling me mail has failed.

Is there a restriction on sening mail via mail(xx) via php?

Anyway what do I do if I would have 1 members. This might take lots of
cpu?! So I would like to keep it via my webinterface, but be able to email
to all members.

Thank you for your advice guys,

Andy



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




[PHP] Re: sending 1000 emails to subscribed members via php?

2002-06-12 Thread andy

additional comment:

some did recieve the email, some did not.
does anybody know a good solution?

andy


"Andy" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there,
>
> I am wondering whats wrong with my php script. I am trying to write a
> newsletter to 150 members. Therefore I did seperate the adresses with a ,
> After about 1 minute php gave up telling me mail has failed.
>
> Is there a restriction on sening mail via mail(xx) via php?
>
> Anyway what do I do if I would have 1 members. This might take lots of
> cpu?! So I would like to keep it via my webinterface, but be able to email
> to all members.
>
> Thank you for your advice guys,
>
> Andy
>
>



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




[PHP] Re: more upload problem

2002-06-20 Thread Andy


i am getting the following warning message:

 Warning: Unable to open 'none' for reading: No such file or directory in
/z/mercury/www/data/content/admin/do_upload.php on line 40



Hi anil,

it seems to me that you are not getting the filename. Check if the filename
which comes from your form is available.
Maybe you spitched to php > 4.2 where you have to deal different with vars
and always have to know where they come from. Try to echo the name out.

Hope this helps,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"Anil Garg" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:022b01c21872$19c64dc0$[EMAIL PROTECTED]...
> Hi,
>
> i am getting the following warning message:
>
> Warning: Unable to open 'none' for reading: No such file or directory in
> /z/mercury/www/data/content/admin/do_upload.php on line 40
>
> As this warning comes when the file is not uploaded to the tmp direcotry
can
> anyone plz tell me what are the cases due to which a file cannot be
uploaded
> to the tmp directory??( size doesnt seem to be the problem here as its
> uploading some files larger than the one which giving this erro)
>
> thanx
> anil :)
>



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




[PHP] Re: How to remove the first element of an array?

2002-06-20 Thread Andy

Hello Leon,

try array_shift

http://www.php.net/manual/en/function.array-shift.php

Hope this helps,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"Leon Mergen" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> Hello,
>
> I would like to know what the best (and fastest) way to remove the first
> element of an array is?
>
> So actually, I want $array[0] removed, and $array[1] to become 0,
$array[2]
> to become 1, etc etc...
>
>



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




[PHP] Re: JPGrapgh and GD Library SAMBAR server

2002-06-20 Thread Andy

Hi Christopher,

it seems to me that you have gd1.8 enabled but jdgraph in you version
requires gd2.

Check your php.ini if the propper library is activated.

Hope this helps,

Andy
--

http://www.globosapiens.net
Global Travellers Network!



"Christopher J. Crane" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> I recently installed and got working the GD library under a Windows 2K
> server running SAMBAR server as the web server. I got a simple test script
> to try to be sure the GD Library was working and it is and I am able to
> output images in PNG JPEG and GIF formats.
>
> My problem is that I can not get the JPGraph scripts running correctly. I
> get error messages such as:
> Warning: Undefined index:  gd2 in ../jpgraph.php on line 3418
>
> Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
>
> Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
>
> Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
>
> Warning: Undefined index:  gd2 in ../jpgraph.php on line 3343
>
> Warning: Cannot add header information - headers already sent by (output
> started at ../jpgraph.php:3418) in ../jpgraph.php on line 4257
> ?PNG
>
> I am not sure what I am doing wrong. I would like to use JPGraph because
of
> the nice graphs I have seen on his website. Any help would be great.
>
>



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




[PHP] Re: Using PHP and Apache's .htaccess files.

2002-06-20 Thread Andy

hello Todd,

there is a directive where you can redirect errors to certain pages withhin
the htaccess file.

I do not remember the exact syntax, but it looked like...

ErrorDocument 401 /root/to/your/file.html

Please check the apache docs it this does not work.

Andy


--

http://www.globosapiens.net
Global Travellers Network!



"Todd Fernandes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
001001c2188d$9614b4f0$[EMAIL PROTECTED]">news:001001c2188d$9614b4f0$[EMAIL PROTECTED]...
> Here is my question. It involves using PHP and apache's .htaccess files.
>
> What I basically want to know is, how do I redirect a bas user after a
> failed Authentication attempt.
>
> Example:
> One PHP script checks to see if $PHP_AUTH_USER is set and if not calls
> header( sprintf("WWW-authenticate: basic realm=\"%s\"", $g_auth_realm ));
> header( "HTTP/1.0 401 Unauthorized" );
>
> to get them to provide a username and password. Now, how to I check that
> against the .htaccess and .htpasswd files I have in a subdirectory below
the
> script.
>
> The way I have it working now is that I check to see if $PHP_AUTH_USER is
> set, and if it is, I send them to the page that is a directory down behind
> the .htaccess file. Working that way, if they are an invalid user, they
are
> prompted again, if they hit cancel, they get the 401 page. I want to give
> them a custom error message instead of the generic 401 page.
>
> Any ideas on how to avoid the 401 page?
>
> Thank you,
> Todd
>



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




[PHP] Architecture problem? Google want index files exept the main page.

2002-06-20 Thread Andy

Hi guys,

I did recently launch my first web site and I am asking myself why google is
only indexing the first page.
To get a better index on other search engines I am passing parameters a bit
strange and the dynamic pages
look more like static ones. So I hope this was not a shoot in a hole :-(

I am getting the parameters from the url and decode them after a certain
key. The file looks to the visitor like
it is a directory while I am forcing apache to parse it with php.

So this is the first day google is indexing it, but as I said I tryed to
search the site with google site search and it
does only find the first page.

A site like:
http://www.globosapiens.net/profiles/A002021.html

is not indexed at all!!

Did I go the wrong path, or what else is going on? Thank you for any help,

Andy

--

http://www.globosapiens.net
Global Travellers Network!






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




[PHP] Re: How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Andy


But i want to show my own message to the user for
this error .
http://www.globosapiens.net
Global Travellers Network!



"Jack" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Dear all
> i made a Registration Form for user to input their Data, but i also had
some
> Field Check before the data can be insert to the Mysql_Database!
> I had a question here, sometime the mysql shows the error :
> "Duplicate Key for xxx"
> I know what is this about, reguarding to my Registration Form, it mean the
> Login Name is Duplicated! But i want to show my own message to the user
for
> this error instead the Mysql Error! It is meanness to show User the Mysql
> Error, cause they won't understand it!!!
>
> Could Someone pls tell me how i can do this?
>
>
> --
> Thx a lot!
> Jack
> [EMAIL PROTECTED]
>
>



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




[PHP] Re: Mysql Insert from select problem with php

2002-06-20 Thread Andy

why don't you do a quick fix and just add addslashes again if obviously
there is no escap slash present right now?

Good luck,

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"David McInnis" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
005001c218e8$699e0c40$221d7041@bigdaddy">news:005001c218e8$699e0c40$221d7041@bigdaddy...
> After posting this on the MySQL list and getting some feedback we were
> able to determine that this was not a flaw with MySQL.  Any ideas from
> the PHP community?
>
> ===
>
> Can anyone tell me why this does not work?  I am using php and mysql.
>
> When I do an insert from select into a mysql table I get an error
> whenever a value from the select portion of the query contains an
> apostrophe.  Before I insert the initial value I use the php
> addslashes() function to escape the ' and " characters.
>
> For example:
>
> If clients table contans a field called fname and it has a value of
> "O'Henry".  Remembering that I have used addslashes() before inserting
> the value into mysql in the first place.
>
> The following query will fail on insert:
>
> Sql = "insert into orders (fname) SELECT fname from clients where
> clientid = '$clientid'";
>
>
> David McInnis
>
>



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




Re: [PHP] Architecture problem? Google want index files exept the main page.

2002-06-21 Thread Andy

Hi,

I am not using a 404 in this case. What I do is to name a file like a
directory name and then parse this file with php. The parameters look like
the filename.

e.g. server.com/file/parameter.html

In an other case I do use a 401 error. What is changing if I send this ok
header? And when should I send it?

Andy


--

http://www.globosapiens.net
Global Travellers Network!



"Olinux" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Are you using a 404 error to generate those deeper
> pages?
>
> If so you will want to send an OK header:
>
> header('HTTP/1.1 200 OK');
>
> olinux
>
>
> --- Andy <[EMAIL PROTECTED]> wrote:
> > Hi guys,
> >
> > I did recently launch my first web site and I am
> > asking myself why google is
> > only indexing the first page.
> > To get a better index on other search engines I am
> > passing parameters a bit
> > strange and the dynamic pages
> > look more like static ones. So I hope this was not a
> > shoot in a hole :-(
> >
> > I am getting the parameters from the url and decode
> > them after a certain
> > key. The file looks to the visitor like
> > it is a directory while I am forcing apache to parse
> > it with php.
> >
> > So this is the first day google is indexing it, but
> > as I said I tryed to
> > search the site with google site search and it
> > does only find the first page.
> >
> > A site like:
> >
> http://www.globosapiens.net/profiles/A002021.html
> >
> > is not indexed at all!!
> >
> > Did I go the wrong path, or what else is going on?
> > Thank you for any help,
> >
> > Andy
> >
> > --
> > 
> > http://www.globosapiens.net
> > Global Travellers Network!
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com



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




[PHP] Re: emailing html file

2002-06-23 Thread Andy

you can do this with the regular mailfunction.

Take a look at http://www.php.net/mail

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"M.E. Suliman" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000b01c219b8$afb448e0$13b81fc4@b1s0n2">news:000b01c219b8$afb448e0$13b81fc4@b1s0n2...
> Hi
>
> I've created a form and a bit of code that processes the form and directs
to
> a confirmation page asking the user to confirm if the details they entered
> are correct.  Once they hit the confirm button how would I send that
> confirmation page as an html file attached to their email.  I know its got
> something to do with MIME email but not too sure.
>
> Thanks in advance
>
> Mohamed
>
>



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




[PHP] Re: Help with e-mail form with server-side written in php?

2002-06-26 Thread Andy

you should consider that not everybody has enabled JS. Always double check
with php before you add data or send it via mail. Maybe some people just hit
the send button without filling in anything.

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"Chris Hounsell" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I seem to be having an issue with an e-mail form that I have created for
> registration purposes with the server-side being written in PHP!  I've
> tested the e-mail form using numerous browsers and operating systems
> including Microsoft, Netscape, Unix, and Linux!  Everytime I test the
form,
> it works just fine.  I have even had other individuals located in
different
> geographical locations register using my form and it works just fine.
> However, I do receive totally blank forms from time to time and I have no
> idea why.  Even the javascript that I have written to fill in fields
> automatically such as a date field and a registration fee field are coming
> back blank.  These are two fields that even the the user can't erase.
>
> The form is hosted on a unix server and everytime I test it, it works just
> fine.  I've tested the form on a IIS server and an apache server and it
> works just fine.  I just can't figure out why I get back some blank
> registration forms.  Maybe it has something to do with the user's side!
>
> Any help or better direction for my message would be much appreciated!
>
> Thanks,
> Chris Hounsell
>
>
> --
>
> -
> Chris Hounsell
> "Memorial University Career Fair 2002" Co-ordinator
> Co-operative Education Services Centre, B1015
> Memorial University of Newfoundland
> Telephone: (709) 737-4825
> Fax: (709) 737-8960
> E-mail: [EMAIL PROTECTED]
> Web: www.mun.ca/ccd/careerfair/
>
>



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




[PHP] Re: logging onto phpmyadmin

2002-06-26 Thread Andy

Hello Phil,

you have to change the file config.inc (or similar name) and change your
password there. Check the docu for phpmyadmin.
Of course other people can access this webinterface as long as you give them
the password and they have netaccess. you might want to give them different
rights. This can be easily done with this programm. Again.. check the docs
which come with it.

Andy

--

http://www.globosapiens.net
Global Travellers Network!



"Phil Schwarzmann" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> now that I put a root password on mysql, I can no longer log onto
> phpmyadmin.  It mentions something about the lib.inc file, it looks like
> I need to edit the file and add in my new username/password.  But when I
> open lib.inc, it looks like a bunch of garbage on the screen, it's not
> normal text.  What am I doing wrong.
>
> Also, I want to allow other users to connect to phpmyadmin from remote
> locations.  Is there a way to do this or do I need to write a little PHP
> script that allows them to log on?
>
> Thanks!!!
>



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




[PHP] rar error in session management

2002-06-26 Thread Andy

Hi there,

I have written an own session management. Workes fine, but recently after
more people signed up there has appeared an error. In some cases when people
submit reports the userID cant be filtered out of the database (there is a
special table handliing the sessions) There session seems still to be valid,
just the user id is lost. The session id is stored in a cookie and the
cookie expires after the user is closing the browser. Session life time is
handeled server site.

It always works for me and the rest of the community. There are just a few
folkes who are able to submit a report without their user id.

Has anybody an idea how I can track this error? I tryed to reproduce it and
did try it on several systems, but I have not been successfull so far.

Thank you for any help on that,

Andy



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




Re: [PHP] saving temporary image to database

2002-06-29 Thread andy

... sorry I thought it would be to much code.
Here is the complete code :

  $inputImg = ImageCreateFromJPEG($picture_location);

  # old size
  $srcX = imagesx($inputImg);
  $srcY = imagesy($inputImg);

   # new size
   $ratio = ($srcY / $dstY);
   $dstX = ($srcX / $ratio);

   $outputImg = ImageCreateTrueColor($maxX, $dstY);
   imagefill($outputImg, 0, 0, ImageColorAllocate($outputImg, 0, 0,0));
   imagecopyresampled($outputImg, $inputImg, (($maxX - $dstX) / 2),0,0,0,
$dstX, $dstY, $srcX, $srcY);

#
 # save image to db into blob

// this does not work (outputImg is a the colorcorrected file)
   $data = addslashes($outputImg);

 // this one would work
# $data = addslashes(fread(fopen($picture_location, "r"),
filesize($picture_location)));

  $stmt ="
INSERT INTO test.picture_test
(file_name, file_type, picture)
VALUES
 ('$name', '$picture_location_type', '$data')
  ";
   execute_stmt($stmt, $link);
  #


"Rasmus Lerdorf" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> There is no imagejpeg() call in the code snippet you provided.  And you
> don't say how it is failing.  You haven't provided us with enough data to
> answer this question.
>
> -Rasmus
>
> On Sat, 29 Jun 2002, andy wrote:
>
> > Hi there,
> >
> > I would like to save a jpg into a blob field of mysql. The function
> > underneath works fine if I read the image from the temporary destination
> > where php did put it after uploading.
> >
> > My problem is, that I would like to do some funky stuff to the image
like
> > changing colors or adding watermarks. So I have several functions ahead
> > before I used to store them successfully to the file system. Now I would
> > like to store it to a blob field, but this does not work. Like I said it
> > works to store the temp file, but not the other one. I guess it has to
do
> > with something regarding the imagejpeg function.
> >
> > Here is what I tryed:
> >   #
> ># save image to db into blob
> >
> >// this does not work (outputImg is a the colorcorrected file)
> >  $data = addslashes($outputImg);
> >
> > // this one would work
> ># $data = addslashes(fread(fopen($picture_location, "r"),
> > filesize($picture_location)));
> >
> >   $stmt ="
> >INSERT INTO test.picture_test
> >     (file_name, file_type, picture)
> > VALUES
> > ('$name', '$picture_location_type', '$data')
> >   ";
> >   execute_stmt($stmt, $link);
> >   #
> >
> > Maybe some of you guy has a good idea on that.
> >
> > Thanx for any help,
> >
> > Andy
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
--
--
http://www.globosapiens.net
Global Travellers Network



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




[PHP] blob versus file

2002-07-01 Thread andy

Hi there,

I am wondering if anybody has experiance in saving images to blob in mysql.

I do save images with 1 K and 4 KB to blob fields while I used to save them
to file. It seams to me that this is much slower accessing the files. The
images take a bit (really short but absolutly noticable) to show up on the
site. Is there a way to improve the performance, and why is this happening?
I thought the performance might even boost after storing them to blobs.

Thank you for any comments on that,

Andy

PS: I was planing to store all the other images (20 - 50 KB) to blobs as
well (thousands) but after this first experiance I am a bit confused if the
performance would even more suffer. Would you guys recommend this?



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




[PHP] Re: blob versus file

2002-07-01 Thread Andy

that sound verry logical. It seams that most of you are absolutly sure that
saving images to the OS FS is way faster than to blob in mysql.

The main reason why I am trying to do so is because I would like to seperate
my application from the content. Whenever I make an update of the
application I have to move around files which are in a data folder inside
the application. So I was searching for a way to avoid this and keep the
data untouched.

Maybe someone knows a better way to do that?

Thanx for your help guys,

Andy

- Knud I thought this might be of interest for u 2


"Richard Lynch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:20020701232018.VNIV6023.sccrmhc02.attbi.com@[192.168.1.103]...
> >I do save images with 1 K and 4 KB to blob fields while I used to save
them
> >to file. It seams to me that this is much slower accessing the files. The
> >images take a bit (really short but absolutly noticable) to show up on
the
> >site. Is there a way to improve the performance, and why is this
happening?
>
>
> The file system will almost certainly be *WAY* faster than MySQL.
> (I'm sure somebody can come up with a two-tier system with burning fast
> MySQL and dog-slow hard-drive on the HTTP server, but... let's be real
> here...)
>
> If the images are "too slow" you need to look at your BANDWIDTH, the HTTP
> server speed, and the hard drive speed, and the caching system of the OS.
>
> Moving the images into MySQL is unlikely to really solve any of these.
>
> You could run a quick test, though, in about 15 minutes of work, with a
> single image, just to be sure.
>
> --
> Like Music?  http://l-i-e.com/artists.htm

Not really, the OS filesystem contains features that makes it always faster
than a sql query, that will increase your network traffic too.

Inserting images or whatever binary data in a database does not have much
sense, you could not do a query with this field, cannot be indexed (dunno if
exists a DB that implement a image indexer ;) ). Storing relative pathes
gave me always more portabilities between DBM.

In some case, you have to insert images (or every others binary data) in DB
(due to global permissions system only avaible for the DB and not for the
filesystem, for example), but as far is possible, I avoid to do it so.

IMHO :)

pa



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




Re: [PHP] Re: [PHP-DB] blob versus file

2002-07-01 Thread Andy

i also noticed that the images are not cached at all. The other images
comming from the FS are cached just fine. Do u think thats because of the
blob?

Andy


"Mark" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Mon, 1 Jul 2002 14:20:30 +0200, Pierre-Alain Joye wrote:
>On Mon, 1 Jul 2002 14:17:53 +0200
>"andy" <[EMAIL PROTECTED]> wrote:
>
>>Hi there,
>>
>>I am wondering if anybody has experiance in saving images to blob
>>in mysql.
>>
>>I do save images with 1 K and 4 KB to blob fields while I used to
>>save them
>>to file. It seams to me that this is much slower accessing the
>>files. The
>>images take a bit (really short but absolutly noticable) to show up
>>on the
>>site. Is there a way to improve the performance, and why is this
>>happening?
>>I thought the performance might even boost after storing them to
>>blobs.
>
>Not really, the OS filesystem contains features that makes it always
>faster than a sql query

not necessarily for small files like he's talking about. it depends
on the fs but I would guess they'd be pretty close.

>that will increase your network traffic too.

only if the db is accessed across a network (he didn't say it was)

>Inserting images or whatever binary data in a database does not
have>much sense, you could not do a query with this field, cannot
be>indexed (dunno if exists a DB that implement a image indexer ;) ).

the blob field can't be indexed but others (id, filename, keywords,
caption etc..) can, there's lots of cases where it makes sense to put
images in a database.

if I had to guess the problem I'd say its either
1) the db is across a network like you said
or (more likely)
2) you need to create an index on the table. try running the query
manually and see how long it takes to get a result set. when you get
it down to .01 seconds you;re in good shape
hth,




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




[PHP] Re: [PHP-DB] blob versus file

2002-07-01 Thread Andy

is the increase of the network traffic noticable? The query is pretty small
just text. Do u really think this might increase the traffic?

I also noticed that the image is not cached anymore. Is this true for all
blobs, or do I just access them in a wron way?
(I am requesting a php file in the  schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Mon, 1 Jul 2002 14:17:53 +0200
> "andy" <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
> >
> > I am wondering if anybody has experiance in saving images to blob in
mysql.
> >
> > I do save images with 1 K and 4 KB to blob fields while I used to save
them
> > to file. It seams to me that this is much slower accessing the files.
The
> > images take a bit (really short but absolutly noticable) to show up on
the
> > site. Is there a way to improve the performance, and why is this
happening?
> > I thought the performance might even boost after storing them to blobs.
>
> Not really, the OS filesystem contains features that makes it always
faster than a sql query, that will increase your network traffic too.
>
> Inserting images or whatever binary data in a database does not have much
sense, you could not do a query with this field, cannot be indexed (dunno if
exists a DB that implement a image indexer ;) ). Storing relative pathes
gave me always more portabilities between DBM.
>
> In some case, you have to insert images (or every others binary data) in
DB (due to global permissions system only avaible for the DB and not for the
filesystem, for example), but as far is possible, I avoid to do it so.
>
> IMHO :)
>
> pa



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




[PHP] storing content data outside the application

2002-07-02 Thread Andy

Hi there,

I have a problem with content data. Currently I do store images inside a
data folder.
/data

This is causing a problem, because everytime I installan update of the
application on the server I have to move this folder around to the new
version of my application. I am worried that during this coppy an error will
apear, due to my fault, or whatever might happen. The immages are part of a
dataset stored in a mysqldb. So I tryed to store them to blobs, but this is
causing performance problems. Images apear much quicker while comming from
the filesystem. They also seem not to be cached by the client anymore.

Does anybody know a good method to store the images outside the rootfolder
and still access them the old fashion way?

Any suggestions are appreciated.

Thanx, Andy






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




[PHP] returning more than 1 value from function

2002-07-04 Thread andy

hi there,

i am wondering if it is possible to return more than 1 value from a
function?

something like

test(){
return $value1, $value2
}

Thanx for any help,

Andy



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




[PHP] resizing images comming out of blobs

2002-07-04 Thread andy

Hi there,

I am wondering how to resize an image which is stored in a mysql blob field.

With files this workes just fine, but how to do this with the image comming
from blob? Has anybody done this already?

Thank you for any help on that,

andy



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




[PHP] inserting linebrakes in multisite forms

2002-07-07 Thread andy

He everybody,

I am wondering how to insert the linebrakes into mulitsite forms.

Example:
One Form has a textfield, I submit it to another html site where there is
another form with a textfield. Inside this textfield I place a hidden field
with the value of the field from page 1 then I submit to the actual php site
inserting the values into a db.

at this point I do insert the linebrakes (nl2br) but only the field from
page 2 is really stored with linebrakes the other one is not. How come?

Has anybody a good idea or even know how to do this?



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




[PHP] transporting variable via post to another site

2002-07-07 Thread andy

Hi there,

I do have a multisite form. There are several fields on page 1 and several
on page 2.

Everything works fine exept of error handling. Which means if a user wants
to go back from step 2 to one and has already filled in some data in site 2
he will loose this data for sure. It is not possible to transport the data
via get anymor because the text is way to long.

So how could this be done with post? I tryed to include a hidden text field,
but since this must be another form (action links to page 1) I can't get the
value of the entered data.

Has anybody a good idea, or even experiance in this?

Thanx,

Andy





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




Re: [PHP] transporting variable via post to another site

2002-07-07 Thread andy

sorry maybe I did explain it not good enough.

The problem is that if a user has entered data in form 2 goes back to form 1
and forward to form 2 again, the data he entered once in form 2 is lost. And
I do not find a way how the get the data out of form 2 because the back
button is placed in form 3 (same site as form2 ) to allow a different action
since we have to link to another site then in form 2.

sounds confusing? I know but I hope I explained it ok

Andy


- Original Message -
From: "Alberto Serra" <[EMAIL PROTECTED]>
Newsgroups: php.general
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, July 07, 2002 1:21 PM
Subject: Re: [PHP] transporting variable via post to another site


> ðÒÉ×ÅÔ!
>
> andy wrote:
> > Everything works fine exept of error handling. Which means if a user
wants
> > to go back from step 2 to one and has already filled in some data in
site 2
> > he will loose this data for sure. It is not possible to transport the
data
> > via get anymor because the text is way to long.
>
> Okay, this means Form 1 can be entered from two directions:
>1) the usual sequence (that is, the way users usually get to it)
>2) getting back from Form 2
>
> If you place a button on Form2 saying "go back to form 1" when your user
> presses it just post your current data back to the script of form1.
> *PLUS* you add a hidden field called *FLAGBACK* (or whatever you want to
> call it like.
>
> when the script that prepares form1 is called it must check for
> *FLAGBACK* being present. If not, it will do the same old stuff, if yes
> you just write a new branch that will put the data back into form 1. Easy.
>
> *BUT* all this will never protect your user in case he just presses
> *back* on his browser. Make sure this is well explained on the page.
>
> ÐÏËÁ
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
>
> --
>
>
> @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is...
>


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




Re: [PHP] inserting linebrakes in multisite forms

2002-07-07 Thread andy

Hi alberto,

I did try this out, but somehow this happens:

text br / br / text in new line

br/ is exacly where the linebrakes should be, but instead it is typed on
screen.

Is there a solution for this?

Andy

"Alberto Serra" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ðÒÉ×ÅÔ!
>
> andy wrote:
> > One Form has a textfield, I submit it to another html site where there
is
> > another form with a textfield. Inside this textfield I place a hidden
field
> > with the value of the field from page 1 then I submit to the actual php
site
> > inserting the values into a db.
>
> So, let's see if I got you right:
>
> Form 1: a textfield, you submit it to another page (no matter whether it
> is on the same host or not, this should not make any difference)
>
> Form 2 contains:
>1) a hidden field with the value from form 1
>2) another text field for new user input
> You submit form 2 and nl2br does not work on the values of the hidden
> field. Right?
>
> If that is so it's simply because once the value gets put in
> form2/field1 it has already lost the new lines.
> So you should run nl2br on it *before* it gets submitted the second
> time. Do it when you send the value to form2.
>
> ÐÏËÁ
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
>
> --
>
>
> @-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@-_=}{=_-@
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is...
>



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




[PHP] Re: Storing images in MySQL bad idea, performance-wise?

2002-07-08 Thread Andy

if the images are not to big I would recommend saving them to blobs. It
saves you a lot of work, since you have to think about lots of stuff. Even a
garbage collector should be programmed since there is not a transaction
possibility between FS and DB.


Andy



"René fournier" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I'm working on a simple content management system that uses PHP and
MySQL for updating a web site's text (stored in a MySQL database). (The
PHP scripts that do the updating (my stuf) live on one web server, the
actual DB data to be updated (my client's stuff) live on another.) So
far, I've only had to he able to update the text content of a
site--therefore, I've only had to bother to store textual data in the
client's DB. But now the client wants to be able to upload/change/delete
certain pictures on their web site--using my CMS tool--so I am faced
with the following problem:

Do I store all such images in the DB? (Which I understand reduces
performance.)

Or do I--somehow--store the images as files on the client's web server?
And if so, how? (Because my PHP scripts are being executed on a
different server.)

...Rene

---
René Fournier,
[EMAIL PROTECTED]

Toll-free +1.888.886.2754
Tel +1.403.291.3601
Fax +1.403.250.5228
www.smartslitters.com

SmartSlitters International
#33, 1339 - 40th Ave NE
Calgary AB  T2E 8N6
Canada




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




[PHP] banner rotation and advertisement

2002-07-09 Thread Andy

Hello everybody:

sorry for this kind of off topic question. I hope that someone might point
me into the right direction.

I am operating a web portal and think about advertisement. Unfortunatelly I
do not have any idea how to start this. First off all how does the client
know how many banner views happend? I mean there must be a system which is
proving how often. And second off all how to find the right sponsors fitting
to the site.

Maybe someone knows a third party company which does this for a fee.

Has anybody a good hint?

Thank you in advance.

Andy



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




  1   2   3   4   5   6   7   8   >