[PHP] fetching words

2005-10-19 Thread Jad Madi
Hi,
guys I have two tables, articles and keywords, what I want to do is to
scan articles and grab every single word
used in an article to the keyword table
any idea how to do that
--


Regards
Jad madi
Blog
http://EasyHTTP.com/jad/
Web standards Planet
http://W3planet.net/

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



[PHP] Help needed / failed to open stream: Permission denied

2005-10-19 Thread Ndagi Mutiri
Hello,

Trying to read a binary file in MySQL database, i have the following error :

Warning: fopen(./) [function.fopen]: failed to open stream: Permission denied 
in d:\...\download.php on line 57

This is line 57 $file_handle = fopen("./" . $file_name, "r");

and my function 

function db_download_file($dbname, $file, $idreunion) {
//Sélectionne la base de données
mysql_select_db($dbname);

//Requête SQL
$select = "SELECT " . $file . " FROM inter_vertaaldienst WHERE 
id_reunion = '" . $idreunion . "'"; 

//Exécution de la requête
$file_records = @mysql_query($select);

//En cas d'erreur, on affiche un message
if (!$file_records){echo('Erreur :' . mysql_error().'');}
//Autrement, on affiche le fichier
else{
if($file_record = mysql_fetch_array($file_records)){
$file_handle = fopen("./" . $file_name, "r");
$file_bytes = $file_record[0];
fwrite($file_handle, $file_bytes, strlen($file_bytes)); 
$return_value = "./" . $file_name;  
}
}
return($return_value);
}

Thank for your help.
Ndagi

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



[PHP] Re: Help needed / failed to open stream: Permission denied

2005-10-19 Thread David Robley
Ndagi Mutiri wrote:

> Hello,
> 
> Trying to read a binary file in MySQL database, i have the following error
> :
> 
> Warning: fopen(./) [function.fopen]: failed to open stream: Permission
> denied in d:\...\download.php on line 57
> 
> This is line 57 $file_handle = fopen("./" . $file_name, "r");

It seems that the user your web server runs as may not have permission to
open that file. Also, you might want to double check that ./$ile_name is a
valid path.
 
> and my function
> 
> function db_download_file($dbname, $file, $idreunion) {
> //Sélectionne la base de données
> mysql_select_db($dbname);
> 
> //Requête SQL
> $select = "SELECT " . $file . " FROM inter_vertaaldienst WHERE id_reunion
> = '" . $idreunion . "'";
> 
> //Exécution de la requête
> $file_records = @mysql_query($select);
> 
> //En cas d'erreur, on affiche un message
> if (!$file_records){echo('Erreur :' . mysql_error().'');}
> //Autrement, on affiche le fichier
> else{
> if($file_record = mysql_fetch_array($file_records)){
> $file_handle = fopen("./" . $file_name, "r");
> $file_bytes = $file_record[0];
> fwrite($file_handle, $file_bytes, strlen($file_bytes));
> $return_value = "./" . $file_name;
> }
> }
> return($return_value);
> }
> 
> Thank for your help.
> Ndagi




Cheers
-- 
David Robley

A cat will go "quack" - if you squeeze it hard enough.

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



[PHP] Re: PHP DOM XHTML - let me set my own javascript from code

2005-10-19 Thread Rob

Petr Smith wrote:

but it encloses it to CDATA section automatically like this:

language="Javascript">


