[PHP] mail headers

2006-07-25 Thread Schalk

Greetings Everyone,

What in the piece of code below might be causing the headers for from 
and reply-to to be set incorrectly?


'
$headers = MIME-Version: 1.0\r\n.
Content-type: text/html; charset=iso-8859-1\r\n.
From: .$email.\r\n.
Reply-to: .$email.\r\n.
Date: .date(r).\r\n;
'

Using Thunderbird on XP it does set the from correctly but then uses the 
default from address set in php.ini for the reply-to. Any ideas? Thanks!


--
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] parse error

2006-07-10 Thread Schalk

Greetings All,

Please have a look at the following code:

if ($numrows  1)
// the member does not exist
{
   include ($adminfolderpath./include/headeradmin.php);
   echo pThat email does not exist in the members list./p;
   echo pa href='login.php'Please login/a./p;
   include ($adminfolderpath./include/footeradmin.php);
   exit;
}

if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
   include ($adminfolderpath./include/headeradmin.php);
   echo pIncorrect password, please try again./p;
   login();
   include ($adminfolderpath./include/footeradmin.php);
   exit;
} else {
   header(Location: 
http://demo.bdiverse.com/accessible/admin/listmypages.php;);
   exit;   
}

?

I am getting the following error:* Parse error*: parse error, unexpected 
$ in 
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php* 
on line *69


In my code the last line i.e. ? is marked as line 69

Can someone please let me know what is causing this error? Thanks!
*

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



Re: [PHP] parse error

2006-07-10 Thread Schalk

Thanks everyone.

Jochem Maas wrote:

Schalk wrote:
  

Greetings All,

Please have a look at the following code:




your missing a closing brace some where - by the looks of things
not in the code you sent.

  

if ($numrows  1)
// the member does not exist
{
   include ($adminfolderpath./include/headeradmin.php);
   echo pThat email does not exist in the members list./p;
   echo pa href='login.php'Please login/a./p;
   include ($adminfolderpath./include/footeradmin.php);
   exit;
}

if (md5($memberpassword) !=$dbmemberpassword)
// the password does not match the one in the database
{
   include ($adminfolderpath./include/headeradmin.php);
   echo pIncorrect password, please try again./p;
   login();
   include ($adminfolderpath./include/footeradmin.php);
   exit;
} else {
   header(Location:
http://demo.bdiverse.com/accessible/admin/listmypages.php;);
   exit;   }
?

I am getting the following error:* Parse error*: parse error, unexpected
$ in
*/home/httpd/vhosts/demo.bdiverse.com/httpdocs/accessible/processlogin.php*
on line *69

In my code the last line i.e. ? is marked as line 69

Can someone please let me know what is causing this error? Thanks!
*




  


--
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] possible IE problem

2006-07-10 Thread Schalk

Greetings All,

Now that the parse error is fixed the login script works fine in FF but 
in IE it does not do the redirect. Is there a reason why this code may 
not work in IE? Is there a better way to do this?


$_SESSION['email'] = $email;
$_SESSION['memberpassword'] = md5($memberpassword);
header(Location: 
http://demo.bdiverse.com/accessible/admin/listmypages.php;);

exit;

Thanks!

--
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] uploading and extracting zip files

2006-07-04 Thread Schalk

Greetings All,

Can someone please point me to a tutorial or open source 'library' that 
will explain how one can upload a .zip file and then extract it's 
contents and store this on the server and/or database using PHP. 
Basically the same way as one can upload and install components etc. 
with Joomla. Thanks!


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



Re: [PHP] php parsing and db content [RESOLVED]

2006-05-11 Thread Schalk Neethling

Chris wrote:

Schalk wrote:

Chris wrote:


Chris wrote:



actually if it's only one variable, this might do it for you:

$content = str_replace('?php echo _root ?', _root, $content);

but that's still a bad way to do this.


Chris,

This works:

$breadcrumb = $row_pathway['pathway'];
$breadcrumb = str_replace('?php echo _root ?', _root, $breadcrumb);

echo $breadcrumb;

However, I would still like to know why this is a bad way to do this 
and hopefully find a better way. Still learning all the aspects of 
PHP so any input is appreciated.




Because you're including your config details in your data (I don't 
think you should do this, but others may disagree).


