php-general Digest 22 Feb 2004 16:48:17 -0000 Issue 2605

Topics (messages 178468 through 178492):

Objects and Arrays - need help?
        178468 by: John Romero

PHP Error
        178469 by: Tim Trimble
        178471 by: John Nichel

running php through cron
        178470 by: Pablo Gosse
        178472 by: Jason Wong
        178473 by: Adam Bregenzer
        178474 by: Pablo Gosse

sql expression
        178475 by: Marc Greenstock
        178477 by: Marc Greenstock
        178478 by: John W. Holmes

Email - format
        178476 by: Sheni R. Meledath
        178479 by: John W. Holmes
        178480 by: Manuel Lemos

help please
        178481 by: ajay
        178482 by: adwinwijaya
        178483 by: ajay
        178484 by: adwinwijaya

crc32
        178485 by: Armand Turpel
        178486 by: Armand Turpel

Re: delete a function
        178487 by: Sztankó Demeter
        178491 by: Marek Kilimajer

Re: using xp home
        178488 by: zerof
        178489 by: XMG

Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually
        178490 by: Rob Richards

Re: Safe Mode
        178492 by: user.domain.invalid

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Here is my code. Two files: 1) myclass.php 2)test.php to instantiate the
objects.

I have two classes. One is a "parts" class with some basic properties in an
array. And the other class is the "repair" class which needs to hold MANY
parts. In the "repair" class, I have a $partsarray so that I can just add
them to the array and then process them later.

The problem is that when I need to get the parts out of the repair class -
they are not there. I made a method called getPartsCount and it always
returns 0. Can someone take a look at this code and help me?  Thanks in
advance.

<?php
//THIS IS MYCLASS.PHP

//make a record class
class part {
  //properties
  var  $_data = array();

  //methods
  function getData($attributeName) {
    return $this->_data[$attributeName];
  }
  function setData($attributeName, $value) {
    $this->_data[$attributeName] = $value;
  }
}

//make a REPAIR class
class repair {
  //properties
  var $_data = array();
  var $_partsarray = array();

  //methods
  function getData($attributeName) {
    return $this->_data[$attributeName];
  }
  function setData($attributeName, $value) {
    $this->_data[$attributeName] = $value;
  }

     function getPart($pos) {
      return $this->_partsarray[$pos];
     }
  function addPart($partsclass, $pos) {
   //pos will actually be a string value
     $this->_partsarray['$pos'] = $partsclass;
  }
  function deletePart($pos) {
    unset($this->_partsarray['$pos']);
  }

  function countParts() {
    return count($_partsarray);
  }

  function getParts() {
    return $_partsarray;
  }
}
?>

<?php
// THIS IS THE CODE TO TEST THE CLASSES - TEST.PHP
require_once('myclass.php');

//make the parts
$partsclass = new part;
$partsclass->setData('1', 'val1');
$partsclass->setData('2', 'val2');
$partsclass->setData('3', 'val3');

$partsclass2 = new part;
$partsclass2->setData('1', 'val1');
$partsclass2->setData('2', 'val2');
$partsclass2->setData('3', 'val3');

$repairclass = new repair;
$repairclass->setData('test1', 'value1');
$repairclass->addPart($partsclass1, '1');
$repairclass->addPart($partsclass2, '2');

echo 'the test value is' . $repairclass->getData('test1');
echo '<br>and the part counter is: ' . $repairclass->countParts();

$partsclasstemp = new part;
$partsclasstemp = $repairclass->getPart('1');
echo '<b><P>parts data is: ' . $partsclasstemp->getData('2');
echo '<br>';
$temparray = array();
$temparray = $repairclass->getParts();

echo count($temparray);
?>

--- End Message ---
--- Begin Message ---
Can anyone tell me what linux and php is asking for here, this dir. and file is at 
this location, and chmoded to 755.

Failed opening required './libraries/grab_globals.lib.php' 
(include_path='.:/php/includes:/usr/share/php') 

I guess what I'm asking is, it says the path is ".:/php/includes" I can't find that on 
the machine anywere

and "/usr/share/php" that I did find, and I put the libraries dir. at that location, 
it still says it's not there

