Re: [PHP] Please help to unsubscribe

2011-08-27 Thread Daniel P. Brown
On Sat, Aug 27, 2011 at 15:45, Eli Orr  wrote:
> The advised email to unsubscribe does not work: 
> php-general-unsubscr...@lists.php.net

It should work just fine, but I had checked and I don't even see
any subscribers to the General mailing list with 'logodial' anywhere
in their address.  Are you still having issues?  If so, it sounds like
perhaps you subscribed using a forwarder.

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



[PHP] Please help to unsubscribe

2011-08-27 Thread Eli Orr
The advised email to unsubscribe does not work: 
php-general-unsubscr...@lists.php.net

Thanks

Eli



-- 



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



Re: [PHP] Please help with glob

2011-04-05 Thread Al Mangkok
Yesterday I yum installed these:
glibc-common.i386 2.3.4-2.54
glibc.i686 2.3.4-2.54
glibc-headers.i386 2.3.4-2.54
glibc-devel.i386 2.3.4-2.54

And about ten minutes ago I recompiled PHP with identical configure
options as before. And this time the glob function is inside PHP.
Phew.

Hopefully someone else will benefit from this post.


--
al

On Tue, Apr 5, 2011 at 2:49 PM, Al Mangkok  wrote:
> Hi Louis,
> Yes, I have read that glob is only available for PHP > 4.3 and I am
> using version 5.2.1.7
>
> # /usr/local/bin/php -v
> PHP 5.2.17 (cli) (built: Feb 16 2011 15:41:35)
> Copyright (c) 1997-2010 The PHP Group
> Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
>    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
>
>
>
>
> # /usr/local/bin/php globtest.php
>
> Fatal error: Call to undefined function  glob() in
> /usr/local/apache2/htdocs/hrms/globtest.php on line 2
>
>
>
> I have read somewhere that it could be connected to glibc, not I have
> no idea how to fix that. Anyone ?
>
>
> --
> al
>
>
>
> On Tue, Apr 5, 2011 at 2:25 PM, Louis Huppenbauer
>  wrote:
>> Hi there
>>
>> Since glob is actually a part of the core - Are you absolutely sure
>> that you're running PHP > 4.3
>>
>> 2011/4/5 Al Mangkok :
>>> Hi everyone,
>>> I am very new to PHP and trying to learn the glob() function. I copied
>>> the example on php.net :
>>>
>>> >> foreach (glob("*.txt") as $filename) {
>>>    echo "$filename size " . filesize($filename) . "\n";
>>> }
>>> ?>
>>>
>>> When I ran the script, I got this error message:
>>> Fatal error: Call to undefined function  glob() in
>>> /usr/local/apache2/htdocs/hrms/globtest.php on line 2
>>>
>>> I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get
>>> the glob function in ?
>>> Please help.
>>>
>>>
>>> --
>>> al
>>>
>>> --
>>> 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] Please help with glob

2011-04-04 Thread Al Mangkok
Hi Louis,
Yes, I have read that glob is only available for PHP > 4.3 and I am
using version 5.2.1.7

# /usr/local/bin/php -v
PHP 5.2.17 (cli) (built: Feb 16 2011 15:41:35)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies




# /usr/local/bin/php globtest.php

Fatal error: Call to undefined function  glob() in
/usr/local/apache2/htdocs/hrms/globtest.php on line 2



I have read somewhere that it could be connected to glibc, not I have
no idea how to fix that. Anyone ?


--
al



On Tue, Apr 5, 2011 at 2:25 PM, Louis Huppenbauer
 wrote:
> Hi there
>
> Since glob is actually a part of the core - Are you absolutely sure
> that you're running PHP > 4.3
>
> 2011/4/5 Al Mangkok :
>> Hi everyone,
>> I am very new to PHP and trying to learn the glob() function. I copied
>> the example on php.net :
>>
>> > foreach (glob("*.txt") as $filename) {
>>    echo "$filename size " . filesize($filename) . "\n";
>> }
>> ?>
>>
>> When I ran the script, I got this error message:
>> Fatal error: Call to undefined function  glob() in
>> /usr/local/apache2/htdocs/hrms/globtest.php on line 2
>>
>> I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get
>> the glob function in ?
>> Please help.
>>
>>
>> --
>> al
>>
>> --
>> 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] Please help with glob

2011-04-04 Thread Louis Huppenbauer
Hi there

Since glob is actually a part of the core - Are you absolutely sure
that you're running PHP > 4.3

2011/4/5 Al Mangkok :
> Hi everyone,
> I am very new to PHP and trying to learn the glob() function. I copied
> the example on php.net :
>
>  foreach (glob("*.txt") as $filename) {
>    echo "$filename size " . filesize($filename) . "\n";
> }
> ?>
>
> When I ran the script, I got this error message:
> Fatal error: Call to undefined function  glob() in
> /usr/local/apache2/htdocs/hrms/globtest.php on line 2
>
> I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get
> the glob function in ?
> Please help.
>
>
> --
> al
>
> --
> 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] Please help with glob

2011-04-04 Thread Al Mangkok
Hi everyone,
I am very new to PHP and trying to learn the glob() function. I copied
the example on php.net :



When I ran the script, I got this error message:
Fatal error: Call to undefined function  glob() in
/usr/local/apache2/htdocs/hrms/globtest.php on line 2

I am running PHP 5.2.17 on CentOS 4.8 . How do I compile PHP to get
the glob function in ?
Please help.


--
al

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



Re: [PHP] please help with regular expression in preg_replace

