[PHP] doubt regarding link

2006-02-25 Thread suresh kumar
i am having  back to home link ,by default its status is 0 in "mail table " 
database  .when any user click the  back to home link.i want to change status 
=1 in user table.is there any possible to call php function in javascript.i am 
using javascript onclick function.but javascript is not support to access DB.i 
am calling php function from javascript.but its not working.i am waiting for ur 
response.
   


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] Re: PHP Manual in PDF format

2006-02-25 Thread zerof

Kaushal Shriyan escreveu:

Hi ALL
I am looking out for PHP Manual in PDF Format
Thanks in Advance
Regards


http://dev.mysql.com/doc/
-
zerof

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



[PHP] RSS / XML

2006-02-25 Thread Gustav Wiberg

Hi there guys!

Where is a good startpoint for learning XML Reader on a very, very basic 
level? (I appreciate links)

Is RSS a technique for retrieving XML? I can't clue the pieces together...

/G

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



[PHP] Re: PHP Manual in PDF format

2006-02-25 Thread zerof

zerof escreveu:

Kaushal Shriyan escreveu:

Hi ALL
I am looking out for PHP Manual in PDF Format
Thanks in Advance
Regards


http://dev.mysql.com/doc/
-
zerof

---
Ops... sorry!
http://www.php.net/docs.php

zerof

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



[PHP] How can I make postgre execute file with SQL code, on windows platform

2006-02-25 Thread Bogdan Ribic

Hi all,

  I need to synchronize two postgresql servers, but synchronization is 
one-directional (ie, data from one computer needs to be copied to 
another). Basically, I want the target computer to drop the schema 
"public" and then re-create it from my dump made on the source machine. 
Is there an easy way to do it from PHP, perhaps using some postgre 
utility via system() call ?


Boban.

--

   Open source PHP code generator for DB operations
   http://sourceforge.net/projects/bfrcg/

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



[PHP] Re: doubt regarding link

2006-02-25 Thread El Bekko

suresh kumar wrote:

i am having  back to home link ,by default its status is 0 in "mail table " 
database  .when any user click the  back to home link.i want to change status =1 in user 
table.is there any possible to call php function in javascript.i am using javascript 
onclick function.but javascript is not support to access DB.i am calling php function 
from javascript.but its not working.i am waiting for ur response.
   



-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
Try using the link type yourpage.php?status=1 and on your home page put 
this check in:


if(isset($_GET['status']))
{
if(intval($_GET['status']) == 1)
{
// Your Query
}
}


Should do it =)

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



[PHP] How do I read Exif data without a file?

2006-02-25 Thread Niels
Hi,

I have some images in a database -- I mean, the actual data. There are no
files.

I want to read Exif data for these images, but the read_exif_data() function
wants a file. I suppose I could write the images to temp files, but that's
a bit wasteful. And where would I write them? Is there a folder I can count
on being allowed to write to?

Thanks,
Niels

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



Re: [PHP] email to db

2006-02-25 Thread Mark Charette

chris smith wrote:

On 2/25/06, Mark <[EMAIL PROTECTED]> wrote:
 
Does anyone know if its possible or how difficult it would be to have 
a user
send an email from outlook express to a websites mysql database and 
update

records.



You could write a script to parse the email and do the update. It
would come in on 'stdin'.
  
Essentially how I do it for customers that want to update content on 
their website and how I add messages from a few mailing lists (Klarinet, 
Doublereed, Clair) I run into a database so they can be browsed and 
later indexed by swish-e.


I use qmail & add aliases; "[EMAIL PROTECTED]" executes backup 
"page" and parse email/update "page", "[EMAIL PROTECTED]" 
restores to the previous page. Similar thing for the lists - sanitize 
"From:" address, insert into database with From, Date, Subject, Body.


Mark C.
Woodwind.Org, Inc.

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



[PHP] Re: How do I read Exif data without a file?

2006-02-25 Thread Niels
On Saturday 25 February 2006 16:36, Niels wrote:

> Hi,
> 
> I have some images in a database -- I mean, the actual data. There are no
> files.
> 
> I want to read Exif data for these images, but the read_exif_data()
> function wants a file. I suppose I could write the images to temp files,
> but that's a bit wasteful. And where would I write them? Is there a folder
> I can count on being allowed to write to?
> 
> Thanks,
> Niels