What am I doing wrong....           Thanks...Tim

--- End Message ---
--- Begin Message --- Tim Trimble wrote:
Can anyone tell me what linux and php is asking for here, this dir. and file is at this location, and chmoded to 755.

Failed opening required './libraries/grab_globals.lib.php' (include_path='.:/php/includes:/usr/share/php')

I guess what I'm asking is, it says the path is ".:/php/includes" I can't find that on the machine anywere

and "/usr/share/php" that I did find, and I put the libraries dir. at that location, it still says it's not there

What am I doing wrong.... Thanks...Tim

With the dot slash (./), it's looking for the file in a directory under the same directory that the script is running in....


-> somefile.php
-> libraries
  |
  -> grab_globals.lib.php

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message ---
Hi folks.  I've got a quick question about security when running a php
script through a cron job.

I've got a cron job set up that executes every minute and looks for idle
users and pending content within a cms.

I know that if I wanted to execute the script with an exec() call from
within another php script I would need to chmod +x it.

I don't seem to need to do this with a cron job, as I use the following
command in the cron job, 

php /home/pablo/cmsutil/CMS_monitor.php

and the permissions on CMS_monitor.php are as follows:

-rw-rw-r--    1 pablo    pablo        3636 Feb 21 00:48 CMS_monitor.php

My question is under these permissions could someone else with an
account on this server execute this file?  I'm pretty sure they couldn't
but my knowledge of Linux isn't yet as extensive as I would like it to
be so I can't say for sure.

Can someone verify or correct me on this?

Cheers and TIA.

Pablo

--- End Message ---
--- Begin Message ---
On Sunday 22 February 2004 11:12, Pablo Gosse wrote:

> I know that if I wanted to execute the script with an exec() call from
> within another php script I would need to chmod +x it.
>
> I don't seem to need to do this with a cron job, as I use the following
> command in the cron job,
>
> php /home/pablo/cmsutil/CMS_monitor.php

That's because you're executing the php binary (php) and telling it to run the 
script (CMS_monitor.php).

> and the permissions on CMS_monitor.php are as follows:
>
> -rw-rw-r--    1 pablo    pablo        3636 Feb 21 00:48 CMS_monitor.php
>
> My question is under these permissions could someone else with an
> account on this server execute this file?

It depends. If they can read the file 'CMS_monitor.php' and they can execute 
the php binary then yes. But because users are not usually allowed to access 
other users' home directory they will not be able to run your scripts.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Why are there flotation devices under plane seats instead of parachutes? 
                -- Why Why Why n22
*/

--- End Message ---
--- Begin Message ---
On Sat, 2004-02-21 at 22:12, Pablo Gosse wrote:
> php /home/pablo/cmsutil/CMS_monitor.php
> 
> and the permissions on CMS_monitor.php are as follows:
> 
> -rw-rw-r--    1 pablo    pablo        3636 Feb 21 00:48 CMS_monitor.php
> 
> My question is under these permissions could someone else with an
> account on this server execute this file?  I'm pretty sure they couldn't
> but my knowledge of Linux isn't yet as extensive as I would like it to
> be so I can't say for sure.

If the script can be read (the "r" permission) it can be run through the
php cli like you are doing in cron.  If the cron command you have is
running under your username, and the script does not need to be viewable
by the web server, you can set the permissions to 600, which would be
-rw-------.  This will allow you as the user to read (as well as execute
through php) and write to the file and not let anyone else (besides root
of course) to do anything with it.  Technically, if an executable can be
read it can be executed.  If it's a binary it can be copied by a user
and the copy can be run, if it's a script it can be passed to an
interpreter and run.

Good Luck,
Adam

-- 
Adam Bregenzer
[EMAIL PROTECTED]
http://adam.bregenzer.net/

--- End Message ---
--- Begin Message ---
<snip>
> php /home/pablo/cmsutil/CMS_monitor.php
> 
> and the permissions on CMS_monitor.php are as follows:
> 
> -rw-rw-r--    1 pablo    pablo        3636 Feb 21 00:48
CMS_monitor.php
> 
> My question is under these permissions could someone else with an
> account on this server execute this file?  I'm pretty sure they
couldn't
> but my knowledge of Linux isn't yet as extensive as I would like it to
> be so I can't say for sure.

