php-general Digest 19 May 2001 11:52:01 -0000 Issue 695

Topics (messages 53497 through 53514):

Re: PHP and XHTML
        53497 by: dempsejn.georgetown.edu
        53498 by: Brian Clark

Network Connectivity help please
        53499 by: Brian
        53502 by: Mohamed LRHAZI
        53503 by: Brian

Mac IE 5.0 upload problem
        53500 by: Jason Lam
        53504 by: Julian Wood

Life of environment variable set put putenv()
        53501 by: Arcady Genkin
        53510 by: elias

Urgent:Mysql read only, please help?
        53505 by: E K L
        53509 by: elias

Date and Time Functions like MySQL?
        53506 by: Chris Lee

Re: Server limits/recommendations
        53507 by: John Lim

weird error!
        53508 by: elias

Header Location problem with PHP as CGI
        53511 by: Bert

Re: file()
        53512 by: Christian Reiniger

globalize all variables not coming from a certain form...
        53513 by: Siim Einfeldt aka Itpunk

adodb 1.10 released
        53514 by: John Lim

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]


----------------------------------------------------------------------


i won't pretend to be an XML guru, but isn't saying "php won't work with XHTML" akin 
to saying
"php won't work with javascript1.3, dhtml, netscape 6" etc? 
php generates code...html, dhtml, whatever...i fail to see how php couldn't generate
what anyone would need for XHTML, or anything else along those lines....

-jack

----- Original Message -----
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
Date: Friday, May 18, 2001 6:59 pm
Subject: Re: [PHP] PHP and XHTML

> > I would like to start using the XHTML syntax for my future 
> projects, but I
> > heard that PHP is not compatible with XHTML. For example, in 
> XHTML the ID
> > attribute is used in place of the deprecated NAME tag. But PHP 
> depends on
> > the NAME attribute in forms, etc. Is there any way around this? 
> Has anyone
> > used XHTML and PHP together successfully, and if so how did you 
> get around
> > the previously mentioned problem? Any help woould be much 
> appreciated,> thanks in advance.
> 
> Completely false.  PHP works fine with XHTML.
> 
> -Rasmus
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: php-list-
> [EMAIL PROTECTED]
> 






Hi Rasmus,

@ 6:59:09 PM on 5/18/2001, Rasmus Lerdorf wrote:

>> I would like to start using the XHTML syntax for my future
>> projects, but I heard that PHP is not compatible with XHTML. For
>> example, in XHTML the ID attribute is used in place of the
>> deprecated NAME tag. But PHP depends on the NAME attribute in
>> forms, etc. Is there any way around this? Has anyone used XHTML and
>> PHP together successfully, and if so how did you get around the
>> previously mentioned problem? Any help woould be much appreciated,
>> thanks in advance.

> Completely false.  PHP works fine with XHTML.

In fact, I wrote a Swiss Army Chain Saw type of class, that started
out as an XHTML class of sorts, to speed up my development. Navid, are
you sure you aren't confusing XHTML with XML?

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please, DO NOT carbon copy me on list replies.





I'm writing a script to help us manage one of our Class C networks.  The
page loads all of the host IPs, who owns them, phys desc. of the box, and
does a forward reverse lookup on all of the addresses.  I'd like to add a
column that shows which machines are currently reachable on the network.  A
simple ping would probably be easiest, but parsing a standard ping for 254
hosts would cause the script to have about a 10 minute load time. are there
any quick easy, and most importly, low system overhead, solutions to this
problem?


Brian Artiaco
[EMAIL PROTECTED]






Brian,

Why don't leave the "pinging" to some other script, and have that other
script run continuesouly and upfate a sql table with the ststus of each 
and time stamp of when it was last ping'ed...etc

Mohamed~