but I need it like this (because otherwise the javascript don't work):


//



First, script was using some bogus method names.
Secondly, you try to do anything like the following (which do work)?

$html = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n".

"\n".
"http://www.w3.org/1999/xhtml\"; xml:lang=\"en\" 
lang=\"en\">\n".

"\n" .
"\n" .
"\n" .
"hello\n" .
"\n" .
"";
$dom = new DomDocument();
$dom->preserveWhiteSpace = true;
$dom->loadXML($html);
$params = $dom->getElementsByTagName('script');
foreach ($params as $param) {
$dat = $dom->createTextNode("\n//");
$param->appendChild($dat);
$dat  = $dom->createCDATASection("\n\nalert('ddd');\n\n//");
$param->appendChild($dat);
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
}
echo $dom->saveXML();

Could also do it using  through a comment node (following adds 
some linefeeds too):

foreach ($params as $param) {
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
$dat  = $dom->createComment("\n\nalert('ddd');\n\n");
$param->appendChild($dat);
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
}

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



Re: [PHP] OPTIMIZING - The fastest way to open and show a file


:(

Its not working

$bytes = @readfile($filename);
if ($bytes === false){
 //error-handling code
}

There is not any output ?




Richard Lynch wrote:


On Fri, October 14, 2005 6:29 am, Ruben Rubio Rey wrote:
 


  if(file_exists($filename)){
$modified_date=filemtime($filename);
if(time()<($modified_date+1 * 24 * 60 * 60)){
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
echo $contents;
}
 }
   



Checking both file_exists and then doing fopen seems a bit silly.

Trap the error from fopen, and just use that as your file_exists test.

I suspect http://php.net/file_get_contents will be SLIGHTLY faster
than doing all of this code, though:

if (filemtime($filename) > time()) $contents =
@file_get_contents($filename);
if ($contents === false){
 //error-handling code
}
else{
 echo $contents;
}

Then, of course, we have to wonder if you NEED $contents for later use
in the script.

If not, something like this will clock in better:

$bytes = @readfile($filename);
if ($bytes === false){
 //error-handling code
}

The difference here is that you don't even stuff the file into the PHP
string.  It's all read and passed out to stdout in low-level internal
PHP C code, and the data never needs to hit "PHP" variables which are
"more expensive" to setup and maintain.

Note that which is REALLY fastest will probably depend on the size of
the files, your OS system cache, your hardware, and maybe which
version of PHP you are using, if the underlying functions changed.

Must be nice to be worried about 0.0x milliseconds -- I'm fighting a
mystery 3.0 seconds in a data feed for a search engine myself :-)

 



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



Re: [PHP] White background with imagecreatetruecolor()

W odpowiedzi na maila (21:21 - 18 października 2005):

> $im = imagecreatetruecolor ( 140, 140 );
> $bg = imagecolorallocate ( $im, 255, 255, 255 );
> $orgimg = imagecreatefromjpeg ( $image_data['image'] );

> imagecopyresampled ( $im, $orgimg, $thumb_x_offset, $thumb_y_offset, 0,
> 0, $new_thumb_x, $new_thumb_y, $image_data['image_x'], 
> $image_data['image_y'] );


try to add imagefill($im, 0, 0, $bg); after defining $bg ... (line 2?)

-- 
pozdrawiam
Łukasz "nostra" Wojciechowski
gg.1028640 * icq.23059512

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



[PHP] Pb to change "accountexpires" attribute in Active Directory

 Hi all,

I'm currently setting up a php site to control my Active Direcory, and I'm 
struggling with the "Accountexpire" field. 

After extending the expiration date, I can't set it back in AD, because it is 
in scientific format (1.2774158851E+017). And I can't find how to transform 
this into an integer before making the AD request ! 

I've tried inval, double, sprintf, ... without success ! I event tried to use a 
string: $ADtime = ($PHPtime + 11644524000)."000", with no luck... I'm 
suspecting something inside the ldap_mod_replace function, but can't be sure

Here's what my code looks like:

$PHPtime = time();

$newExpiration = $PHPtime + (7 * 24 * 60 * 60); //add 1 week (7 
days * 24 hours * 60 minutes * 60 seconds)
$ADtime = ($PHPtime + 11644524000) * 1000 ;
  
$userdata["accountexpires"] = $ADtime;
$result = ldap_mod_replace($ad, $myaccount->dn, $userdata);


Any idea how to fix this ?

thanks a lot, 


-
 Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
 Téléchargez le ici !  

RE: [PHP] fetching words

> 
> Hi,
> guys I have two tables, articles and keywords, what I want to do is to
> scan articles and grab every single word
> used in an article to the keyword table
> any idea how to do that
> --

Vague question, and I suspect that there is a much better way to do what you
are trying to do, but since you didn't elaborate, here goes:



JM

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



[PHP] Re: PHP and files Upload


> the script always says it was sucessful to upload the file, but the
destination
> directory was always empty...
> even when checking the $_FILES global
>
> $_FILES['var_name']['tmp_name'] and
> $_FILES['var_name']['name'] and
> $_FILES['var_name']['size'], the vars alwyas return empty values...
>
> is there any issue with php5 about files uploads ?

I have it working on Windows, Apache, PHP5

A few checks you could make:

Are you sure that var_name is the name of the file upload field in your
form?
Have you set the form enctype to "multipart/form-data"?
Have you set the maxfilesize attribute, and does the file you are trying to
upload exceed that size?

Good luck

Mark

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



[PHP] Re: Help needed / failed to open stream: Permission denied

 >
> > This is line 57 $file_handle = fopen("./" . $file_name, "r");
>
> It seems that the user your web server runs as may not have permission to
> open that file. Also, you might want to double check that ./$ile_name is a
> valid path.

And if you're planning to write to the file, you need to specify that. "r"
means "open for reading only". Read up on the possibilities here:

http://uk2.php.net/fopen

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



[PHP] Re: PHP DOM XHTML - let me set my own javascript from code


Thanks a lot Rob, it's so simple! I don't know why I did't find it myself.

Petr

Rob wrote:

Petr Smith wrote:


but it encloses it to CDATA section automatically like this:

language="Javascript">


but I need it like this (because otherwise the javascript don't work):


//




First, script was using some bogus method names.
Secondly, you try to do anything like the following (which do work)?

$html = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\";>\n".

"\n".
"http://www.w3.org/1999/xhtml\"; xml:lang=\"en\" 
lang=\"en\">\n".

"\n" .
"\n" .
"\n" .
"hello\n" .
"\n" .
"";
$dom = new DomDocument();
$dom->preserveWhiteSpace = true;
$dom->loadXML($html);
$params = $dom->getElementsByTagName('script');
foreach ($params as $param) {
$dat = $dom->createTextNode("\n//");
$param->appendChild($dat);
$dat  = $dom->createCDATASection("\n\nalert('ddd');\n\n//");
$param->appendChild($dat);
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
}
echo $dom->saveXML();

Could also do it using  through a comment node (following adds 
some linefeeds too):

foreach ($params as $param) {
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
$dat  = $dom->createComment("\n\nalert('ddd');\n\n");
$param->appendChild($dat);
$dat = $dom->createTextNode("\n");
$param->appendChild($dat);
}


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



RE: [PHP] Help needed / failed to open stream: Permission denied


> 
> Hello,
> 
> Trying to read a binary file in MySQL database, i have the 
> following error :
> 
> Warning: fopen(./) [function.fopen]: failed to open stream: 
> Permission denied in d:\...\download.php on line 57
> 
> This is line 57 $file_handle = fopen("./" . $file_name, "r");
> 
> and my function 
> 
> function db_download_file($dbname, $file, $idreunion) {
> //Sélectionne la base de données
>   mysql_select_db($dbname);
> 
>   //Requête SQL
>   $select = "SELECT " . $file . " FROM 
> inter_vertaaldienst WHERE id_reunion = '" . $idreunion . "'"; 
>  
> 
>   //Exécution de la requête
>   $file_records = @mysql_query($select);
> 
>   //En cas d'erreur, on affiche un message
>   if (!$file_records){echo('Erreur :' . mysql_error().'');}
>   //Autrement, on affiche le fichier
>   else{
>   if($file_record = mysql_fetch_array($file_records)){
>   $file_handle = fopen("./" . $file_name, "r");
>   $file_bytes = $file_record[0];
>   fwrite($file_handle, $file_bytes, 
> strlen($file_bytes)); 
>   $return_value = "./" . $file_name;  
>   }
>   }
>   return($return_value);
> }

Place an:

echo "./" . $file_name;

...just above line 57 and make sure that the filename is what you expect it
to be.  If it is, make sure the user the webserver is running as has
permissions sufficient to open the file for reading.  You could, as a test,
temporarily chmod 777 the file to rule out permission issues.

JM

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



Re: [PHP] Help needed / failed to open stream: Permission denied


Ndagi Mutiri wrote:

Hello,


I can't be of any help here but couldn't help noticing
that th OP (Ndagi) is dealing with dutch language DB entities and
comments/output in french and code (vars etc) in english 

bet that can be a PITA :-)