Answering myself: I solved this with tempnam(). I'm not completely sure
about the portability, and of course it's a waste to write a file at all.
And it could pose a security problem as well. Ho hum.

//Niels

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



[PHP] Re: How can I stop PHP from resolving symlinks?

2006-02-25 Thread James Benson

is_link() perhaps ?



http://php.net/is_link



James

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



RE: [PHP] RSS / XML

2006-02-25 Thread Weber Sites LTD
Here are a few (from easy to hard)

Parsing XML With DOMXML And PHP
http://www.weberdev.com/ViewArticle-158.html

Converting XML Into a PHP Data Structure
http://www.weberdev.com/ViewArticle-389.html

Building XML Trees with PEAR's XML_Tree Class
http://www.weberdev.com/ViewArticle-345.html

Building XML Web Services with PHP NuSOAP
http://www.weberdev.com/ViewArticle-336.html

Serializing XML With PHP
http://www.weberdev.com/ViewArticle/450 

Injecting XML Content Into Page Templates With patXMLRenderer 
http://www.weberdev.com/ViewArticle/441

berber
-Original Message-
From: Gustav Wiberg [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 25, 2006 2:55 PM
To: PHP General
Subject: [PHP] RSS / XML

Hi there guys!

Where is a good startpoint for learning XML Reader on a very, very basic
level? (I appreciate links) Is RSS a technique for retrieving XML? I can't
clue the pieces together...

/G

--
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] RSS / XML

2006-02-25 Thread Gustav Wiberg
- Original Message - 
From: "Weber Sites LTD" <[EMAIL PROTECTED]>
To: "'Gustav Wiberg'" <[EMAIL PROTECTED]>; "'PHP General'" 


Sent: Saturday, February 25, 2006 7:37 PM
Subject: RE: [PHP] RSS / XML



Here are a few (from easy to hard)

Parsing XML With DOMXML And PHP
http://www.weberdev.com/ViewArticle-158.html

Converting XML Into a PHP Data Structure
http://www.weberdev.com/ViewArticle-389.html

Building XML Trees with PEAR's XML_Tree Class
http://www.weberdev.com/ViewArticle-345.html

Building XML Web Services with PHP NuSOAP
http://www.weberdev.com/ViewArticle-336.html

Serializing XML With PHP
http://www.weberdev.com/ViewArticle/450

Injecting XML Content Into Page Templates With patXMLRenderer
http://www.weberdev.com/ViewArticle/441

berber
-Original Message-
From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 25, 2006 2:55 PM
To: PHP General
Subject: [PHP] RSS / XML

Hi there guys!

Where is a good startpoint for learning XML Reader on a very, very basic
level? (I appreciate links) Is RSS a technique for retrieving XML? I can't
clue the pieces together...

/G

--
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


Thanx!

/G 


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



[PHP] PHP upgrade on Go Daddy virtual server

2006-02-25 Thread Nicolas Verhaeghe
Has anybody heard (or done it himself) how to upgrade PHP on a Go Daddy
virtual server?

Current version is 4.3.11 and I'd like to upgrade to 5.1.2.

All I know is that this server is a Red Hat Fedora 2.

I have SSH access and root as well.

Thanks for your help!

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



[PHP] Error compiling php 5.1.2

2006-02-25 Thread Paul Reinheimer
Hi, I'm trying to compile PHP 5.1.2.
My ./configure is:

'./configure' '--with-mysql=/usr/local/mysql'
'--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png'
'--with-zlib-dir=/root/zlib-1.2.2' '--enable-gd-native-ttf'
'--with-ttf' '--with-jpeg-dir=/usr/local/lib/jpeg-6b/'
'--with-freetype-dir=/usr/local/lib/freetype-2.1.9/'
'--with-xpm-dir=/usr/X11R6/' '--with-tidy' '--with-curl'
'--with-openssl=/usr/local/' '--enable-dba=shared' '--with-db4'
'--disable-eapi' '--with-xsl' '--enable-memory-limit'
'--with-libxml-dir=/usr/local/lib/'

make ends with

collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


anyone got any ideas, or hints on what information I should be giving
to make diagnosis easier/possible?



thanks
paul


--
Paul Reinheimer

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



[PHP] Expat + PHP Examples...

2006-02-25 Thread Gustav Wiberg

Hi there!