Brian wrote:
> 
> I'm writing a script to help us manage one of our Class C networks.  The
> page loads all of the host IPs, who owns them, phys desc. of the box, and
> does a forward reverse lookup on all of the addresses.  I'd like to add a
> column that shows which machines are currently reachable on the network.  A
> simple ping would probably be easiest, but parsing a standard ping for 254
> hosts would cause the script to have about a 10 minute load time. are there
> any quick easy, and most importly, low system overhead, solutions to this
> problem?
> 
> Brian Artiaco
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Good point, I considered, doing it that way, I was just hoping that there
might be a 'prettier' way to do it from within PHP.  Right now I'm using
fping from within a php loop that steps through the class C.  The machine
I'm doing this on is dog slow though, so I'm hoping that when I move the
final version over to our main webserver it will run the script at an
acceptable speed.  If not though, I have a feeling that I will most likely
implement your suggestion, unless someone knows of the 'pretty' solution
that I seek :)

Brian
"He did not know the strength of my Kung fu"
--Wong Fei Hung "The Iron Monkey"

"Mohamed LRHAZI" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Brian,
>
> Why don't leave the "pinging" to some other script, and have that other
> script run continuesouly and upfate a sql table with the ststus of each
> and time stamp of when it was last ping'ed...etc
>
> Mohamed~
>
> Brian wrote:
> >
> > I'm writing a script to help us manage one of our Class C networks.  The
> > page loads all of the host IPs, who owns them, phys desc. of the box,
and
> > does a forward reverse lookup on all of the addresses.  I'd like to add
a
> > column that shows which machines are currently reachable on the network.
A
> > simple ping would probably be easiest, but parsing a standard ping for
254
> > hosts would cause the script to have about a 10 minute load time. are
there
> > any quick easy, and most importly, low system overhead, solutions to
this
> > problem?
> >
> > Brian Artiaco
> > [EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Would any Mac expert help me out with this one.

I have created an upload script with works fine for PC file and Mac files
with IE 4.5, but it just would not work with IE5.0

Whenever I upload file with IE 5.0, after it gets to the server, the size
becomes smaller by few hundred bytes, this ruin the file. If I download the
file to a mac again, it becomes a white icon and cannot be opened. The
$file_type tells me that it is "application/octet-stream". But on the other
hand, doing the same thing on IE 4.5 will make the filesize larger by a few
hundred bytes when it arrive at the server (I think the resource fork is
included) and the upload file type is "application/x-macbinary". Anyone know
how come IE5.0 seems to lost those bytes? Is it losing the resource fork? Do
I have any control over what the browser will upload? BTW, I was testing
with some Quark Express file.

Any help is appreciated.

Jason Lam








I don't know what your problem might be, but there is nothing wrong with the
file upload on Mac IE5. We use it all the time, in connection with both perl
and php server-side and there is no problem. You do have to make sure the
file you upload is essentially flat (ie no resource fork, since that will be
stripped) but most file formats are flat these days anyway. I'm not sure
about Quark. IE 4.5 should *not* be uploading in MacBinary, so I guess
that's a bug they fixed for 5.0. See if you can upload a gif or a jpeg file
and retrieve it properly. There shouldn't be a problem.

Julian

on 5/18/01 6:57 PM, Jason Lam at [EMAIL PROTECTED] wrote:

> 
> Would any Mac expert help me out with this one.
> 
> I have created an upload script with works fine for PC file and Mac files
> with IE 4.5, but it just would not work with IE5.0
> 
> Whenever I upload file with IE 5.0, after it gets to the server, the size
> becomes smaller by few hundred bytes, this ruin the file. If I download the
> file to a mac again, it becomes a white icon and cannot be opened. The
> $file_type tells me that it is "application/octet-stream". But on the other
> hand, doing the same thing on IE 4.5 will make the filesize larger by a few
> hundred bytes when it arrive at the server (I think the resource fork is
> included) and the upload file type is "application/x-macbinary". Anyone know
> how come IE5.0 seems to lost those bytes? Is it losing the resource fork? Do
> I have any control over what the browser will upload? BTW, I was testing
> with some Quark Express file.
> 
> Any help is appreciated.
> 
> Jason Lam
> 
> 
> 

--
Julian Wood
Learning Technologies and Digital Media
University of Calgary






I could not find this in the docs, but maybe I've been looking in the
wrong place.  Could someone give me an authorative answer or point me
to it someplace else, to the question:

When you set an environment variable with putenv(), is there a chance
that it would be visible to any other PHP script served by the same
apache child?

Many thanks,
-- 
Arcady Genkin




never tried it though...but through my experience i would say:
The Environment values that are set within a script can be seen only within
child scripts (ie when script1.php spwans scrip2.php)

-elias

"Arcady Genkin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I could not find this in the docs, but maybe I've been looking in the
> wrong place.  Could someone give me an authorative answer or point me
> to it someplace else, to the question:
>
> When you set an environment variable with putenv(), is there a chance
> that it would be visible to any other PHP script served by the same
> apache child?
>
> Many thanks,
> --
> Arcady Genkin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi all,

Anybody can help me to fix this problem:

ERROR 1036: Table 'trade_account_credit' is read only

I just want to update the table and i login as root.....But i came across 
the error, please help. It's very urgent.
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





>and i login as root
login where? you *nix machine?
Else make sure that you connect to the MySql server as a user with enough
privilige (read, write, update, delete...)

-elias

""E K L"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> Anybody can help me to fix this problem:
>
> ERROR 1036: Table 'trade_account_credit' is read only
>
> I just want to update the table and i login as root.....But i came across
> the error, please help. It's very urgent.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi,

Does anyone implement Date and Time Functions for PHP like MySQL?
http://www.mysql.com/doc/D/a/Date_and_time_functions.html

I know there is already have functions for  PHP, however it cannot
handle year expect it was between 1902 and 2037.
http://www.php.net/manual/en/ref.datetime.php

Regards,
Chris Lee
 





Hi Ian,

I've also been using PHP at HostPro. They are using PHP 4.0.1pl1
on our NT server, which is really old.

What version do you have on your server?

I definitely recommend you switch over to Linux or get HostPro to upgrade
their PHP to a newer more stable version if possible. The config mentioned
below looks cool, the only concern is backups as you don't have mirroring
with only 1 EIDE hard disks.

The reason we are using HostPro is because the site was originally ASP,
 and we moved some pages to PHP because we had a large library of PHP
 code (phpLens stuff -- see http://phplens.com) that we could reuse for the
site.

Regards, john


Ian Evans <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'd really like to move our site to a dedicated server, but I'm not
> ready to lay down the monthly cash for a multi-SCSI drived 1gig ram
> beast -- yet.
>
> Right now we're hosted by the oxymoronically named HostPro. We're on a
> shared NT server with a SQL Server ODBC connection and we use PHP to do
> a lot of the stuff on the site.
>
> There's stuff that just doesn't work. For example, I have better odds
> rolling the dice than hoping that my databse insert form for our
> entertainment news will work. Sometimes it does, sometimes it doesn't
> and "Support" (they had to name it something I guess) has never been
> able to figure out why.
>
> Covering the world of entertainment, we can average 10,000 pageviews a
> day but will swing up to 200,000+ on days like the Oscars. We've seen
> our bandwidth usage swing from 80meg a day to 3gig.
>
> I'd just like to get into an entry-level dedicated linux server, running
> apache, PHP and MySQL. I've looked at Rackspace as other contacts have
> recommended them and their entry level system consists of:
>
> 750 Mhz Processor
> 256MB RAM
> 20GB EIDE Drive
> 10GB/Month Burstable Bandwidth
>
> I'm looking for input on that configuration. The way I see it, if we're
> surviving on a shared server now, we'll still be able to stretch our
> feet and grow a bit (as well as being able to do things that we can't in
> our shared NT server) before we need to add memory and go to SCSI, etc.
>
> Do you concur?
>
> Thanks!
> --
> Ian Evans
> Digital Hit Entertainment - News and Information
> http://www.digitalhit.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






hello,

i have my file which reads like:
dir3/dir3-3/
dir2/
dir1/
s

now when i run this script:
  $a = file("exclude_dir.txt");
  $t = "dir3/dir3-3/";
  $temp = in_array($t, $a) ? "yes" : "no";
  echo "\$a=";
  var_dump($a);
  echo "<br>";
  echo "in_array(\$t=$t, \$a)=$temp";


 i have this output:
$a=array(4) { [0]=> string(13) "dir3/dir3-3/ " [1]=> string(6) "dir2/ "
[2]=> string(6) "dir1/ " [3]=> string(1) "s" }
in_array($t=dir3/dir3-3/, $a)=no


as you noticed that in each element of the array "$a" a space is appended
for an unknown reason!
that's why my in_array() call returns "no"

any ideas other than doing: $a = split(";", join(';', file("myfile"))); or
something?






Hello,

I'm desperate here...
I hope this question hasn't been asked a million times before (I sure
did not find an answer in the archives)

I'm developing a site that runs perfectly on a surver with the PHP
module in apache.
The problem is that the site will be hosted on a server with PHP as
CGI (from PHPinfo: Configure Command './configure'
'--prefix=/usr/local/php' '--enable-static' '--enable-safe-mode=yes'
'--enable-track-vars=yes' '--enable-memory-limit=yes'
'--enable-short-tags=no' '--with-gd=/usr/local'
'--with-mysql=/usr/local/mysql' '--enable-force-cgi-redirect' )

I have a couple of "Header: Location"s in the site that are not
working properly.
The redirect actualy happens BUT the address in the addressbar of the
browser doesn't change.
A little example: the first time someone visits he has to choose his
language. At that moment a cookie is set.
The next time he reaches the www.site.com/index.html some code checks
for the cookie and he should get redirected to the first page in his
language that is www.site.com/language/home/index.html
What actualy happens is that he gets to see the page but in the
addressbar it still shows www.site.com/index.html This gives a couple
of ptoblems:
when the user clicks refresh on his browser, the address in the
addressbar gets refreshed.
on that first page there is a java applet that doesn't get found (it
looks for it in the root instead of in the home-directory.

I hope this all is a littlebit understandable ...

I don't know if this is important but I added a .htaccess in the root
that forces .html to get parsed as php:
***
Action application/x-httpd-php /cgi/php.cgi
AddHandler application/x-httpd-php .html
***
I don't think this has something to do with it but I add it just in
case.

Thanks to anyone who can shed some light on my problem!

Bert
please check my email address if you would like to mail me




On Saturday 19 May 2001 01:27, elias wrote:
> hello,
>
> i have my file which reads like:
> dir3/dir3-3/
> dir2/
> dir1/
> s

[...]

> as you noticed that in each element of the array "$a" a space is
> appended for an unknown reason!

Wild guess: You're on a Unixy server and the file is in DOS format (CRLF 
endings)?

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

Very funny, Scotty! Now beam up my clothes...





Hi everybody,

Is it possible (and if it is, how) to globalize all the variables, that
come from some form, automatically?
For example:

function do_something(){
        global $form;
        if($form != "func"){
                /* globalize all the variables that come from a form
called $form . How to do it? */
        }
}

Yes, I could it manually - global $firstname,$lastname,$addres, etc
etc...but the function is being used by different scripts and I need to
globalize only these variables that come from that particular form ... and
all that 'automatically'.

Any ideas?

Thanks,
Siim Einfeldt





http://php.weblogs.com/adodb

Database wrapper library 1.10. Now supports cached recordsets.

Example below:

include('adodb.inc.php');
include('tohtml.inc.php');
$ADODB_CACHE_DIR = '/usr/local/adodbcache';
$conn = &ADONewConnection('oracle');/* Oracle 8, use 'oci8' */
$conn->PConnect('','scott','tiger');
$rs = $conn->CacheExecute(15,'select * from table');
rs2html($rs); /* recordset to html table */

The 15  in CacheExecute() indicates that the recordset will be cached
for 15 seconds. Subsequent calls with this SQL statement will use the
 cached results until the 15 seconds expires.








Reply via email to