Trying to read a binary file in MySQL database, i have the following error :

Warning: fopen(./) [function.fopen]: failed to open stream: Permission denied 
in d:\...\download.php on line 57

This is line 57 $file_handle = fopen("./" . $file_name, "r");

and my function 


function db_download_file($dbname, $file, $idreunion) {
//Sélectionne la base de données
mysql_select_db($dbname);

//Requête SQL
	$select = "SELECT " . $file . " FROM inter_vertaaldienst WHERE id_reunion = '" . $idreunion . "'";			   


//Exécution de la requête
$file_records = @mysql_query($select);

//En cas d'erreur, on affiche un message
if (!$file_records){echo('Erreur :' . mysql_error().'');}
//Autrement, on affiche le fichier
else{
if($file_record = mysql_fetch_array($file_records)){
$file_handle = fopen("./" . $file_name, "r");
$file_bytes = $file_record[0];
			fwrite($file_handle, $file_bytes, strlen($file_bytes)); 
			$return_value = "./" . $file_name;  
		}

}
return($return_value);
}

Thank for your help.
Ndagi



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



Re: [PHP] Java editor


Looks good. But I was hoping for open source.
John

Torgny Bjers wrote:


John Taylor-Johnston wrote:

 


Is there a OS java (or other) html editor I can implement on a Web
page. I want a user to type text, use bold, italics, etc.
I would then store the html in a MySQl record and then use php to
insert the edited text.
I've seen some packaged, in Moodle for example.
John
   



I heartily recommend InnovaStudio WYSIWYG editor:
http://www.innovastudio.com/editor.asp

It comes with both PHP, ASP, and ASP.NET implementation examples.

It doesn't support XHTML, but you solve that by using the PHP tidy module.

Warm Regards,
Torgny



 



--
John Taylor-Johnston
-
"If it's not Open Source, it's Murphy's Law."

 ' ' 'Collège de Sherbrooke:
ô¿ôhttp://www.collegesherbrooke.qc.ca/languesmodernes/
   - 819-569-2064

 °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign 
Literatures
/(_)\  Université de Sherbrooke
 ^ ^   http://compcanlit.ca/ T: 819.569.2064



RE: [PHP] Java editor

[snip]
>>Is there a OS java (or other) html editor I can implement on a Web
>>page. I want a user to type text, use bold, italics, etc.
>>I would then store the html in a MySQl record and then use php to
>>insert the edited text.
[/snip]

Sorry I missed this earlier. Have you looked at htmlArea?

http://www.htmlarea.com/

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



Re: [PHP] Java editor

Thanks Rob. They are hard to choose between?! I'll play with both. I 
only want the very basics.

Thanks!
John


On Tue, 2005-10-18 at 23:52, John Taylor-Johnston wrote:
 

Is there a OS java (or other) html editor I can implement on a Web page. 
I've seen some packaged, in Moodle for example.
   


Robert Cummings wrote:
Here's a couple of popular ones.
   http://tinymce.moxiecode.com/example_full.php?example=true
   http://www.fckeditor.net/demo/default.html
 


--
John Taylor-Johnston
-
"If it's not Open Source, it's Murphy's Law."

 °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign 
Literatures
/(_)\  Université de Sherbrooke
 ^ ^   http://compcanlit.ca/ T: 819.569.2064

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



[PHP] PHP to read news

Hi,

I'm looking for some help with reading freely available news files like
this:   news://newsclip.ap.org/[EMAIL PROTECTED]
.  
I'm able to connect to the newsgroup with the IMAP functions just file,
but this type of news url can be placed in a browser like mozilla and
the message will be pulled, so i'm thinking it should be much easier
than that.   Has anyone ever pulled a news url like this with php and
parsed it?   If so, what functions were you using?