2009-10-30 Thread Red
Many thanx to Jim and andy for their replies, with Jim`s changes its now 
working like in sed. Excuse me for my stupid question, but im old unix/linux 
system engineer coding with C , perl and bash, php gave me unpredictable 
results in this task. ;-)
so, in final, may be this help some other roundcube users who need one 
universal site for many domain access.

this is test page:
" ;
echo "dom_sed = $dom_sed[0]" ;
echo "p1_1 = $p1_1  " ;
echo "p1_2 = $p1_2  " ;
echo "p2_1 = $p2_1  " ;
echo "p2_2 = $p2_2  " ;

?>
with result:
host.1stdom.com
dom_sed = 1stdom.com
p1_1 = com
p1_2 = com
p2_1 = 1stdom.com
p2_2 = 1stdom.com


and this is line which i need in roundcube setup:

$rcmail_config['username_domain'] = preg_replace( '/^[^.]+\./' , '', 
$_SERVER['HTTP_HOST'] ) ;


many thanks again

Rene

- Original Message ----- 
From: "Jim Lucas" 

To: "Red" 
Cc: 
Sent: Friday, October 30, 2009 12:33 AM
Subject: Re: [PHP] please help with regular expression in preg_replace



Red wrote:
hello, im not a php developer, i just need to rewrite one php file but 
having problem with understanding syntax of regexp in php.


i need to get domain name from fqdn (for example from 
$_SERVER['HTTP_HOST'] )


in sed its working well with "s/[^.]*\.//" , but preg_replace behaves 
weird.



http_host is for example hostname.domain.com



return "domain.com", but



return only "com"

i think when this php page get many hits, its not so wise to call sed 
everytime, i would like to ask someone for help how to write preg_replace 
pattern.


thanx

Rene



I would add one thing and change another.



Adding an additional '^' to the start tells it to start at the beginning.
And changing '*' to a '+'

Jim

--
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] please help with regular expression in preg_replace

2009-10-29 Thread Jim Lucas
Red wrote:
> hello, im not a php developer, i just need to rewrite one php file but having 
> problem with understanding syntax of regexp in php.
> 
> i need to get domain name from fqdn (for example from $_SERVER['HTTP_HOST'] )
> 
> in sed its working well with "s/[^.]*\.//" , but preg_replace behaves weird.
> 
> 
> http_host is for example hostname.domain.com
> 
>  $host = $_SERVER['HTTP_HOST'];
> exec( "echo $host | sed s/[^.]*\.//", $domain ) ;
> echo "$domain[0]"
> ?>
> 
> return "domain.com", but
> 
>  $host = $_SERVER['HTTP_HOST'];
> $domain = preg_replace( '/[^.]*\./' , '', $host) ;
> echo "$domain";
> ?>
> 
> return only "com"
> 
> i think when this php page get many hits, its not so wise to call sed 
> everytime, i would like to ask someone for help how to write preg_replace 
> pattern.
> 
> thanx 
> 
> Rene
> 

I would add one thing and change another.



Adding an additional '^' to the start tells it to start at the beginning.
And changing '*' to a '+'

Jim

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



Re: [PHP] please help with regular expression in preg_replace

2009-10-29 Thread Andy Shellam (Mailing Lists)

Hi Rene,

This looks suspiciously like regex's "greedy" behaviour - it will  
gobble up everything that matches until you tell it otherwise.


For example, your regex is matching "any character that isn't a dot,  
followed by a dot."


In host.domain.com, both "host." and "domain." match this regex - and  
because your regex is "greedy" it's grabbing both, leaving you with  
"com".


Try adding the "ungreedy" modifier to your regex, like so: $domain =  
preg_replace( '/[^.]*\./U' , '', $host); (note the additional U in  
your regex.)


HTH,
Andy

On 29 October2009, at 20:33, Red wrote:



hello, im not a php developer, i just need to rewrite one php file  
but having problem with understanding syntax of regexp in php.


i need to get domain name from fqdn (for example from $_SERVER 
['HTTP_HOST'] )


in sed its working well with "s/[^.]*\.//" , but preg_replace  
behaves weird.



http_host is for example hostname.domain.com



return "domain.com", but



return only "com"

i think when this php page get many hits, its not so wise to call  
sed everytime, i would like to ask someone for help how to write  
preg_replace pattern.


thanx

Rene



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



[PHP] please help with regular expression in preg_replace

2009-10-29 Thread Red

hello, im not a php developer, i just need to rewrite one php file but having 
problem with understanding syntax of regexp in php.

i need to get domain name from fqdn (for example from $_SERVER['HTTP_HOST'] )

in sed its working well with "s/[^.]*\.//" , but preg_replace behaves weird.


http_host is for example hostname.domain.com



return "domain.com", but



return only "com"

i think when this php page get many hits, its not so wise to call sed 
everytime, i would like to ask someone for help how to write preg_replace 
pattern.

thanx 

Rene


Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Jignesh Thummar
whenever you want to print HTMLs in your code you don't need to call echo or
print everytime.
You can use plain HTML in your php code this way.


your HTML code

your HTML code

or you can use HEREDOC to print long string ( http://in.php.net/types.string)

- Jignesh

On Fri, Apr 10, 2009 at 12:37 PM, Bipin Upadhyay wrote:

> kunal sharma wrote:
>
>>  Hello,
>> I'm building my own website without any knowledge of PHP, & i'm almost
>> done
>> with that..as my website works fine on my local server
>> i:e WAMPSERVER 2.0,
>> but the same code is not working on server...n i'm rilli 'd of coz of
>> that...
>>
>> The error is :"PHP Parse error: syntax error, unexpected $end in
>> /home/usang2me/public_html/sign_up.php on line 145"
>>
>> "145" happens to be last line i:e "?>" , but here becoz of pattern..itz
>> not
>> into its proper way...
>>
>> &
>> After filling the sign up form correctly . it says ALL FIELD ARE
>> MANDATORYi dont understand ...y soi'm pasting my code
>> here...please
>> help me asap ...
>> each and every suggestion will be appreciat'd
>>
>>
>>
>> Here Is The Code:
>>
>> > $username = $_POST['username'];
>> $password1 = $_POST['password1'];
>> $password2 = $_POST['password2'];
>> $name = $_POST['name'];
>> $address = $_POST['address'];
>> $city = $_POST['city'];
>> $state = $_POST['state'];
>> $code = $_POST['code'];
>> $phone = $_POST['phone'];
>> $email = $_POST['email'];
>> //$bankname = $_POST['bankname'];
>> //$bankbranch = $_POST['bankbranch'];
>> //$accountnumber = $_POST['bankac'];
>> $refer_id = $_POST['refer_id'];
>> //$country = $_POST['country'];
>> // Connects to your Database
>> include('database_connect_local.php');
>> //This makes sure they did not leave any fields blank
>> $minuser_len = 6; //username minimum length
>> $minpass_len = 6; //password minimum length
>> $mincode_len = 6; //code minimum length
>> $minphone_len = 10; //phone minimum length
>> //$refer_id_len = 6; //refer_id minimum length
>>
>> if (strlen($username) < $minuser_len || strlen($password1) < $minpass_len
>> ||
>> strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
>> {
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>Minimum length values for Username or Password or
>> Pincode or Mobile is missing. Please try again with correct
>> values.   ";
>> include 'signup.php';
>> exit;
>> //die("User/password was not long enough!");
>> }elseif (!is_numeric($code) || !is_numeric($phone)){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>Non Numeric Character Where only Numeric Value is
>> Allowed.   ";
>> include 'signup.php';
>> exit;
>> //}elseif (empty($username)|| empty($password1) || empty($password2) ||
>> empty($name) || empty($address) || empty($city) || empty($state) ||
>> empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
>> //echo "";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo " ";
>> //echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> //echo " > style=font-size:11pt;>All fields are
>> Mandatory
>>   //";
>> //include 'signup.php';
>> }else{
>> // checks if the username is in use
>> $checkuser = mysql_query("SELECT username FROM id_users WHERE
>> username='$username'");
>> $username_exist = mysql_num_rows($checkuser);
>> $referid = mysql_query("SELECT username FROM id_users WHERE
>> username='$refer_id'");
>> $referid_exist = mysql_num_rows($referid);
>> if($username_exist != 0){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>I'm sorry but the username you specified has
>> already been taken. Please pick another one.
>>   ";
>> unset($username);
>> include 'signup.php';
>> }elseif($referid_exist > 0){
>> echo "";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo " ";
>> echo "> bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
>> echo " > style=font-size:11pt;>I'm sorry but the referral id doesn't exist.
>> Please
>> check the referral id or enter the valid one.
>>   ";
>> unset($username);
>> include 'signup.php';
>> }else{
>> // this makes sure both passwords entered match
>> if ($password1 != $password2) {
>> die('Your passwords did not match.');
>> }else{
>> //}
>> // now we insert it into the database
>> //$password3 = md5($_POST['password1']);//
>> $insert = "INSERT INTO id_users (username, password, name, address, city,
>> state, code, p

Re: [PHP] Please Help Me ASAP

2009-04-10 Thread Bipin Upadhyay

kunal sharma wrote:

 Hello,
I'm building my own website without any knowledge of PHP, & i'm almost done
with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of coz of
that...

The error is :"PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145"

"145" happens to be last line i:e "?>" , but here becoz of pattern..itz not
into its proper way...

&
After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code here...please
help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Minimum length values for Username or Password or
Pincode or Mobile is missing. Please try again with correct
values.   ";
include 'signup.php';
exit;
//die("User/password was not long enough!");
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Non Numeric Character Where only Numeric Value is
Allowed.   ";
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo "";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo "";
//echo " All fields are Mandatory
  //";
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query("SELECT username FROM id_users WHERE
username='$username'");
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query("SELECT username FROM id_users WHERE
username='$refer_id'");
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the username you specified has
already been taken. Please pick another one.
  ";
unset($username);
include 'signup.php';
}elseif($referid_exist > 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the referral id doesn't exist. Please
check the referral id or enter the valid one.
  ";
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = "INSERT INTO id_users (username, password, name, address, city,
state, code, phone, email, payment_status, member_status, total_member,
refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city', '$state',
'$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE id_users
SET refer_id = '1' where username = 'refer_id';";
$queries =
preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\\']*[^'|^\\\']$)/",
$insert);
foreach ($queries as $query){
if (strlen(trim($query)) != 0) mysql_query($query) or die(mysql_error());
}
//mysql_query($insert) or die(mysql_error());
//mysql_close();

//$update = "update id_users set refer_id='1' where username='refer_id'";
//mysql_query($update) or die(mysql_error());
//mysql_close();
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " You have successfully Registered, Please
Login   ";
include 'login.php';
}
}
}
?>

Thanks Kunal

  

Kunal,

The trouble is the way you've commented things here (and in the 
following lines):


//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
...


Due to these comments, you are missing a semicolon.

On a very friendly note, here are a few comments:
1. The code is very ugly. Almost unmaintainable.
2. It seems to have almost every vulnerability I can think of -SQL 
Injection, XSS, etc.
3. You don't seem to be using an IDE. Any basic PHP IDE will at least 
eliminate these parsing related issues.

4. .

There are a few things that you'd need to learn before you can actually 
put your code in a live environment.

BTW, which book are you referring to write code?

--Bipin Upadhyay.
http://projectbee.org/



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



RE: [PHP] Please Help Me ASAP

2009-04-09 Thread abdulazeez alugo


 

> Date: Fri, 10 Apr 2009 08:33:10 +0530
> From: usang...@gmail.com
> To: php-general@lists.php.net
> Subject: [PHP] Please Help Me ASAP
> 
> Hello,
> I'm building my own website without any knowledge of PHP, & i'm almost done
> with that..as my website works fine on my local server
> i:e WAMPSERVER 2.0,
> but the same code is not working on server...n i'm rilli 'd of coz of
> that...
> 
> The error is :"PHP Parse error: syntax error, unexpected $end in
> /home/usang2me/public_html/sign_up.php on line 145"
> 
> "145" happens to be last line i:e "?>" , but here becoz of pattern..itz not
> into its proper way...
> 
> &
> After filling the sign up form correctly . it says ALL FIELD ARE
> MANDATORYi dont understand ...y soi'm pasting my code here...please
> help me asap ...
> each and every suggestion will be appreciat'd
> 
> 
> 
> Here Is The Code:
> 
>  $username = $_POST['username'];
> $password1 = $_POST['password1'];
> $password2 = $_POST['password2'];
> $name = $_POST['name'];
> $address = $_POST['address'];
> $city = $_POST['city'];
> $state = $_POST['state'];
> $code = $_POST['code'];
> $phone = $_POST['phone'];
> $email = $_POST['email'];
> //$bankname = $_POST['bankname'];
> //$bankbranch = $_POST['bankbranch'];
> //$accountnumber = $_POST['bankac'];
> $refer_id = $_POST['refer_id'];
> //$country = $_POST['country'];
> // Connects to your Database
> include('database_connect_local.php');
> //This makes sure they did not leave any fields blank
> $minuser_len = 6; //username minimum length
> $minpass_len = 6; //password minimum length
> $mincode_len = 6; //code minimum length
> $minphone_len = 10; //phone minimum length
> //$refer_id_len = 6; //refer_id minimum length
> 
> if (strlen($username) < $minuser_len || strlen($password1) < $minpass_len ||
> strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
> {
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>Minimum length values for Username or Password or
> Pincode or Mobile is missing. Please try again with correct
> values.   ";
> include 'signup.php';
> exit;
> //die("User/password was not long enough!");
> }elseif (!is_numeric($code) || !is_numeric($phone)){
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo "  style=font-size:11pt;>Non Numeric Character Where only Numeric Value is
> Allowed.   ";
> include 'signup.php';
> exit;
> //}elseif (empty($username)|| empty($password1) || empty($password2) ||
> empty($name) || empty($address) || empty($city) || empty($state) ||
> empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
> //echo "";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " ";
> //echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> //echo "  style=font-size:11pt;>All fields are Mandatory
>   //";
> //include 'signup.php';
> }else{
> // checks if the username is in use
> $checkuser = mysql_query("SELECT username FROM id_users WHERE
> username='$username'");
> $username_exist = mysql_num_rows($checkuser);
> $referid = mysql_query("SELECT username FROM id_users WHERE
> username='$refer_id'");
> $referid_exist = mysql_num_rows($referid);
> if($username_exist != 0){
> echo "";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " ";
> echo " bordercolor=#FF6600 bgcolor=#C0C0C0 width=50% height=10>";
> echo &q

Re: [PHP] Please Help Me ASAP

2009-04-09 Thread Jason Pruim



Jason Pruim

On Apr 9, 2009, at 11:03 PM, kunal sharma  wrote:


Hello,
I'm building my own website without any knowledge of PHP, & i'm  
almost done

with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of  
coz of

that...

The error is :"PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145"

"145" happens to be last line i:e "?>" , but here becoz of  
pattern..itz not

into its proper way...

&
After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code  
here...please

help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

if (strlen($username) < $minuser_len || strlen($password1) <  
$minpass_len ||

strlen($code) < $mincode_len || strlen($phone) < $minphone_len)
{
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>Minimum length values for Username or  
Password or

Pincode or Mobile is missing. Please try again with correct
values.   ";
include 'signup.php';
exit;
//die("User/password was not long enough!");
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>Non Numeric Character Where only Numeric  
Value is

Allowed.   ";
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2)  
||

empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo "";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo "";
//echo " style=font-size:11pt;>All fields are Mandatoryp>

  //";
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query("SELECT username FROM id_users WHERE
username='$username'");
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query("SELECT username FROM id_users WHERE
username='$refer_id'");
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the username you specified has
already been taken. Please pick another one.td>

  ";
unset($username);
include 'signup.php';
}elseif($referid_exist > 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " style=font-size:11pt;>I'm sorry but the referral id doesn't  
exist. Please
check the referral id or enter the valid one.td>

  ";
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = "INSERT INTO id_users (username, password, name, address,  
city,
state, code, phone, email, payment_status, member_status,  
total_member,

refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city',  
'$state',
'$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE  
id_users

SET refer_id = '1' where username = 'refer_id';";
$queries =
preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\ 
\']*[^'|^\\\']$)/",

$insert);
foreach ($queries as $query){
if (strlen(trim($query)) != 0) mysql_query($query) or  
die(mysql_error());

}
//mysql_query($insert) or die(mysql_error());
//mysql_close();

//$update = "update id_users set refer_id='1' where  
username='refer_id'";

//mysql_query($update) or die(mysql_error());
//mysql_close();
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " You have successfully Registered, Please
Login   ";
include 'login.php';
}
}
}
?>

Thanks Kunal


Just based on a quick look i'd guess you don't have the right number  
of curly braces at the end of the file. 


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



[PHP] Please Help Me ASAP

2009-04-09 Thread kunal sharma
 Hello,
I'm building my own website without any knowledge of PHP, & i'm almost done
with that..as my website works fine on my local server
i:e WAMPSERVER 2.0,
but the same code is not working on server...n i'm rilli 'd of coz of
that...

The error is :"PHP Parse error: syntax error, unexpected $end in
/home/usang2me/public_html/sign_up.php on line 145"

"145" happens to be last line i:e "?>" , but here becoz of pattern..itz not
into its proper way...

&
After filling the sign up form correctly . it says ALL FIELD ARE
MANDATORYi dont understand ...y soi'm pasting my code here...please
help me asap ...
each and every suggestion will be appreciat'd



Here Is The Code:

";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Minimum length values for Username or Password or
Pincode or Mobile is missing. Please try again with correct
values.   ";
include 'signup.php';
exit;
//die("User/password was not long enough!");
}elseif (!is_numeric($code) || !is_numeric($phone)){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " Non Numeric Character Where only Numeric Value is
Allowed.   ";
include 'signup.php';
exit;
//}elseif (empty($username)|| empty($password1) || empty($password2) ||
empty($name) || empty($address) || empty($city) || empty($state) ||
empty($code) || //empty($phone) || empty($email) || empty($refer_id)){
//echo "";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo " ";
//echo "";
//echo " All fields are Mandatory
  //";
//include 'signup.php';
}else{
// checks if the username is in use
$checkuser = mysql_query("SELECT username FROM id_users WHERE
username='$username'");
$username_exist = mysql_num_rows($checkuser);
$referid = mysql_query("SELECT username FROM id_users WHERE
username='$refer_id'");
$referid_exist = mysql_num_rows($referid);
if($username_exist != 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the username you specified has
already been taken. Please pick another one.
  ";
unset($username);
include 'signup.php';
}elseif($referid_exist > 0){
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " I'm sorry but the referral id doesn't exist. Please
check the referral id or enter the valid one.
  ";
unset($username);
include 'signup.php';
}else{
// this makes sure both passwords entered match
if ($password1 != $password2) {
die('Your passwords did not match.');
}else{
//}
// now we insert it into the database
//$password3 = md5($_POST['password1']);//
$insert = "INSERT INTO id_users (username, password, name, address, city,
state, code, phone, email, payment_status, member_status, total_member,
refer_id)
VALUES ('$username', '$password1', '$name', '$address', '$city', '$state',
'$code', '$phone', '$email', '0', '0', '0', '$refer_id'); UPDATE id_users
SET refer_id = '1' where username = 'refer_id';";
$queries =
preg_split("/;+(?=([^'|^\\\']*['|\\\'][^'|^\\\']*['|\\\'])*[^'|^\\\']*[^'|^\\\']$)/",
$insert);
foreach ($queries as $query){
if (strlen(trim($query)) != 0) mysql_query($query) or die(mysql_error());
}
//mysql_query($insert) or die(mysql_error());
//mysql_close();

//$update = "update id_users set refer_id='1' where username='refer_id'";
//mysql_query($update) or die(mysql_error());
//mysql_close();
echo "";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo " ";
echo "";
echo " You have successfully Registered, Please
Login   ";
include 'login.php';
}
}
}
?>

Thanks Kunal


Re: [PHP] PLEASE help, this is driving me crazy - is saveHTML() etc not UTF-8 capable?

2009-02-18 Thread Addmissins Development
mike wrote:
> On Tue, Feb 17, 2009 at 4:26 PM, mike  wrote:
>> i tried that kind of stuff - it did not seem to work.
>>
>> i will try again... if anyone has any ideas i.e. "use iconv to convert
>> to A, then use DOM stuff, then use iconv to move it back to UTF8..."
>> etc. i am all ears.
> 
> Nope - for example this is the input text (apologies if your reader
> isn't utf-8) - simplified chinese
> 
> 足以概括英特尔为此所付出的努力。谈及移动设备,英特尔公司自诩在该领域的创新犹如其户友好性设计及能效等一样出类拔萃。同时,英特尔也一直表示要帮助构建能够
> 
> Output is this:
> 
> 一句“英特尔热衷于移åŠ&u
> 
> What is funny is I don't care about altering the actual content, only
> the content of the "href" and "src" attributes, which are all standard
> latin-based URLs, too.
> 
> Here's the simplest code to create the behavior
> 
> $q = db_query("SELECT id,old FROM testing", "redirects");
> while(list($id, $doc) = db_rows($q)) {
> $new = fix_document($doc);
> $new = db_escape($new);
> db_query("UPDATE testing SET new='$new' WHERE id=$id",
> "redirects");
> }
> db_free($q);
> 
> function fix_document($string) {
> $dom = new DomDocument('1.0', 'UTF-8');
> @$dom->loadHTML($string);
> $dom->preserveWhiteSpace = false;
> return $dom->saveHTML();
> }
> 
> (Note: it is not the db functions, if I do this:
> 
> function fix_document($string) {
> return $string;
> }
> 
> The content is unaltered.
> 
> Anyone with any ideas? Any options to feed to the DOM stuff? It's
> translating the stuff to htmlentities, which I don't want either.
> 

As i understand all non ASCII characters will be converted to html entities.

Try this

function fix_document($string) {
$dom = new DomDocument('1.0', 'UTF-8');
@$dom->loadHTML($string);
$dom->preserveWhiteSpace = false;
return html_entity_decode($dom->saveHTML(),ENT_QUOTES,"UTF-8");
}

header("Content-Type: text/html; charset=UTF-8");
echo fix_document('data here');

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



Re: [PHP] PLEASE help, this is driving me crazy - is saveHTML() etc not UTF-8 capable?

2009-02-17 Thread mike
On Tue, Feb 17, 2009 at 4:26 PM, mike  wrote:
> i tried that kind of stuff - it did not seem to work.
>
> i will try again... if anyone has any ideas i.e. "use iconv to convert
> to A, then use DOM stuff, then use iconv to move it back to UTF8..."
> etc. i am all ears.

Nope - for example this is the input text (apologies if your reader
isn't utf-8) - simplified chinese

足以概括英特尔为此所付出的努力。谈及移动设备,英特尔公司自诩在该领域的创新犹如其户友好性设计及能效等一样出类拔萃。同时,英特尔也一直表示要帮助构建能够

Output is this:

一句“英特尔热衷于移åŠ&u

What is funny is I don't care about altering the actual content, only
the content of the "href" and "src" attributes, which are all standard
latin-based URLs, too.

Here's the simplest code to create the behavior

$q = db_query("SELECT id,old FROM testing", "redirects");
while(list($id, $doc) = db_rows($q)) {
$new = fix_document($doc);
$new = db_escape($new);
db_query("UPDATE testing SET new='$new' WHERE id=$id",
"redirects");
}
db_free($q);

function fix_document($string) {
$dom = new DomDocument('1.0', 'UTF-8');
@$dom->loadHTML($string);
$dom->preserveWhiteSpace = false;
return $dom->saveHTML();
}

(Note: it is not the db functions, if I do this:

function fix_document($string) {
return $string;
}

The content is unaltered.

Anyone with any ideas? Any options to feed to the DOM stuff? It's
translating the stuff to htmlentities, which I don't want either.

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



Re: [PHP] PLEASE help, this is driving me crazy - is saveHTML() etc not UTF-8 capable?

2009-02-17 Thread mike
i tried that kind of stuff - it did not seem to work.

i will try again... if anyone has any ideas i.e. "use iconv to convert
to A, then use DOM stuff, then use iconv to move it back to UTF8..."
etc. i am all ears.


On Tue, Feb 17, 2009 at 12:46 PM, Nathan Nobbe  wrote:
> On Tue, Feb 17, 2009 at 12:40 PM, mike  wrote:
>>
>> Pardon the messy code, but I got this working like a charm. Then I
>> went to try it on some Russian content and it broke. The inbound was
>> utf-8 encoded Russian characters, output was something else
>> unintelligible.
>>
>> I found a PHP bug from years ago that sounded related but the user had
>> a workaround.
>>
>> Note that it does not appear that any of the functions break the
>> encoding - it is the ->saveHTML() that doesn't seem to work (I also
>> tried saveXML() and it did not work either?
>>
>> I am totally up for changing out using php's DOM and using another
>> library, basically I just want to traverse the DOM and pick out all > href> and  and possibly any other external references in the
>> documents so I can run them through some link examination and such. I
>> figured I may have to fall back to a regexp, but PHP's DOM was so good
>> with even partial and malformed HTML, I was excited at how easy this
>> was...
>>
>>$dom = new domDocument;
>>@$dom->loadHTML($string);
>>$dom->preserveWhiteSpace = false;
>>$links = $dom->getElementsByTagName('a');
>>foreach($links as $tag) {
>>$before = $tag->getAttribute('href');
>>$after = strip_chars($before);
>>$after = map_url($after);
>>$after = fix_link($after);
>>if($after != false) {
>>echo "\tBEFORE: $before\n";
>>echo "\tAFTER : $after\n\n";
>>$tag->removeAttribute('href');
>>$tag->setAttribute('href', $after);
>>}
>>}
>>return $dom->saveHTML();
>> }
>>
>> I tried things like this:
>>
>> new DomDocument('1.0', 'UTF-8');
>>
>> as well as encoding options for $dom like $dom->encoding = 'utf-8' or
>> something (I tried so many variations I cannot remember anymore)
>>
>> Anyone have any ideas?
>>
>> As long as it can read in the string (which is and should always be
>> UTF-8) and spit out UTF-8, I can make sure any of my functions are
>> UTF-8 safe that handle the data...
>
> from the manual on DOM,
>
> Note: DOM extension uses UTF-8 encoding. Use utf8_encode() and utf8_decode()
> to work with texts in ISO-8859-1 encoding or Iconv for other encodings.
>
> -nathan
>
>

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



Re: [PHP] PLEASE help, this is driving me crazy - is saveHTML() etc not UTF-8 capable?

2009-02-17 Thread Nathan Nobbe
On Tue, Feb 17, 2009 at 12:40 PM, mike  wrote:

> Pardon the messy code, but I got this working like a charm. Then I
> went to try it on some Russian content and it broke. The inbound was
> utf-8 encoded Russian characters, output was something else
> unintelligible.
>
> I found a PHP bug from years ago that sounded related but the user had
> a workaround.
>
> Note that it does not appear that any of the functions break the
> encoding - it is the ->saveHTML() that doesn't seem to work (I also
> tried saveXML() and it did not work either?
>
> I am totally up for changing out using php's DOM and using another
> library, basically I just want to traverse the DOM and pick out all  href> and  and possibly any other external references in the
> documents so I can run them through some link examination and such. I
> figured I may have to fall back to a regexp, but PHP's DOM was so good
> with even partial and malformed HTML, I was excited at how easy this
> was...
>
>$dom = new domDocument;
>@$dom->loadHTML($string);
>$dom->preserveWhiteSpace = false;
>$links = $dom->getElementsByTagName('a');
>foreach($links as $tag) {
>$before = $tag->getAttribute('href');
>$after = strip_chars($before);
>$after = map_url($after);
>$after = fix_link($after);
>if($after != false) {
>echo "\tBEFORE: $before\n";
>echo "\tAFTER : $after\n\n";
>$tag->removeAttribute('href');
>$tag->setAttribute('href', $after);
>}
>}
>return $dom->saveHTML();
> }
>
> I tried things like this:
>
> new DomDocument('1.0', 'UTF-8');
>
> as well as encoding options for $dom like $dom->encoding = 'utf-8' or
> something (I tried so many variations I cannot remember anymore)
>
> Anyone have any ideas?
>
> As long as it can read in the string (which is and should always be
> UTF-8) and spit out UTF-8, I can make sure any of my functions are
> UTF-8 safe that handle the data...


from the manual on DOM,

*Note*: DOM extension uses UTF-8 encoding. Use
utf8_encode()and
utf8_decode()  to work
with texts in ISO-8859-1 encoding or
Iconvfor other encodings.

-nathan


[PHP] PLEASE help, this is driving me crazy - is saveHTML() etc not UTF-8 capable?

2009-02-17 Thread mike
Pardon the messy code, but I got this working like a charm. Then I
went to try it on some Russian content and it broke. The inbound was
utf-8 encoded Russian characters, output was something else
unintelligible.

I found a PHP bug from years ago that sounded related but the user had
a workaround.

Note that it does not appear that any of the functions break the
encoding - it is the ->saveHTML() that doesn't seem to work (I also
tried saveXML() and it did not work either?

I am totally up for changing out using php's DOM and using another
library, basically I just want to traverse the DOM and pick out all  and  and possibly any other external references in the
documents so I can run them through some link examination and such. I
figured I may have to fall back to a regexp, but PHP's DOM was so good
with even partial and malformed HTML, I was excited at how easy this
was...

$dom = new domDocument;
@$dom->loadHTML($string);
$dom->preserveWhiteSpace = false;
$links = $dom->getElementsByTagName('a');
foreach($links as $tag) {
$before = $tag->getAttribute('href');
$after = strip_chars($before);
$after = map_url($after);
$after = fix_link($after);
if($after != false) {
echo "\tBEFORE: $before\n";
echo "\tAFTER : $after\n\n";
$tag->removeAttribute('href');
$tag->setAttribute('href', $after);
}
}
return $dom->saveHTML();
}

I tried things like this:

new DomDocument('1.0', 'UTF-8');

as well as encoding options for $dom like $dom->encoding = 'utf-8' or
something (I tried so many variations I cannot remember anymore)

Anyone have any ideas?

As long as it can read in the string (which is and should always be
UTF-8) and spit out UTF-8, I can make sure any of my functions are
UTF-8 safe that handle the data...

Thanks

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



RE: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Arno Kuhl
-Original Message-
From: Scott Bounds [mailto:[EMAIL PROTECTED]
Sent: 11 January 2007 07:16
To: php-general@lists.php.net
Subject: Re: [PHP] Please Help with simple Noob problem

Arno, you nailed it right on the head.  You and someone else told me
that.  I am glad that you did because that is exactly what the problem
was.  Thanks for being patient and understanding.

Scott

--
Sure, all part of the learning experience.

Understanding why you can view an html file in a browser but not a php file
is essential: when viewing an html file, it's the browser (client-side)
that's processing and rendering the html code, but the browser can't process
php code. For that you need the webserver (server-side). Browsers are built
to understand and process html and javascript, but only a webserver can
understand and process php script. Unless you're developing or learning, the
browser and the webserver are almost always on different machines (that's
the whole point of the internet!). In your case (and most cases) the
webserver is Apache.

Apache treats html files and php files differently. In the case of html
files it just gets the file and sends it back to the browser, as it was
requested to do. But in the case of php files it opens the file and starts
processing it, i.e. running it as a program.

Apache processes (runs) the php script which generates the html script,
which Apache then sends back to the browser. The browser then processes that
html script and displays the result. It's basically the same concept for all
server-side scripting.

When you type http:// in the browser address bar, you're telling the browser
to communicate with a webserver, using the hypertext protocol. When you type
file:// in the browser address bar, you're telling the browser to
communicate with your local file system. Try
http://local-directory/file.html and you'll see it won't work, whereas
file://local-directory/file.html will work just fine (assuming you've got
file.html in local-directory).

Hope that makes sense.

Arno

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds
Bruce, thanks fro your help but I found out what stupid noob thing I was 
doing.  I had been doing the File/Open File/test.php  Janet had gotten 
to me and do http://localhost/test.php.  Big world of difference. 
trying to learn why but that made all the difference.  Worked great 
then.  Thanks for your help.


Signed,

The really, really noob

Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds
Arno, you nailed it right on the head.  You and someone else told me 
that.  I am glad that you did because that is exactly what the problem 
was.  Thanks for being patient and understanding.


Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Raphael Martins

Use  instead of , or try to add some space
after the 
Hello all. I seem to be having a terrible tim ewith something that is
so simple it makes me sick.  I have a server running FC2.  it has
Apache 2.x.x on it and it came installed with php-4.x.x.  Sorry I
don't have the exact versions but fatigue and frustration has taken
over.  I can get them if you really need them.  Here's the major
problem.  When I try and view a simple php page in the browser, it
doesn't display anything that has to do with the php tags.  By that I
mean it won't recognize the  php directives (I guess).  I made a
simple page (the infamous phpinfo ()  page) right out of the books.
Saved it as test.php just like it said.  Made sure that apache is
running and browsed to the page. Nothing, no errors, no nothing.  I
have made up some other pages (mostly from some php books - real
simple ones) to view and they all display the same action.

Now when these machines (I actually have a couple of these servers and
they all act the same) were installed, it was from FC2 CD's with the
webserver full package.  There were all kinds of php files installed,
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it
seems to be all there.

Can anyone out there help me figure out how to make this work?  I
would be truly indebted to you, put you on my Christmas card list, etc.

Thanks in advance to all of you kind and wonderful people.

Scott



RE: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Arno Kuhl
-Original Message-
From: Scott Bounds [mailto:[EMAIL PROTECTED]
Sent: 11 January 2007 06:21
To: php-general@lists.php.net
Subject: Re: [PHP] Please Help with simple Noob problem


Jochem Maas wrote:
> Scott Bounds wrote:
>
>>Hello all. I seem to be having a terrible tim ewith something that is so
>>simple it makes me sick.  I have a server running FC2.  it has Apache
>>2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have
>>the exact versions but fatigue and frustration has taken over.  I can
>>get them if you really need them.  Here's the major problem.  When I try
>>and view a simple php page in the browser, it doesn't display anything
>>that has to do with the php tags.  By that I mean it won't recognize the
>> php directives (I guess).
>
>
> does that mean your seeing the text '' (or similar)
> in your browser? if so then your apache setup is broken with regard to
> php - the php apache module is not being loaded or the mapping to
> .php files is borked (or non-existent).
>
>  I made a simple page (the infamous phpinfo
>
>>()  page) right out of the books.  Saved it as test.php just like it
>>said.  Made sure that apache is running and browsed to the page.
>>Nothing, no errors, no nothing.  I have made up some other pages (mostly
>>from some php books - real simple ones) to view and they all display the
>>same action.
>>
>>Now when these machines (I actually have a couple of these servers and
>>they all act the same) were installed, it was from FC2 CD's with the
>>webserver full package.  There were all kinds of php files installed,
>>etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems
>>to be all there.
>
>
> start by tailing the apache access_log and the apache error_log,
> a cmdline something like this:
>
> tail -f /var/log/apache2/access_log /var/log/apache2/error_log
>
> and see what kind of errors appear when you surf to the problem pages.
> also check for apache start up errors that a related to php.
>
>
>>Can anyone out there help me figure out how to make this work?  I would
>>be truly indebted to you, put you on my Christmas card list, etc.
>
>
> please don't waste trees.
>
>
>>Thanks in advance to all of you kind and wonderful people.
>>
>>Scott
>>
Well, actually I don't see anything.  Nothing at all (in the case of the
  phpinfo() page.  All the page has in it is just .
It was saved as test.php.  How can I tell if something is broken and
where do I look for the files?  I haven't done any dorking around with
the links, etc.  Just done the complete install, etc.  Then wanted to
play around with things to to get the feel of everything.  And I get
nothing.

Thanks!

Scott

--

Might be a silly question, but in the browser address bar did you type
http://localhost/test.php
because if you just viewed a php file in the browser you see the contents as
you described. You can most times view an html file successfully in a
browser but not a php file, that needs the webserver to process it. (sorry
if I'm being over-simple but you did say you were a noob)

If you're loading the page properly then check your php.ini to see if it's
outputing to an error log and what that error log is, then check the log
file. Apache also has an error log, look in the conf file to see what it's
called and check that too.

Arno

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



RE: [PHP] Please Help with simple Noob problem

2007-01-11 Thread bruce
hi scott...

ok.. good.. so we know apache works/simple html works..

can you post your apache conf file

can you also create a simple php file to be served, and run that from your
php cmdline.. just want to make sure that php is actually running, and that
the test php file will run... remember to include "#!/usr/bin/php" as the
1st line...



-Original Message-
From: Scott Bounds [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 8:50 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Please Help with simple Noob problem


bruce wrote:
> hi scott.
>
> tell us, have you been able to generate a simple html test page on the
> server that you can see from your browser.
>
> for test purposes (i'm assuming this is your on test server), rename the
> apache error/access log files. no need to trek through old garbage in the
> files. when you restart apache, it'll recreate the files.
>
> from a short perusal of your posts, i'm of the opinion that something is
> screwing up apache from running.
>
> so let's see if we get apache starting correctly.
>  -lets see is we get a basic test html file to be served
>  -we'll tackle getting php files served...
>
>
>
> -Original Message-
> From: Scott Bounds [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 11, 2007 8:30 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Please Help with simple Noob problem
>
>
> David Giragosian wrote:
>
>>>Well, actually I don't see anything.  Nothing at all (in the case of the
>>>phpinfo() page.  All the page has in it is just .
>>>It was saved as test.php.  How can I tell if something is broken and
>>>where do I look for the files?  I haven't done any dorking around with
>>>the links, etc.  Just done the complete install, etc.  Then wanted to
>>>play around with things to to get the feel of everything.  And I get
>>>nothing.
>>>
>>>Thanks!
>>
>>
>>
>>
>>Scott,
>>
>>Have you restarted the server (or the machine), as Miles has suggested?
>>
>>David
>>
>
> Hi David.  yes, many times.  I'm ready to put it on a crontab to restart
> it like every minute.
>
> Scott
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Hi Bruce.  I created a simple test.html page and had the following in
the page:

This is a test page to see if the html is working

The page did present with the text in red.  I then checked the error_log
and it had no entries beyond just  the startup stuff.  it seems that it
is doing the html just fine.  I do have a production server running
(same configuration) and it presents html pages just fine.  Just no php
pages.

Scott

--
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] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds

bruce wrote:

hi scott.

tell us, have you been able to generate a simple html test page on the
server that you can see from your browser.

for test purposes (i'm assuming this is your on test server), rename the
apache error/access log files. no need to trek through old garbage in the
files. when you restart apache, it'll recreate the files.

from a short perusal of your posts, i'm of the opinion that something is
screwing up apache from running.

so let's see if we get apache starting correctly.
 -lets see is we get a basic test html file to be served
 -we'll tackle getting php files served...



-Original Message-
From: Scott Bounds [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 8:30 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Please Help with simple Noob problem


David Giragosian wrote:


Well, actually I don't see anything.  Nothing at all (in the case of the
phpinfo() page.  All the page has in it is just .
It was saved as test.php.  How can I tell if something is broken and
where do I look for the files?  I haven't done any dorking around with
the links, etc.  Just done the complete install, etc.  Then wanted to
play around with things to to get the feel of everything.  And I get
nothing.

Thanks!





Scott,

Have you restarted the server (or the machine), as Miles has suggested?

David



Hi David.  yes, many times.  I'm ready to put it on a crontab to restart
it like every minute.

Scott

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Bruce.  I created a simple test.html page and had the following in 
the page:


This is a test page to see if the html is working

The page did present with the text in red.  I then checked the error_log 
and it had no entries beyond just  the startup stuff.  it seems that it 
is doing the html just fine.  I do have a production server running 
(same configuration) and it presents html pages just fine.  Just no php 
pages.


Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Stut

Please keep it on-list.

Scott Bounds wrote:

 by the way, I did view source and it seemed to recognize the opening
 php tag ().  I am
 assuming that in that evidently FC2 likes to color code the tags (php
 is with purple) and it had the opening tag colored purple, but the
 closing tag was black.  It also (in the web page) displayed the
 closing tag like regular text.


Are you saying that you see the  when you view the source of 
the page? If so then your configuration in Apache is wrong. Please do as 
I said and read the manual page regarding installing PHP4 on Apache2, 
following the instructions and check the Apache error log.



 I tried to put the line in about loading the module (mine is php4)
 and apache complained saying that it had already been called (from
 the conf.d file).  I did however add the following:


> # Filters allow you to process content before it is sent to the client.
> #
> # To parse .shtml files for server-side includes (SSI):
> # (You will also need to add "Includes" to the "Options" directive.)
> #
> AddType text/html .shtml
> AddOutputFilter INCLUDES .shtml
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> AddType application/x-httpd-php  .phtml


 I then restarted apache (service httpd restart) and tried viewing the
 pages again; same outcome.


Check the Apache error log - I'm guessing it's failing to initialise the 
PHP module.


-Stut


 On Thu, 2007-01-11 at 09:59, Stut wrote:
> Scott Bounds wrote:
>> Hello all. I seem to be having a terrible tim ewith something
>> that is so simple it makes me sick.  I have a server running FC2.
>>  it has Apache 2.x.x on it and it came installed with php-4.x.x.
>>  Sorry I don't have the exact versions but fatigue and
>> frustration has taken over.  I can get them if you really need
>> them.  Here's the major problem.  When I try and view a simple
>> php page in the browser, it doesn't display anything that has to
>> do with the php tags.  By that I mean it won't recognize the  php
>> directives (I guess).  I made a simple page (the infamous phpinfo
>> ()  page) right out of the books. Saved it as test.php just like
>> it said. Made sure that apache is running and browsed to the
>> page. Nothing, no errors, no nothing.  I have made up some other
>> pages (mostly from some php books - real simple ones) to view and
>> they all display the same action.
>>
>> Now when these machines (I actually have a couple of these
>> servers and they all act the same) were installed, it was from
>> FC2 CD's with the webserver full package.  There were all kinds
>> of php files installed, etc.  In my httpd.conf file it calls the
>>  php.ini file, etc.  So it seems to be all there.
>>
>> Can anyone out there help me figure out how to make this work?  I
>>  would be truly indebted to you, put you on my Christmas card
>> list, etc.
> View the source of your page in the browser. If you see the PHP
> code chances are you haven't told Apache about PHP. Read the manual
>  (yes, there is a manual: http://php.net/install.unix.apache2) for
>  specific instructions, but your httpd.conf needs at least the
> following two lines (paths on your system may differ)...
>
> LoadModule php5_module modules/libphp5.so AddType
> application/x-httpd-php .php .phtml
>
> -Stut


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



RE: [PHP] Please Help with simple Noob problem

2007-01-11 Thread bruce
hi scott.

tell us, have you been able to generate a simple html test page on the
server that you can see from your browser.

for test purposes (i'm assuming this is your on test server), rename the
apache error/access log files. no need to trek through old garbage in the
files. when you restart apache, it'll recreate the files.

from a short perusal of your posts, i'm of the opinion that something is
screwing up apache from running.

so let's see if we get apache starting correctly.
 -lets see is we get a basic test html file to be served
 -we'll tackle getting php files served...



-Original Message-
From: Scott Bounds [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 11, 2007 8:30 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Please Help with simple Noob problem


David Giragosian wrote:
>>
>> Well, actually I don't see anything.  Nothing at all (in the case of the
>> phpinfo() page.  All the page has in it is just .
>> It was saved as test.php.  How can I tell if something is broken and
>> where do I look for the files?  I haven't done any dorking around with
>> the links, etc.  Just done the complete install, etc.  Then wanted to
>> play around with things to to get the feel of everything.  And I get
>> nothing.
>>
>> Thanks!
>
>
>
>
> Scott,
>
> Have you restarted the server (or the machine), as Miles has suggested?
>
> David
>
Hi David.  yes, many times.  I'm ready to put it on a crontab to restart
it like every minute.

Scott

--
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] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds

Dave Goodchild wrote:
Why not check php.ini to see whether display_errors is set to off and 
switch
it on until you are back in business? Check the httpd.conf file to make 
sure

Apache is parsing .php files correctly.



hi Dave.  let me check in the ini file and see.  I'll reply as soon as I 
can determine.


Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds

David Giragosian wrote:


Well, actually I don't see anything.  Nothing at all (in the case of the
phpinfo() page.  All the page has in it is just .
It was saved as test.php.  How can I tell if something is broken and
where do I look for the files?  I haven't done any dorking around with
the links, etc.  Just done the complete install, etc.  Then wanted to
play around with things to to get the feel of everything.  And I get
nothing.

Thanks!





Scott,

Have you restarted the server (or the machine), as Miles has suggested?

David

Hi David.  yes, many times.  I'm ready to put it on a crontab to restart 
it like every minute.


Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds

Scott Bounds wrote:

Jochem Maas wrote:


Scott Bounds wrote:


Hello all. I seem to be having a terrible tim ewith something that is so
simple it makes me sick.  I have a server running FC2.  it has Apache
2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have
the exact versions but fatigue and frustration has taken over.  I can
get them if you really need them.  Here's the major problem.  When I try
and view a simple php page in the browser, it doesn't display anything
that has to do with the php tags.  By that I mean it won't recognize the
php directives (I guess). 




does that mean your seeing the text '' (or similar)
in your browser? if so then your apache setup is broken with regard to
php - the php apache module is not being loaded or the mapping to
.php files is borked (or non-existent).

 I made a simple page (the infamous phpinfo


()  page) right out of the books.  Saved it as test.php just like it
said.  Made sure that apache is running and browsed to the page.
Nothing, no errors, no nothing.  I have made up some other pages (mostly
from some php books - real simple ones) to view and they all display the
same action.

Now when these machines (I actually have a couple of these servers and
they all act the same) were installed, it was from FC2 CD's with the
webserver full package.  There were all kinds of php files installed,
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems
to be all there.




start by tailing the apache access_log and the apache error_log,
a cmdline something like this:

tail -f /var/log/apache2/access_log /var/log/apache2/error_log

and see what kind of errors appear when you surf to the problem pages.
also check for apache start up errors that a related to php.



Can anyone out there help me figure out how to make this work?  I would
be truly indebted to you, put you on my Christmas card list, etc.




please don't waste trees.



Thanks in advance to all of you kind and wonderful people.

Scott

Well, actually I don't see anything.  Nothing at all (in the case of the 
 phpinfo() page.  All the page has in it is just . It 
was saved as test.php.  How can I tell if something is broken and where 
do I look for the files?  I haven't done any dorking around with the 
links, etc.  Just done the complete install, etc.  Then wanted to play 
around with things to to get the feel of everything.  And I get nothing.


Thanks!

Scott


When I tailed the access_log and surfed to the file I got nothing.  When 
I tailed the error_log, I got the following:


[EMAIL PROTECTED] httpd]# tail -f error_log
[Thu Jan 11 08:57:12 2007] [error] jk2_init() Can't find child 14360 in 
scoreboard
[Thu Jan 11 08:57:12 2007] [notice] workerEnv.init() ok 
/etc/httpd/conf/workers2.properties

[Thu Jan 11 08:57:12 2007] [error] mod_jk child init 1 -2
[Thu Jan 11 08:57:12 2007] [error] jk2_init() Can't find child 14361 in 
scoreboard
[Thu Jan 11 08:57:12 2007] [notice] workerEnv.init() ok 
/etc/httpd/conf/workers2.properties

[Thu Jan 11 08:57:12 2007] [error] mod_jk child init 1 -2
[Thu Jan 11 08:57:12 2007] [error] jk2_init() Can't find child 14362 in 
scoreboard
[Thu Jan 11 08:57:12 2007] [notice] workerEnv.init() ok 
/etc/httpd/conf/workers2.properties

[Thu Jan 11 08:57:12 2007] [error] mod_jk child init 1 -2
[Thu Jan 11 08:57:12 2007] [notice] Apache/2.0.51 (Fedora) configured -- 
resuming normal operations


I have no idea what this is telling me.

Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread David Giragosian


Well, actually I don't see anything.  Nothing at all (in the case of the
phpinfo() page.  All the page has in it is just .
It was saved as test.php.  How can I tell if something is broken and
where do I look for the files?  I haven't done any dorking around with
the links, etc.  Just done the complete install, etc.  Then wanted to
play around with things to to get the feel of everything.  And I get
nothing.

Thanks!




Scott,

Have you restarted the server (or the machine), as Miles has suggested?

David


Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Dave Goodchild

Why not check php.ini to see whether display_errors is set to off and switch
it on until you are back in business? Check the httpd.conf file to make sure
Apache is parsing .php files correctly.


Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds

Jochem Maas wrote:

Scott Bounds wrote:


Hello all. I seem to be having a terrible tim ewith something that is so
simple it makes me sick.  I have a server running FC2.  it has Apache
2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have
the exact versions but fatigue and frustration has taken over.  I can
get them if you really need them.  Here's the major problem.  When I try
and view a simple php page in the browser, it doesn't display anything
that has to do with the php tags.  By that I mean it won't recognize the
php directives (I guess). 



does that mean your seeing the text '' (or similar)
in your browser? if so then your apache setup is broken with regard to
php - the php apache module is not being loaded or the mapping to
.php files is borked (or non-existent).

 I made a simple page (the infamous phpinfo


()  page) right out of the books.  Saved it as test.php just like it
said.  Made sure that apache is running and browsed to the page.
Nothing, no errors, no nothing.  I have made up some other pages (mostly
from some php books - real simple ones) to view and they all display the
same action.

Now when these machines (I actually have a couple of these servers and
they all act the same) were installed, it was from FC2 CD's with the
webserver full package.  There were all kinds of php files installed,
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems
to be all there.



start by tailing the apache access_log and the apache error_log,
a cmdline something like this:

tail -f /var/log/apache2/access_log /var/log/apache2/error_log

and see what kind of errors appear when you surf to the problem pages.
also check for apache start up errors that a related to php.



Can anyone out there help me figure out how to make this work?  I would
be truly indebted to you, put you on my Christmas card list, etc.



please don't waste trees.



Thanks in advance to all of you kind and wonderful people.

Scott

Well, actually I don't see anything.  Nothing at all (in the case of the 
 phpinfo() page.  All the page has in it is just . 
It was saved as test.php.  How can I tell if something is broken and 
where do I look for the files?  I haven't done any dorking around with 
the links, etc.  Just done the complete install, etc.  Then wanted to 
play around with things to to get the feel of everything.  And I get 
nothing.


Thanks!

Scott

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Miles Thompson

At 11:39 AM 1/11/2007, Scott Bounds wrote:

Hello all. I seem to be having a terrible tim ewith something that is so 
simple it makes me sick.  I have a server running FC2.  it has Apache 
2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have the 
exact versions but fatigue and frustration has taken over.  I can get them 
if you really need them.  Here's the major problem.  When I try and view a 
simple php page in the browser, it doesn't display anything that has to do 
with the php tags.  By that I mean it won't recognize the  php directives 
(I guess).  I made a simple page (the infamous phpinfo ()  page) right out 
of the books.  Saved it as test.php just like it said.  Made sure that 
apache is running and browsed to the page. Nothing, no errors, no 
nothing.  I have made up some other pages (mostly from some php books - 
real simple ones) to view and they all display the same action.


Now when these machines (I actually have a couple of these servers and 
they all act the same) were installed, it was from FC2 CD's with the 
webserver full package.  There were all kinds of php files installed, 
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems 
to be all there.


Can anyone out there help me figure out how to make this work?  I would be 
truly indebted to you, put you on my Christmas card list, etc.


Thanks in advance to all of you kind and wonderful people.

Scott


Scott,

Have a look at the instructions for setting up PHP. (It's been such a long 
time I do not remember where the different bits are.)


I do remember, however, that the php.ini file has to be in the right place, 
and that in httpd.conf you have to recognize the .php extension along with 
.htm, and .html.


Finally, you have to stop and rstart Apache so httpd.conf will be read again.

This is v. sketchy, but hope it helps.

Cheers - Miles 



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.410 / Virus Database: 268.16.9/622 - Release Date: 1/10/2007

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Jochem Maas
Scott Bounds wrote:
> Hello all. I seem to be having a terrible tim ewith something that is so
> simple it makes me sick.  I have a server running FC2.  it has Apache
> 2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have
> the exact versions but fatigue and frustration has taken over.  I can
> get them if you really need them.  Here's the major problem.  When I try
> and view a simple php page in the browser, it doesn't display anything
> that has to do with the php tags.  By that I mean it won't recognize the
>  php directives (I guess). 

does that mean your seeing the text '' (or similar)
in your browser? if so then your apache setup is broken with regard to
php - the php apache module is not being loaded or the mapping to
.php files is borked (or non-existent).

 I made a simple page (the infamous phpinfo
> ()  page) right out of the books.  Saved it as test.php just like it
> said.  Made sure that apache is running and browsed to the page.
> Nothing, no errors, no nothing.  I have made up some other pages (mostly
> from some php books - real simple ones) to view and they all display the
> same action.
> 
> Now when these machines (I actually have a couple of these servers and
> they all act the same) were installed, it was from FC2 CD's with the
> webserver full package.  There were all kinds of php files installed,
> etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems
> to be all there.

start by tailing the apache access_log and the apache error_log,
a cmdline something like this:

tail -f /var/log/apache2/access_log /var/log/apache2/error_log

and see what kind of errors appear when you surf to the problem pages.
also check for apache start up errors that a related to php.

> 
> Can anyone out there help me figure out how to make this work?  I would
> be truly indebted to you, put you on my Christmas card list, etc.

please don't waste trees.

> 
> Thanks in advance to all of you kind and wonderful people.
> 
> Scott
> 

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



Re: [PHP] Please Help with simple Noob problem

2007-01-11 Thread Stut

Scott Bounds wrote:

 Hello all. I seem to be having a terrible tim ewith something that is
 so simple it makes me sick.  I have a server running FC2.  it has
 Apache 2.x.x on it and it came installed with php-4.x.x.  Sorry I
 don't have the exact versions but fatigue and frustration has taken
 over.  I can get them if you really need them.  Here's the major
 problem.  When I try and view a simple php page in the browser, it
 doesn't display anything that has to do with the php tags.  By that I
 mean it won't recognize the  php directives (I guess).  I made a
 simple page (the infamous phpinfo ()  page) right out of the books.
 Saved it as test.php just like it said.  Made sure that apache is
 running and browsed to the page. Nothing, no errors, no nothing.  I
 have made up some other pages (mostly from some php books - real
 simple ones) to view and they all display the same action.

 Now when these machines (I actually have a couple of these servers
 and they all act the same) were installed, it was from FC2 CD's with
 the webserver full package.  There were all kinds of php files
 installed, etc.  In my httpd.conf file it calls the php.ini file,
 etc.  So it seems to be all there.

 Can anyone out there help me figure out how to make this work?  I
 would be truly indebted to you, put you on my Christmas card list,
 etc.


View the source of your page in the browser. If you see the PHP code 
chances are you haven't told Apache about PHP. Read the manual (yes, 
there is a manual: http://php.net/install.unix.apache2) for specific 
instructions, but your httpd.conf needs at least the following two lines 
(paths on your system may differ)...


LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml

-Stut

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



[PHP] Please Help with simple Noob problem

2007-01-11 Thread Scott Bounds
Hello all. I seem to be having a terrible tim ewith something that is so 
simple it makes me sick.  I have a server running FC2.  it has Apache 
2.x.x on it and it came installed with php-4.x.x.  Sorry I don't have 
the exact versions but fatigue and frustration has taken over.  I can 
get them if you really need them.  Here's the major problem.  When I try 
and view a simple php page in the browser, it doesn't display anything 
that has to do with the php tags.  By that I mean it won't recognize the 
 php directives (I guess).  I made a simple page (the infamous phpinfo 
()  page) right out of the books.  Saved it as test.php just like it 
said.  Made sure that apache is running and browsed to the page. 
Nothing, no errors, no nothing.  I have made up some other pages (mostly 
from some php books - real simple ones) to view and they all display the 
same action.


Now when these machines (I actually have a couple of these servers and 
they all act the same) were installed, it was from FC2 CD's with the 
webserver full package.  There were all kinds of php files installed, 
etc.  In my httpd.conf file it calls the php.ini file, etc.  So it seems 
to be all there.


Can anyone out there help me figure out how to make this work?  I would 
be truly indebted to you, put you on my Christmas card list, etc.


Thanks in advance to all of you kind and wonderful people.

Scott

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



RE: [PHP] Please help me

2007-01-02 Thread Peter Lauri
I also use PHPmailer to send emails. However it is good to do it the 'hard'
way once to learn about mailing headers etc.

Best regards,
Peter Lauri

www.dwsasia.com - company web site
www.lauri.se - personal web site
www.carbonfree.org.uk - become Carbon Free



-Original Message-
From: Steven Macintyre [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 02, 2007 2:44 PM
To: php-general@lists.php.net
Subject: RE: [PHP] Please help me

> When I send a mail using php using mail(), and using html tags in
> message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

I use phpmailer for all my email sending ... 

Never had a problem with it

S

-- 
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] Please help me

2007-01-02 Thread Steven Macintyre
> When I send a mail using php using mail(), and using html tags in
> message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

I use phpmailer for all my email sending ... 

Never had a problem with it

S

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



Re: [PHP] Please help me

2007-01-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-02 15:35:26 +0530:
> my problem got solved in gmail, but now i am not getting mails any where
> else...
> headers now i am using is:
> 
> $headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
> text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
> 8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;

If and when you're interested in doing your job right instead of blindly
trying whatever shmuck your /dev/random can generate, read about the email
message format at

ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt
ftp://ftp.rfc-editor.org/in-notes/rfc2821.txt
ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Please help me

2007-01-02 Thread Jochem Maas
use and/or study this nice bit of code (well I like it anyway, Manuel Lemos 
probably
diagrees :-) 

http://phpmailer.sourceforge.net/



Anju Prasad wrote:
> my problem got solved in gmail, but now i am not getting mails any where
> else...
> headers now i am using is:
> 
> $headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
> text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
> 8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;
> 
> 
> On 1/2/07, Stut <[EMAIL PROTECTED]> wrote:
>>
>> Please don't reply to me directly. Always include the list in replies.
>>
>> Anju Prasad wrote:
>> > Headers i am using:
>> > $headers = "MIME-Version: 1.0*\r\n*
>> > Content-type:
>> text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
>> > *\r\n\r\n*From:$sitename*\r\n*return-path:
>> > $from";
>> >
>> > Message body:
>> >
>> > $message = 'Hi '.$_POST[name1
>> > ].' '.$message.'Regards '.
>> > $sitename.' ' ;
>> > Now tell is there any wrong in this syntax
>>
>> There's something wrong with that syntax.
>>
>> Assuming it's not your mail client wrapping the line above, you have two
>> newlines between the MIME-Version header and the Content-Type header.
>> This will cause the headers after MIME-Version to be ignored.
>>
>> -Stut
>>
>> >
>> > On 1/2/07, *Stut* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>> >
>> > Anju Prasad wrote:
>> > > I am doing that but still not getting any fruitful results.
>> >
>> > Show us exactly what you're doing. If your mail client is not
>> > displaying
>> > the email as HTML one of two things is happening. 1) You're not
>> > telling
>> > it it's an HTML email, or 2) your mail client is ignoring the
>> headers
>> > and displaying the raw message. I'm gonna go with the former since
>> > hopefully you'd remember if you'd told your mail client to do the
>> > latter.
>> >
>> > -Stut
>> >
>> > > On 1/2/07, zoticaic <[EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>> wrote:
>> > >>
>> > >>
>> > >>
>> > >> --
>> > >> > My Seeding Blog | http://bytes.nullp0inter.com
>> > >> > Hire me as Freelancer |
>> > >> http://www.getafreelancer.com/affiliates/shockx/
>> > >> > -Original Message-
>> > >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
>> > <mailto:[EMAIL PROTECTED]>]
>> > >> > Sent: Tuesday, January 02, 2007 5:13 PM
>> > >> > To: php-general@lists.php.net
>> <mailto:php-general@lists.php.net
>> >
>> > >> > Subject: [PHP] Please help me
>> > >> >
>> > >> > When I send a mail using php using mail(), and using html tags
>> in
>> > >> message
>> > >> > body , these tags are being displayed as it is.
>> > >> > Please let me know if there's any way of how to tackle with
>> this.
>> > >>
>> > >> You need to add some headers that should indicate that the type
>> > of mail
>> > >> you are
>> > >> sending is an HTML email.
>> > >>
>> > >> Take this link from our friendly manual and see through
>> Example 4
>> :
>> > >> Sending HTML
>> > >> Emails
>> > >> http://www.php.net/manual/en/function.mail.php
>> > <http://www.php.net/manual/en/function.mail.php>
>> > >>
>> > >> HTH
>> > >> Jervin
>> > >>
>> > >>
>> > >
>> >
>> >
>>
>>
> 

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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

my problem got solved in gmail, but now i am not getting mails any where
else...
headers now i am using is:

$headers = 'MIME-Version: 1.0'."*\n*".'Content-type:
text/html;charset=iso-8859-1'."*\n*".'Content-Transfer-Encoding:
8bit'."*\n*".'From:'.$sitename."*\n*".'return-path:'.$from;


On 1/2/07, Stut <[EMAIL PROTECTED]> wrote:


Please don't reply to me directly. Always include the list in replies.

Anju Prasad wrote:
> Headers i am using:
> $headers = "MIME-Version: 1.0*\r\n*
> Content-type:
text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
> *\r\n\r\n*From:$sitename*\r\n*return-path:
> $from";
>
> Message body:
>
> $message = 'Hi '.$_POST[name1
> ].' '.$message.'Regards '.
> $sitename.' ' ;
> Now tell is there any wrong in this syntax

There's something wrong with that syntax.

Assuming it's not your mail client wrapping the line above, you have two
newlines between the MIME-Version header and the Content-Type header.
This will cause the headers after MIME-Version to be ignored.

-Stut

>
> On 1/2/07, *Stut* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
> Anju Prasad wrote:
> > I am doing that but still not getting any fruitful results.
>
> Show us exactly what you're doing. If your mail client is not
> displaying
> the email as HTML one of two things is happening. 1) You're not
> telling
> it it's an HTML email, or 2) your mail client is ignoring the
headers
> and displaying the raw message. I'm gonna go with the former since
> hopefully you'd remember if you'd told your mail client to do the
> latter.
>
> -Stut
>
> > On 1/2/07, zoticaic <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> >>
> >>
> >>
> >> --
> >> > My Seeding Blog | http://bytes.nullp0inter.com
>     >> > Hire me as Freelancer |
> >> http://www.getafreelancer.com/affiliates/shockx/
> >> > -Original Message-
> >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>]
> >> > Sent: Tuesday, January 02, 2007 5:13 PM
> >> > To: php-general@lists.php.net <mailto:php-general@lists.php.net
>
> >> > Subject: [PHP] Please help me
> >> >
> >> > When I send a mail using php using mail(), and using html tags
in
> >> message
> >> > body , these tags are being displayed as it is.
> >> > Please let me know if there's any way of how to tackle with
this.
> >>
> >> You need to add some headers that should indicate that the type
> of mail
> >> you are
> >> sending is an HTML email.
> >>
> >> Take this link from our friendly manual and see through Example 4
:
> >> Sending HTML
> >> Emails
> >> http://www.php.net/manual/en/function.mail.php
> <http://www.php.net/manual/en/function.mail.php>
> >>
> >> HTH
> >> Jervin
> >>
> >>
> >
>
>




Re: [PHP] Please help me

2007-01-02 Thread Stut

Please don't reply to me directly. Always include the list in replies.

Anju Prasad wrote:
Headers i am using: 
$headers = "MIME-Version: 1.0*\r\n*

Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
*\r\n\r\n*From:$sitename*\r\n*return-path:
$from";

Message body:

$message = 'Hi '.$_POST[name1
].' '.$message.'Regards '.
$sitename.' ' ;
Now tell is there any wrong in this syntax


There's something wrong with that syntax.

Assuming it's not your mail client wrapping the line above, you have two 
newlines between the MIME-Version header and the Content-Type header. 
This will cause the headers after MIME-Version to be ignored.


-Stut



On 1/2/07, *Stut* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

Anju Prasad wrote:
> I am doing that but still not getting any fruitful results.

Show us exactly what you're doing. If your mail client is not
displaying
the email as HTML one of two things is happening. 1) You're not
telling
it it's an HTML email, or 2) your mail client is ignoring the headers
and displaying the raw message. I'm gonna go with the former since
hopefully you'd remember if you'd told your mail client to do the
latter.

-Stut

> On 1/2/07, zoticaic <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
>>
>>
>>
>> --
>> > My Seeding Blog | http://bytes.nullp0inter.com
>> > Hire me as Freelancer |
>> http://www.getafreelancer.com/affiliates/shockx/
>> > -Original Message-
>> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>]
>> > Sent: Tuesday, January 02, 2007 5:13 PM
>> > To: php-general@lists.php.net <mailto:php-general@lists.php.net>
>> > Subject: [PHP] Please help me
>> >
>> > When I send a mail using php using mail(), and using html tags in
>> message
>> > body , these tags are being displayed as it is.
>> > Please let me know if there's any way of how to tackle with this.
>>
>> You need to add some headers that should indicate that the type
of mail
>> you are
>> sending is an HTML email.
>>
>> Take this link from our friendly manual and see through Example 4 :
>> Sending HTML
>> Emails
>> http://www.php.net/manual/en/function.mail.php
<http://www.php.net/manual/en/function.mail.php>
>>
>> HTH
>> Jervin
>>
>>
>




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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

actually this problem i am getting only when sending mail in gmail,
otherwise everywhere its coming correctly and fine

On 1/2/07, Anju Prasad < [EMAIL PROTECTED]> wrote:


Headers i am using:
$headers = "MIME-Version: 1.0*\r\n*
Content-type: text/html;charset=iso-8859-1*\r\n*Content-Transfer-Encoding: 8bit
*\r\n\r\n*From:$sitename*\r\n*
return-path:
$from";

Message body:


$message = 'Hi '.$_POST[name1
].' '.$message.'Regards '
.
$sitename.' ' ;
Now tell is there any wrong in this syntax



On 1/2/07, Stut < [EMAIL PROTECTED]> wrote:
>
> Anju Prasad wrote:
> > I am doing that but still not getting any fruitful results.
>
> Show us exactly what you're doing. If your mail client is not displaying
> the email as HTML one of two things is happening. 1) You're not telling
> it it's an HTML email, or 2) your mail client is ignoring the headers
> and displaying the raw message. I'm gonna go with the former since
> hopefully you'd remember if you'd told your mail client to do the
> latter.
>
> -Stut
>
> > On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>
> >> --
> >> > My Seeding Blog | http://bytes.nullp0inter.com
> >> > Hire me as Freelancer |
> >> http://www.getafreelancer.com/affiliates/shockx/
> >> > -Original Message-
> >> > From: Anju Prasad [mailto:[EMAIL PROTECTED]
> >> > Sent: Tuesday, January 02, 2007 5:13 PM
> >> > To: php-general@lists.php.net
> >> > Subject: [PHP] Please help me
> >> >
> >> > When I send a mail using php using mail(), and using html tags in
> >> message
> >> > body , these tags are being displayed as it is.
> >> > Please let me know if there's any way of how to tackle with this.
> >>
> >> You need to add some headers that should indicate that the type of
> mail
> >> you are
> >> sending is an HTML email.
> >>
> >> Take this link from our friendly manual and see through Example 4 :
> >> Sending HTML
> >> Emails
> >> http://www.php.net/manual/en/function.mail.php
> >>
> >> HTH
> >> Jervin
> >>
> >>
> >
>
>



RE: [PHP] Please help me

2007-01-02 Thread zoticaic
1. Try displaying the message first on the browser and see if it renders
properly.

2. Try viewing the headers of the actual sent message and check if they are
properly transmitted. Sometimes spaces/punctuations or typo errors on header
generation wholly disregards our intent on sending HTML type emails.

 

--
> Outsource Now | GetAFreelancer
<http://www.getafreelancer.com/affiliates/shockx/> 

  _  

From: Anju Prasad [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 02, 2007 5:26 PM
To: zoticaic
Cc: php-general@lists.php.net
Subject: Re: [PHP] Please help me

 

I am doing that but still not getting any fruitful results. 

On 1/2/07, zoticaic <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:



--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto: [EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me 
>
> When I send a mail using php using mail(), and using html tags in message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this. 

You need to add some headers that should indicate that the type of mail you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 : Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin

 



Re: [PHP] Please help me

2007-01-02 Thread Stut

Anju Prasad wrote:

I am doing that but still not getting any fruitful results.


Show us exactly what you're doing. If your mail client is not displaying 
the email as HTML one of two things is happening. 1) You're not telling 
it it's an HTML email, or 2) your mail client is ignoring the headers 
and displaying the raw message. I'm gonna go with the former since 
hopefully you'd remember if you'd told your mail client to do the latter.


-Stut


On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:




--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | 
http://www.getafreelancer.com/affiliates/shockx/

> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
>
> When I send a mail using php using mail(), and using html tags in
message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail
you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 :
Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin






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



Re: [PHP] Please help me

2007-01-02 Thread Anju Prasad

I am doing that but still not getting any fruitful results.

On 1/2/07, zoticaic <[EMAIL PROTECTED]> wrote:




--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
>
> When I send a mail using php using mail(), and using html tags in
message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail
you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 :
Sending HTML
Emails
http://www.php.net/manual/en/function.mail.php

HTH
Jervin




RE: [PHP] Please help me

2007-01-02 Thread zoticaic


--
> My Seeding Blog | http://bytes.nullp0inter.com
> Hire me as Freelancer | http://www.getafreelancer.com/affiliates/shockx/
> -Original Message-
> From: Anju Prasad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 02, 2007 5:13 PM
> To: php-general@lists.php.net
> Subject: [PHP] Please help me
> 
> When I send a mail using php using mail(), and using html tags in message
> body , these tags are being displayed as it is.
> Please let me know if there's any way of how to tackle with this.

You need to add some headers that should indicate that the type of mail you are
sending is an HTML email.

Take this link from our friendly manual and see through Example 4 : Sending HTML
Emails 
http://www.php.net/manual/en/function.mail.php

HTH
Jervin

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



[PHP] Please help me

2007-01-02 Thread Anju Prasad

When I send a mail using php using mail(), and using html tags in message
body , these tags are being displayed as it is.
Please let me know if there's any way of how to tackle with this.


Re: [PHP] Please help me with in_array

2006-08-04 Thread Jochem Maas
Chris G wrote:
> I have already tried using
>  
> foreach($_GET['question'] as $key => $value)
>  
> the in_array function does not work with it for some reason.

'does not work with it' ??

use var_dump(); to see what's actually in your variables.

> 
>  
> On 8/5/06, *Jochem Maas* <[EMAIL PROTECTED]
> > wrote:
> 

> foreach($_GET['question'] as $key => $value) {
> 

var_dump($key, $value);

> >  if(!in_array($key, $_SESSION['question'])) {
> >   print "not matched lets update".
> > "$_GET[question][$key]"; // HERE I WANT IT TO
> SHOW $key
> > is 10 and its value should be 1 (as printed in the Array above)
> >  }
> > else {
> >  print "matched";
> >  }
> > }
> >
> >
> >
> > Where it gets to the section "not matched" I need to print out
> from the
> > question array question[$key][$value] (question '10' => '1' as above)
> >
> >
> >
> > I am not sure if I am even making sense here anymore...
> >
> > Thanks in advance
> >
> >
> > Chris
> >
> 
> 

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



Re: [PHP] Please help me with in_array

2006-08-04 Thread Jochem Maas
Chris G wrote:
> Hi all
> 
> I have been stuck on this problem for 4 hours. Please anyone that can help
> here I would appreciate it.
> 
> If I print_r($_GET) I have
> 
> Array ([question] => Array ( [10] => 1 [11] => 2 [12] => 1 [13] => 1)'
> 
> 
> So now I try
> 
> foreach($_GET['question'] as $key) {

foreach($_GET['question'] as $key => $value) {

>  if(!in_array($key, $_SESSION['question'])) {
>   print "not matched lets update".
> "$_GET[question][$key]"; // HERE I WANT IT TO SHOW $key
> is 10 and its value should be 1 (as printed in the Array above)
>  }
> else {
>  print "matched";
>  }
> }
> 
> 
> 
> Where it gets to the section "not matched" I need to print out from the
> question array question[$key][$value] (question '10' => '1' as above)
> 
> 
> 
> I am not sure if I am even making sense here anymore...
> 
> Thanks in advance
> 
> 
> Chris
> 

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



[PHP] Please help me with in_array

2006-08-04 Thread Chris G

Hi all

I have been stuck on this problem for 4 hours. Please anyone that can help
here I would appreciate it.

If I print_r($_GET) I have

Array ([question] => Array ( [10] => 1 [11] => 2 [12] => 1 [13] => 1)'


So now I try

foreach($_GET['question'] as $key) {
 if(!in_array($key, $_SESSION['question'])) {
  print "not matched lets update".
"$_GET[question][$key]"; // HERE I WANT IT TO SHOW $key
is 10 and its value should be 1 (as printed in the Array above)
 }
else {
 print "matched";
 }
}



Where it gets to the section "not matched" I need to print out from the
question array question[$key][$value] (question '10' => '1' as above)



I am not sure if I am even making sense here anymore...

Thanks in advance


Chris


RE: [PHP] Please help me with a query

2006-06-13 Thread Jef Sullivan
Your query is wrong. You are selecting only one result yet you are 
referencing three. I suggest...

SELECT * FROM centers ORDER BY idc asc


Jef

-Original Message-
From: Jesús Alain Rodríguez Santos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 8:49 AM
To: php-general@lists.php.net
Subject: [PHP] Please help me with a query

First of all I'm sorry for my english I don't know speak very well, I will 
try to explain it, I hope you understain what I need.

I have two tables: centers and peoples, in table centers I have the centers 
values and in table peoples I have the peoples values and in table columns 
center the id corresponding the center.

db:
centers
id  nameccorreoc   telc
1 Cienfuegos  [EMAIL PROTECTED]  4534345
2   Havana [EMAIL PROTECTED] 4643765
3  Santiago[EMAIL PROTECTED]  3453453

peoples
idnamed   center  correod 
cargod
1 Albert  1   [EMAIL PROTECTED] 
sfgsdfgsdfgsdfg
2  Julio1  [EMAIL PROTECTED] 
sadfsgfdsfgfdsg
3 Sussan 2  [EMAIL PROTECTED] 
gjfhjfhjfhjfg
4 Peter2  [EMAIL PROTECTED] 
fgjhfgjgfjhjjghj

And the query and script to generate the tables for each centers list is:

$centers = mysql_query("SELECT namec FROM centers ORDER BY idc asc", 
$connect);

while ($centerss = mysql_fetch_array($centers, MYSQL_ASSOC)) {
   echo "";
echo "";
echo "".$centerss['namec']."";
echo "mailto:".$centerss['correoc'].">".$centerss['correoc']."";
echo "".$centerss['telc']."";
echo "";
echo "";
}
mysql_free_result($centers);

That's generate one table with one row and three columns for each center, 
but, I would like to generate more rows and 3 columns in each table with the 
named, correod and cargod of peoples corresponding the center, I mean, print 
the centers values with the peoples corresponding this center, in one table 
each one.

I hope you understaind what I need, if not polease let me know.

regards Alain


-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

-- 
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] Please help me with a query

2006-06-13 Thread Jochem Maas
if you want to ask a question don't be so lazy as to
simply reply to a post in an existing thread - it's considered
rude.

send a new email.

Jesús Alain Rodríguez Santos wrote:

...

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



[PHP] Please help me with a query

2006-06-13 Thread Jesús Alain Rodríguez Santos
First of all I'm sorry for my english I don't know speak very well, I will 
try to explain it, I hope you understain what I need.


I have two tables: centers and peoples, in table centers I have the centers 
values and in table peoples I have the peoples values and in table columns 
center the id corresponding the center.


db:
centers
id  nameccorreoc   telc
1 Cienfuegos  [EMAIL PROTECTED]  4534345
2   Havana [EMAIL PROTECTED] 4643765
3  Santiago[EMAIL PROTECTED]  3453453

peoples
idnamed   center  correod 
cargod
1 Albert  1   [EMAIL PROTECTED] 
sfgsdfgsdfgsdfg
2  Julio1  [EMAIL PROTECTED] 
sadfsgfdsfgfdsg
3 Sussan 2  [EMAIL PROTECTED] 
gjfhjfhjfhjfg
4 Peter2  [EMAIL PROTECTED] 
fgjhfgjgfjhjjghj


And the query and script to generate the tables for each centers list is:

$centers = mysql_query("SELECT namec FROM centers ORDER BY idc asc", 
$connect);


while ($centerss = mysql_fetch_array($centers, MYSQL_ASSOC)) {
  echo "";
   echo "";
   echo "valign=middle>".$centerss['namec']."";
   echo "href=mailto:".$centerss['correoc'].">".$centerss['correoc']."";
   echo "valign=middle>".$centerss['telc']."";

   echo "";
   echo "";
}
mysql_free_result($centers);

That's generate one table with one row and three columns for each center, 
but, I would like to generate more rows and 3 columns in each table with the 
named, correod and cargod of peoples corresponding the center, I mean, print 
the centers values with the peoples corresponding this center, in one table 
each one.


I hope you understaind what I need, if not polease let me know.

regards Alain


--
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Kim Christensen
On 2/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> $filename =3D "c:data.txt";
> $contents =3D file($filename);
> echo $contents;
> ?>
> // data in text file is "1_2_3_4" < _ =3D blank>
> // output is "1 2 3 4"
> // I want fixed possition . please help me ?

I'm not really sure what you're trying to do, but I assume you want to
keep the four(?) spaces when you output the data. If you're going to
display it using HTML, you have to replace the spaces with   -
otherwise HTML truncates the excess whitespace. Try using REGEX:

$contents =3D file($filename);
echo preg_replace("/\s/", " ", $contents);

This regular expression will replace all whitespace
(spaces/newlines/carriage returns) with the character  , which in
HTML yields a blank space.

--
Kim Christensen
[EMAIL PROTECTED]

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



Re: [PHP] please help me I try to post my question to Php.net 2-3times

2006-02-16 Thread Hugh Danaher
wvolks wrote "...but when I display data in text file it compress space in 
each lines..."  Sounded to me like he wanted all the blank spaces he put 
into the string, but when he "displayed" it, the spaces were gone.  Since 
html ignores more than one blank space between printable characters, I 
suggested he substitute   for the blank spaces.  He also said "I want 
fixed possition . please help me ?", and so I tried to help.

Regards,
HTD
- Original Message - 
From: "Barry" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, February 16, 2006 12:37 AM
Subject: Re: [PHP] please help me I try to post my question to Php.net 
2-3times




Hugh Danaher wrote:

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD


no he don't:
qote:

> read text file to array string


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
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: 267.15.6/257 - Release Date: 2/10/2006






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Barry

Hugh Danaher wrote:

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD


no he don't:
qote:

> read text file to array string


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

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



Re: [PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-16 Thread Hugh Danaher

If you want to preserve the blank spaces then try;

str_replace(" ", " ", $contents); //   is html for blank space.
HTH
HTD
- Original Message - 
From: <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, February 15, 2006 10:26 PM
Subject: [PHP] please help me I try to post my question to Php.net 2-3 times



text file problem

read text file to array string. I use function File(). but when I display
data in text file it compress space in each lines such as first record
contain "1_2__3__4__" ( _ = blank )
when store in array string is "1 2 3 4" . I want you tell me howto do?
+

// data in text file is "1_2_3_4" < _ = blank>
// output is "1 2 3 4"
// I want fixed possition . please help me ?
from Wvolks

--
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: 267.15.6/257 - Release Date: 2/10/2006






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006

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



[PHP] please help me I try to post my question to Php.net 2-3 times

2006-02-15 Thread wvolks
text file problem

read text file to array string. I use function File(). but when I display
data in text file it compress space in each lines such as first record
contain "1_2__3__4__" ( _ = blank )
when store in array string is "1 2 3 4" . I want you tell me howto do?
+

// data in text file is "1_2_3_4" < _ = blank>
// output is "1 2 3 4"
// I want fixed possition . please help me ?
from Wvolks

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



Re: [PHP] Please help with apache 2

2006-01-28 Thread PHP

Hi,
Thanks, putting the addtype in the  section seems to have solved 
the problem.



- Original Message - 
From: "Dan Trainor" <[EMAIL PROTECTED]>

To: "PHP" <[EMAIL PROTECTED]>
Sent: Friday, January 27, 2006 6:09 PM
Subject: Re: [PHP] Please help with apache 2



PHP wrote:

Help, I can't find anything on this.
 I upgraded from apache 1.3 to apache 2.2
 My problem is, I currently have .htm files being parsed as php, that 
works fine.
 However, if I have the php_engine turned off for a directory, any .htm 
files will now prompt firefox to download it.
 How do I stop this? I need to keep .htm files parsed for php, but I also 
need to be able to turn php off for certain directories and still allow 
regular .htm files to be seen.

 Thanks.



Hi -

Looks like AddType can be used on a per-container (directory container, 
virtual host container, or even from htaccess, that is)-basis.  Consider 
using this to parse PHP via .html pages.  Then, you could leave php_engine 
on for the rest of the site.


Hope that helps
-dant






--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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



Re: [PHP] Please help with apache 2

2006-01-27 Thread The Doctor
On Fri, Jan 27, 2006 at 06:03:50PM -0800, PHP wrote:
> Help, I can't find anything on this.
> 
> I upgraded from apache 1.3 to apache 2.2
> 
> My problem is, I currently have .htm files being parsed as php, that works 
> fine.
> 
> However, if I have the php_engine turned off for a directory, any .htm files 
> will now prompt firefox to download it.
> 
> How do I stop this? I need to keep .htm files parsed for php, but I also need 
> to be able to turn php off for certain directories and still allow regular 
> .htm files to be seen.
> 
> Thanks.
>

HAve you examined you php.ini and httpd.conf for any changes?
 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

Content-Description: "AVG certification"
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006
> 

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

-- 
Member - Liberal International  
This is [EMAIL PROTECTED]   Ici [EMAIL PROTECTED]
God Queen and country! Beware Anti-Christ rising!
Born 29 Jan 1969 Redhill Surrey UK

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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



[PHP] Please help with apache 2

2006-01-27 Thread PHP



Help, I can't find anything on this.
 
I upgraded from apache 1.3 to apache 
2.2
 
My problem is, I currently have .htm files being 
parsed as php, that works fine.
 
However, if I have the php_engine turned off for a 
directory, any .htm files will now prompt firefox to download it.
 
How do I stop this? I need to keep .htm files 
parsed for php, but I also need to be able to turn php off for certain 
directories and still allow regular .htm files to be seen.
 
Thanks.
 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 1/27/2006

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

Re: [PHP] Please Help!

2006-01-25 Thread Steve Clay
Wednesday, January 25, 2006, 2:52:21 PM, S Yang wrote:
>  Which method might I use to split the signature I have built in PHP into
> (r,s)? How can I know what the signature looks like?

Run the function http://us2.php.net/openssl_sign and pass it a $signature.
According to the manual, if successful, $signature will be altered.  You
tell /us/ what it looks like and we'll help you split it. ;)

Steve
-- 
http://mrclay.org/

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



Re: [PHP] Please Help!

2006-01-25 Thread Michael Crute
On 1/25/06, S Yang <[EMAIL PROTECTED]> wrote:
> Dear Sir/Madam:
>
> I am trying to split a DSA signature that is generated by openssl_sign()
> function in PHP, which should be made up of 2 numbers: r and s, but I don't
> know how to build the structure of the signature generated by PHP and then
> to split it into two numbers (r,s). Which method might I use to split the
> signature I have built in PHP into (r,s)? How can I know what the signature
> looks like? I appreciate your any helps in advance. I am looking forward to
> hearing from you.

http://www.catb.org/~esr/faqs/smart-questions.html

*SIGH* How many times must you tell people to use a descriptive
subject line. I swear reading ESR's how to ask questions the smart way
should be a requirement to posting on lists.

-Mike

--

Michael E. Crute
Software Developer
SoftGroup Development Corporation

Linux takes junk and turns it into something useful.
Windows takes something useful and turns it into junk.

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



[PHP] Please Help!

2006-01-25 Thread S Yang

Dear Sir/Madam:

I am trying to split a DSA signature that is generated by openssl_sign() 
function in PHP, which should be made up of 2 numbers: r and s, but I don't 
know how to build the structure of the signature generated by PHP and then 
to split it into two numbers (r,s). Which method might I use to split the 
signature I have built in PHP into (r,s)? How can I know what the signature 
looks like? I appreciate your any helps in advance. I am looking forward to 
hearing from you.



Sincerely
Stephaney Yang
[EMAIL PROTECTED]

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



Re: [PHP] please help me send html email from php scripts instead of simple text

2005-04-28 Thread John Nichel
Carraccia, Giuseppe wrote:
Hello, can you please help me send an html email using php instead of
just simple text output.  I'm trying to have the user fill out a form (
https://www.smilerochester.com/medical_form.html ) and have the exact
same form emailed to me with the same pretty format of a form instead of
just a variable name and the value.  
 
Do you think you can give me a hand?
Google can...
http://www.google.com/search?q=php+send+html+email
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] please help me send html email from php scripts instead of simple text

2005-04-28 Thread Richard Davey
Hello Giuseppe,

Thursday, April 28, 2005, 2:22:20 PM, you wrote:

CG> Hello, can you please help me send an html email using php instead of
CG> just simple text output.  I'm trying to have the user fill out a form (
CG> https://www.smilerochester.com/medical_form.html ) and have the exact
CG> same form emailed to me with the same pretty format of a form instead of
CG> just a variable name and the value.  

Save yourself some hassle and use the excellent free PHPMailer class
library. http://phpmailer.sourceforge.net

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I do not fear computers. I fear the lack of them." - Isaac Asimov

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



[PHP] please help me send html email from php scripts instead of simple text

2005-04-28 Thread Carraccia, Giuseppe
Hello, can you please help me send an html email using php instead of
just simple text output.  I'm trying to have the user fill out a form (
https://www.smilerochester.com/medical_form.html ) and have the exact
same form emailed to me with the same pretty format of a form instead of
just a variable name and the value.  
 
Do you think you can give me a hand?
 
Thank you so much for the help.
Joe


[PHP] Please help!

2005-01-05 Thread 琬婷
To whom it may concern,
When I worte php for ldap_search(), It always shows the warning 
message:"Warning: ldap_search(): Search: Operations error "...
My server is windows 2003 with AD.
I have seen one solution on the network, they said that I should add 
"ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);"
in my code if I used windows 2003 with AD. 
I did it. But the warning message is still the same.
What should I do?
Please help me to deal this solution.
Thank you so so so much:)


Re: [PHP] PLEASE HELP ON MAIL FUNCTION

2004-10-31 Thread Chris
Your Apache/PHP Mail function is working properly. The SMTP server needs 
to be configured to relay email from the PHP server.

The normal configuration would be to allow the relay of all mail from 
that server.

Chris
kunal Aggarwal wrote:
 
Dear friend,
I am using PHP 4.3.4 version.
Please tell how to unpload a mail function.
Error comes on executing mail function is 

"mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in 
C:\Program Files\Apache Group\Apache2\htdocs\testprodigious\MAIL\mail_enquiry.php on line 30
"
Scprit used is 


/* recipients */
 $to  = "[EMAIL PROTECTED]"; 

   /* subject */
  $subject = "Automatic Weekly Reports of Marketing from Prodigious";
  /*making message body */
  $message ="Wekly Reprot";   

   /* To send HTML mail, you can
set the Content-type header. there header are nessare for maing table 
in php and even for html pahe without these header only script will send 
in mail no brwser look*/

 $headers  = "MIME-Version: 1.0\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
   /* and now mail it */   
   mail($to, $subject, $message,$headers );
?>

I will be grateful to you.
With Best Regards
«·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·» 
«..Er. Kunal Aggarwal ..» 
«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·» 

Software Engineer 
ICL Certifications Limited
372, Industrial Area Phase 1
Panchkula
Haryana
India
Voice Talk:-+91-98159-65988(Mobile), +91-0172-2563358 (Office) * 24, +91-0172-2563358 (Fax)

Email: [EMAIL PROTECTED]
Website: www.iclcertifications.com
 

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


[PHP] PLEASE HELP ON MAIL FUNCTION

2004-10-31 Thread kunal Aggarwal
 
  
Dear friend,
I am using PHP 4.3.4 version.
Please tell how to unpload a mail function.
Error comes on executing mail function is 

"mail(): SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in 
C:\Program Files\Apache Group\Apache2\htdocs\testprodigious\MAIL\mail_enquiry.php on 
line 30
"


Scprit used is 




I will be grateful to you.

With Best Regards
 
 
 «·´`·.(*·.¸(`·.¸ ¸.·´)¸.·*).·´`·» 
«..Er. Kunal Aggarwal ..» 
«·´`·.(¸.·*(¸.·´ `·.¸)*·.¸).·´`·» 
 
Software Engineer 
ICL Certifications Limited
372, Industrial Area Phase 1
Panchkula
Haryana
India
Voice Talk:-+91-98159-65988(Mobile), +91-0172-2563358 (Office) * 24, +91-0172-2563358 
(Fax)
 
Email: [EMAIL PROTECTED]
Website: www.iclcertifications.com


Re: [PHP] Please Help! Call to undefined function mysql_connect()

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 16:41:28 -0500, Scott McDonald
<[EMAIL PROTECTED]> wrote:
> Error:
> Fatal error: Call to undefined function mysql_connect() in
> d:\inetpub\www\test.php on line 5
> 
> I am at a loss... any ideas?

Did you uncomment the mysql entension in your php.ini ?


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



[PHP] Please Help! Call to undefined function mysql_connect()

2004-10-21 Thread Scott McDonald
Error:
Fatal error: Call to undefined function mysql_connect() in
d:\inetpub\www\test.php on line 5


System: winXPsp2
Tried:
. Re-install IIS
. Re-install PHP using installer.
. Re-install PHP using zip manual install (both ISAPI and CGI approachs)
. Re-install in Safe Mode (d'oh! no IIS in safe mode :p )

Info:
Bug reports in php.net all show that this isn't a bug, but rather
that that extention is not compiled... however, since this is IIS not
linux that's not possible. the one item I found with IIS as the OS
the only response was "Man, your F**ked"

Other usefull information: when i use the installer, it never
finishes. it hangs on "copying php.ini" (this is why i thought to
reinstall IIS)

I am at a loss... any ideas?

Thanks -Echo


[PHP] Please Help, returning path

2004-06-18 Thread me2resh






is there a function to detect the path of the directory 
i need my file to detect the path it is on it, not the http path but the path on server
please help me with that







  IncrediMail - Email has finally evolved - Click Here

Re: [PHP] Please help, problem with set_ini

2004-06-02 Thread Marek Kilimajer
Warren Gardner wrote:
Hi,
I'm having a problem with a set_ini command... I need to be able to set
the -f parameter (to set the originating address on my server). I am getting
a false response code when I run the following command:
$Result=ini_get("sendmail_path"),
"/usr/sbin/sendmail -t -f".$DataUserInfo['OriginatingEmail']);
How can I set this parameter at runtime, or are there any other alternatives
Warren
False response error? You mean parse error. It should be
ini_set("sendmail_path", "/usr/sbin/sendmail -t 
-f".$DataUserInfo['OriginatingEmail']);

But that will not work, as sendmail_path is PHP_INI_SYSTEM - can be set 
only in php.ini or httpd.conf

You can use mail()'s fifth parameter if you are not under safe mode. Or 
connect directly to port 25 using any of the smtp classes.

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


Re: [PHP] Please help, problem with set_ini

2004-06-02 Thread Matt Matijevich
[snip]
I'm having a problem with a set_ini command... I need to be able to
set
the -f parameter (to set the originating address on my server). I am
getting
a false response code when I run the following command:
[/snip]

looks like sendmail_path has to be set in http.conf or php.ini

http://www.php.net/ini_set

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



[PHP] Please help, problem with set_ini

2004-06-02 Thread Warren Gardner
Hi,

I'm having a problem with a set_ini command... I need to be able to set
the -f parameter (to set the originating address on my server). I am getting
a false response code when I run the following command:

$Result=ini_get("sendmail_path"),
"/usr/sbin/sendmail -t -f".$DataUserInfo['OriginatingEmail']);

How can I set this parameter at runtime, or are there any other alternatives

Warren

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



[PHP] PLEASE HELP on ClibPDF, didn't receive any answers so far....

2004-02-17 Thread Jan Broermann

Hi List, 
to say it up front, this is none of these how do I I do (with PHP) what Javascript  is 
supposed to be for (Client Side)? Or my computer is broken how do I fix it, I'm deeply 
in the need for help.

 
I run Apache 1.3.x
with PHP 4.3.1
on Win2000
 

I'm doing a paper comparing some of the PDF Creating Tools and I'm having no fun at all
with the Clibpdf Lib. By the way, if you google it is realy hard not find the PHP 
Manual, which
is great, but doesn't realy help, especially if you find it 10.000 times. ;-)


This is the output I get:
on oppening Adobe Reader (6) 
 I get the message Illegal Operation 'TM' outside Text object???
+ the picture doesn't show (no error message)
+ all text is in the same line. (but not the header surprisingly)


Below is my code, which works perfectly when using PDFLib, but as I said I need ClibPDF
If you can't help me, please give me a tutorial or forum where I can get help.

I need help on the stated problems above + how do I save the header stream to a file? 
If I try it with the fopen I get an incorrect PDF.

many many thx
Janbro










__
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110

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



RE: [PHP] Please help me understand gmmktime()

2004-02-12 Thread Ford, Mike [LSS]
On 11 February 2004 20:26, Richard Day wrote:

> Hello:
> 
> 
> Environment:
> Linux server
> PHP 4.3.4
> 
> This code:
> 
> echo ''.strftime('%T %Z',mktime()).', Timestamp='.mktime();
> echo ''.strftime('%T GMT',gmmktime()).',
> Timestamp='.gmmktime();
> 
> yields this result:
> 
> 23:52:08 EST, Timestamp=1076475128
> 18:52:08 GMT, Timestamp=1076457128
> 
> Why? GMT should be 5 hours ahead of EST, not 5 behind. Right?
> What am I
> missing here??

Well, that looks very suspicious, and probably not for the reasons you're
thinking.

I can explain why you get that result, but it means that either (a) there's
a bug in gmmktime(), or (b) the documentation for gmmktime() is wrong (or,
at least, misleading).  So, let's take it step-by-step:

1. gmmktime(), according to the manual, should use the "current
corresponding GMT value" for it's omitted arguments.
2. In my book, at 23:52:08 EST that means it should be using 04:52:08 GMT on
the following day (we'll discuss this later, since, whilst giving a
different result, it still wouldn't produce what you're expecting!).
3. However, let's guess that gmmktime() is actually using the *local* time
value of 23:52:08, but treating it as if it were GMT.
4. In which case, you'll get a timestamp for 23:52:08 GMT.
5. Because timestamps are absolute (not adjusted for timezone), this is also
the timestamp for 18:52:08 EST.
6. 18:52:08 is what you're getting printed.
7. QED.

This behaviour is *not* what the manual says should happen, and in my
opinion is counter-intuitive.  However, if gmmktime() were to behave as the
manual, at least how I read it, suggests, this is what would happen:

1. gmmktime() would calculate a timestamp for 04:52:08 GMT (next day).
2. Because timestamps are absolute, this is also the timestamp for 23:52:08
EST.
3. So strftime() still outputs 23:52:08.

Ergo, this is not the way to produce an adjusted time.  One way to do what
you're looking for is to feed the same timestamp to date('%H:%i:%s') and
gmdate('%H:%i:%s).  If you want something you can feed to strftime() for the
GMT date, you need to acquire your timezone's offset from GMT in seconds
(e.g. with date('Z');) and subtract that from the timestamp.

HTH

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Please help me understand gmmktime()

2004-02-11 Thread Richard Day
Hello:


Environment:
Linux server
PHP 4.3.4

This code:

echo ''.strftime('%T %Z',mktime()).', Timestamp='.mktime();
echo ''.strftime('%T GMT',gmmktime()).', Timestamp='.gmmktime();

yields this result:

23:52:08 EST, Timestamp=1076475128
18:52:08 GMT, Timestamp=1076457128

Why? GMT should be 5 hours ahead of EST, not 5 behind. Right? What am I
missing here??


Richard

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



Re: [PHP] Please help me with this. (Retriving info from mySQL database and then put it in combo box)

2004-01-31 Thread Raditha Dissanayake
Hello
This is a PHP list not an activex list.
Radwan Aladdin wrote:

Hi all..

I have in my database the fields :"CourseTitle, Language1, Language2, Language3, Language4, Language5, Language6...Etc.."

Now what I want to make is : By using an ActiveX Control I want to retrive the values for these fields from the database.. so for example there are many rows there(In the database).. :

MS Word XP   EnglishFrench  Arabic

MS PowerPoint XPChinese French Arabic.Etc

MS Access XPChinese JapaneseEnglish.Etc

I want to retrive these rows and put them in two combo boxes  (CourseTitle and CourseLanguage).. the CourseTitle combo box contains the "CourseTitle values from the database. For example : MS Word XP, MS PowerPoint XP, MS Access XP...Etc " and the CourseLanguage combo box contains the "CourseLanguage values from the database for every CourseTitle. For example : MS Word XP has Englsih,French and Arabic languages.. so if the user chose MS Word XP then the CourseLanguage will show the languages for that Course.."

I hope you got my meaning..

So what I want is to import from the database then split these info into items inside the Combo box..

Best Regards..

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Please help me with this. (Retriving info from mySQL database and then put it in combo box)

2004-01-31 Thread Radwan Aladdin
Hi all..

I have in my database the fields :"CourseTitle, Language1, Language2, Language3, 
Language4, Language5, Language6...Etc.."

Now what I want to make is : By using an ActiveX Control I want to retrive the values 
for these fields from the database.. so for example there are many rows there(In the 
database).. :

MS Word XP   EnglishFrench  Arabic

MS PowerPoint XPChinese French Arabic.Etc

MS Access XPChinese JapaneseEnglish.Etc

I want to retrive these rows and put them in two combo boxes  (CourseTitle and 
CourseLanguage).. the CourseTitle combo box contains the "CourseTitle values from the 
database. For example : MS Word XP, MS PowerPoint XP, MS Access XP...Etc " and the 
CourseLanguage combo box contains the "CourseLanguage values from the database for 
every CourseTitle. For example : MS Word XP has Englsih,French and Arabic languages.. 
so if the user chose MS Word XP then the CourseLanguage will show the languages for 
that Course.."

I hope you got my meaning..

So what I want is to import from the database then split these info into items inside 
the Combo box..

Best Regards..


Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Tom
Radwan Aladdin wrote:

Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..

 

I am not aware of any such functionality within MySQL.

However if you have a one-one relationship between a period of time and 
an incremental,
could you not simply INSERT a timestamp and then compare with times with 
NOW,
and then divide by your time period?

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


RE: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Chris Kay


http://www.unixgeeks.org/security/newbie/unix/cron-1.html


Chris Kay (CK)
Eleet Internet Services
M: 0415 451 372
P: 02 4620 5076
F: 02 4620 7008
E: [EMAIL PROTECTED]

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 20 January 2004 9:05 PM
To: Nick JORDAN
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Please help me as fast as possible.. very important!!

Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a 
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could 
> write a small script in PHP (or, indeed, some other language) which 
> would increment the counter, and which would be run at intervals via 
> cron (for instance).
>
> A better solution, however, would be to include a timestamp in your 
> database, then, when data is requested, calculate how many units of 
> ten minutes have passed and adjust your counter accordingly.
>
> Nick
>

--
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] Please help me as fast as possible.. very important!!

2004-01-20 Thread Angelo Zanetti
Im not sure about php but if you are desperate then you could also do it in
VB with a timer control.

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Please help me as fast as possible.. very important!!
Importance: High


Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in
a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field
number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Mario
The only thing you need to know is that you enter a file in the cron dir (in
/etc I think) and you have the following line in that file:
52 10 * * * /usr/bin/php /home/mainwebsite_html/file.php

this line runs the file.php every day at 10.52

(min hour week month year) (php dir) (file location) - the star means any
day-month-year [i'm not sure if it's week month year or year month week]

If there is a cron.daily or monthly ...etc... you don't need to specify the
first part (date time stuff)

e.g.  /usr/bin/php /home/mainwebsite_html/file.php





- Original Message - 
From: "Radwan Aladdin" <[EMAIL PROTECTED]>
To: "Nick JORDAN" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 12:05 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> Where can I fin tutorials about it? (CRON Tab)?
>
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very important!!
>
>
> > > Is it possible in mySQL to put a timer that changes a value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however you could
write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
>
> -- 
> 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] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=cron+tutorials&btnG=Google+Search

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 10:05
> To: Nick JORDAN
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Please help me as fast as possible.. very
> important!![Scanned]
> 
> 
> Where can I fin tutorials about it? (CRON Tab)?
> 
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very 
> important!!
> 
> 
> > > Is it possible in mySQL to put a timer that changes a 
> value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however 
> you could write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals 
> via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many 
> units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
> 
> -- 
> 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] Please help me as fast as possible.. very important!!

2004-01-20 Thread Radwan Aladdin
Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could write
> a small script in PHP (or, indeed, some other language) which would
> increment the counter, and which would be run at intervals via cron (for
> instance).
>
> A better solution, however, would be to include a timestamp in your
> database, then, when data is requested, calculate how many units of ten
> minutes have passed and adjust your counter accordingly.
>
> Nick
>

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
I've never done it but I can only imagine you'd need to run some sort of CRON job to 
effect this at regular intervals.

HTH,

Michael Egan

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 09:45
> To: [EMAIL PROTECTED]
> Subject: [PHP] Please help me as fast as possible.. very 
> important!![Scanned]
> Importance: High
> 
> 
> Hi all
> 
> Is it possible in mySQL to put a timer that changes a value 
> inside a row in a table every while?
> 
> For example : Add "1" to the value very 10 minutes for 
> example.. Field number = 5 after ten minutes = 6 after 
> another 10 minuste = 7..Etc..
> 
> Is it possible?And how?
> 
> Regards..
> 

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



[PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Radwan Aladdin
Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in a table 
every while?

For example : Add "1" to the value very 10 minutes for example.. Field number = 5 
after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..


Re: [PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread John W. Holmes
SASSINC Internet Solutions - Arabic Department wrote:

How to retrieve data from a PHP file? 
(The value that will be retrieved of course 
it is echoed in the PHP file, and it will be 
shown in a TextBox in my VB program.. so I want 
to retrieve it to my EXE VB program that will 
put it inside a TextBox or something like that..)
So you have a PHP file that does (for example)



And you want to retrieve it's results, i.e. the "Hello" string?

Like someone else said, you need to ask this on a VB list. You need to 
determine how to run a program from within VB to run php from the 
command line or open a web interface and retrieve the results of a web 
file. This is not a PHP specific problem.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


[PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread SASSINC Internet Solutions - Arabic Department
Hi all..

I hope you can help me..

How to retrieve data from a PHP file? (The value that will be retrieved of course it 
is echoed in the PHP file, and it will be shown in a TextBox in my VB program.. so I 
want to retrieve it to my EXE VB program that will put it inside a TextBox or 
something like that..)

I'm waiting your replies guys..

Best regards and cheers..
Hadi Aladdin


Re: [PHP] Please help me with these questions..

2004-01-16 Thread Richard Davey
Hello,

Friday, January 16, 2004, 11:54:26 AM, you wrote:

SISAD> I'm a beginner in PHP.. And I'm working on a project..
SISAD> I want your help please to learn how to :

SISAD> 1- MD5 with PHP values.

$md5 = md5($variable);

SISAD> 2- Random values in PHP.

$min = 1;
$max = 100;
$random = mt_rand($min, $max);

SISAD> 3- Inserting values to mySQL DB by PHP and importing
SISAD> from them also to send echo. (For example : after MD5 some
SISAD> strings in PHP I want to insert them into the database also
SISAD> then to echo these MD5 strings).

Depends on your table structure, there are hundreds of tutorials
covering this on the web.

SISAD> 4- How to echo something.

echo "something";

;)

SISAD> 5- How to make some GET values like :
SISAD> http://www.mysitename.com/test.php?username=abc then insert
SISAD> them to the database.

$username = $_GET['username'];

***Strongly*** suggest you download yourself a copy of the PHP manual,
I am on a Windows PC so personally I use the CHM version for speed and
built-in searching. You can find example code for ALL of the questions
you asked in there.

-- 
Best regards,
 Richardmailto:[EMAIL PROTECTED]

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



[PHP] Please help me with these questions..

2004-01-16 Thread SASSINC Internet Solutions - Arabic Department
Hi all..

I'm a beginner in PHP.. And I'm working on a project.. I want your help please to 
learn how to :

1- MD5 with PHP values.

2- Random values in PHP.

3- Inserting values to mySQL DB by PHP and importing from them also to send echo. (For 
example : after MD5 some strings in PHP I want to insert them into the database also 
then to echo these MD5 strings).

4- How to echo something.

5- How to make some GET values like : http://www.mysitename.com/test.php?username=abc 
then insert them to the database.


Hope some experts help me with these.. I want to find some tutorials about them...also 
some examples..

Waiting your replies..

Cheers and regards..
Hadi Aladdin


[PHP] Please help with mail function

2004-01-08 Thread Rolf Berkenbosch
Hello all,
 
 
I have a big problem with the mail function in a php script.
If I run this script with root access, the mail function is working.
If I try to run it like http://www.i-s-u.nl/test.php it won't work.
What is happening, what can I do???
 
Below the little script:
 

 
Thanks,
 
Rolf
 


[PHP] Please help on session_destroy error...

2004-01-01 Thread Tim Meader
I'm looking for help trying to do away with an error I get from time to
time in my access control session logic. Here is my session setup from the
php.ini:
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = gsfc.nasa.gov
session.cookie_secure = On
session.serialize_handler = php
session.gc_probability = 100
session.gc_maxlifetime = 1800
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 32
session.entropy_file = /dev/urandom
session.cache_limiter =
session.cache_expire = 180
session.use_trans_sid = 0
Now, to my understanding, with this setup, the session cookie should be
good for as long as the browser is open, the garbage collector will be run
on any session startup, and a session should be considered garbage after 3
hours.  My problem is that these settings don't always seem to be followed.
Even after sitting for only 60 minutes sometimes, if I click on the logout
button in my interface (which executes the following code), I get a
session_destroy error, about it the session being called for destruction
not being found
 if ((!empty($_GET['action'])) && ($_GET['action'] == "logout")) {
 session_unset();
 if (!empty($_SESSION['logged_in'])) {
 session_destroy();
 }
  }
The only other code is simple HTML output. The session variable "logged_in"
is set upon successful login initially. My rationale for that variable is
that if the session file gets removed via the garbage collector, then that
check above should fail, and the session_destroy function won't be called.
But this doesn't seem to ever work. Is there anything I'm missing here? Any
help would be appreciated. This is all running on Apache 1.3.29, using
Redhat 8 with all current updates, and PHP 4.3.4.
Thanks in advance for any help you may have.



---
Tim
[EMAIL PROTECTED] 

Re: [PHP] Please help on session_destroy error...

2004-01-01 Thread Jeremy Johnstone
You problem is probably right here:

session.gc_maxlifetime = 1800

That sets the garbage collection timeout to 30 minutes... 

Per the manual:

session.gc_maxlifetime specifies the number of seconds after which data
will be seen as 'garbage' and cleaned up.

It is not "strictly" followed, but PHP does it's best to destroy data
after that timeout elapses. This would explain why sometimes you can
last an hour without getting the error. If you want your timeout to be 3
hours, then I would set that value to something like 11,000 (which is
just a little over 3 hours).

-Jeremy

On Thu, 2004-01-01 at 19:30, Tim Meader wrote:
> I'm looking for help trying to do away with an error I get from time to 
> time in my access control session logic. Here is my session setup from the 
> php.ini:
> 
> session.save_handler = files
> session.save_path = /tmp
> session.use_cookies = 1
> session.use_only_cookies = 1
> session.name = PHPSESSID
> session.auto_start = 0
> session.cookie_lifetime = 0
> session.cookie_path = /
> session.cookie_domain = gsfc.nasa.gov
> session.cookie_secure = On
> session.serialize_handler = php
> session.gc_probability = 100
> session.gc_maxlifetime = 1800
> session.bug_compat_42 = 0
> session.bug_compat_warn = 1
> session.referer_check =
> session.entropy_length = 32
> session.entropy_file = /dev/urandom
> session.cache_limiter =
> session.cache_expire = 180
> session.use_trans_sid = 0
> 
> Now, to my understanding, with this setup, the session cookie should be 
> good for as long as the browser is open, the garbage collector will be run 
> on any session startup, and a session should be considered garbage after 3 
> hours.  My problem is that these settings don't always seem to be followed. 
> Even after sitting for only 60 minutes sometimes, if I click on the logout 
> button in my interface (which executes the following code), I get a 
> session_destroy error, about it the session being called for destruction 
> not being found
> 
>  if ((!empty($_GET['action'])) && ($_GET['action'] == "logout")) {
>  session_unset();
>  if (!empty($_SESSION['logged_in'])) {
>  session_destroy();
>  }
>   }
> 
> The only other code is simple HTML output. The session variable "logged_in" 
> is set upon successful login initially. My rationale for that variable is 
> that if the session file gets removed via the garbage collector, then that 
> check above should fail, and the session_destroy function won't be called. 
> But this doesn't seem to ever work. Is there anything I'm missing here? Any 
> help would be appreciated. This is all running on Apache 1.3.29, using 
> Redhat 8 with all current updates, and PHP 4.3.4.
> 
> Thanks in advance for any help you may have.
> 
> 
> 
> 
> ---
> Tim Meader
> CNE ODIN Unix Group
> Lockheed Martin Information Technologies
> [EMAIL PROTECTED]
> (301) 286-8013  

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



  1   2   3   4   >