I've found out that I can use expat XML, but I can't figure out HOW to 
use... it seems simple, but I tried and can't figure it out...


I'd like to get retrieve info from
http://www.frisim.com/frisim/servlet/rss?searchString=google

and convert it to html...

I've read a lot a of text for Expat, but found no really good example (I 
found one at phpbuilder.com but with links that went to xml-files that 
didn't exists ):


Someone who have used expat.. ..and can give me a hint...

/G 


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



[PHP] defined

2006-02-25 Thread sub
I'm having kind of a weird problem I want $MailSubject to contain a the value 
"prayer" unless I tell it other wise. 

// on a form processor. 
$MailSubject = "Praise";
include_once("mailit.php");

// then in mailit.php
include "form2mail.php";

// and in formtomail.php
if(!defined($MailSubject)) // This is the problem line
{
   $MailSubject = "Prayer"; 
}

The problem I believe is with the defined function check. (I think) the value 
of $MailSubject is maintained to the end so I'm don't think it to be a scope 
issue, but also, if I don't assign a value to it it should be running the if() 
statement, but it's not. 

Any thoughts?


~Drew
www.drewpydraws.com


[PHP] not sure, what now

2006-02-25 Thread Schalk

Greetings All,

I am pretty new to PHP and are tasked to move a clients site from:

www.domain.com/somedirectory/home.php to www.home.php