Thanks in advance,

Steve

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



[PHP] Imap, reading the email-body


Hi guys,

I need some help with the imap_body function and how to work with the 
string that this function returns...


Im working on a mailing list archive website and i'm using the imap_* 
functions to handle this, the header works fine (and other things too) 
but the Body of the message dont work as expected. It came as one-line 
string, the "\n" character (or  in html) is simple ignored. I dont 
know how to make the function translate the "\n" to .



You can understand better what i'm saying looking:

http://www.brunogola.com.br/testeimap.php

Look the main page and try to read any message... I dont know what can i 
do to fix it...


Thanks for any help and sorry any mistakes about my english...

Bruno Gola

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



Re: [PHP] Imap, reading the email-body

Hello Bruno,

Wednesday, October 19, 2005, 10:08:24 AM, you wrote:
> Look the main page and try to read any message... I dont know what
> can i do to fix it...

nl2br()
(see php manual)


-- 
  TBUDL/BETA/DEV/TECH Lists Moderator / PGP 0x6C0AB16B
 __       Geocaching:http://gps.PCWize.com
(  )  ( ___)(_  _)( ___)  TBUDP Wiki Site:  http://www.PCWize.com/thebat/tbudp
 )(__  )__)  _)(_  )__)   Roguemoticons & Smileys:http://PCWize.com/thebat
()()()(__)PHP Tutorials and snippets:http://www.DevTek.org

Speak softly and carry a big aardvark.

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



Re: [PHP] Imap, reading the email-body

hi,

I think that I understood you problem some what,
if you are having newline character (\n) in you string ,
then you can use Regular expression to replace the \n character
with  tag.

why can't you try something like the following

-code
 tag */
$string = "this is to first_line\nthis is second line.\nthird line";

$search = '@[\n]+@';
$replace = '';

$result = preg_replace($search, $replace, $string);
print $result;
?>
--
if your input is like the value of "$string" then this will help you.

On 10/19/05, Bruno Gola <[EMAIL PROTECTED]> wrote:
>
> Hi guys,
>
> I need some help with the imap_body function and how to work with the
> string that this function returns...
>
> Im working on a mailing list archive website and i'm using the imap_*
> functions to handle this, the header works fine (and other things too)
> but the Body of the message dont work as expected. It came as one-line
> string, the "\n" character (or  in html) is simple ignored. I dont
> know how to make the function translate the "\n" to .
>
>
> You can understand better what i'm saying looking:
>
> http://www.brunogola.com.br/testeimap.php
>
> Look the main page and try to read any message... I dont know what can i
> do to fix it...
>
> Thanks for any help and sorry any mistakes about my english...
>
> Bruno Gola
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
with regds,
Nahalingam.


[PHP] Classes or functions

What this methods are better for php4? classes or functions
Does it better to use classes when I can write the codes with
functions?
Excuseme for my bad english


[PHP] Classes or functions

What this methods are better for php4? classes or functions
Does it better to use classes when I can write the codes with functions?
Excuseme for my bad english


Re: [PHP] Java editor


Thanks all. This was easy to install:
http://ccl.flsh.usherbrooke.ca/~johj2201/test.php

Jay Blanchard wrote:


[snip]
 


Is there a OS java (or other) html editor I can implement on a Web
page. I want a user to type text, use bold, italics, etc.
I would then store the html in a MySQl record and then use php to
insert the edited text.
 


[/snip]

Sorry I missed this earlier. Have you looked at htmlArea?

http://www.htmlarea.com/

 



--
John Taylor-Johnston
-
"If it's not Open Source, it's Murphy's Law."

 ' ' 'Collège de Sherbrooke:
ô¿ôhttp://www.collegesherbrooke.qc.ca/languesmodernes/
   - 819-569-2064

 °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign 
Literatures
/(_)\  Université de Sherbrooke
 ^ ^   http://compcanlit.ca/ T: 819.569.2064



Re: [PHP] Java editor

Please take a look at http://mozile.mozdev.org/