The str_replace method should be pretty fast and won't introduce any 
security issues like the 'eval' method I originally mentioned would.



Thank you for all of your help Chris. Much appreciated.

--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
US Tel: (440) 499-5484
Fax: +27125468436
Web
email:[EMAIL PROTECTED]
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: [EMAIL PROTECTED]

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/

The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error, please 
contact the sender and please delete all traces of this material from all 
devices.

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



[PHP] php parsing and db content

2006-05-10 Thread Schalk

Greetings All,

I have the following problem. I load certain links and breadcrumbs from 
the database into a external .php file which I include on various pages 
within the site. Due to this I have defined a constant '_root' and 
precede all links with this to ensure that the links will work no matter 
from where inside the site structure they are called.


My problem is this, when I load these links from the database into the 
external .php file and the load the page that includes this, the line 
?php echo _root ? is not parsed and shows up in the links, for example:


/our_work/?php echo _root ?/our_work/index.php when it should be 
/site_root/our_work/index.php


How can I ensure that these calls to ?php echo _root ? are parsed 
before sent to the browser?


Thanks!

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



Re: [PHP] php parsing and db content

2006-05-10 Thread Schalk

Chris wrote:

Chris wrote:

Schalk wrote:


Greetings All,

I have the following problem. I load certain links and breadcrumbs 
from the database into a external .php file which I include on 
various pages within the site. Due to this I have defined a constant 
'_root' and precede all links with this to ensure that the links 
will work no matter from where inside the site structure they are 
called.


My problem is this, when I load these links from the database into 
the external .php file and the load the page that includes this, the 
line ?php echo _root ? is not parsed and shows up in the links, 
for example:


/our_work/?php echo _root ?/our_work/index.php when it should be 
/site_root/our_work/index.php


How can I ensure that these calls to ?php echo _root ? are parsed 
before sent to the browser?



Why do you need to store _root in the data? Wouldn't it be better to 
take it out and then prefix it before displaying? No complications then.



actually if it's only one variable, this might do it for you:

$content = str_replace('?php echo _root ?', _root, $content);

but that's still a bad way to do this.

Chris,

The reason I need root in there is because sometimes it would be 
something like text  link  link, so in these cases I cannot merely 
prefix _root.


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



Re: [PHP] php parsing and db content

2006-05-10 Thread Schalk

Chris wrote:

Chris wrote:



actually if it's only one variable, this might do it for you:

$content = str_replace('?php echo _root ?', _root, $content);

but that's still a bad way to do this.


Chris,

This works:

$breadcrumb = $row_pathway['pathway'];
$breadcrumb = str_replace('?php echo _root ?', _root, $breadcrumb);

echo $breadcrumb;

However, I would still like to know why this is a bad way to do this and 
hopefully find a better way. Still learning all the aspects of PHP so 
any input is appreciated.


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



Re: [PHP] php and ssl [SOLVED]

2006-05-05 Thread Schalk

Eric Butera wrote:

On 5/4/06, Schalk [EMAIL PROTECTED] wrote:


Greetings All,

I am currently implementing a form for a client that will run over
https. Now, all is good and well except, for some reason when the form
loads in IE the lock in the status bar displays for a short while and
then goes away, it is fine in Firefox though. The way I have the form
coded is something like this:

?php
// Handle POST method.
if ($_POST)
{
$name = $_POST['name'];
$street_address = $_POST['street_address'];

$to = 'address';
$subject = subject;
$headers = MIME-Version: 1.0\r\n.
   Content-type: text/html; charset=iso-8859-1\r\n.
   From: .$name.\r\n.
   Reply-to: .$email.\r\n.

   Date: .date(r).\r\n;

// Compose message:
$message = message;

// Send message
mail($to, $subject, $message, $headers);

// Thank the generous user
echo h1Thank You!/h1;
}
else {

?
form name=donation_eng action=?php echo $_SERVER['PHP_SELF']; ?
method=post
fieldset
legendFill in your details/legend
table cellspacing=0 cellpadding=0 class=form-container
tr
td colspan=2
label for=nameName:
input name=name type=text id=name tabindex=1 size=35
maxlength=150 /
/label
/td
/tr
/table
/fieldset
/form
?php
   }