Sounds simple at first but, when I moved the files to the root of the 
httpdocs I get an array of errors in the vain of:
*Warning*: main(): open_basedir restriction in effect. 
File(../inc/siteconfig.php) is not within the allowed path(s):
(/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in 
/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1


What exactly does this mean? I am sure there must be a config somewhere 
that has set it up to load from the sub directory and now it prevents it 
from loading from the root directory. Is this correct? What exactly does 
this error mean? Thanks to all!*

*

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



[PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread Chris Lott
I'm making the switch from Windows to Linux for mydesktop and
development environment and would greatly appreciate suggestions for
development tools on this platform. Ubuntu seems to be getting all the
press, but suggestions about Linux distributions are welcome as well!

c

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



Re: [PHP] Re: How do I read Exif data without a file?

2006-02-25 Thread chris smith
> > I have some images in a database -- I mean, the actual data. There are no
> > files.
> >
> > I want to read Exif data for these images, but the read_exif_data()
> > function wants a file. I suppose I could write the images to temp files,
> > but that's a bit wasteful. And where would I write them? Is there a folder
> > I can count on being allowed to write to?
> >
> Answering myself: I solved this with tempnam(). I'm not completely sure
> about the portability, and of course it's a waste to write a file at all.
> And it could pose a security problem as well. Ho hum.

You only need to do it once - then store it back in the database. That
info isn't going to change.

When you store the image in the database you can get the info and store it then.

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



Re: [PHP] Re: How do I read Exif data without a file?

2006-02-25 Thread Niels
On Saturday 25 February 2006 23:42, chris smith wrote:

>> > I have some images in a database -- I mean, the actual data. There are
>> > no files.
>> >
>> > I want to read Exif data for these images, but the read_exif_data()
>> > function wants a file. I suppose I could write the images to temp
>> > files, but that's a bit wasteful. And where would I write them? Is
>> > there a folder I can count on being allowed to write to?
>> >
>> Answering myself: I solved this with tempnam(). I'm not completely sure
>> about the portability, and of course it's a waste to write a file at all.
>> And it could pose a security problem as well. Ho hum.
> 
> You only need to do it once - then store it back in the database. That
> info isn't going to change.
> 
> When you store the image in the database you can get the info and store it
> then.

No, I can't. I've got some images, with exif information in the DB. I'm now
generating thumbnails for them, and also storing those in the DB. No files
at all, and therefore I can't read exif data for the thumbnails.

As I said I've solved the problem by writing a temporary file and reading
exif from that. Not pretty or efficient, but it works.


//Niels

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



Re: [PHP] not sure, what now

2006-02-25 Thread Rory Browne
On 2/25/06, Schalk <[EMAIL PROTECTED]> wrote:
>
> Greetings All,
>
> I am pretty new to PHP and are tasked to move a clients site from:
>
> www.domain.com/somedirectory/home.php to www.home.php

Is there a .php tld?



Sounds simple at first but, when I moved the files to the root of the
> httpdocs I get an array of errors in the vain of:
> *Warning*: main(): open_basedir restriction in effect.
> File(../inc/siteconfig.php) is not within the allowed path(s):
> (/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in
> /home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1
>
> What exactly does this mean? I am sure there must be a config somewhere
> that has set it up to load from the sub directory and now it prevents it
> from loading from the root directory. Is this correct? What exactly does
> this error mean? Thanks to all!*

Make a phpinfo file(google for phpinfo), and check it for a configureation
path. It will probably be something like /etc/php.ini or /etc/php/php.ini,
or /this/that/something/else/php.ini. Open up this php.ini file and check
for the open_basedir


Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread chris smith
On 2/26/06, Chris Lott <[EMAIL PROTECTED]> wrote:
> I'm making the switch from Windows to Linux for mydesktop and
> development environment and would greatly appreciate suggestions for
> development tools on this platform. Ubuntu seems to be getting all the
> press, but suggestions about Linux distributions are welcome as well!

That's a bit of a can of worms :) Everyone has different preferences.

Ubuntu or debian are good choices (ubuntu is kept more up to date, the
debian-stable branch only gets updated with security releases between
major versions).

Fedora is easy to use and set up.

They are both package based systems so unless you have a very specific
need from a package (eg with php you need the 'pcntl' functions) you
don't need to compile anything from source.

If you want to use a 'source package' system, I've been told Gentoo is
good (works much the same as freebsd) but I don't have any experience
with it.

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



Re: [PHP] Re: How do I read Exif data without a file?

2006-02-25 Thread chris smith
> >> Answering myself: I solved this with tempnam(). I'm not completely sure
> >> about the portability, and of course it's a waste to write a file at all.
> >> And it could pose a security problem as well. Ho hum.
> >
> > You only need to do it once - then store it back in the database. That
> > info isn't going to change.
> >
> > When you store the image in the database you can get the info and store it
> > then.
>
> No, I can't. I've got some images, with exif information in the DB. I'm now
> generating thumbnails for them, and also storing those in the DB. No files
> at all, and therefore I can't read exif data for the thumbnails.

So how do you GET the images into the database? from the filesystem
(whether you are uploading through a form or importing it, it's still
on the filesystem at some point). Generate the exif once (using your
tempnam workaround) then update the database.. so you only need to do
it once.

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



Re: [PHP] Re: How do I read Exif data without a file?

2006-02-25 Thread Niels
On Saturday 25 February 2006 23:55, chris smith wrote:

>> >> Answering myself: I solved this with tempnam(). I'm not completely
>> >> sure about the portability, and of course it's a waste to write a file
>> >> at all. And it could pose a security problem as well. Ho hum.
>> >
>> > You only need to do it once - then store it back in the database. That
>> > info isn't going to change.
>> >
>> > When you store the image in the database you can get the info and store
>> > it then.
>>
>> No, I can't. I've got some images, with exif information in the DB. I'm
>> now generating thumbnails for them, and also storing those in the DB. No
>> files at all, and therefore I can't read exif data for the thumbnails.
> 
> So how do you GET the images into the database? from the filesystem
> (whether you are uploading through a form or importing it, it's still
> on the filesystem at some point). Generate the exif once (using your
> tempnam workaround) then update the database.. so you only need to do
> it once.

I think you misunderstand the situation.

I've got a database of images (image data) and their exif data, I'm not
uploading any files. I want to make new entries in that DB, new images that
are thumbnails of the present images. I can do that without creating files,
but I can't get exif data of these thumbnails, because there are no files.
The exif data for the thumbnails isn't the same as for the full images.


//Niels

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



Re: [PHP] not sure, what now

2006-02-25 Thread chris smith
On 2/26/06, Schalk <[EMAIL PROTECTED]> wrote:
> Greetings All,
>
> I am pretty new to PHP and are tasked to move a clients site from:
>
> www.domain.com/somedirectory/home.php to www.home.php

If you're moving a clients site wouldn't your work be a better place
to ask? They will have processes etc to follow on how to do this and
will be able to help you a lot quicker than anyone here.

> Sounds simple at first but, when I moved the files to the root of the
> httpdocs I get an array of errors in the vain of:
> *Warning*: main(): open_basedir restriction in effect.
> File(../inc/siteconfig.php) is not within the allowed path(s):
> (/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in
> /home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1
>
> What exactly does this mean? I am sure there must be a config somewhere
> that has set it up to load from the sub directory and now it prevents it
> from loading from the root directory. Is this correct? What exactly does
> this error mean? Thanks to all!*

Open_basedir restricts where you can access files (see
http://www.php.net/features.safe-mode and search for 'open_basedir' to
tell you exactly what it does).

If you are in this folder:

/home/httpd/vhosts/domain.com/httpdocs

you are trying to include '../inc/siteconfig.inc.php'

so that means you are trying to access:

/home/httpd/vhosts/domain.com/inc/siteconfig.inc.php

which isn't in the open_basedir list (so php is stopping you).

Adjust the path to the 'siteconfig.inc.php' file and you should be right to go.

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



Re: [PHP] defined

2006-02-25 Thread Philip Hallstrom



I'm having kind of a weird problem I want $MailSubject to contain a the value 
"prayer" unless I tell it other wise.

// on a form processor.
$MailSubject = "Praise";
include_once("mailit.php");

// then in mailit.php
include "form2mail.php";

// and in formtomail.php
if(!defined($MailSubject)) // This is the problem line
{
  $MailSubject = "Prayer";
}

The problem I believe is with the defined function check. (I think) the 
value of $MailSubject is maintained to the end so I'm don't think it to 
be a scope issue, but also, if I don't assign a value to it it should be 
running the if() statement, but it's not.


Any thoughts?


Try...  if (empty($MailSubject)

-philip

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



Re: [PHP] defined

2006-02-25 Thread chris smith
On 2/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I'm having kind of a weird problem I want $MailSubject to contain a the value 
> "prayer" unless I tell it other wise.
>
> // on a form processor.
> $MailSubject = "Praise";
> include_once("mailit.php");
>
> // then in mailit.php
> include "form2mail.php";
>
> // and in formtomail.php
> if(!defined($MailSubject)) // This is the problem line
> {
>$MailSubject = "Prayer";
> }

As Philip said, try if (empty($MailSubject))

defined only checks constants:

';
} else {
  echo 'not found!';
}
?>

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



Re: [PHP] defined

2006-02-25 Thread sub
Well ain't that a kick in the pants? Works great now, thanks. And now I see
the difference between empty() and defined().

Again, many thanks,

~Drew
www.drewpydraws.com

- Original Message - 
From: "Philip Hallstrom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: 
Sent: Saturday, February 25, 2006 3:27 PM
Subject: Re: [PHP] defined


>
> > I'm having kind of a weird problem I want $MailSubject to contain a the
value "prayer" unless I tell it other wise.
> >
> > // on a form processor.
> > $MailSubject = "Praise";
> > include_once("mailit.php");
> >
> > // then in mailit.php
> > include "form2mail.php";
> >
> > // and in formtomail.php
> > if(!defined($MailSubject)) // This is the problem line
> > {
> >   $MailSubject = "Prayer";
> > }
> >
> > The problem I believe is with the defined function check. (I think) the
> > value of $MailSubject is maintained to the end so I'm don't think it to
> > be a scope issue, but also, if I don't assign a value to it it should be
> > running the if() statement, but it's not.
> >
> > Any thoughts?
>
> Try...  if (empty($MailSubject)
>
> -philip
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006
>
>

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



Re: [PHP] How can I make postgre execute file with SQL code, on windows platform

2006-02-25 Thread chris smith
On 2/26/06, Bogdan Ribic <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>I need to synchronize two postgresql servers, but synchronization is
> one-directional (ie, data from one computer needs to be copied to
> another). Basically, I want the target computer to drop the schema
> "public" and then re-create it from my dump made on the source machine.
> Is there an easy way to do it from PHP, perhaps using some postgre
> utility via system() call ?

err

pg_connect($connection_string);
pg_query("drop schema public");
...
import data
...

or am I missing something here?


You might be better of not doing this with php.

Create the dump on the first machine.
Copy the dump (scp, rsync, copy via samba-mounted drive, whatever)
import it

It depends what your end goal is.

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



Re: [PHP] Error compiling php 5.1.2

2006-02-25 Thread chris smith
On 2/26/06, Paul Reinheimer <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to compile PHP 5.1.2.
> My ./configure is:
>
> './configure' '--with-mysql=/usr/local/mysql'
> '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png'
> '--with-zlib-dir=/root/zlib-1.2.2' '--enable-gd-native-ttf'
> '--with-ttf' '--with-jpeg-dir=/usr/local/lib/jpeg-6b/'
> '--with-freetype-dir=/usr/local/lib/freetype-2.1.9/'
> '--with-xpm-dir=/usr/X11R6/' '--with-tidy' '--with-curl'
> '--with-openssl=/usr/local/' '--enable-dba=shared' '--with-db4'
> '--disable-eapi' '--with-xsl' '--enable-memory-limit'
> '--with-libxml-dir=/usr/local/lib/'
>
> make ends with
>
> collect2: ld returned 1 exit status
> make: *** [sapi/cli/php] Error 1
>
>
> anyone got any ideas, or hints on what information I should be giving
> to make diagnosis easier/possible?

Might be better to ask on the devel list, the developers will be able
to help you out better with this problem.

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



Re: [PHP] not sure, what now

2006-02-25 Thread Schalk

chris smith wrote:

On 2/26/06, Schalk <[EMAIL PROTECTED]> wrote:
  

Greetings All,

I am pretty new to PHP and are tasked to move a clients site from:

www.domain.com/somedirectory/home.php to www.home.php



If you're moving a clients site wouldn't your work be a better place
to ask? They will have processes etc to follow on how to do this and
will be able to help you a lot quicker than anyone here.

  

Sounds simple at first but, when I moved the files to the root of the
httpdocs I get an array of errors in the vain of:
*Warning*: main(): open_basedir restriction in effect.
File(../inc/siteconfig.php) is not within the allowed path(s):
(/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in
/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1

What exactly does this mean? I am sure there must be a config somewhere
that has set it up to load from the sub directory and now it prevents it
from loading from the root directory. Is this correct? What exactly does
this error mean? Thanks to all!*



Open_basedir restricts where you can access files (see
http://www.php.net/features.safe-mode and search for 'open_basedir' to
tell you exactly what it does).

If you are in this folder:

/home/httpd/vhosts/domain.com/httpdocs

you are trying to include '../inc/siteconfig.inc.php'

so that means you are trying to access:

/home/httpd/vhosts/domain.com/inc/siteconfig.inc.php

which isn't in the open_basedir list (so php is stopping you).

Adjust the path to the 'siteconfig.inc.php' file and you should be right to go.

  
Where is Open_basedir set? In a global php setting or can it be done 
site by site? And if so, what is the most logical place to put the file 
that controls this?


The reason I ask is because I have found a file called siteconfig.php 
located in the inc/ directory and below, please find it's contents.




I do not see anything here that will restrict it from running from 
either www.thedomain.com or www.thedomain.com/subfolder/


These all seem to be loading relative to root.

Thanks for everyones help so far.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers

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



[PHP] HTML_QuickForm

2006-02-25 Thread Atif Khan
Hello there, I am having an issue with HTML_QuickForm.
When I try to send the form to another page, it does not
seem to validate the form.

Any suggestions.



// Load the main class

require_once 'HTML/QuickForm.php';

// Instantiate the HTML_QuickForm object

$form = new HTML_QuickForm('firstForm', 'get', './somepage.html');

 ELEMENTS / RULES 

// validate form

if ($form->validate()) {

??   $form->submitValues();

   exit;

}



Thank you

Atif K


Re: [PHP] not sure, what now

2006-02-25 Thread chris smith
> Where is Open_basedir set? In a global php setting or can it be done
> site by site? And if so, what is the most logical place to put the file
> that controls this?

It's set by apache and unless you have root access you don't have any
control over it.

Re-read the error message, php tells you all you need to know:

File(../inc/siteconfig.php) is not within the allowed path(s):

in /home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on line 1

So

The first line of home.php is:

include('../inc/siteconfig.php');

Change that.

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



Re: [PHP] HTML_QuickForm

2006-02-25 Thread chris smith
On 2/26/06, Atif Khan <[EMAIL PROTECTED]> wrote:
> Hello there, I am having an issue with HTML_QuickForm.
> When I try to send the form to another page, it does not
> seem to validate the form.
>
> Any suggestions.
>
>
>
> // Load the main class
>
> require_once 'HTML/QuickForm.php';
>
> // Instantiate the HTML_QuickForm object
>
> $form = new HTML_QuickForm('firstForm', 'get', './somepage.html');
>
>  ELEMENTS / RULES 
>
> // validate form
>
> if ($form->validate()) {
>
> ??   $form->submitValues();
>
>exit;
>
> }

I don't have an answer for you but you might be better off asking the pear list:

http://pear.php.net/support/lists.php

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



Re: [PHP] Error compiling php 5.1.2

2006-02-25 Thread Paul Reinheimer
Thanks,

I've subscribed to and posted to the instalation list. I'm going to
try and stay off internals@ if I have a choice.


thanks
paul

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



Re: [PHP] defined

2006-02-25 Thread tedd
I'm having kind of a weird problem I want $MailSubject to contain a 
the value "prayer" unless I tell it other wise.


// on a form processor.
$MailSubject = "Praise";
include_once("mailit.php");

// then in mailit.php
include "form2mail.php";

// and in formtomail.php
if(!defined($MailSubject)) // This is the problem line
{
   $MailSubject = "Prayer";
}

The problem I believe is with the defined function check. (I think) 
the value of $MailSubject is maintained to the end so I'm don't 
think it to be a scope issue, but also, if I don't assign a value to 
it it should be running the if() statement, but it's not.


Any thoughts?


~Drew
www.drewpydraws.com


Drew:

This will work:

 if(!isset($MailSubject))
{
 $MailSubject = "Prayer";
}

tedd
--

http://sperling.com

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



Re: [PHP] not sure, what now

2006-02-25 Thread Richard Lynch
Find your php.ini and read it.

Actually, find your httpd.conf and read it, because you can change
JUST DocumentRoot in httpd.conf, and not move any files around.

'Course, you'll have to put the files back, but you won't have to
change any of the paths embedded in the PHP web application.

On Sat, February 25, 2006 4:22 pm, Schalk wrote:
> Greetings All,
>
> I am pretty new to PHP and are tasked to move a clients site from:
>
> www.domain.com/somedirectory/home.php to www.home.php
>
> Sounds simple at first but, when I moved the files to the root of the
> httpdocs I get an array of errors in the vain of:
> *Warning*: main(): open_basedir restriction in effect.
> File(../inc/siteconfig.php) is not within the allowed path(s):
> (/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in
> /home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on
> line 1
>
> What exactly does this mean? I am sure there must be a config
> somewhere
> that has set it up to load from the sub directory and now it prevents
> it
> from loading from the root directory. Is this correct? What exactly
> does
> this error mean? Thanks to all!*
> *
>
> --
> Kind Regards
> Schalk Neethling
> Web Developer.Designer.Programmer.President
> Volume4.Business.Solution.Developers
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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

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



Re: [PHP] defined

2006-02-25 Thread Richard Lynch
On Sat, February 25, 2006 4:18 pm, [EMAIL PROTECTED] wrote:
> I'm having kind of a weird problem I want $MailSubject to contain a
> the value "prayer" unless I tell it other wise.
>
> // on a form processor.
> $MailSubject = "Praise";
> include_once("mailit.php");
>
> // then in mailit.php
> include "form2mail.php";
>
> // and in formtomail.php
> if(!defined($MailSubject)) // This is the problem line

defined checks for CONSTANTS, not variables.

You may want http://php.net/isset
Or maybe you want if ($MailSubject == "")

But for sure you don't want defined.

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

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



Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-25 Thread Ozz

On Sun, 26 Feb 2006 09:52:43 +1100, "chris smith" <[EMAIL PROTECTED]>
wrote:
> 
> Ubuntu or debian are good choices (ubuntu is kept more up to date, the
> debian-stable branch only gets updated with security releases between
> major versions).

Having said that, Debian Sid is usually pretty bleeding-edge.

And, although it is considered the 'Unstable' branch, it is nowhere
near as bas as people think.  I'm typing this e-mail on an amd64 box
running Debian Sid amd64, current uptime 54 days, last reboot due to
installing a new UPS.  But then again, one of my hats is SysAdmin, so I
can deal with update/upgrade issues better than the average end-user...

The only issue for me really is that Quanta has become a bit unstable
recently (a known bug, reported on Bugzilla) but other than that, I love
Debian.

My personal recommendation is Debian Stable (currently Sarge) for
mission-critical servers, Debian Testing (currently Etch) for
workstations, and Debian Unstable (always Sid) if you need the latest
and greatest on your workstation.  I do have a few servers running
Testing, but would not use Unstable on a mission-critical server.

We run Debian on just about all our work boxen. Heck, we even run
Debian on our SUN hardware...

Hope that helps.

Regards,
Ozz.


pgp9fCCMFr2Ry.pgp
Description: PGP signature


Re: [PHP] Error compiling php 5.1.2

2006-02-25 Thread Richard Lynch
On Sat, February 25, 2006 4:08 pm, Paul Reinheimer wrote:
> './configure' '--with-mysql=/usr/local/mysql'
> '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png'
> '--with-zlib-dir=/root/zlib-1.2.2' '--enable-gd-native-ttf'
> '--with-ttf' '--with-jpeg-dir=/usr/local/lib/jpeg-6b/'
> '--with-freetype-dir=/usr/local/lib/freetype-2.1.9/'
> '--with-xpm-dir=/usr/X11R6/' '--with-tidy' '--with-curl'
> '--with-openssl=/usr/local/' '--enable-dba=shared' '--with-db4'
> '--disable-eapi' '--with-xsl' '--enable-memory-limit'
> '--with-libxml-dir=/usr/local/lib/'
>
> make ends with
>
> collect2: ld returned 1 exit status
> make: *** [sapi/cli/php] Error 1
>
> anyone got any ideas, or hints on what information I should be giving
> to make diagnosis easier/possible?

I was watching a movie last night.

I saw this when if was over:  "The End"

What was the movie about?

:-)

What happened BEFORE ld told you thins were broken?

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

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



Re: [PHP] not sure, what now

2006-02-25 Thread Michael Hulse

On Feb 25, 2006, at 2:22 PM, Schalk wrote:
*Warning*: main(): open_basedir restriction in effect. 
File(../inc/siteconfig.php) is not within the allowed path(s):
(/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs:/tmp) in 
/home/httpd/vhosts/sealbeachprofessionals.com/httpdocs/home.php on 
line 1


Try changing all includes that look like this:

include('/folder/file.php');

... to this:

include($_SERVER['DOCUMENT_ROOT'].'/folder/file.php');

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



Re: [PHP] not sure, what now

2006-02-25 Thread Michael Hulse

To be more specific:

Based on error message you posted:

#Start from server root:
include($_SERVER['DOCUMENT_ROOT'].'/inc/siteconfig.php');

Hth,
gl, M

On Feb 25, 2006, at 7:31 PM, Michael Hulse wrote:


Try changing all includes that look like this:

include('/folder/file.php');

... to this:

include($_SERVER['DOCUMENT_ROOT'].'/folder/file.php');


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



Re: [PHP] Error compiling php 5.1.2

2006-02-25 Thread Paul Reinheimer
I posted the full output of make earlier in this thread, as well as the
configure command i'm using, what are you looking for? The ./configure
output lines that reference libxml say nothing out of the ordinary.




paul


On 2/25/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
> On Sat, February 25, 2006 4:08 pm, Paul Reinheimer wrote:
> > './configure' '--with-mysql=/usr/local/mysql'
> > '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png'
> > '--with-zlib-dir=/root/zlib-1.2.2' '--enable-gd-native-ttf'
> > '--with-ttf' '--with-jpeg-dir=/usr/local/lib/jpeg-6b/'
> > '--with-freetype-dir=/usr/local/lib/freetype-2.1.9/'
> > '--with-xpm-dir=/usr/X11R6/' '--with-tidy' '--with-curl'
> > '--with-openssl=/usr/local/' '--enable-dba=shared' '--with-db4'
> > '--disable-eapi' '--with-xsl' '--enable-memory-limit'
> > '--with-libxml-dir=/usr/local/lib/'
> >
> > make ends with
> >
> > collect2: ld returned 1 exit status
> > make: *** [sapi/cli/php] Error 1
> >
> > anyone got any ideas, or hints on what information I should be giving
> > to make diagnosis easier/possible?
>
> I was watching a movie last night.
>
> I saw this when if was over:  "The End"
>
> What was the movie about?
>
> :-)
>
> What happened BEFORE ld told you thins were broken?
>
> --
> Like Music?
> http://l-i-e.com/artists.htm
>
>
>


--
Paul Reinheimer
Zend Certified Engineer