This is a browser based solution. Pretty cool i find.

bye

Am Dienstag, den 18.10.2005, 23:52 -0400 schrieb John Taylor-Johnston:
> Is there a OS java (or other) html editor I can implement on a Web page. 
> I want a user to type text, use bold, italics, etc.
> I would then store the html in a MySQl record and then use php to insert 
> the edited text.
> I've seen some packaged, in Moodle for example.
> John
> 

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



Re: [PHP] Java editor

On Wed, 2005-10-19 at 13:07, John Taylor-Johnston wrote:
> Thanks all. This was easy to install:
> http://ccl.flsh.usherbrooke.ca/~johj2201/test.php

IMHO would stay away from htmlarea, they've discontinued it in favour of
what I would guess is the unfree InnovaStudio (since it ranks first on
their site). Either way from what I've been seeing over the past few
months, fckeditor seems to be the most popular with good community
support.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] re: some problems with php form

Mike and all,
 guess I still have something wrong as I am getting this error:
 *Parse error*: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in *
/hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form.php
* on line *52*
  line 52 is:
 " id="firstname" name="firstname" type="text" value="">
  how would I fix this error?

 On 10/18/05, Ford, Mike <[EMAIL PROTECTED]> wrote:
>
> On 18 October 2005 15:50, Bruce Gilbert wrote:
>
> > I think so Minuk. Here is the *entire* form code below. Maybe
> > someone can
> > also point out why the email regex validation code isn't working? TIA
> > /begin PHP form
> > code*/
> >
> >  > $form_block=<<
> Here starteth a heredoc ;)
>
> >  > class="info_request" > 
> > About You
> >
> > * First
> > Name:  > />
> >
> > 
> Here you try to start a block of PHP code within the heredoc. You can't do
> that.
>
> Because you didn't show us the heredoc, most of the responses assumed you
> had broken out of PHP completely into HTML, which is why many of the
> solutions produced parse errors.
>
> > input.normal";}?>" id="firstname" name="firstname"
> > type="text" value=" > echo $_POST['firstname'];?>">
>
> Again, you're trying to use PHP code inside a heredoc -- this one's
> solvable, though: as you just want the value of the variable, you can use
> {$_POST['firstname']} (which I notice you do elsewhere!).
>
> Actually, since you use the heredoc's value once almost immediately after
> assigning it, I think you probably would be better breaking out into PHP for
> most of this, thusly:
>
> if ($_POST['op']!='ds') {
>
> ?>
>  class="info_request" >
> 
> About You
>
> * First Name:
> 
>
>  else {echo "normal"}
> ?>" id="firstname" name="firstname" type="text" value=" echo $_POST['firstname'] ?>">
>
> ... etc. ...
>
>  } else if ($_POST["op"] == "ds") {
>
> Hope this helps.
>
> Cheers!
>
> Mike
>
> -
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Headingley Campus, LEEDS, LS6 3QS, United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
>
> To view the terms under which this email is distributed, please go to
> http://disclaimer.leedsmet.ac.uk/email.htm
>



--
::Bruce::


RE: [PHP] re: some problems with php form

[snip]
"
id="firstname" name="firstname" type="text" value="">

  how would I fix this error?
[/snip]

You are missing several semi-colons;

"
id="firstname" name="firstname" type="text" value="">

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



[PHP] How can I get the url in the IE?

Hello friend.
How can I get the url in the IE ?

best regards TOMAS


-
Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.27
en el dominio de correo angerona.cult.cu  y no se encontro ninguna coincidencia.

RE: [PHP] How can I get the url in the IE?

[snip]
How can I get the url in the IE ?
[/snip]

http://us3.php.net/manual/en/reserved.variables.php#reserved.variables.serve
r

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



Re: [PHP] re: some problems with php form

I now have:

* First Name: 
"
id="firstname" name="firstname" type="text" value="">



but I still receive the same error:
 ' *Parse error*: parse error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in *
/hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form.php
* on line *54 '*

 On 10/19/05, Jay Blanchard <[EMAIL PROTECTED]> wrote:
>
> [snip]
> "
> id="firstname" name="firstname" type="text" value=" $_POST['firstname'] ?>">
>
> how would I fix this error?
> [/snip]
>
> You are missing several semi-colons;
>
>  "normal";}?>"
> id="firstname" name="firstname" type="text" value=" $_POST['firstname']; ?>">
>