?

The page in question is here: https://www.epda.cc/donation_eng.php

Is there any reason why coding the form like this will cause IE to think
that the form is not secure and not loaded over https? Thank you in
advance!

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



I bet your problem is this:
http://www.epda.cc/images/horz_master_120pixels.gif

One thing I do at work here when I'm having issues with SSL is to 
check any

links you have to stylesheets, javascript, etc for http:// in them.  Then
after that use firefox's View Page Info and goto the tab Media.  
Check

for any http:// images.

Hope that helps.

Perfect! Thanks a lot!

--
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] php and ssl

2006-05-04 Thread Schalk

Greetings All,

I am currently implementing a form for a client that will run over 
https. Now, all is good and well except, for some reason when the form 
loads in IE the lock in the status bar displays for a short while and 
then goes away, it is fine in Firefox though. The way I have the form 
coded is something like this:


?php
// Handle POST method.
if ($_POST)
{ 
$name = $_POST['name'];

$street_address = $_POST['street_address'];

$to = 'address';
$subject = subject;
$headers = MIME-Version: 1.0\r\n.
  Content-type: text/html; charset=iso-8859-1\r\n.
  From: .$name.\r\n.
  Reply-to: .$email.\r\n.   
 
  Date: .date(r).\r\n;


// Compose message:
$message = message;

// Send message
mail($to, $subject, $message, $headers);

// Thank the generous user
echo h1Thank You!/h1;
}
else {

?
form name=donation_eng action=?php echo $_SERVER['PHP_SELF']; ? 
method=post

fieldset
legendFill in your details/legend
table cellspacing=0 cellpadding=0 class=form-container
tr
td colspan=2
label for=nameName:
input name=name type=text id=name tabindex=1 size=35 
maxlength=150 /

/label
/td   
/tr

/table
/fieldset
/form
?php
  }
?

The page in question is here: https://www.epda.cc/donation_eng.php

Is there any reason why coding the form like this will cause IE to think 
that the form is not secure and not loaded over https? Thank you in advance!


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



Re: [PHP] Re: php and ssl

2006-05-04 Thread Schalk Neethling

Barry wrote:

Schalk schrieb:

Greetings All,

I am currently implementing a form for a client that will run over 
https. Now, all is good and well except, for some reason when the 
form loads in IE the lock in the status bar displays for a short 
while and then goes away, it is fine in Firefox though. The way I 
have the form coded is something like this:


The page in question is here: https://www.epda.cc/donation_eng.php

Is there any reason why coding the form like this will cause IE to 
think that the form is not secure and not loaded over https? Thank 
you in advance!


Since you load it framewise. is there probably a problem with the 
loaded frames?


It has nothing to do with PHP though.

Barry,

Not sure what you mean by frames If you look at the HTML source 
there are no frames in there. Do you mean the fieldset?



--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
emotionalize.conceptualize.visualize.realize
Landlines
Tel: +27125468436
US Tel: (440) 499-5484
Fax: +27125468436
Web
email:[EMAIL PROTECTED]
Global: www.volume4.com
Messenger
Yahoo!: v_olume4
AOL: v0lume4
MSN: [EMAIL PROTECTED]

We support OpenSource
Get Firefox!- The browser reloaded - http://www.mozilla.org/products/firefox/

The information transmitted is intended solely for the individual or entity to 
which it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of or taking action in 
reliance upon this information by persons or entities other than the intended 
recipient is prohibited. If you have received this email in error, please 
contact the sender and please delete all traces of this material from all 
devices.

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



Re: [PHP] Re: php and ssl

2006-05-04 Thread Schalk

Schalk Neethling wrote:

Barry wrote:

Schalk schrieb:

Greetings All,