If the script can be read (the "r" permission) it can be run through the
php cli like you are doing in cron.  If the cron command you have is
running under your username, and the script does not need to be viewable
by the web server, you can set the permissions to 600, which would be
-rw-------.  This will allow you as the user to read (as well as execute
through php) and write to the file and not let anyone else (besides root
of course) to do anything with it.  Technically, if an executable can be
read it can be executed.  If it's a binary it can be copied by a user
and the copy can be run, if it's a script it can be passed to an
interpreter and run.
</snip>

Thanks for the replies.  Very helpful.  The crontab running is my own so
if I change the permission on the file as Adam mentions above I'll be
fine (please let me know if this is not the case!).

Thanks again.

Pablo.

--- End Message ---
--- Begin Message ---
Hi all,

I am trying to provide a star sign search so that the user can search for
any given star sign eg Gemini and retrieve all the users who belong to that
sign.

I have a table with all the star signs, in the table are the fields
'Name','From','To'. Both the 'From' and 'To' are an integer of the relevant
dates eg in the 'Gemini' row I have:

Gemini, 521, 621 (521 means May 21st, 621 means June 21st). I hope I'm
explaining my self ok.

Now in the users table I have date of birth stored in the Date format eg;
1979-06-20.

Here is my current stab at this.

SELECT * FROM users
WHERE MONTH(user_data.User_DOB) >= 5
AND DAYOFMONTH(user_data.User_DOB) >= 21
AND MONTH(user_data.User_DOB) <= 6
AND DAYOFMONTH(user_data.User_DOB) <= 21

Obviously this wont work because anyone born, lets say on the 20th will not
fit that criteria.

I've tried other methods but I cant seem to figure out the correct syntax.

I thought using CONCAT may work eg:

SELECT * FROM users
WHERE CONCAT(MONTH(user_data.User_DOB),DAYOFMONTH(user_data.User_DOB))
BETWEEN 521 AND 621

but that doesn't seem to work either.

Can someone help please?

Thanks in advance.

--- End Message ---
--- Begin Message ---
Ok I spoke too soon,

I did this:

SELECT * FROM users
WHERE ((MONTH(user_data.User_DOB) * 100) + DAYOFMONTH(user_data.User_DOB))
BETWEEN 521 AND 621

as in I multiplied MONTH with 100 and added the DAYOFMONTH

Marc.

"Marc Greenstock" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I am trying to provide a star sign search so that the user can search for
> any given star sign eg Gemini and retrieve all the users who belong to
that
> sign.
>
> I have a table with all the star signs, in the table are the fields
> 'Name','From','To'. Both the 'From' and 'To' are an integer of the
relevant
> dates eg in the 'Gemini' row I have:
>
> Gemini, 521, 621 (521 means May 21st, 621 means June 21st). I hope I'm
> explaining my self ok.
>
> Now in the users table I have date of birth stored in the Date format eg;
> 1979-06-20.
>
> Here is my current stab at this.
>
> SELECT * FROM users
> WHERE MONTH(user_data.User_DOB) >= 5
> AND DAYOFMONTH(user_data.User_DOB) >= 21
> AND MONTH(user_data.User_DOB) <= 6
> AND DAYOFMONTH(user_data.User_DOB) <= 21
>
> Obviously this wont work because anyone born, lets say on the 20th will
not
> fit that criteria.
>
> I've tried other methods but I cant seem to figure out the correct syntax.
>
> I thought using CONCAT may work eg:
>
> SELECT * FROM users
> WHERE CONCAT(MONTH(user_data.User_DOB),DAYOFMONTH(user_data.User_DOB))
> BETWEEN 521 AND 621
>
> but that doesn't seem to work either.
>
> Can someone help please?
>
> Thanks in advance.

--- End Message ---
--- Begin Message --- Marc Greenstock wrote:

I have a table with all the star signs, in the table are the fields
'Name','From','To'. Both the 'From' and 'To' are an integer of the relevant
dates eg in the 'Gemini' row I have:

Gemini, 521, 621 (521 means May 21st, 621 means June 21st). I hope I'm
explaining my self ok.

You should use a regular date column for your "from" and "to" dates.


Now in the users table I have date of birth stored in the Date format eg;
1979-06-20.

Here is my current stab at this.

SELECT * FROM users
WHERE MONTH(user_data.User_DOB) >= 5
AND DAYOFMONTH(user_data.User_DOB) >= 21
AND MONTH(user_data.User_DOB) <= 6
AND DAYOFMONTH(user_data.User_DOB) <= 21

and then you can do something like this:


WHERE DAYOFYEAR(user_data.User_DOB) BETWEEN DAYOFYEAR(startable.from) AND DAYOFYEAR(startable.to)

--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- Hello:

Can any body provide me with a regular expression (as per the latest standards) to check the validity of an email address.

I am using some of the below formats. But these formats are not handling all the email addresses.

Format I:

ereg("^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$", $email)

Will not accept hyphen (-) in the email addresses.


Format II:


eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email)

Will not accept domains like y.net.ye

Please suggest a regular expression which will reject only email addresses which are 100% invalid.


Sheni R Meledath
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message --- Sheni R. Meledath wrote:

Can any body provide me with a regular expression (as per the latest standards) to check the validity of an email address.

This is covered over and over and over, 100s of times (literally) in the manual. Look through the comments in either of the regular expression chapters.


--
---John Holmes...

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

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- Hello,

On 02/22/2004 02:47 AM, Sheni R. Meledath wrote:
Please suggest a regular expression which will reject only email addresses which are 100% invalid.

You may want to take a look at this class that not only does regular expression e-mail address validation rejecting only addresses that have 100% certainly invalid characters, but also can check if the domain exists and if the respective SMTP server would accept messages to that address:


http://www.phpclasses.org/emailvalidation

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
hi!

i have a class called DB that i include in a page as include(classes/DB.php);
however when i run this page i get an error saying
Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open 
stream: No such file or directory in /home/bikkar/public_html/ajay/index.php 
on line 18

Warning: main(): Failed opening '/home/bikkar/public_html/ajay/classes/DB.php' 
for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') 
in /home/bikkar/public_html/ajay/index.php on line 18

but i have verified that DB.php is there, is full(non-corrupted) and there are 
a few other classes in that folder that upload fine.

can someone please help

thanks



-- 
ajay
---------------
Who Dares Wins

-------------------------------------------------
This mail sent through IMP: www-mail.usyd.edu.au

--- End Message ---
--- Begin Message ---
Hello ajay,
Sunday, February 22, 2004, 7:57:21 PM, you wrote:

a> hi!
a> i have a class called DB that i include in a page as include(classes/DB.php);
a> however when i run this page i get an error saying
a> Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open
a> stream: No such file or directory in
a> /home/bikkar/public_html/ajay/index.php 
a> on line 18
a> Warning: main(): Failed opening
a> '/home/bikkar/public_html/ajay/classes/DB.php' 
a> for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') 
a> in /home/bikkar/public_html/ajay/index.php on line 18
a> but i have verified that DB.php is there, is
a> full(non-corrupted) and there are 
a> a few other classes in that folder that upload fine.
a> can someone please help
a> thanks
a> --
a> ajay
a> ---------------

--> would you  like to show us part of the code (especially on
--> index.php line 18)