--
::Bruce::


RE: [PHP] re: some problems with php form

[snip]
I now have:

* First Name: 
"

id="firstname" name="firstname" type="text" value="">


You added one too many, change $_POST["firstname";]; to $_POST['firstname'];

"
id="firstname" name="firstname" type="text" value="">

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



[PHP] Modular Authoring System

Hi,

I am now working on a concept for a webportal software in about 2 and a
halv year. As far as I am in the development of the project I was able
to write an authoring system with support of unlimited language transla-
tions and xml based frontend/screen engine.

All html forms and screens are generated via parsed xml frontend tem-
plates. The navigation elements are consisting of xml elements too.

Alot of things can be done, without the developer has to write html or
php code very much.

The media asset management system is able to convert images, videos and
in near future audio files to any format the player needs to play the
video or audio file without use of mplayer-plugin or windows media pla-
yer.

I wrote a question catalog management system, with which it is very easy
to add question catalogs to the content management system, so individual
services can be offered to customers, by evaluation of the user given
answers to the system.

The user management has a very detailed rights management, and the user
profiles are consisting of xml profile element templates which are
editable, thru the form engine, which is reading the xml profile tem-
plates and is displaying them as forms.

The screentext management is a nice frontend to the screentext database,
in which all frontend screentexts are stored, while the documents of the
content management system are entered by a special xml editor i wrote,
with wich the webauthor dont has to be able to know any html tags or
such things, so write content for the website.

In future i want to add the possebility to the editor, that authors are
going to be able to add tables, generated by the GD lib, so informations
cant just be grabbed by other companys too easy, so informations cant
really be stolen. And i want to add a frontend to the JPGraph lib, so
the authors will be able to enter values into the documents they are
working on, to add diagrams to the document.

I nice working template engine has to be written, so the design of the
hole page can change by daytime or the time of the year.

I added a cronjob management tool, so alot of tasks can be executed
timed as needed. If a customer of an couple finder service want to get
out of his contract, it can be done automatically to the end of the
month, without the site administrators have to do anything about it.

The Online shopping module should consist of a kind of neural network to
find out, what kind of products is fitting best to a customer with
specific account values based on the question catalog management tool.

Later I want to add an tracking system, a product managment system, and
marketing management tool, a statistics tool and many other things.

The hole system is build up modular and is based on php5.

No other programmer did ever take a look at this system, so I dont
really now, if my design is well, or if my php code is just wellformed.

I'm went to work alone, because i did so in the last 8 years.

My question is now, as this concept and the authoring system itself is
not opensource at the moment. If somepeople would like to take a look at
it, and maybe discuss with me, wheather to make it opensource, or
letting it stay as a commercial project.

My only goal is, to set up the webportals I have written concepts for in
the last couple of years. But the project is now comming into a size
where its nearly impossible to start anything new, because there still
are alot of holes in the modules.

And my pressure is growing abit.

All i can say, that is is possible to set up a content management based
website including webdesign and all other things can be done with the
authoring system in about 4 - 6 days, instead of one or two month, it
would take to write something like that on your own if you dont use all
of the modules the authoring system is consisting of at the moment.

I'm not the best programmer, but I'm good in software design and concep-
tion. So it would be really nice, to have some people around, who can
take care abit about the quality of the project. And maybe make use of
it, like i want too.

So best regards,

and lets make it happen :)))

Sascha Braun

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



Re: [PHP] Classes or functions

It's really a matter of comfort level and opinion. There can be  
strong arguments either way. Using just functions will be faster,  
although the speed difference may be minimal and not noticeable.  
Using just functions can be easier and quicker to develop, especially  
for small projects.