I am currently implementing a form for a client that will run over 
https. Now, all is good and well except, for some reason when the 
form loads in IE the lock in the status bar displays for a short 
while and then goes away, it is fine in Firefox though. The way I 
have the form coded is something like this:


The page in question is here: https://www.epda.cc/donation_eng.php

Is there any reason why coding the form like this will cause IE to 
think that the form is not secure and not loaded over https? Thank 
you in advance!


Since you load it framewise. is there probably a problem with the 
loaded frames?


It has nothing to do with PHP though.

Barry,

Not sure what you mean by frames If you look at the HTML source 
there are no frames in there. Do you mean the fieldset?
Has anyone been able to see what might be causing the problem in IE? I 
am really stumped :( It may even be something simple but, I cannot see 
why the way the form is coded will cause this problem.


Any thoughts on this will be much appreciated. Thanks!

--
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] php login

2006-04-29 Thread Schalk

Greetings All,

Where can I find a good tutorial on creating a login protected area 
using php? I did a Google search and found a couple but, I would like to 
get suggestions from the list. Thanks!


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



Re: [PHP] php login

2006-04-29 Thread Schalk

chris smith wrote:

On 4/30/06, Schalk [EMAIL PROTECTED] wrote:

Greetings All,

Where can I find a good tutorial on creating a login protected area
using php? I did a Google search and found a couple but, I would like to
get suggestions from the list. Thanks!


Just found a good one.. it's a little more complicated than most
because it has the userlevel stuff included.. but gives you some
ideas.

http://www.evolt.org/article/PHP_Login_System_with_Admin_Features/17/60384/index.html 


Thanks Chris, I will check it out.

--
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] getting current page url

2006-04-28 Thread Schalk

Greetings All,

Possibly a very simple question but here goes. How would I code the 
following in PHP?