-- 
Best regards,
 adwinwijaya                            mailto:[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
hi!

the code is

<?php
                include("classes/DB.php");
        include("classes/PageMaker.php");
        



        $page = new PageMaker("main.css", "USYD Basketball");
        $page->print_header();

        printf("<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");

        $page->print_banner();
        $page->print_menu();

        $db = new DB("localhost", "usydbasketball", "", "");
        $query = "SELECT * FROM updates ORDER BY ID DESC";

thanks
ajay


Quoting adwinwijaya <[EMAIL PROTECTED]>:

> Hello ajay,
> Sunday, February 22, 2004, 7:57:21 PM, you wrote:
> 
> a> hi!
> a> i have a class called DB that i include in a page as
> include(classes/DB.php);
> a> however when i run this page i get an error saying
> a> Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to
> open
> a> stream: No such file or directory in
> a> /home/bikkar/public_html/ajay/index.php 
> a> on line 18
> a> Warning: main(): Failed opening
> a> '/home/bikkar/public_html/ajay/classes/DB.php' 
> a> for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') 
> a> in /home/bikkar/public_html/ajay/index.php on line 18
> a> but i have verified that DB.php is there, is
> a> full(non-corrupted) and there are 
> a> a few other classes in that folder that upload fine.
> a> can someone please help
> a> thanks
> a> --
> a> ajay
> a> ---------------
> 
> --> would you  like to show us part of the code (especially on
> --> index.php line 18)
> 
> -- 
> Best regards,
>  adwinwijaya                            mailto:[EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
ajay
---------------
Who Dares Wins

-------------------------------------------------
This mail sent through IMP: www-mail.usyd.edu.au

--- End Message ---
--- Begin Message ---
Hello ajay,
Sunday, February 22, 2004, 9:05:52 PM, you wrote:

a> hi!
a> the code is
a> <?php
a>  include("classes/DB.php");
a>      include("classes/PageMaker.php");
        
hmm... may be you need to add '/' in front of classess
try this one:
    include(dirname(__FILE__)."/classes/DB.php");

hope it will work :)

good luck

-- 
Best regards,
 adwin

--- End Message ---
--- Begin Message ---
Hi,

Currently I'm working on a search engine for a website. A mysql table on which 
searching should be done was created which contains Words of website articles:

CREATE TABLE docs_words (
  crc32_word int(11) NOT NULL default '0',
  id_doc int(11) NOT NULL default '0');

As you can see not the real word is taken for indexing but the crc32 checksum of a 
word. 

So my question is: How big is the probability that 2 different words has the same 
crc32 checksum?

Thanks for response

--- End Message ---
--- Begin Message ---
Found on http://search.mnogo.ru/doc/msearch-howstore.html#sql-stor-crc

According to our tests there are only 250 pairs of words have the same CRC
in the list of about 1.600.000 unique words. Most of these pairs (>90%) have
at least one misspelled word.



----- Original Message -----
From: "Armand Turpel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 22, 2004 12:21 PM
Subject: [PHP] crc32


Hi,

Currently I'm working on a search engine for a website. A mysql table on
which searching should be done was created which contains Words of website
articles:

CREATE TABLE docs_words (
  crc32_word int(11) NOT NULL default '0',
  id_doc int(11) NOT NULL default '0');

As you can see not the real word is taken for indexing but the crc32
checksum of a word.

So my question is: How big is the probability that 2 different words has the
same crc32 checksum?

Thanks for response

--- End Message ---
--- Begin Message ---
Thank You for the answer and the link.

I'm not sure that I want to start OOP-ing in my php code, but I will if
necessary.

I'l tell the problem I want to solve. It also will help me to understand the
problem:

There are two (or more) different functions on my web site, that have the
same name (an action). They are called depending on the permittions of the
end user. (for example, if it is an unregistered user, then it is redirected
to registration form, if it is a registered user, some table is generated
from database, if it a administrator user, some additional controls a shown
that allow to change the table). I want to have the code clean so I don't
want to put the switch or if operators to it. I will call the wrapper that
will check the grant of the user and call apropriate function. (For example:
Load_action("List"))

So there is a set of grant properties assigned to each function and a list
(array, whatever) of such functions is assigned to the action. The wrapper
walks through the list and finds the first function which grant properties
match the user grant properties.

The second side is that I want to make the coding very easy and simple. So
if I want don't want to bother with the name of the functions a write for
the action. I want to write the function, and call some method that accepts
action name and a permission set as an argument (permission set will be a
string that will be evaluted by the wrapper), for example  :
Add_function_to_container("List","(P_READ AND P_WRITE) OR P_ADMIN","Some
kind of description of this function");
This method adds the copy of function to array then deletes the original
function, so I can use the same function name next time. (For simplicity,
the function names is always the same as the action name, so it always knows
which function to add)

This will also simplify the process of writing developers documentation.

So, this doesn't work in PHP. There are several solutions:

1.
I wouldn't be so lazy and will make another function name. For example if
there is an action called List, then there will be following functions:
function Action_List_1()
function Action_List_2()
function Action_List_3()
The wrapper then looks up for the new function with the help of
get_defined_functions() and adds the Action_List_...() function that is
still not in the list.

2.
I will make same kind of an abstract class called the same way as action and
there will be derived classes that implement the functions.
This sounds nice but a little bit cumbersome. There will be 200 actions and
I don't want to write an abstract class for each of them.This contradicts my
philosophy of lazyness.

3.
 Some great idea that You will provide. Maybe based on OOP, maybe not, but
it is easy to code and perfect.

Have a nice day.
Dimi.

----- Original Message -----
From: "Adam Bregenzer" <[EMAIL PROTECTED]>
To: "Sztankó Demeter" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 21, 2004 7:13 PM
Subject: Re: [PHP] delete a function


> I'm not completely sure what your intended use of the process you
> described is, but it sounds to me like you are trying to implement the
> factory pattern[1].  I would recommend looking into using classes in PHP
> and giving it a shot.
>
> http://www.phppatterns.com/index.php/article/articleview/49/1/1/

--- End Message ---
--- Begin Message --- Sztankó Demeter wrote:
Hello!

Is there any way to delete (unset) a function?

I want to write some function with one constantyl defined name, then call a
function_manager function, that will gice this function an unique name, than
delete the original function, so I can start the process from the beginning.

I will call this function through a wrapper, which will find the function I
need.

Thanks
Dimi.


I'm not exactly sure what you want to do but you might try lambda functions, check out http://www.php.net/create_function

--- End Message ---
--- Begin Message ---
No problems.
I recommend you, to use Apache 1.3.29 + php 4.3.4 + mysql 4.0.18 + mysqlfront 3.0
-----
zerof
http://www.educar.pro.br/PAGES/
--------
"Danny Cobbinah" <[EMAIL PROTECTED]> escreveu na mensagem
ews:[EMAIL PROTECTED]
> is it better to use apache 1.3.29 or apache 2.0.48?  i am having the worst trouble 
> ever
trying to get this thing to work
----------------

--- End Message ---
--- Begin Message ---
I don't know about running it on Windows XP, but
on RH Linux I have had much better results using
1.3.29. RH Linux 8.0 comes with 2.0.48 as the
default version but I finally downloaded and built
the 1.3.29 version (as recommended by several 
here) and have had much better results.

lk
www.theNewAgeSite.com


On Sun, 22 Feb 2004, danny cobbinah wrote:

> is it better to use apache 1.3.29 or apache 2.0.48?
> 
> i am having the worst trouble ever trying to get this thing to work
> 
> 

--- End Message ---
--- Begin Message ---
From: Vivian Steller

> i now can use the following syntax to set the namespaceUri of a node:
>
> <?php
>         $element = new DomElement("tagname", "value",
"http://namespaceUri";);
>         // or
>         $element = new DomElement("pref:tagname", "value",
"http://namespaceUri";);
>         // works as well
> ?>

Your point for adding this was well made (as well as others expressing the
same view), so support has been added to the DomElement constructor. as well
as the examples above, to create a node with no value in a namespace:
$element = new DomElement("pref:tagname", NULL, "http://namespaceUri";);

Note: There will be no further additional dom features added for 5.0. This
was an exception due to its usefulness in functionality.

Rob

--- End Message ---
--- Begin Message ---
Can safe mode be turned off in the .htaccess file?


I don't know the gallery script but setting safe_mode_include_dir should help. Ask the admin to set it to your directory for your virtual host. Another option would be to use ftp functions to upload the images to your directory, but you would have to rewrite the script.
According the safe-mode page http://us4.php.net/features.safe-mode in http.conf :
<Directory /docroot>
php_admin_value open_basedir /docroot
# In your case safe_mode_include_dir
</Directory>


Can "php_admin_value" be inlcuding in the *.php pages and/or .htaccess.

David
--- End Message ---

Reply via email to