But, using classes will allow your project to scale much better, if  
only by giving you the ability to create variable scopes so that  
variable and function names don't conflict. Classes will also allow  
you to standardize your function names. For instance, you can have  
multiple functions called getList(), but in different classes. Then  
any time you need to retrieve a list of data, you call the getList()  
function from the appropriate class (i.e. companies, contacts,  
phones, etc).


That's a very basic example. My personal opinion is that you cannot  
build a large scale project that will be easily maintainable without  
using classes and object oriented concepts. That's not to say it  
can't or hasn't been done (it has).


On Oct 19, 2005, at 12:42 PM, Khorosh Irani wrote:


What this methods are better for php4? classes or functions
Does it better to use classes when I can write the codes with  
functions?

Excuseme for my bad english



--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

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



[PHP] concerning open_basedir and safe_mode on fileupload

I am making an imagegallery with fileuploads for the members of the site and
need a little info on how the open_basedir affects the fileupload.
I have read what I have found on it, but I'm not sure what it really does.

The phpinfo file says something like this:

PHP CORE config.
--
open_basedir (local value) /dir1/dir2/yoursite:/dir1/dir2/tempdir (master
value) No value
safe_mode (local value) On (master value) Off
-

If I understood this correctly this means that I have to upload the
imagefile to $sysfolder="/dir1/dir2/tempdir"

Or would the $sysfolder be the whole value of the (local value):
/dir1/dir2/yoursite:/dir1/dir2/tempdir

And do I then have to move the file to the wanted directory for the uploads
with a php script?

And chmod(). Is this anything to have in mind?

Final question: Wich of the values am I gonna work out from?
My guess is offcourse the (local value), or I wouldn't get the:

*Warning: *copy(): open_basedir restriction in effect.

But I would believe the (master value) WAS the master value...if you get
what I mean?
Most of the time a "mastersomething" usually overrides a
"notmastersomething" Agree?

Additional info:

The upload is from a form and works perfectly on my own testing server where
both safe_mode and open_basedir is turned of.



Can anyone explain this to me in a nice "master to noob" way? Or is more
information needed?


Re: [PHP] Re: How can I connect a remote server from phpmyadmin?

I asked my host to set up PHP and MySQL on the server.
They had either that or ASP with Access db.
I got an adress from them to the PHPmyadmin.
I don't think most webhosting companies allows remote access to th DB from
the local machines.
OffcourseI could be wrong...

-Twisted-


[PHP] win32service extension source code

Whre can i fid the source code for this extension?

it's documented at php.net/win32service and can be downloaded from
snaps.php.net/win32/ but the source isn't in the cvs. or did i miss
it?
--
"If you really want something in this life, you have to work for it.
Now, quiet! They're about to announce the lottery numbers..."
- Homer Simpson

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



Re: [PHP] win32service extension source code

On Thu, 2005-10-20 at 02:22 +0300, Evil Worm wrote:
> Whre can i fid the source code for this extension?
> 
> it's documented at php.net/win32service and can be downloaded from
> snaps.php.net/win32/ but the source isn't in the cvs. or did i miss
> it?

http://cvs.php.net/pecl/win32service/

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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



Re: [PHP] Re: No redirect with header()

On 10/18/05, Oliver Grätz <[EMAIL PROTECTED]> wrote:
> Snippets are bad ;-)
>
> Please post a full example that is _not_ working on your server.
> Perhaps this is no PHP problem at all.
>

I know, but I don't want to post my tracking code. I am certain,
however, that it is not returning anything to the browser. The http://lyricslist.com

3

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



Re: [PHP] Re: No redirect with header()

On Thu, 2005-10-20 at 03:22 +0200, Dotan Cohen wrote:
> On 10/18/05, Oliver Grätz <[EMAIL PROTECTED]> wrote:
> > Snippets are bad ;-)
> >
> > Please post a full example that is _not_ working on your server.
> > Perhaps this is no PHP problem at all.
> >
> 
> I know, but I don't want to post my tracking code. I am certain,
> however, that it is not returning anything to the browser. The  is at the top of the page, no echo, ...

So just blank out the tracking code. I'm not sure how you expect us to
help you if we can't see the code that isn't working :)

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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