if(window.location == ((http://www.epda.cc/index.php;) || 
(http://www.epda.cc/;))) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }

What I am trying to accomplish is something like this:

?php   
   if(window.location == ((http://www.epda.cc/index.php;) || 
(http://www.epda.cc/;))) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?

Thanks!

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



Re: [PHP] getting current page url [RESOLVED]

2006-04-28 Thread Schalk



Jochem Maas wrote:

do a search $_SERVER['PHP_SELF'] - it should answer all your question.

if in doubt a var_dump() can do wonders (in this finding out what kind of
info is generally available, e.g.:

?php

echo 'pre';
var_dump($_SERVER, $_REQUEST, $_ENV, $_POST, $_GET);


Thanks Jochem,

A combination $_SERVER['PHP_SELF'] and $_SERVER['QUERY_STRING'] did the 
trick:


?php   
   if(($_SERVER['PHP_SELF'])  (!$_SERVER['QUERY_STRING'])) {

   $current_nav = includes/home_nav.php;
   } else {
   $current_nav = includes/inside_nav.php;
   }
   ?
   ?php include($current_nav); ?

--
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] plain text email message format

2006-04-12 Thread Schalk

Greetings All,

Is the code below the correct way to 'build' the message for plain text 
email?


$message = Message From: .$firstName.   .$lastName.
First Name: .$firstName.
Last Name: .$lastName.
Address: .$address.
Home phone: .$homePhone.
Best time to contact: .$bestTime.
Email: .$email.;

Thanks!

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



Re: [Fwd: Re: [PHP] redirect using php]

2006-04-05 Thread Schalk
Thanks everyone for your help. In the end the simplest one that works 
for this specific project was:


echo meta http-equiv=\Refresh\ content=\0;url=$from_page\;

Andrei wrote:


Andrei wrote:


It works with document.location = '...'; too. I use only this method 
and it worked on all browsers...




Assuming the end user has JS turned on.  JS and Meta Refreshes are not
acceptable when you need to be sure the redirect works.

Depends on your user target...
I generally suppose the users using my code enabled JS on their 
browsers. If they didn't too bad. I can't code everything judging 
there are ppl that do restrictions on their browsers.


Andy



--
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] redirect using php

2006-04-04 Thread Schalk

Greetings All,

In JSP I have access to a function called sendRedirect() to send a user 
from one page to another, usually after some processing completed. Is 
there a similar function in PHP?


After processing a form and sending the data via email, I need to 
redirect them to another page. I currently use a method of merely 
replacing the form with some 'thank you' text after submitting the form, 
I prefer this but, the client wants me to redirect to another page. All 
help appreciated. Thanks!


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



Re: [PHP] redirect using php

2006-04-04 Thread Schalk



Brady Mitchell wrote:

-Original Message-
In JSP I have access to a function called sendRedirect() to 
send a user 
from one page to another, usually after some processing completed. Is 
there a similar function in PHP?



Take a look at the header() function.
http://php.net/header

To redirect you can use:  header(Location: http://www.example.com/;); 


Brady

Thanks everyone, I will give this a go.

--
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] making php code from db work

2006-03-17 Thread Schalk

Greetings All,

I pull the following snippet of code directly from a MySQL database:

ul
   lia href=# title=Highway  Toll FacilitiesHighway  Toll 
Facilities/a/li

   lia href=# title=Mass TransitMass Transit/a/li
   lia href=?php echo _root 
?/expertise/index.php?category=specialized_expertiseamp;content=Intermodalamp;side_content=our_work 
title=IntermodalIntermodal/a/li

   lia href=# title=Public PolicyPublic Policy/a/li
   lia href=# title=Mega-ProjectsMega-Projects/a/li
   lia href=# title=Infrastructure RenewalInfrastructure 
Renewal/a/li

   lia href=# title=InternationalInternational/a/li
   lia href=# title=Design-BuildDesign-Build/a/li
   lia href=# title=WorkoutsWorkouts/a/li
   lia href=# title=Advanced Revenue Collection SystemsAdvanced 
Revenue Collection Systems/a/li

   lia href=# title=TIFIATIFIA/a/li
   lia href=# title=Corporate Alliances  Ancillary 
RevenueCorporate Alliances  Ancillary Revenue/a/li

   lia href=# title=Fare PolicyFare Policy/a/li
   lia href=# title=Joint DevelopmentJoint Development/a/li
/ul

As you can see in line three, I use the following PHP code there: ?php 
echo _root ?


Unfortunately when this is loaded into the PHP page this bit of code is 
not parsed and the link still includes the code snippet. Is there a way 
I can make this work or would it be better to build this nav tree in a 
more robust fashion such as loading the li one by one in a for loop 
for example?


Thanks in advance.

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



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.


?
$template_title=Seal Beach Professionals - REFERRAL Networking Group;
$template_bgcolor=#4C4A4A;
$template_textcolor=#00;
$template_bgpicture=../images/bg.gif;
$template_content_bgcolor=#FF;
$template_header_pic=../images/header.jpg;
$template_footer_pic=../images/footer_img.jpg;

$template_database_host=localhost;
$template_database=sealdata;
$template_databasen=sealuser;
$template_databasep=sealpass;
?

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] Sending Mail (newbie)

2005-11-22 Thread schalk
Greetings All

I am using the following script to send mail via PHP. The script processes and
send the mail but the message is never displayed in the received email. Any
pointers will be much appreciated. Thank you.

?php
// Handle POST method.
if ($_POST)
{   
   
$name = $_POST['name'];
$phone = $_POST['phone'];
$comments = $_POST['comments'];

$to = '[EMAIL PROTECTED]';
$subject = Contact from OxfordPrice.com;
$headers = MIME-Version: 1.0\r\n.
   Content-type: text/html; 
charset=iso-8859-1\r\n.
   From: .$name.\r\n.   
   
   Date: .date(r).\r\n;

   // Compose message:
$message = 
html
body
h1Message From:  . $name . 
/h1
/body
/html
;

  // Send message
mail($to, $subject, $message, $headers);

  // Thank the generous user
echo div id=\message-response\h1Thank You!/h1/div\n;
}

--
Open WebMail Project (http://openwebmail.org)

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



RE: [PHP] Sending Mail (newbie)

2005-11-22 Thread schalk
Thanks All. I have got this working.

--
Open WebMail Project (http://openwebmail.org)

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