|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 27 Jun 2003 01:15:13 -0000 Issue 2141
php-general-digest-help
lists.php.net
Date: Thu Jun 26 2003 - 20:15:13 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 27 Jun 2003 01:15:13 -0000 Issue 2141
Topics (messages 152971 through 153046):
Re: cannot get php through apache to write to my home dir on shared server
152971 by: Steve Buehler
Re: defect tracking systems
152972 by: Jay Blanchard
152981 by: Martin Balcar
152983 by: Jay Blanchard
152984 by: Bibhas Kumar Samanta
152987 by: Martin Balcar
Re: Month name
152973 by: David Robley
Re: '/tmp/mysql.sock' error
152974 by: Didier McGillis
153031 by: Jean-Christian IMbeault
How can MD5 HAsh be passed to db as pwd? was a Re: [PHP] Securing PHP code
152975 by: SLanger.spirit21.de
152992 by: Jeff Harris
152993 by: Duncan Hill
Re: mysql update not working
152976 by: David Robley
Re: Ticketing System?
152977 by: Pete Morganic
Re: sessions and browser back[Scanned]
152978 by: SLanger.spirit21.de
Re: Securing PHP code
152979 by: Dan Joseph
152980 by: Dan Joseph
153034 by: Manuel Lemos
153037 by: Mike Morton
153038 by: Manuel Lemos
153039 by: Chris Rehm
Re: limiting functions
152982 by: Wendell Brown
Install PHP on windows using PHP installler
152985 by: Mark McCulligh
152988 by: Nadim Attari
152995 by: Anthony
152997 by: Pete Morganic
153002 by: php dot net
153003 by: Mark McCulligh
Re: problem with mktime
152986 by: Nadim Attari
Re: Impossible bug!
152989 by: Mark
153004 by: Ford, Mike [LSS]
153028 by: Mark
php function system() on win2k srv /iis
152990 by: user.lngs.infn.it
What's best, using a temp-file or a temp-table
152991 by: Øystein Håland
152996 by: Pete Morganic
152998 by: Chris Hayes
153026 by: Øystein Håland
problem with popen and cvs
152994 by: php dot net
Strange output issue
152999 by: John Luxford
153000 by: Adam Voigt
153001 by: php dot net
153007 by: Ford, Mike [LSS]
153012 by: John Luxford
PHP 5 won't install
153005 by: janet.valade.com
153021 by: Edin Kadribasic
153027 by: janet.valade.com
153033 by: Edin Kadribasic
SEARCH ENGINE
153006 by: David Elìas Sánchez Vásquez
153008 by: Jay Blanchard
153013 by: Jeff Harris
Re: image galleries
153009 by: Johnny Martinez
Re: weird switch behaviour
153010 by: Miles Thompson
Re: Sybase and PHP
153011 by: Mark McCulligh
153014 by: Mark McCulligh
Oops, sessions. I need to study the subject
153015 by: Øystein Håland
Regex Help with -> ?
153016 by: Gerard Samuel
Re: pdf routine - good local / bad online
153017 by: Floyd Baker
if else if statement failed...
153018 by: Scott Fletcher
153019 by: Dan Joseph
153020 by: Jay Blanchard
153022 by: Scott Fletcher
153024 by: Scott Fletcher
153030 by: Ernest E Vogelsinger
Binary data 65 kb have then as file: 536 KB ??? fwrite ..
153023 by: Gerhard Knapp
Binary Blob = 65535 byte -> fwrite to a file = 7680000 Byte, why?
153025 by: Gerhard Knapp
153043 by: Catalin Trifu
153045 by: Gerhard Knapp
Re: Impossible bug! (fwd)
153029 by: John Wulff
Largest Member of Array
153032 by: John Wulff
153035 by: Leif K-Brooks
153036 by: Mike Migurski
Calling PHP from Java usign CGI...
153040 by: Rodrigo Reyes
153041 by: Catalin Trifu
Re: How to solve include_path / safe_mode / open_basedir /document_root
153042 by: Adam Henry
Cookoo clock
153044 by: Sparky Kopetzky
Re: Japanese text not displaying correctly.
153046 by: - Edwin -
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Another option might be to create a directory in your web space to hold
your file and open up just that directory as 777.
Steve
At 08:17 AM 6/26/2003 -0400, you wrote:
>From: "frank reeves" <frankreeves
yahoo.com>
> > I have an account on shared server and am trying to
> > write a logfile (a dump of an email which i use mail()
> > to send) to a logfile in my home dir. This logfile
> > will grow with all emails send by my app and will thus
> > give me an archive of sorts.
> >
> > However, because php is executed through apache as
> > user nobody it does not have permission to write to my
> > linux home dir (fopen("log.file","a")) fails with
> > permission denied). I dont want to open my home dir to
> > the world to allow this operation but I also dont want
> > to write my log to /var/tmp as user nobody.
> >
> > Does anyone know how I can get php to write as me to
> > my home dir ?
>
>You can only get this with PHP as a CGI.
>
> > I suppose i could write a shell script and have my app
> > call this but that seems a bit convoluted.
>
>Other option is to read/write the file over FTP, since you'll be able to log
>in as you.
>
>---John Holmes...
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by the MailScanner at ow4, and is
>believed to be clean.
attached mail follows:
[snip]
Please help me to choose some....
[/snip]
Google for bug tracking system
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=bug+tracking+syst
em
HTH
attached mail follows:
Hm, good answer ;)
Can you recommend one of them? Do you have experience with some of these
systems?
I don't want to try them all....
Martin
"Jay Blanchard" <jay.blanchard
niicommunications.com> píse v diskusním
príspevku news:C8F323573C030A448F3E5A2B6FE2070B0101F87E
nemesis...
[snip]
Please help me to choose some....
[/snip]
Google for bug tracking system
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=bug+tracking+syst
em
HTH
attached mail follows:
[snip]
Hm, good answer ;)
Can you recommend one of them? Do you have experience with some of these
systems?
I don't want to try them all....
[snip]
Please help me to choose some....
[/snip]
Google for bug tracking system
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=bug+tracking+syst
em
[/snip]
It would be hard for me to make a recommendation since I do not know
what kind of requirements you have for a system such as this.
HTH
attached mail follows:
can try gnatsweb. It is very widely used, and less complicated/featured
than bugzilla,
Bibhas
Martin Balcar wrote:
>
> Hi,
> I want to begin to use some of bug tracking systems. I think it can help me
> with developing more robust applications and make an easier communication
> with my clients. I have tried to use Bugzilla, but It was a little bit
> complicated system.
>
> Please help me to choose some....
>
> Regards
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
My fault...
I would run it on Apache, mySQL using PHP technology....
And the system should be simple.
I admire Bugzilla project, but it seems to be very complicated ;(
Martin
"Jay Blanchard" <jay.blanchard
niicommunications.com> píse v diskusním
príspevku news:C8F323573C030A448F3E5A2B6FE2070B0101F883
nemesis...
[snip]
Hm, good answer ;)
Can you recommend one of them? Do you have experience with some of these
systems?
I don't want to try them all....
[snip]
Please help me to choose some....
[/snip]
Google for bug tracking system
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=bug+tracking+syst
em
[/snip]
It would be hard for me to make a recommendation since I do not know
what kind of requirements you have for a system such as this.
HTH
attached mail follows:
In article <027101c33aeb$1f7c6f00$0100a8c0
predator>,
nadim
alienworkers.com says...
> PiBIb3cgY2FuIEkgZ2V0IHRoZSBtb250aCBuYW1lIGZyb20gYSBkYXRlPyBJZiB5b3UgY291bGQg
> cG9zdCB3aXRoIGFuIGV4YW1wbGUNCj4gaSdsbCBiZSBncmF0ZWZ1bGwNCg0KVHdvIGxpbmtzIHRv
> IGhlbHAgeW91Li4uDQpodHRwOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLmdldGRh
> dGUucGhwDQpodHRwOi8vd3d3LnBocC5uZXQvbWFudWFsL2VuL2Z1bmN0aW9uLnN0cnRvdGltZS5w
> aHANCg==
>
>
Can you fix your mail/news program so it just sends text, please?
--
Quod subigo farinam
$email =~ s/oz$/au/o;
attached mail follows:
What has always worked for me was to make sure MySQL is running, and if so
then go delete the mysql.sock file and restart MySQL, not sure why but the
first couple of times I have seen that error, usually goes away after one or
two restarts.
>From: Jean-Christian IMbeault <jc
mega-bucks.co.jp>
>To: php-general
lists.php.net
>Subject: [PHP] mysql_connect(): '/tmp/mysql.sock' error
>Date: Thu, 26 Jun 2003 16:53:22 +0900
>
>I've installed PHP from source and MySQL 4.0.9 from rpm on my RH 9 machine.
>
>When I try and connect from php using mysql_connect() I get the following
>error:
>
>Warning: mysql_connect(): Can't connect to local MySQL server through
>socket '/tmp/mysql.sock' (2)
>
>The server is up and running and I can connect fine using the command line
>client.
>
>Do I need some special configuration?
>
>Any advice appriciated!
>
>Jean-Christian Imbeault
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
attached mail follows:
Jason Wong wrote:
>
> Find out where your mysql.sock is and edit php.ini to match.
Good idea.
The problem was that the installation instructions for MySQL for vague
and confusing. I started trying to install from rpm and that didn't
work. I then installed from the binary and that was hell too. All the
problems stemmed from the fact that I couldn't figure out where MySQL
was installing itself too.
I finally was able to find the source and install with that and force it
to be where I wanted.
I had the feeling that installing MySQL was going to be easy but it
isn't all that simple. Maybe thay've made it *too* easy ;)
Now, creating users ... what a pain.
Jean-Christian Imbeault
attached mail follows:
Hello Justin or Anybody else
> Store an MD5 of the password, that way you're comparing the two hashes,
not
> two passwords... even if someone stumbles into your database, they'll
only
> see the MD5'd password. A further step would be encryption, on which
you
> will have to do a LOT of reading.
Just out of curiosity how can you pass an md5 hash to a database like
mysql as password? Taking mysql as an example I would say you need to pass
the pwd in clearform since mysql will probably do a hash to it to compare
it to its internal rights db. Or is there a feature that tells mysql upon
connection that the pwd is allready hashed?
I mean storing the hash as the password doesn't resolve the conflict since
then you have the clear password in the file again.
So how can this be done?
Regards
Stefan Langer
attached mail follows:
|Hello Justin or Anybody else
|
|> Store an MD5 of the password, that way you're comparing the two hashes,
|not
|> two passwords... even if someone stumbles into your database, they'll
|only
|> see the MD5'd password. A further step would be encryption, on which
|you
|> will have to do a LOT of reading.
On Jun 26, 2003, "SLanger
spirit21.de" claimed that:
|Just out of curiosity how can you pass an md5 hash to a database like
|mysql as password? Taking mysql as an example I would say you need to pass
|the pwd in clearform since mysql will probably do a hash to it to compare
|it to its internal rights db. Or is there a feature that tells mysql upon
|connection that the pwd is allready hashed?
|I mean storing the hash as the password doesn't resolve the conflict since
|then you have the clear password in the file again.
|So how can this be done?
|
|Regards
|Stefan Langer
|
http://www.php.net/md5
Set the column type of password to be a char(32). Then, pass the password
through md5 to mysql to store it. To verify it, pass the password through
md5 then compare it to what's in the database.
"one should not increase, beyond what is necessary, the number of entities
required to explain anything."
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.
pi="May I have a large container of coffee? Thank you."
attached mail follows:
On Thursday 26 June 2003 16:22, Jeff Harris wrote:
> http://www.php.net/md5
>
> Set the column type of password to be a char(32). Then, pass the password
> through md5 to mysql to store it. To verify it, pass the password through
> md5 then compare it to what's in the database.
Or, to avoid problems with MD5 weaknesses, use SHA1 :)
attached mail follows:
In article <3EFA0E3E.10909
goquest.com>, steve
goquest.com says...
> I have the following code:
>
>
> $sql = "UPDATE class_sub SET desc = '$catdesc', sub_cat = '$subcatname'
> WHERE id='$catid'";
> echo $sql;
> $sql_result = mysql_query($sql);
> if (!$sql_result)
> {
> echo "<P>Couldn't update record!<br></p>";
> echo mysql_error();
> exit;
> } else
> {
> header("Location: index.php"); /* Redirect browser */
> exit;
> }
> here is the actual sql statement:
> UPDATE class_sub SET desc = 'Come play with us! This class is designed
> to challenge your cardiovascular and muscular endurance. Participants
> will work or \"play\" in different activities such as team exercises,
> sprints, obstacle courses, cycling, plyometrics, and core conditioning.
> Challenge yourself like never before!', sub_cat = 'Recess' WHERE id='4'
>
> And the error:
>
>
> Couldn't update record!
>
> You have an error in your SQL syntax near 'desc = 'Come play with us!
> This class is designed to challenge your cardiovascul' at line 1
Desc is a reserved word in mysql
--
Quod subigo farinam
$email =~ s/oz$/au/o;
attached mail follows:
The one we use is oneorzero helpdesk which is a project at sourceforge.net
Andreas Cahen wrote:
> Hello List :)
>
> Is there any usefull ticketing system (Hotline/Support/etc.) written in
> PHP?
> I have found some on hotscripts.com, but I don't know which one is
> really got or not..
>
> Any suggestions?
>
> Cheers,
>
> Andreas Cahen
>
>
attached mail follows:
As a suggestion can you simply redisplay your form on the error page and
such avoid having to use the back button? This would also allow you to
actually display the error at the place the error occurs.
Another thing you might want to try is using a cache header that allows
the browser to cache the site for a certain time. This way the browser
might redisplay the page without reseting it. I have not tested this and
can't promise that this will actually work.
Regards
Stefan Langer
attached mail follows:
Hi,
> Why rely on some access restriction when you don't have to? You
> include code
> using a filesystem path. There is no need for it to reside under
> document root.
> Yes, you can make it so that certain things are not served
> directly by the Web
> server, but why take the extra risk? You gain nothing. What if you make a
> mistake? What if you install a new version of Apache and that
> file accidently
> gets served raw?
Right. Also don't forget, there have been exploits in the past, and there
will be in the future that will allow a hacker access to your docroot (not
necessarily the entire system) through the web browser, and they can
download all those files. Why leave the database connection information in
there for him?
-Dan Joseph
attached mail follows:
Hi,
> The only reason that I was so adamant about it was I had a 'heated'
> discussion with a business associate who's server was compromised - and he
> was, lets say, insistant that the fact that there were database
> passwords in
> a php file inside the webroot was the reason it was insecure. I
> just wanted
> to know if I was wrong in saying that the passwords were not compromised
> without the server access being compromised....
>
> (not to mention the clear text password accesses, the wildcarded mysql
> access on a remote host passed in clear text, the lack of ssl on pages
> collection cc information, same root passwords across the network and
> dictionary hackable passwords for users :) Oh, and did I mention the non
> ssh telnet access from internet café's?)
Wow! Sounds like you have more important issues to worry about then where
you have your mysql connect info!
-Dan Joseph
attached mail follows:
Hello,
On 06/26/2003 02:10 AM, Joseph Szobody wrote:
>> A safer architechture would be to use two machines. One to act as
>> the Web server and the other to process transactions. The Web
>> server would take the orders and request the transaction server to
>> process them.
>>
>> The transcation server can only be accessed from the Web server.
>> Nobody should be able to reach the transaction server from the
>> Internet. The transaction server machine should have the database
>> server too. The database server should not accept network
>> connections.
>
> Having never setup a multi-server web environment before, I'm a bit
> curious. How would the public server communicate with the private
> server, passing in database queries and getting results, if it can't
> connect directly to the database? Are we talking about building a
> SOAP interface between the two?
Yes, it could be SOAP although a less bloated protocol over HTTP would do.
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Why not just connect the 2 servers together with additional nic cards, then
the second is only accessable from the first.
On 6/26/03 6:26 PM, "Manuel Lemos" <mlemos
acm.org> wrote:
> Hello,
>
> On 06/26/2003 02:10 AM, Joseph Szobody wrote:
>>> A safer architechture would be to use two machines. One to act as
>>> the Web server and the other to process transactions. The Web
>>> server would take the orders and request the transaction server to
>>> process them.
>>>
>>> The transcation server can only be accessed from the Web server.
>>> Nobody should be able to reach the transaction server from the
>>> Internet. The transaction server machine should have the database
>>> server too. The database server should not accept network
>>> connections.
>>
>> Having never setup a multi-server web environment before, I'm a bit
>> curious. How would the public server communicate with the private
>> server, passing in database queries and getting results, if it can't
>> connect directly to the database? Are we talking about building a
>> SOAP interface between the two?
>
> Yes, it could be SOAP although a less bloated protocol over HTTP would do.
>
--
Cheers
Mike Morton
****************************************************
*
* Tel: 905-465-1263
* Email: mike
webtraxx.com
*
****************************************************
"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine
Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey
attached mail follows:
Hello,
On 06/26/2003 07:43 PM, Mike Morton wrote:
> Why not just connect the 2 servers together with additional nic cards, then
> the second is only accessable from the first.
That is the point but if you make the database server accessible from
the Web server, anybody that hacks the Web server, can hack the
information in the database server, making having the two servers pointless.
> On 6/26/03 6:26 PM, "Manuel Lemos" <mlemos
acm.org> wrote:
>
>
>>Hello,
>>
>>On 06/26/2003 02:10 AM, Joseph Szobody wrote:
>>
>>>>A safer architechture would be to use two machines. One to act as
>>>>the Web server and the other to process transactions. The Web
>>>>server would take the orders and request the transaction server to
>>>>process them.
>>>>
>>>>The transcation server can only be accessed from the Web server.
>>>>Nobody should be able to reach the transaction server from the
>>>>Internet. The transaction server machine should have the database
>>>>server too. The database server should not accept network
>>>>connections.
>>>
>>>Having never setup a multi-server web environment before, I'm a bit
>>>curious. How would the public server communicate with the private
>>>server, passing in database queries and getting results, if it can't
>>>connect directly to the database? Are we talking about building a
>>>SOAP interface between the two?
>>
>>Yes, it could be SOAP although a less bloated protocol over HTTP would do.
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Manuel Lemos wrote:
> That is the point but if you make the database server accessible from
> the Web server, anybody that hacks the Web server, can hack the
> information in the database server, making having the two servers
> pointless.
Not necessarily. There are a number of things that one can do to protect
the second machine. The first one can be limited to whatever requests
the Web server was allowed to make. So, data on the second server can be
secured.
I've seen it done where the connection between the web and data servers
was made using SNA instead of TCP/IP to increase security. Regardless of
protocols, the database server can be configured to only accept certain
requests from the web server, and none at all from outside the trusted
network.
IBM markets an iSeries server that allows you to configure multiple
servers in one box. You can have different physical servers, or
different logical servers, or a mix. By configuring separate web and
data servers, you can dramatically increase security.
It just takes a little planning.
--
Chris Rehm
chris
javadisciple.com
For all the law is fulfilled in one word, even in this; Thou shalt love
thy neighbour as thyself.
Gal. 5: 14
attached mail follows:
On Thu, 26 Jun 2003 06:10:48 -0500, Daryl Meese wrote:
>A quick thought -- It would be nice if we had a "authorization code" in the
What about "Safe Mode"? It looks like it can be configured
> http://us3.php.net/manual/en/features.safe-mode.php#ini.safe-mode
Between safe_mode_include_dir and safe_mode_exec_dir it seems you
should be able to get something pretty safe set up.
attached mail follows:
I am building a Windows 2000/PHP production server. I have only ever used
LINUX for production and windows for developer machines.
Is it better to install PHP using the PHP installer or using the Zip file
version?
Should you install PHP as CGI or ISAPI?
I am looking for the pros and cons, someone told me not to use the PHP
installer because it is not secure.
Thanks,
Mark.
attached mail follows:
> Is it better to install PHP using the PHP installer or using the Zip file
> version?
Go for the PHP Installer. It's straight forward to install...
Do download the Zip file also, in case u need any extensions (DLL)
Nadim Attari
http://www.alienworkers.com
attached mail follows:
what webserver are you using? If it's IIS, then use the installer... If
it's Apache, teh installer doesn;t work, you have to do it manualy.
- Anthony
"Mark McCulligh" <mmcculli
sykescanada.com> wrote in message
news:20030626134342.23198.qmail
pb1.pair.com...
> I am building a Windows 2000/PHP production server. I have only ever used
> LINUX for production and windows for developer machines.
>
> Is it better to install PHP using the PHP installer or using the Zip file
> version?
> Should you install PHP as CGI or ISAPI?
>
> I am looking for the pros and cons, someone told me not to use the PHP
> installer because it is not secure.
>
> Thanks,
> Mark.
>
>
attached mail follows:
What I tend to do is to download the installer and run it as this sets
up all the configuration (eg IIS)
I then download the zip file (Which contains a load of extra files eg
PEAR) and copy the whole unzipped directory to overwite the c:\php dir
contents created by the installer.
This might be a bit "cock handed" way of doing it but it works for me.
If its IIS server then I suggest (personal view) that you use CGI - I
recently had a couple of applications crash my ISP host and changing to
CGI solved the problem.
Hope it helps
Pete
Mark McCulligh wrote:
> I am building a Windows 2000/PHP production server. I have only ever used
> LINUX for production and windows for developer machines.
>
> Is it better to install PHP using the PHP installer or using the Zip file
> version?
> Should you install PHP as CGI or ISAPI?
>
> I am looking for the pros and cons, someone told me not to use the PHP
> installer because it is not secure.
>
> Thanks,
> Mark.
>
>
attached mail follows:
depend on which web server :
for apache : use php as a module
for IIS (very bad id) : use php as a ISAPI
In either case don't use php as a CGI, this won't allow persistant
connection (very usefull for mysql....)
Hope that helped !
k
attached mail follows:
From my understanding you can get PHP with CGI to do persistant connection
if you install fastcgi.
Link about PHP and FastCGI:
http://php.weblogs.com/fastcgi_with_php_and_iis
Mark.
"Php Dot Net" <kth
ivalua.com> wrote in message
news:20030626155452.61835.qmail
pb1.pair.com...
> depend on which web server :
>
> for apache : use php as a module
> for IIS (very bad id) : use php as a ISAPI
>
> In either case don't use php as a CGI, this won't allow persistant
> connection (very usefull for mysql....)
> Hope that helped !
>
> k
>
>
attached mail follows:
> The following line of code doesn't work for me:
> $previous_issue_unixdate = mktime(0, 0, 0, $previous_issue_month,
> $previous_issue_day, $previous_issue_year, 0);
> $previous_issue_month is set to 06, _issue_day is 30 and _issue_year to
> 2003. Still $previous_issue_unixdate is emtpy.
> anders thoresson
--------------------------------------------------------------------------
echo mktime(0, 0, 0, 09, 30, 2002, 0);
echo mktime(0, 0, 0, 9, 30, 2002, 0);
OUTPUTS:
========
1009656000
1033329600
NOTE:
=====
09 and 9 are not the same !!!
09 = octal number (well 9 doesn't exist in octal !!!)
9 = digital number
But mktime(0, 0, 0, 06, 30, 2002, 0) and mktime(0, 0, 0, 6, 30, 2002, 0)
should produce the same result:
1025380800
1025380800
> Still $previous_issue_unixdate is emtpy.
I dunno what to say... should work
Hope it helps...
Nadim Attari
http://www.alienworkers.com
attached mail follows:
In additon to the previous comment about resetting $*_color, you're
multiplying the decimal value by 100 to get a percentage. But then
you're comparing it to 1, not 100.
EWither don't multiply it by 100, or check to see if it's > 100. Or
do you really want $*_color to be set if it's greater than 1%?
--- John Wulff <johnw
orcasnet.com> wrote:
> Where the heck is my problem? No matter what the value for *_color
> is
> always 1!!!
>
> $example_data = array(
> array("Mar-99",100,2000,5945.33,1234,10),
> array("Feb-99",908,3454,47648.90,4321,50),
> array("Jan-99",542,8000,13365.52,6012,60)
> );
>
> $high = 47648.90;
> if(!isset($num))
> {
> $num = 1;
> }
> while($num <= 100 && $num >= 1)
> {
>
> foreach ($example_data as $key=>$value)
> {
> list($month, $a, $b, $c, $d, $e) = $value;
>
> $a_percent = ($a / $high) * 100;
> if($a_percent > $num) { $a_color = 1; }
>
> $b_percent = ($b / $high) * 100;
> if($b_percent > $num) { $b_color = 1; }
>
> $c_percent = ($c / $high) * 100;
> if($c_percent > $num) { $c_color = 1; }
>
> $d_percent = ($d / $high) * 100;
> if($d_percent > $num) { $d_color = 1; }
>
> $e_percent = ($e / $high) * 100;
> if($e_percent > $num) { $e_color = 1; }
> }
>
> $num = $num + 1;
> }
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
Mark Weinstock
mark_weinstock
yahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
attached mail follows:
> -----Original Message-----
> From: Mark [mailto:mark_weinstock
yahoo.com]
> Sent: 26 June 2003 15:16
> To: John Wulff; php-general
lists.php.net
> Subject: Re: [PHP] Impossible bug!
>
>
> In additon to the previous comment about resetting $*_color, you're
> multiplying the decimal value by 100 to get a percentage. But then
> you're comparing it to 1, not 100.
>
> EWither don't multiply it by 100, or check to see if it's > 100. Or
> do you really want $*_color to be set if it's greater than 1%?
Actually, if you look really carefully, you'll see he's comparing it
successively to every integer between the initial value of $num (or 1 if it
wasn't set) and 100 -- but as he's never remembering these, all he'll get
out of this is whether the percentages are greater then one of these values
(which, if the loop starts at 1, it's more then likely they all will be!).
Mind you, if this is a snip of the real script and there's some output
making use of these values each time round the loop, this may actually be
what's required. ;)
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: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
> --- John Wulff <johnw
orcasnet.com> wrote:
> > Where the heck is my problem? No matter what the value for *_color
> > is
> > always 1!!!
> >
> > $example_data = array(
> > array("Mar-99",100,2000,5945.33,1234,10),
> > array("Feb-99",908,3454,47648.90,4321,50),
> > array("Jan-99",542,8000,13365.52,6012,60)
> > );
> >
> > $high = 47648.90;
> > if(!isset($num))
> > {
> > $num = 1;
> > }
> > while($num <= 100 && $num >= 1)
> > {
> >
> > foreach ($example_data as $key=>$value)
> > {
> > list($month, $a, $b, $c, $d, $e) = $value;
> >
> > $a_percent = ($a / $high) * 100;
> > if($a_percent > $num) { $a_color = 1; }
> >
> > $b_percent = ($b / $high) * 100;
> > if($b_percent > $num) { $b_color = 1; }
> >
> > $c_percent = ($c / $high) * 100;
> > if($c_percent > $num) { $c_color = 1; }
> >
> > $d_percent = ($d / $high) * 100;
> > if($d_percent > $num) { $d_color = 1; }
> >
> > $e_percent = ($e / $high) * 100;
> > if($e_percent > $num) { $e_color = 1; }
> > }
> >
> > $num = $num + 1;
> > }
attached mail follows:
--- "Ford, Mike [LSS]" <M.Ford
lmu.ac.uk> wrote:
> > -----Original Message-----
> > From: Mark [mailto:mark_weinstock
yahoo.com]
> > Sent: 26 June 2003 15:16
> > To: John Wulff; php-general
lists.php.net
> > Subject: Re: [PHP] Impossible bug!
> >
> >
> > In additon to the previous comment about resetting $*_color,
> you're
> > multiplying the decimal value by 100 to get a percentage. But
> then
> > you're comparing it to 1, not 100.
> >
> > EWither don't multiply it by 100, or check to see if it's > 100.
> Or
> > do you really want $*_color to be set if it's greater than 1%?
>
> Actually, if you look really carefully, you'll see he's comparing
> it
> successively to every integer between the initial value of $num (or
> 1 if it
> wasn't set) and 100 -- but as he's never remembering these, all
> he'll get
> out of this is whether the percentages are greater then one of
> these values
> (which, if the loop starts at 1, it's more then likely they all
> will be!).
Very true. I didn't look carefully enough at the code.
>
> Mind you, if this is a snip of the real script and there's some
> output
> making use of these values each time round the loop, this may
> actually be
> what's required. ;)
I would hope something else is happening. It'd be a pretty boring
application otherwise! ;^)
>
> 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: m.ford
lmu.ac.uk
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
>
> > --- John Wulff <johnw
orcasnet.com> wrote:
> > > Where the heck is my problem? No matter what the value for
> *_color
> > > is
> > > always 1!!!
> > >
> > > $example_data = array(
> > > array("Mar-99",100,2000,5945.33,1234,10),
> > > array("Feb-99",908,3454,47648.90,4321,50),
> > > array("Jan-99",542,8000,13365.52,6012,60)
> > > );
> > >
> > > $high = 47648.90;
> > > if(!isset($num))
> > > {
> > > $num = 1;
> > > }
> > > while($num <= 100 && $num >= 1)
> > > {
> > >
> > > foreach ($example_data as $key=>$value)
> > > {
> > > list($month, $a, $b, $c, $d, $e) = $value;
> > >
> > > $a_percent = ($a / $high) * 100;
> > > if($a_percent > $num) { $a_color = 1; }
> > >
> > > $b_percent = ($b / $high) * 100;
> > > if($b_percent > $num) { $b_color = 1; }
> > >
> > > $c_percent = ($c / $high) * 100;
> > > if($c_percent > $num) { $c_color = 1; }
> > >
> > > $d_percent = ($d / $high) * 100;
> > > if($d_percent > $num) { $d_color = 1; }
> > >
> > > $e_percent = ($e / $high) * 100;
> > > if($e_percent > $num) { $e_color = 1; }
> > > }
> > >
> > > $num = $num + 1;
> > > }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
Mark Weinstock
mark_weinstock
yahoo.com
***************************************
You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing.
***************************************
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
attached mail follows:
Hello,
I performed some tests using the backticks operator
and the system() call.
This is my.php :
<?
/*-----------------------------------------------------------*/
header("Pragma: no-cache"); // HTTP/1.0
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
?>
<HTML>
<head>
<title> uhmmmm </title>
</head>
<body>
I am
<?
$fldr = "d:\\winnt";
system("g:\\cygwin\\bin\\whoami");
echo "<br>";
$k = sprintf( `dir $fldr` );
$k = str_replace ("<", "<", $k );
$k = str_replace (">", ">", $k );
$k = str_replace ("\n", "<br>", $k );
echo "\$k = $k";
?>
</body>
</html>
this is the output:
I am SYSTEM
$k = Volume in drive D is WIN2KSRV
Volume Serial Number is 58D7-73D6
Directory of d:\winnt
06/25/2003 05:36p <DIR> .
06/25/2003 05:36p <DIR> ..
05/30/2003 11:46a 21,107 Active Setup Log.txt
05/29/2003 05:14p <DIR> addins
05/29/2003 06:20p <DIR> Application Compatibility Scripts
05/30/2003 10:15a <DIR> AppPatch
12/07/1999 02:00p 1,272 Blue Lace 16.bmp
05/30/2003 04:40p <DIR> Cache
05/30/2003 01:40p 24,106 certocm.log
12/07/1999 02:00p 82,944 clock.avi
12/07/1999 02:00p 17,062 Coffee Bean.bmp
05/29/2003 04:27p 1,038 COM+.log
.....
and so on
My problem is that it works too much ;-)
because the SYSTEM account can read everywhere in my win partition.
Is it possible to have the command executed by the user
IUSR_machinename instead of SYSTEM ?
In this case I can set up proper right in order to prevent access
to certain sensitive folders....
TIA, bye,
___________________________________________________________________
attached mail follows:
I want to give the visitor a possibility to create plenty of new user
accounts by letting the him paste the userinfo from a tab-, comma- or
semicolonseparated file to a textarea (form.php). Then some checking needs
to be done (check_users.php) before the final result is written to the db
(add_users.php).
Right now I'm trying to achieve this by putting the user input into a
(temporary) file and populate the fields in check_users.php from this file.
This works. But now I will do some changes before I write to the db, and
here I know nada. Is there some useful functions here that is useful? (How
can I edit this temp-file?)
I have (as mentioned above) another idea: use a temporay table and populate
this from the user input. Do the changes here, using the queries needed,
write from this table to the real place and then drop this table. What is
the best approach?
Here is form.php:
<?php
echo "
<HTML>
<BODY>
<H1>Klistra in från din textfil</H1>
Kom ihåg att texten måste vara tabb-, komma- eller semikolonavgränsad
<FORM METHOD=POST ACTION=\"check_users.php\">
<TEXTAREA NAME=\"users\" ROWS=\"10\" COLS=\"50\"></TEXTAREA><BR>
<INPUT TYPE=\"submit\" VALUE=\"Skicka\">
</FORM>
</BODY>
</HTML>
";
?>
and here check.users.php (right now)
<?php
include("../recycle/head.php");
echo "
</HEAD>
<BODY STYLE=\"background-color:#444444\">
<CENTER><TABLE>
<TH COLSPAN=6>Förhandsgranska</TH>
<TR><TD></TD><TD>Förnamn</TD><TD>Efternamn</TD><TD>Klass/grupp</TD><TD>Använ
darnamn</TD><TD></TD></TR>
";
if ($users == "" || $users == "\r\n") {
echo "
<SCRIPT LANGUAGE=\"JavaScript\">
<!--
document.write(void(history.go(-1)))
//-->
</SCRIPT>";
}
$filename = "addusers.txt";
if (isset($users)) {
$temp = $_POST['users'];
$handle = fopen("$filename", "w+");
fwrite($handle, $temp);
$users = file("$filename");
if (ereg("\t", $users[0]) == true) $separator = "\t"; // om texten är
tabbavgränsad
else if (ereg(",", $users[0]) == true) $separator = ","; // om texten är
kommaavgränsad
else $separator = ";"; // om texten är semikolonavgränsad
$count = 0;
foreach ($users as $v) {
list($firstname, $lastname, $mygroup, $username, $password) =
explode($separator, trim($v));
$firstname = ucfirst(trim($firstname));
$lastname = ucfirst(trim($lastname));
$mygroup = strtoupper(trim($mygroup));
$username = trim($username);
$password = trim($password);
echo "<FORM NAME=\"form_$count\" METHOD=POST
ACTION=\"{$_SERVER['PHP_SELF']}\"><TR>";
echo "<TD>$count<INPUT TYPE=HIDDEN NAME=\"counter\"
VALUE=\"$count\"></TD>";
echo "<TD><INPUT TYPE=TEXT NAME=\"firstname\" SIZE=15
VALUE=\"$firstname\"></TD>";
echo "<TD><INPUT TYPE=TEXT NAME=\"lastname\" SIZE=15
VALUE=\"$lastname\"></TD>";
echo "<TD><INPUT TYPE=TEXT NAME=\"mygroup\" SIZE=7
VALUE=\"$mygroup\"></TD>";
echo "<TD><INPUT TYPE=TEXT NAME=\"username\" SIZE=15
VALUE=\"$username\"></TD>";
echo "<INPUT TYPE=HIDDEN NAME=\"password\" VALUE=\"$password\">";
echo "<TD ALIGN=LEFT><A HREF=\"#\" TITLE=\"Ta bort denna post\"
onClick=\"\"><IMG SRC=\"delete.gif\" BORDER=0></A></TD>";//I'm not sure what
to do here
echo "</TR></FORM>";
$count++;
}
echo "<FORM NAME=\"show_users\" METHOD=POST ACTION=\"add_users.php\"><TR><TD
COLSPAN=6 ALIGN=RIGHT><INPUT TYPE=\"submit\" VALUE=\"OK,
skicka\"></TD></TR><INPUT TYPE=HIDDEN NAME=\"temp\"
VALUE=\"$temp\"></FORM>";
}
echo "
</TABLE></CENTER>
</BODY>
</HTML>
";
fclose($handle);
?>
attached mail follows:
you could use a $_SESSION variable instead of file
> $filename = "addusers.txt";
> if (isset($users)) {
> $temp = $_POST['users'];
> $handle = fopen("$filename", "w+");
> fwrite($handle, $temp);
>
> $users = file("$filename");
> if (ereg("\t", $users[0]) == true) $separator = "\t"; // om texten är
if(isset($_POST['users'])
{
$_SESSION['temp_users'] = $_POST['users'];
}
if (ereg("\t", $_SESSION['temp_users'][0]) == true) $separator = "\t";
.......etc
hope it helps
Pete
ØYstein HåLand wrote:
> I want to give the visitor a possibility to create plenty of new user
> accounts by letting the him paste the userinfo from a tab-, comma- or
> semicolonseparated file to a textarea (form.php). Then some checking needs
> to be done (check_users.php) before the final result is written to the db
> (add_users.php).
> Right now I'm trying to achieve this by putting the user input into a
> (temporary) file and populate the fields in check_users.php from this file.
> This works. But now I will do some changes before I write to the db, and
> here I know nada. Is there some useful functions here that is useful? (How
> can I edit this temp-file?)
> I have (as mentioned above) another idea: use a temporay table and populate
> this from the user input. Do the changes here, using the queries needed,
> write from this table to the real place and then drop this table. What is
> the best approach?
>
> Here is form.php:
> <?php
> echo "
> <HTML>
> <BODY>
> <H1>Klistra in från din textfil</H1>
> Kom ihåg att texten måste vara tabb-, komma- eller semikolonavgränsad
> <FORM METHOD=POST ACTION=\"check_users.php\">
> <TEXTAREA NAME=\"users\" ROWS=\"10\" COLS=\"50\"></TEXTAREA><BR>
> <INPUT TYPE=\"submit\" VALUE=\"Skicka\">
> </FORM>
> </BODY>
> </HTML>
> ";
> ?>
>
> and here check.users.php (right now)
> <?php
> include("../recycle/head.php");
> echo "
> </HEAD>
> <BODY STYLE=\"background-color:#444444\">
> <CENTER><TABLE>
> <TH COLSPAN=6>Förhandsgranska</TH>
>
> <TR><TD></TD><TD>Förnamn</TD><TD>Efternamn</TD><TD>Klass/grupp</TD><TD>Använ
> darnamn</TD><TD></TD></TR>
> ";
> if ($users == "" || $users == "\r\n") {
> echo "
> <SCRIPT LANGUAGE=\"JavaScript\">
> <!--
> document.write(void(history.go(-1)))
> //-->
> </SCRIPT>";
> }
> $filename = "addusers.txt";
> if (isset($users)) {
> $temp = $_POST['users'];
> $handle = fopen("$filename", "w+");
> fwrite($handle, $temp);
>
> $users = file("$filename");
> if (ereg("\t", $users[0]) == true) $separator = "\t"; // om texten är
> tabbavgränsad
> else if (ereg(",", $users[0]) == true) $separator = ","; // om texten är
> kommaavgränsad
> else $separator = ";"; // om texten är semikolonavgränsad
> $count = 0;
> foreach ($users as $v) {
> list($firstname, $lastname, $mygroup, $username, $password) =
> explode($separator, trim($v));
> $firstname = ucfirst(trim($firstname));
> $lastname = ucfirst(trim($lastname));
> $mygroup = strtoupper(trim($mygroup));
> $username = trim($username);
> $password = trim($password);
> echo "<FORM NAME=\"form_$count\" METHOD=POST
> ACTION=\"{$_SERVER['PHP_SELF']}\"><TR>";
> echo "<TD>$count<INPUT TYPE=HIDDEN NAME=\"counter\"
> VALUE=\"$count\"></TD>";
> echo "<TD><INPUT TYPE=TEXT NAME=\"firstname\" SIZE=15
> VALUE=\"$firstname\"></TD>";
> echo "<TD><INPUT TYPE=TEXT NAME=\"lastname\" SIZE=15
> VALUE=\"$lastname\"></TD>";
> echo "<TD><INPUT TYPE=TEXT NAME=\"mygroup\" SIZE=7
> VALUE=\"$mygroup\"></TD>";
> echo "<TD><INPUT TYPE=TEXT NAME=\"username\" SIZE=15
> VALUE=\"$username\"></TD>";
> echo "<INPUT TYPE=HIDDEN NAME=\"password\" VALUE=\"$password\">";
> echo "<TD ALIGN=LEFT><A HREF=\"#\" TITLE=\"Ta bort denna post\"
> onClick=\"\"><IMG SRC=\"delete.gif\" BORDER=0></A></TD>";//I'm not sure what
> to do here
> echo "</TR></FORM>";
> $count++;
> }
> echo "<FORM NAME=\"show_users\" METHOD=POST ACTION=\"add_users.php\"><TR><TD
> COLSPAN=6 ALIGN=RIGHT><INPUT TYPE=\"submit\" VALUE=\"OK,
> skicka\"></TD></TR><INPUT TYPE=HIDDEN NAME=\"temp\"
> VALUE=\"$temp\"></FORM>";
> }
> echo "
> </TABLE></CENTER>
> </BODY>
> </HTML>
> ";
> fclose($handle);
> ?>
>
>
attached mail follows:
At 17:36 26-6-03, you wrote:
>you could use a $_SESSION variable instead of file
or when the data come in, you can put them into an array and pass on the
array through a hidden form field. before putting it in the hidden field
serialize the array
and in the receiving page unserialize it.
http://nl.php.net/manual/en/function.serialize.php
(take care to prevent tampering)
attached mail follows:
Since I'm new to the subject have patience with my 'stupid' questions. On
the form-page I don't have a session_start(), right?
But, this means the session will not be set before I reload the
check_users.php?
From what I can see the session var is a string exactly a copy of the input
(the csv, txt or skv-file). How can I now delete let's say the second row in
this session var?
"Pete Morganic" <pete
daffodil.uk.com> skrev i meddelandet
news:20030626152808.25065.qmail
pb1.pair.com...
> you could use a $_SESSION variable instead of file
> > $filename = "addusers.txt";
> > if (isset($users)) {
> > $temp = $_POST['users'];
> > $handle = fopen("$filename", "w+");
> > fwrite($handle, $temp);
> >
> > $users = file("$filename");
> > if (ereg("\t", $users[0]) == true) $separator = "\t"; // om texten är
>
> if(isset($_POST['users'])
> {
> $_SESSION['temp_users'] = $_POST['users'];
> }
> if (ereg("\t", $_SESSION['temp_users'][0]) == true) $separator = "\t";
> .......etc
>
> hope it helps
> Pete
>
>
> ØYstein HåLand wrote:
> > I want to give the visitor a possibility to create plenty of new user
> > accounts by letting the him paste the userinfo from a tab-, comma- or
> > semicolonseparated file to a textarea (form.php). Then some checking
needs
> > to be done (check_users.php) before the final result is written to the
db
> > (add_users.php).
> > Right now I'm trying to achieve this by putting the user input into a
> > (temporary) file and populate the fields in check_users.php from this
file.
> > This works. But now I will do some changes before I write to the db, and
> > here I know nada. Is there some useful functions here that is useful?
(How
> > can I edit this temp-file?)
> > I have (as mentioned above) another idea: use a temporay table and
populate
> > this from the user input. Do the changes here, using the queries needed,
> > write from this table to the real place and then drop this table. What
is
> > the best approach?
> >
> > Here is form.php:
> > <?php
> > echo "
> > <HTML>
> > <BODY>
> > <H1>Klistra in från din textfil</H1>
> > Kom ihåg att texten måste vara tabb-, komma- eller semikolonavgränsad
> > <FORM METHOD=POST ACTION=\"check_users.php\">
> > <TEXTAREA NAME=\"users\" ROWS=\"10\" COLS=\"50\"></TEXTAREA><BR>
> > <INPUT TYPE=\"submit\" VALUE=\"Skicka\">
> > </FORM>
> > </BODY>
> > </HTML>
> > ";
> > ?>
> >
> > and here check.users.php (right now)
> > <?php
> > include("../recycle/head.php");
> > echo "
> > </HEAD>
> > <BODY STYLE=\"background-color:#444444\">
> > <CENTER><TABLE>
> > <TH COLSPAN=6>Förhandsgranska</TH>
> >
> >
<TR><TD></TD><TD>Förnamn</TD><TD>Efternamn</TD><TD>Klass/grupp</TD><TD>Använ
> > darnamn</TD><TD></TD></TR>
> > ";
> > if ($users == "" || $users == "\r\n") {
> > echo "
> > <SCRIPT LANGUAGE=\"JavaScript\">
> > <!--
> > document.write(void(history.go(-1)))
> > //-->
> > </SCRIPT>";
> > }
> > $filename = "addusers.txt";
> > if (isset($users)) {
> > $temp = $_POST['users'];
> > $handle = fopen("$filename", "w+");
> > fwrite($handle, $temp);
> >
> > $users = file("$filename");
> > if (ereg("\t", $users[0]) == true) $separator = "\t"; // om texten är
> > tabbavgränsad
> > else if (ereg(",", $users[0]) == true) $separator = ","; // om texten är
> > kommaavgränsad
> > else $separator = ";"; // om texten är semikolonavgränsad
> > $count = 0;
> > foreach ($users as $v) {
> > list($firstname, $lastname, $mygroup, $username, $password) =
> > explode($separator, trim($v));
> > $firstname = ucfirst(trim($firstname));
> > $lastname = ucfirst(trim($lastname));
> > $mygroup = strtoupper(trim($mygroup));
> > $username = trim($username);
> > $password = trim($password);
> > echo "<FORM NAME=\"form_$count\" METHOD=POST
> > ACTION=\"{$_SERVER['PHP_SELF']}\"><TR>";
> > echo "<TD>$count<INPUT TYPE=HIDDEN NAME=\"counter\"
> > VALUE=\"$count\"></TD>";
> > echo "<TD><INPUT TYPE=TEXT NAME=\"firstname\" SIZE=15
> > VALUE=\"$firstname\"></TD>";
> > echo "<TD><INPUT TYPE=TEXT NAME=\"lastname\" SIZE=15
> > VALUE=\"$lastname\"></TD>";
> > echo "<TD><INPUT TYPE=TEXT NAME=\"mygroup\" SIZE=7
> > VALUE=\"$mygroup\"></TD>";
> > echo "<TD><INPUT TYPE=TEXT NAME=\"username\" SIZE=15
> > VALUE=\"$username\"></TD>";
> > echo "<INPUT TYPE=HIDDEN NAME=\"password\" VALUE=\"$password\">";
> > echo "<TD ALIGN=LEFT><A HREF=\"#\" TITLE=\"Ta bort denna post\"
> > onClick=\"\"><IMG SRC=\"delete.gif\" BORDER=0></A></TD>";//I'm not sure
what
> > to do here
> > echo "</TR></FORM>";
> > $count++;
> > }
> > echo "<FORM NAME=\"show_users\" METHOD=POST
ACTION=\"add_users.php\"><TR><TD
> > COLSPAN=6 ALIGN=RIGHT><INPUT TYPE=\"submit\" VALUE=\"OK,
> > skicka\"></TD></TR><INPUT TYPE=HIDDEN NAME=\"temp\"
> > VALUE=\"$temp\"></FORM>";
> > }
> > echo "
> > </TABLE></CENTER>
> > </BODY>
> > </HTML>
> > ";
> > fclose($handle);
> > ?>
> >
> >
>
attached mail follows:
$handle = popen("cvs --help", "r");
while(!feof($handle)) {
echo fgets($handle, 30000);
}
pclose($handle);
i get a valid handle but no output ! popen failed only with cvs command
(cvs.exe), if anybody could help me :-)
attached mail follows:
Hello,
I'm having a really strange output problem that I can't figure out.
The problem is that a few characters appear prepended and appended to
the body of the server response. I'm running PHP 4.3.0 and 4.3.2 on
Mac OS X (tibook and xserve) and Red Hat 7.1 with 4.3.2 as well, with
Apache 1.3 on all of them.
Here is a reproduction of the problem on two servers:
From the command line... (the following URL illustrates the problem,
feel free to use it)
(Request)
$ telnet dev.ourvoices.ca 80
GET /test.php HTTP/1.1
Host: dev.ourvoices.ca
(Response)
HTTP/1.1 200 OK
...other headers...
Content-Type: text/html
3
foo
0
(The code in /test.php)
<?php echo 'foo'; ?>
(What's with the 3 and the 0)
You can also duplicate this problem at ourvoices.sitellite.org on the
Linux box as well.
phpinfo() can be seen for both these machines at:
http://dev.ourvoices.ca/phpinfo.php
http://ourvoices.sitellite.org/phpinfo.php
Anyone seen this before? Anyone know of a solution?
Thanks in advance,
Lux
--
John Luxford
President and Chief Developer
______________________________
SIMIAN systems
Driving Web Content Management
______________________________
web : http://www.simian.ca/
email : lux
simian.ca
phone : 204.942.8630
fax : 309.218.3874
attached mail follows:
The three might be the "Content-length" header, not sure
though, thats just a guess since your outputting 3 characters.
On Thu, 2003-06-26 at 11:44, John Luxford wrote:
> Hello,
>
> I'm having a really strange output problem that I can't figure out.
> The problem is that a few characters appear prepended and appended to
> the body of the server response. I'm running PHP 4.3.0 and 4.3.2 on
> Mac OS X (tibook and xserve) and Red Hat 7.1 with 4.3.2 as well, with
> Apache 1.3 on all of them.
>
> Here is a reproduction of the problem on two servers:
>
> From the command line... (the following URL illustrates the problem,
> feel free to use it)
>
> (Request)
> $ telnet dev.ourvoices.ca 80
> GET /test.php HTTP/1.1
> Host: dev.ourvoices.ca
>
> (Response)
> HTTP/1.1 200 OK
> ...other headers...
> Content-Type: text/html
>
> 3
> foo
> 0
>
> (The code in /test.php)
> <?php echo 'foo'; ?>
>
> (What's with the 3 and the 0)
>
> You can also duplicate this problem at ourvoices.sitellite.org on the
> Linux box as well.
>
> phpinfo() can be seen for both these machines at:
>
> http://dev.ourvoices.ca/phpinfo.php
> http://ourvoices.sitellite.org/phpinfo.php
>
> Anyone seen this before? Anyone know of a solution?
>
> Thanks in advance,
>
> Lux
>
> --
>
> John Luxford
> President and Chief Developer
> ______________________________
> SIMIAN systems
> Driving Web Content Management
> ______________________________
> web : http://www.simian.ca/
> email : lux
simian.ca
> phone : 204.942.8630
> fax : 309.218.3874
--
Adam Voigt (adam
cryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group
attached mail follows:
This problem can comes from your php.ini, at the section :
; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =
attached mail follows:
> -----Original Message-----
> From: John Luxford [mailto:lux
simian.ca]
> Sent: 26 June 2003 16:44
>
> I'm having a really strange output problem that I can't figure out.
> The problem is that a few characters appear prepended and appended to
> the body of the server response. I'm running PHP 4.3.0 and 4.3.2 on
> Mac OS X (tibook and xserve) and Red Hat 7.1 with 4.3.2 as well, with
> Apache 1.3 on all of them.
>
> Here is a reproduction of the problem on two servers:
>
> From the command line... (the following URL illustrates the problem,
> feel free to use it)
>
> (Request)
> $ telnet dev.ourvoices.ca 80
> GET /test.php HTTP/1.1
> Host: dev.ourvoices.ca
>
> (Response)
> HTTP/1.1 200 OK
> ...other headers...
> Content-Type: text/html
>
> 3
> foo
> 0
>
> (The code in /test.php)
> <?php echo 'foo'; ?>
>
> (What's with the 3 and the 0)
This is HTTP Chunked transfer encoding. Practically all browsers around
these days understand this, and will correctly render the above as just
foo
(The technical details are that output is sent as a series of chunks
consisting of the chunk length followed by that many bytes. A chunk length
of 0 indicates the end of the data.)
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: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Hi Mike,
Thanks for the info. The problem is that I'm trying to output an M3U
file to stream a series of MP3s, and some players won't properly parse
the output due to the first line containing that chunk info. Is there
a way to turn it on and off that you know of?
Thanks again,
Lux
On Thursday, June 26, 2003, at 11:38 AM, Ford, Mike [LSS] wrote:
>> -----Original Message-----
>> From: John Luxford [mailto:lux
simian.ca]
>> Sent: 26 June 2003 16:44
>>
>> I'm having a really strange output problem that I can't figure out.
>> The problem is that a few characters appear prepended and appended to
>> the body of the server response. I'm running PHP 4.3.0 and 4.3.2 on
>> Mac OS X (tibook and xserve) and Red Hat 7.1 with 4.3.2 as well, with
>> Apache 1.3 on all of them.
>>
>> Here is a reproduction of the problem on two servers:
>>
>> From the command line... (the following URL illustrates the problem,
>> feel free to use it)
>>
>> (Request)
>> $ telnet dev.ourvoices.ca 80
>> GET /test.php HTTP/1.1
>> Host: dev.ourvoices.ca
>>
>> (Response)
>> HTTP/1.1 200 OK
>> ...other headers...
>> Content-Type: text/html
>>
>> 3
>> foo
>> 0
>>
>> (The code in /test.php)
>> <?php echo 'foo'; ?>
>>
>> (What's with the 3 and the 0)
>
> This is HTTP Chunked transfer encoding. Practically all browsers
> around
> these days understand this, and will correctly render the above as just
>
> foo
>
> (The technical details are that output is sent as a series of chunks
> consisting of the chunk length followed by that many bytes. A chunk
> length
> of 0 indicates the end of the data.)
>
> 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: m.ford
lmu.ac.uk
> 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
>
>
>
--
John Luxford
President and Chief Developer
______________________________
SIMIAN systems
Driving Web Content Management
______________________________
web : http://www.simian.ca/
email : lux
simian.ca
phone : 204.942.8630
fax : 309.218.3874
attached mail follows:
I downloaded PHP 5-dev from snaps last night but it is giving me an error
when I try to install it. The error is: The dynamic link library libxml2.dll
could not be found in the specified path.
I have been downloading and installing PHP 5 from snaps for some time and
haven't had any problem installing it prior to this. Is this a change,
something different about the installation procedure? Or is there a problem
with PHP 5 on snaps.
I am using Windows 2000. I download the zip file, unzip into the PHP
directory, and copy php4ts.dll into winnt\system32. This has worked many
times in the past.
Thanks,
Janet
attached mail follows:
You need to copy dlls\*.dll to winnt\system32 too.
Edin
----- Original Message -----
From: <janet
valade.com>
To: <php-general
lists.php.net>
Sent: Thursday, June 26, 2003 6:26 PM
Subject: [PHP] PHP 5 won't install
> I downloaded PHP 5-dev from snaps last night but it is giving me an error
> when I try to install it. The error is: The dynamic link library
libxml2.dll
> could not be found in the specified path.
>
> I have been downloading and installing PHP 5 from snaps for some time and
> haven't had any problem installing it prior to this. Is this a change,
> something different about the installation procedure? Or is there a
problem
> with PHP 5 on snaps.
>
> I am using Windows 2000. I download the zip file, unzip into the PHP
> directory, and copy php4ts.dll into winnt\system32. This has worked many
> times in the past.
>
> Thanks,
>
> Janet
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
In a message dated 6/26/2003 1:08:02 PM Pacific Daylight Time,
edink
proventum.net writes:
>You need to copy dlls\*.dll to winnt\system32 too.
Yes, but my question is about the change. There are two, libxml2 and iconv,
that I had to copy into the system directory before PHP 5 would run. I didn't
have to do this when I previously installed PHP 5. I just started having to
copy these dlls yesterday. My question is whether this is a permanent change
to the installation process or something that will be fixed.
Janet
attached mail follows:
Yes, this is something that would probably be changed before the final
release, maybe even in the upcoming beta1.
Edin
----- Original Message -----
From: <janet
valade.com>
To: <php-general
lists.php.net>
Cc: <edink
proventum.net>
Sent: Thursday, June 26, 2003 10:34 PM
Subject: Re: [PHP] PHP 5 won't install
> In a message dated 6/26/2003 1:08:02 PM Pacific Daylight Time,
> edink
proventum.net writes:
>
> >You need to copy dlls\*.dll to winnt\system32 too.
>
> Yes, but my question is about the change. There are two, libxml2 and
iconv,
> that I had to copy into the system directory before PHP 5 would run. I
didn't
> have to do this when I previously installed PHP 5. I just started having
to
> copy these dlls yesterday. My question is whether this is a permanent
change
> to the installation process or something that will be fixed.
>
> Janet
>
>
attached mail follows:
Hi folks
First, thanks to Jim for the greeat tree-menu, we are just editing it.
Ok, we are doing the tutorial for the Intranet of our University. There is
just a lot of information and we want to give the user all the ways to find
the information he's looking for. Hence, we need a great search engine too.
We have all our information stored in a MYSQL database. We need a search
engine to look for the keywords we have in our tables and that show the
related results. Anyone knows a good search engine -free- for this treat?
thanks
David.
attached mail follows:
[snip]
First, thanks to Jim for the greeat tree-menu, we are just editing it.
Ok, we are doing the tutorial for the Intranet of our University. There
is
just a lot of information and we want to give the user all the ways to
find
the information he's looking for. Hence, we need a great search engine
too.
We have all our information stored in a MYSQL database. We need a search
engine to look for the keywords we have in our tables and that show the
related results. Anyone knows a good search engine -free- for this
treat?
[/snip]
Yes, and you already own it! It is called a full text search ...
http://www.mysql.com/doc/en/Fulltext_Search.html
HTH!
attached mail follows:
On Jun 26, 2003, "David Elìas Sánchez Vásquez" claimed that:
|
|Hi folks
|
|First, thanks to Jim for the greeat tree-menu, we are just editing it.
|Ok, we are doing the tutorial for the Intranet of our University. There is
|just a lot of information and we want to give the user all the ways to find
|the information he's looking for. Hence, we need a great search engine too.
|
|We have all our information stored in a MYSQL database. We need a search
|engine to look for the keywords we have in our tables and that show the
|related results. Anyone knows a good search engine -free- for this treat?
|
|thanks
|
|David.
|
http://www.phpbuilder.com/columns/clay19990421.php3?print_mode=1
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.
attached mail follows:
The Gallery I recommended can be edited so the thumbnails don't display and
you can make the links appear instead. Shouldn't be tough, the info is
already there. Just replace the <img> tag with the <a href> text.
before:
<a href='images/cars/bmw/pic1.gif'><img
src='images/cars/bmw/pic1_thumb.gif'></a>
after:
<a
href='images/cars/bmw/pic1.gif'>http://www.domain/images/cars/bmw/pic1.gif</
a>
J
-----Original Message-----
From: chris sherwood [mailto:csherwood
nortialearning.com]
Sent: Monday, June 23, 2003 10:20 AM
To: webmaster
flowerpot.iofm.net
Cc: php-general
lists.php.net
Subject: Re: [PHP] image galleries
I haven't found anything that would handle the problem you have... in my
case I would create the galleries that I needed... maybe write some
reiterate code that would display recreated thumbs from the images...
this could be done when the upload is done and the new image created from
the old one using create from functionality available in the php engine such
as
http://ca3.php.net/manual/en/function.imagecreatefromjpeg.php
or one of the others you find there.... good luck
"Alan Quirk" <webmaster
flowerpot.iofm.net> wrote in message
news:<20030623163243.21269.qmail
pb1.pair.com>...
> I've had a look around lots of script sites (hotscripts, etc) and there
are
> lots of scripts for gd-library galleries, but unfortunately the server i'm
> using does not support it, and I really want to have a gallery where
> pictures can be uploaded and all the appropriate directories are created
> automatically (i'm not that good with code just yet) but instead of
listing
> pages of thumbnails it just automatically lists the pics in the gallery as
> text links.
>
> I hope you can be of some help, I can't find anything anywhere on the
whole
> internet like this.
>
>
>
> --
> 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
attached mail follows:
Try cleaning it up ...
switch( trim( strtoupper( $type ) ) );
I had this happen to me - the $type echoed OK, but would not get caught in
the "case". The above fixed it.
Miles Thompson
At 02:18 PM 6/18/2003 +0100, cg wrote:
>I am testing a var in a switch statement,
>switch($type)
> {
> case "HIRE":
> statements;
> break;
> etc....
> default:
> echo "In Default";
> break;
> }
>I can echo $type directly above the switch statement, confirm it contains
>the string "HIRE", but the switch takes the default every time!!
>
>what is going on??
>
>thanks
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
What Sybase are you using Sybase ASE (Adaptive Server Enterprise) or Sybase
Anywhere.
Is your PHP server on Windows or Linux.
What you will need is the Sybase client first off. PHP links to the sql.ini
files (in windows).
Then you will need to edit your php.ini and uncomment the Sybase extension.
Mark.
"Michael A Smith" <php-digest
custom87.net> wrote in message
news:1056605203.5134.122.camel
localhost.localdomain...
> Hi,
>
> I want to connect to a Sybase database running on another windoze server
> without having to a buy a copy of sybase for linux. How can I compile
> PHP to have the sybase functions, but not the local database program.
>
> -Michael
> --
> Michael A Smith <php-digest
custom87.net>
>
attached mail follows:
Do you have Sybase ASE on windows or Sybase Anywhere. I didn't know that
Sybase make a windows version of ASE.
We use Sybase ASE on HP UNIX here at work and I have PHP on both Windows
2000 and Sun linked to it.
Mark.
----- Original Message -----
From: "Michael A Smith" <php-digest
custom87.net>
To: "Mark McCulligh" <mmcculli
sykescanada.com>
Sent: Thursday, June 26, 2003 1:13 PM
Subject: Re: [PHP] Re: Sybase and PHP
> I'm trying to use a sybase client to connect to a sybase database (which
> is running on windoze) from a Linux box running PHP 4.3.2. I installed
> the Sybase RPMs (ASE, common, openclient), and can configure right with
> --with-sybase, but making gives me a bunch of errors: here's a sample:
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:38:22: sybfront.h: No
> such file or directory
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:39:19: sybdb.h: No such
> file or directory
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:40:22: syberror.h: No
> such file or directory
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:61: parse error before
> "LOGINREC"
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:61: warning: no
> semicolon at end of struct or union
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:62: `link' redeclared as
> different kind of symbol
> /usr/include/unistd.h:697: previous declaration of `link'
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:62: warning: data
> definition has no type or storage class
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:64: parse error before
> '}' token
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c:143: parse error before
> '*' token
> /usr/local/php-4.3.2/ext/sybase/php_sybase_db.c: In function
> `php_sybase_error_handler':
> I can't figure out what's wrong...
>
> -Michael
> On Thu, 2003-06-26 at 09:06, Mark McCulligh wrote:
> > What Sybase are you using Sybase ASE (Adaptive Server Enterprise) or
Sybase
> > Anywhere.
> > Is your PHP server on Windows or Linux.
> >
> > What you will need is the Sybase client first off. PHP links to the
sql.ini
> > files (in windows).
> > Then you will need to edit your php.ini and uncomment the Sybase
extension.
> >
> > Mark.
> >
> >
> > "Michael A Smith" <php-digest
custom87.net> wrote in message
> > news:1056605203.5134.122.camel
localhost.localdomain...
> > > Hi,
> > >
> > > I want to connect to a Sybase database running on another windoze
server
> > > without having to a buy a copy of sybase for linux. How can I compile
> > > PHP to have the sybase functions, but not the local database program.
> > >
> > > -Michael
> > > --
> > > Michael A Smith <php-digest
custom87.net>
> > >
>
>
attached mail follows:
> if(isset($_POST['users'])
> {
> $_SESSION['temp_users'] = $_POST['users'];
> }
> if (ereg("\t", $_SESSION['temp_users'][0]) == true) $separator = "\t";
> .......etc
>
> hope it helps
> Pete
>
Will take a look at function.serialize too. Thank you guys
attached mail follows:
I have a string something like ->
<[TIT2]> ABC <[TPE1]> GHI <[TALB]> XYZ
Im applying a regex as such ->
// Title/Songname/Content
preg_match('/<\[TIT2\]>(.*?)(<\[)?/', $foo, $match);
$title = trim( $match[1] );
The above regex doesn't work. At the end of the pattern Im using (<\[)?
The pattern may or may not end with <[
For example searching for -> <[TALB]> XYZ
The string, is *NOT* expected to hold a certain order as how it is
retrieved.
How does one go about to fix up this regex?
Thanks
attached mail follows:
On Thu, 26 Jun 2003 10:40:46 +1000, you wrote:
>Is the pdf module being loaded on the linux machine?
>What is the error message (if any) that's displayed at the "create handle"
>bit ?
>
>Martin
It just stops dead. The body color is still there on the screen but
there is no more output to the screen nor is the pdf file produced.
I'm too lite on linux for the module question. I'll have the guru
look into that... Thanks.
>-----Original Message-----
>From: Floyd Baker [mailto:fbaker
olm1.com]
>Sent: Thursday, 26 June 2003 10:32 AM
>To: php-general
lists.php.net
>Subject: [PHP] pdf routine - good local / bad online
>
>
>
>Hi.
>
>I have a routine creating a pdf file. Here is the script that works
>on the win98 dev box. But when I upload it to the linux online, it
>does not work.
>
>It stops at 'create handle'. Can someone please tell me why?
>
>// GET COMPANY INFO
> while($row = mysql_fetch_array($mysql_result)){
> $name1 = $row['name1'];
> $name2 = $row['name2'];
> $addr1 = $row['addr1'];
> $addr2 = $row['addr2'];
> $city = $row['city'];
> $stat = $row['stat'];
> $zipc = $row['zipc'];
> $phone = $row['phone'];}
>
>// START PDF FILE
> unlink('f:/localhost/adobe/' . $cocode . '_info.pdf');
>
>// create handle for new PDF document
> pdf_delete($pdf);
> $pdf = pdf_new();
>
>// open a file
> pdf_open_file($pdf, 'f:/localhost/adobe/' . $cocode . '_info.pdf');
>
>
>I do change the 'f:/localhost' to https://xx.xx.xx,xx when uploaded.
>
>Any thoughts will be greatly appreciated... TIA
>
>Floyd
--
attached mail follows:
Hi!
Noticed something interesting. I was helping to debug someone's
programming problem and found that if there is to many 'else if' in the if
and else statement then it doesn't work. Have anyone encoutered this
problem and know of a workaround to it?
Thanks,
Scott
attached mail follows:
Hi,
> Noticed something interesting. I was helping to debug someone's
> programming problem and found that if there is to many 'else if' in the if
> and else statement then it doesn't work. Have anyone encoutered this
> problem and know of a workaround to it?
That sounds kinda bizzare, how many elseif's did you have? also, were you
using 'else if' or 'elseif'?
-Dan Joseph
attached mail follows:
[snip]
Noticed something interesting. I was helping to debug someone's
programming problem and found that if there is to many 'else if' in the
if
and else statement then it doesn't work. Have anyone encoutered this
problem and know of a workaround to it?
[/snip]
I'd have to see the code
Jay
attached mail follows:
I am seeing the problem now. It seem that it had to do with the 'OR'
statement inside the elseif statement... I'm going to try a workaround to
it... As for you mentioning about the code... It's too bad this message
window doesn't properly display the tabs....
--clip--
if ($firstname == \"\") {echo \"Enter [First Name]\"; return false;}
elseif ($lastname == \"\") {echo \"Enter [Last Name]\"; return false;}
elseif ($address == \"\") {echo \"Enter [Address]\"; return false;}
elseif ($city == \"\") {echo \"Enter [City]\"; return false;}
elseif ($state == \"\") {echo \"Enter [State]\"; return false;}
elseif ($zipcode == \"\") {echo \"Enter [Zip Code]\"; return false;}
elseif ($homephoneno == \"\") {echo \"Enter [Home Phone #]\"; return false;}
elseif ($dob == \"\") {echo \"Enter [Date of Birth]\"; return false;}
elseif ($ssn == \"\") {echo \"Enter [Social Security No]\"; return false;}
elseif ($dln == \"\") {echo \"Enter [Driver\'s License No]\"; return false;}
elseif ($occupation == \"\") {echo \"Enter [Occupation]\"; return false;}
elseif ($months == \"\") {echo \"Enter [Residence Months]\"; return false;}
elseif ($rentown == \"Renting\" || $rentown == \"Lease\" || $rentown ==
\"Buying House W/Mortgage\") {
/*
if ($towhompaid == \"\") {echo \"Enter [To Whom Paid]\"; return false;}
elseif ($paymentaddress == \"\") {echo \"Enter [Home Payment Address]\";
return false;}
elseif ($paymentcity == \"\") {echo \"Enter [Home Payment City]\"; return
false;}
elseif ($paymentstate == \"\") {echo \"Enter [Home Payment State]\"; return
false;}
elseif ($paymentzipcode == \"\") {echo \"Enter [Home Payment Zip Code]\";
return false;}
*/
}
/*
elseif ($income == \"\") {echo \"Enter [Income]\"; return false;}
elseif ($typeofincome == \"\" && $otherincome > 0) {echo \"Enter [Type of
Income]\"; return false;}
elseif ($bankname == \"\") {echo \"Enter [Bank Name]\"; return false;}
elseif ($Jfirstname != \"\" && $Jlastname == \"\") {echo \"Enter Cobuyer\'s
[Last Name]\"; return false;}
elseif ($Jfirstname != \"\" && $Jaddress == \"\") {echo \"Enter Cobuyer\'s
[Address]\"; return false;}
elseif ($Jfirstname != \"\" && $Jcity == \"\") {echo \"Enter Cobuyer\'s
[City]\"; return false;}
elseif ($Jfirstname != \"\" && $Jstate == \"\") {echo \"Enter Cobuyer\'s
[State]\"; return false;}
elseif ($Jfirstname != \"\" && $Jzipcode == \"\") {echo \"Enter Cobuyer\'s
[Zip Code]\"; return false;}
elseif ($Jfirstname != \"\" && $Jhomephoneno == \"\") {echo \"Enter
Cobuyer\'s [Home Phone #]\"; return false;}
elseif ($Jfirstname != \"\" && $Jdob == \"\") {echo \"Enter Cobuyer\'s [Date
of Birth]\"; return false;}
elseif ($Jfirstname != \"\" && $Jssn == \"\") {echo \"Enter Cobuyer\'s
[Social Security No]\"; return false;}
elseif ($Jfirstname != \"\" && $Jdln == \"\") {echo \"Enter Cobuyer\'s
[Driver\'s License No]\"; return false;}
elseif ($Jfirstname != \"\" && $Joccupation == \"\") {echo \"Enter
Cobuyer\'s [Occupation]\"; return false;}
elseif ($Jfirstname != \"\" && $Jmonths == \"\") {echo \"Enter Cobuyer\'s
[Residence Months]\"; return false;}
elseif ($Jfirstname != \"\" && ($Jrentown == \"Renting\" || $Jrentown ==
\"Lease\" || $Jrentown == \"Buying House W/Mortgage\")) {
if ($Jfirstname != \"\" && $Jtowhompaid == \"\") {echo \"Enter Cobuyer\'s
[To Whom Paid]\"; return false;}
elseif ($Jfirstname != \"\" && $Jpaymentaddress == \"\") {echo \"Enter
Cobuyer\'s [Home Payment Address]\"; return false;}
elseif ($Jfirstname != \"\" && $Jpaymentcity == \"\") {echo \"Enter
Cobuyer\'s [Home Payment City]\"; return false;}
elseif ($Jfirstname != \"\" && $Jpaymentstate == \"\") {echo \"Enter
Cobuyer\'s [Home Payment State]\"; return false;}
elseif ($Jfirstname != \"\" && $Jpaymentzipcode == \"\") {echo \"Enter
Cobuyer\'s [Home Payment Zip Code]\"; return false;}
}
elseif ($Jfirstname != \"\" && $Jincome == \"\") {echo \"Enter Cobuyer\'s
[Income]\"; return false;}
elseif ($Jfirstname != \"\" && $Jtypeofincome == \"\" && $Jotherincome > 0)
{echo \"Enter Cobuyer\'s [Type of Income]\"; return false;}
elseif ($Jfirstname != \"\" && $Jbankname == \"\") {echo \"Enter Cobuyer\'s
[Bank Name]\"; return false;} */
else
return $returnvalue = \"Pass\";
--clip--
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B0101F896
nemesis...
[snip]
Noticed something interesting. I was helping to debug someone's
programming problem and found that if there is to many 'else if' in the
if
and else statement then it doesn't work. Have anyone encoutered this
problem and know of a workaround to it?
[/snip]
I'd have to see the code
Jay
attached mail follows:
Just found the problem, the if, else-if, else statement work okay when it is
too many. The reason it doesn't work is because there's a loophole in the
script due to someone's flaw logic or haven't thought about it when
brainstorming...
Thanks,
Scott
"Scott Fletcher" <scott
abcoa.com> wrote in message
news:20030626200655.90401.qmail
pb1.pair.com...
> I am seeing the problem now. It seem that it had to do with the 'OR'
> statement inside the elseif statement... I'm going to try a workaround to
> it... As for you mentioning about the code... It's too bad this message
> window doesn't properly display the tabs....
>
> --clip--
> if ($firstname == \"\") {echo \"Enter [First Name]\"; return false;}
>
> elseif ($lastname == \"\") {echo \"Enter [Last Name]\"; return false;}
>
> elseif ($address == \"\") {echo \"Enter [Address]\"; return false;}
>
> elseif ($city == \"\") {echo \"Enter [City]\"; return false;}
>
> elseif ($state == \"\") {echo \"Enter [State]\"; return false;}
>
> elseif ($zipcode == \"\") {echo \"Enter [Zip Code]\"; return false;}
>
> elseif ($homephoneno == \"\") {echo \"Enter [Home Phone #]\"; return
false;}
>
> elseif ($dob == \"\") {echo \"Enter [Date of Birth]\"; return false;}
>
> elseif ($ssn == \"\") {echo \"Enter [Social Security No]\"; return false;}
>
> elseif ($dln == \"\") {echo \"Enter [Driver\'s License No]\"; return
false;}
>
> elseif ($occupation == \"\") {echo \"Enter [Occupation]\"; return false;}
>
> elseif ($months == \"\") {echo \"Enter [Residence Months]\"; return
false;}
>
> elseif ($rentown == \"Renting\" || $rentown == \"Lease\" || $rentown ==
> \"Buying House W/Mortgage\") {
>
> /*
>
> if ($towhompaid == \"\") {echo \"Enter [To Whom Paid]\"; return false;}
>
> elseif ($paymentaddress == \"\") {echo \"Enter [Home Payment Address]\";
> return false;}
>
> elseif ($paymentcity == \"\") {echo \"Enter [Home Payment City]\"; return
> false;}
>
> elseif ($paymentstate == \"\") {echo \"Enter [Home Payment State]\";
return
> false;}
>
> elseif ($paymentzipcode == \"\") {echo \"Enter [Home Payment Zip Code]\";
> return false;}
>
> */
>
> }
>
> /*
>
> elseif ($income == \"\") {echo \"Enter [Income]\"; return false;}
>
> elseif ($typeofincome == \"\" && $otherincome > 0) {echo \"Enter [Type of
> Income]\"; return false;}
>
> elseif ($bankname == \"\") {echo \"Enter [Bank Name]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jlastname == \"\") {echo \"Enter
Cobuyer\'s
> [Last Name]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jaddress == \"\") {echo \"Enter Cobuyer\'s
> [Address]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jcity == \"\") {echo \"Enter Cobuyer\'s
> [City]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jstate == \"\") {echo \"Enter Cobuyer\'s
> [State]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jzipcode == \"\") {echo \"Enter Cobuyer\'s
> [Zip Code]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jhomephoneno == \"\") {echo \"Enter
> Cobuyer\'s [Home Phone #]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jdob == \"\") {echo \"Enter Cobuyer\'s
[Date
> of Birth]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jssn == \"\") {echo \"Enter Cobuyer\'s
> [Social Security No]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jdln == \"\") {echo \"Enter Cobuyer\'s
> [Driver\'s License No]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Joccupation == \"\") {echo \"Enter
> Cobuyer\'s [Occupation]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jmonths == \"\") {echo \"Enter Cobuyer\'s
> [Residence Months]\"; return false;}
>
> elseif ($Jfirstname != \"\" && ($Jrentown == \"Renting\" || $Jrentown ==
> \"Lease\" || $Jrentown == \"Buying House W/Mortgage\")) {
>
> if ($Jfirstname != \"\" && $Jtowhompaid == \"\") {echo \"Enter Cobuyer\'s
> [To Whom Paid]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jpaymentaddress == \"\") {echo \"Enter
> Cobuyer\'s [Home Payment Address]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jpaymentcity == \"\") {echo \"Enter
> Cobuyer\'s [Home Payment City]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jpaymentstate == \"\") {echo \"Enter
> Cobuyer\'s [Home Payment State]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jpaymentzipcode == \"\") {echo \"Enter
> Cobuyer\'s [Home Payment Zip Code]\"; return false;}
>
> }
>
> elseif ($Jfirstname != \"\" && $Jincome == \"\") {echo \"Enter Cobuyer\'s
> [Income]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jtypeofincome == \"\" && $Jotherincome >
0)
> {echo \"Enter Cobuyer\'s [Type of Income]\"; return false;}
>
> elseif ($Jfirstname != \"\" && $Jbankname == \"\") {echo \"Enter
Cobuyer\'s
> [Bank Name]\"; return false;} */
>
> else
>
> return $returnvalue = \"Pass\";
>
> --clip--
>
>
>
> "Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
> news:C8F323573C030A448F3E5A2B6FE2070B0101F896
nemesis...
> [snip]
> Noticed something interesting. I was helping to debug someone's
> programming problem and found that if there is to many 'else if' in the
> if
> and else statement then it doesn't work. Have anyone encoutered this
> problem and know of a workaround to it?
> [/snip]
>
> I'd have to see the code
>
> Jay
>
>
attached mail follows:
At 22:09 26.06.2003, Scott Fletcher said:
--------------------[snip]--------------------
>I am seeing the problem now. It seem that it had to do with the 'OR'
>statement inside the elseif statement... I'm going to try a workaround to
>it... As for you mentioning about the code... It's too bad this message
>window doesn't properly display the tabs....
--------------------[snip]--------------------
I have a little piece of code for you that may help cleaning up your
if/elseif sequence. Not tested && may contain typos && use on your own
risk. Hope the list doesn't clutter it too much...
This multi-dimensional array should make it quite easy to manage such
situations. The main array consists of a series of sub-arrays ("structures"
containing these elements:
- 'expr' - if this evaluates to TRUE, the following checks are performed
- 'check' - an array of fieldname => error message
- 'pattern' - a pattern for sprintf to format the message
"fieldname" is assumed to be a $_REQUEST element that is checked for
emptiness. If empty, the message is issued (just as in your code) and the
function returns false. If no error occurs throughout the tests, the
function returns "Pass" (I'd prefer "true").
$test_map = array(
array('expr' => 'true',
'pattern' => 'Enter [%s]',
'check' => array('firstname' => 'First Name',
'lastname' => 'Last Name',
'address' => 'Address',
'city' => 'City',
'state' => 'State',
'zipcode' => 'Zip Code',
'homephoneno' => 'Home Phone #',
'dob' => 'Date of Birth',
'ssn' => 'Social Security No',
'dln' => 'Driver\'s License No',
'occupation' => 'Occupation',
'months' => 'Residence Months',
),
),
array('expr' => 'in_array(\$_REQUEST[\'rentown\'],' .
' array(\'Renting\', \'Lease\',' .
' \'Buying House W/Mortgage\')',
'pattern' => 'Enter [%s]',
'check' => array('towhompaid' => 'To Whom Paid',
'paymentaddress' => 'Home Payment Address',
'paymentcity' => 'Home Payment City',
'paymentstate' => 'Home Payment State',
'paymentzipcode' => 'Home Payment Zipcode',
),
),
array('expr' => 'true',
'pattern' => 'Enter [%s]',
'check' => array('income' => 'Income',
),
),
array('expr' => '\$_REQUEST[\'otherincome\'] > 0',
'pattern' => 'Enter [%s]',
'check' => array('typeofincome' => 'Type of Income',
),
),
array('expr' => 'true',
'pattern' => 'Enter [%s]',
'check' => array('bankname' => 'Bank Name',
),
),
array('expr' => '!empty(\$_REQUEST[\'Jfirstname\'])',
'pattern' => 'Enter Cobuyer\'s [%s]',
'check' => array('Jlastname' => 'Last Name',
'Jaddress' => 'Address',
'Jcity' => 'City',
'Jstate' => 'State',
'Jzipcode' => 'Zip Code',
'Jhomephoneno' => 'Home Phone #',
'Jdob' => 'Date of Birth',
'Jssn' => 'Social Security No',
'Jdln' => 'Driver\'s License No',
'Joccupation' => 'Occupation',
'Jmonths' => 'Residence Months',
),
),
array('expr' => '!empty(\$_REQUEST[\'Jfirstname\'])' .
' && in_array(\$_REQUEST[\'Jtowhompaid\'],' .
' array(\'Renting\', \'Lease\', \'Buying House
W/Mortgage\'))',
'pattern' => 'Enter Cobuyer\'s [%s]',
'check' => array('Jtowhompaid' => 'To Whom Paid',
'Jpaymentaddress' => 'Home Payment Address',
'Jpaymentcity' => 'Home Payment City',
'Jpaymentstate' => 'Home Payment State',
'Jpaymentzipcode' => 'Home Payment Zip Code',
),
),
array('expr' => '!empty(\$_REQUEST[\'Jfirstname\'])',
'pattern' => 'Enter Cobuyer\'s [%s]',
'check' => array('Jincome' => 'Income',
'Jtypeofincome' => 'Type of Income',
'Jbankname' => 'Bank Name',
),
),
);
function run_test(&$map)
{
foreach ($map as $check) {
if (eval("return ({$check['expr']});")) {
foreach ($check['check'] as $field => $msg) {
if (empty($_REQUEST[$field])) {
echo sprintf($check['pattern'], $msg);
return false;
}
}
}
}
return 'Pass';
}
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
hi, perhaps someone can help me ...
i store jpgs in a database, then i read them out
and write them to a tempfile, the sizeinformation says,
the binary blob = 65.535 bytes, but the jpg file has then
768.000 bytes, horrable do dl ...
i expect that i read 65 kb and write 65 kb, thats all ...
................
$TEMPFILE = tempnam("./","TMP");
$TEMPFILE .= ".jpg";
$FILEID = fopen($TEMPFILE,"wb");
$BLOBID = ibase_blob_open($R->GRUND_FOTO);
while ($PIC = ibase_blob_get($BLOBID,10240))
{
fputs($FILEID,$PIC);
}
fclose($FILEID);
ibase_blob_close($BLOBID);
...................
best regards
-Gerhard
B
attached mail follows:
hi, perhaps someone can help me ...
i store jpgs in a database, then i read them out
and write them to a tempfile, the sizeinformation says,
the binary blob = 65.535 bytes, but the jpg file has then
768.000 bytes, horrable do dl ...
................
$TEMPFILE = tempnam("./","TMP");
$TEMPFILE .= ".jpg";
$FILEID = fopen($TEMPFILE,"wb");
$BLOBID = ibase_blob_open($R->GRUND_FOTO);
while ($PIC = ibase_blob_get($BLOBID,10240))
{
fputs($FILEID,$PIC);
}
fclose($FILEID);
ibase_blob_close($BLOBID);
...................
best regards
-Gerhard
attached mail follows:
Hi,
Just a suggestion. It might be better and simpler
to store the imges as files on disk and not as BLOBs
and store in the DB only the reference to their path.
I think this performs better.
Cheers,
Catalin
"Gerhard Knapp" <prometheus
aon.at> wrote in message
news:20030626195829.82353.qmail
pb1.pair.com...
> hi, perhaps someone can help me ...
>
> i store jpgs in a database, then i read them out
> and write them to a tempfile, the sizeinformation says,
> the binary blob = 65.535 bytes, but the jpg file has then
> 768.000 bytes, horrable do dl ...
>
> ................
> $TEMPFILE = tempnam("./","TMP");
> $TEMPFILE .= ".jpg";
> $FILEID = fopen($TEMPFILE,"wb");
> $BLOBID = ibase_blob_open($R->GRUND_FOTO);
> while ($PIC = ibase_blob_get($BLOBID,10240))
> {
> fputs($FILEID,$PIC);
> }
> fclose($FILEID);
> ibase_blob_close($BLOBID);
> ...................
> best regards
> -Gerhard
>
>
attached mail follows:
thats right, catalin, but ....
is it not possible do get a binary blob and write it to file, as it is?
... i cannot believe this ..., with any program language i can do so ...
...it have to be possible to write a blob-buffer byte by byte to a file,
damn ...
best regards
-Gerhard
"Catalin Trifu" <catalin
isp-software.de> schrieb im Newsbeitrag
news:20030626232052.58188.qmail
pb1.pair.com...
> Hi,
>
> Just a suggestion. It might be better and simpler
> to store the imges as files on disk and not as BLOBs
> and store in the DB only the reference to their path.
> I think this performs better.
>
> Cheers,
> Catalin
>
> "Gerhard Knapp" <prometheus
aon.at> wrote in message
> news:20030626195829.82353.qmail
pb1.pair.com...
> > hi, perhaps someone can help me ...
> >
> > i store jpgs in a database, then i read them out
> > and write them to a tempfile, the sizeinformation says,
> > the binary blob = 65.535 bytes, but the jpg file has then
> > 768.000 bytes, horrable do dl ...
> >
> > ................
> > $TEMPFILE = tempnam("./","TMP");
> > $TEMPFILE .= ".jpg";
> > $FILEID = fopen($TEMPFILE,"wb");
> > $BLOBID = ibase_blob_open($R->GRUND_FOTO);
> > while ($PIC = ibase_blob_get($BLOBID,10240))
> > {
> > fputs($FILEID,$PIC);
> > }
> > fclose($FILEID);
> > ibase_blob_close($BLOBID);
> > ...................
> > best regards
> > -Gerhard
> >
> >
>
>
attached mail follows:
Hmph, just not quite doing the trick... If you'd be so kind here is the
complete source to give you a little bigger picture. As you can probably
see the point of the script is to generate a bar chart of the array.
Thanks so much for the help, let me know what you think!
-John
<?php
$height = "1";
$width_bar = "25";
$width_spacer = "15";
$color_first = "blue";
$color_second = "red";
$color_third = "green";
$color_fourth = "purple";
$color_fifth = "yellow";
$example_data = array(
array("Mar-99",100,2000,5945.33,1234,10),
array("Feb-99",908,3454,47648.90,4321,50),
array("Jan-99",542,8000,13365.52,6012,60)
);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100" border="0" cellspacing="0" cellpadding="0">
<?php
$high = "47648.90";
if(!isset($num))
{
$num = 1;
}
while($num <= 100 && $num >= 1)
{
?>
<tr>
<?php
foreach ($example_data as $key=>$value)
{
$a_color = "0";
$b_color = "0";
$c_color = "0";
$d_color = "0";
$e_color = "0";
list($month, $a, $b, $c, $d, $e) = $value;
$a_percent = ($a / $high) * 100;
if($a_percent > $num) { $a_color = "1"; }
$b_percent = ($b / $high) * 100;
if($b_percent > $num) { $b_color = "1"; }
$c_percent = ($c / $high) * 100;
if($c_percent > $num) { $c_color = "1"; }
$d_percent = ($d / $high) * 100;
if($d_percent > $num) { $d_color = "1"; }
$e_percent = ($e / $high) * 100;
if($e_percent > $num) { $e_color = "1"; }
?>
<td width="<?php print($width_bar); ?>" height="<?php
print($height);
?>" <?php if($a_color = "1") { ?>bgcolor="<?php print($color_first);
?>"<?php } ?>> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_bar); ?>" height="<?php
print($height);
?>" <?php if($b_color = "1") { ?>bgcolor="<?php print($color_second);
?>"<?php } ?>> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_bar); ?>" height="<?php
print($height);
?>" <?php if($c_color = "1") { ?>bgcolor="<?php print($color_third);
?>"<?php } ?>> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_bar); ?>" height="<?php
print($height);
?>" <?php if($d_color = "1") { ?>bgcolor="<?php print($color_fourth);
?>"<?php } ?>> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_bar); ?>" height="<?php
print($height);
?>" <?php if($e_color = "1") { ?>bgcolor="<?php print($color_fifth);
?>"<?php } ?>> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<td width="<?php print($width_spacer); ?>" height="<?php
print($height);
?>"> </td>
<?php
}
?>
</tr>
<?php
$num = $num + 1;
}
?>
</table>
<?php if($e_percent > 0) { print("1"); } print($e_percent);?>
</body>
</html>
attached mail follows:
How would i find the value of the largest number in this array?
$example_data = array(
array("Mar-99",100,2000,5945.33,1234,10),
array("Feb-99",908,3454,4764.90,4321,50),
array("Jan-99",542,8000,13365.52,6012,60)
);
attached mail follows:
John Wulff wrote:
>How would i find the value of the largest number in this array?
>
>$example_data = array(
>array("Mar-99",100,2000,5945.33,1234,10),
>array("Feb-99",908,3454,4764.90,4321,50),
>array("Jan-99",542,8000,13365.52,6012,60)
>);
>
www.php.net/max
--
The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
attached mail follows:
>How would i find the value of the largest number in this array?
>
>$example_data = array(
>array("Mar-99",100,2000,5945.33,1234,10),
>array("Feb-99",908,3454,4764.90,4321,50),
>array("Jan-99",542,8000,13365.52,6012,60)
>);
end(array_reduce($example_data,
create_function('$a, $b',
'return array(max(array_reduce($a, "max"),
array_reduce($b, "max")));')));
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html
attached mail follows:
Hi all
Has anyone been able to call php from a servlet (JAVA) using CGI
interface? I am trying to do that here, and everything seems to work without
problems, except that no data returns from the execution of my scripts. Any
idea what could be happening? Is there information on how to configure the
CGI variables in order to be able to call PHP? Thanx in advance...
Rodrigo
attached mail follows:
Hi,
I didn't quite understood what you mean by CGI in this case,
but if you reffer to calling a script which resides on a server via HTTP
protocol, i suggest you take a look at the java.net.* package, You can
use the java.net.URLConnection to connect to the PHP script and act
as a client (like a browser) for it from your servlet.
You should het the response from the script back through the
getInputStream()
ar any other method that suits you.
Also take a look at java.net.HttpURLConnection which has more
specific methods for dealing with HTTP.
Once again, I may have misunderstood you, but I hope this is
helpfull anyhow.
Cheers,
Catalin
"Rodrigo Reyes" <rodrigo
instaservi.com> wrote in message
news:20030626223940.20059.qmail
pb1.pair.com...
> Hi all
> Has anyone been able to call php from a servlet (JAVA) using CGI
> interface? I am trying to do that here, and everything seems to work
without
> problems, except that no data returns from the execution of my scripts.
Any
> idea what could be happening? Is there information on how to configure the
> CGI variables in order to be able to call PHP? Thanx in advance...
>
> Rodrigo
>
>
attached mail follows:
PHP4: 4.3.2
Likewise, my intention is to restrict the user within
'/home/ahank/public_html' when using fopen(), but allow the user to use
include() on files in '/usr/local/share/wl'. Here is my VirtualHost
config:
php_admin_flag register_globals Off
php_admin_flag safe_mode On
php_admin_flag safe_mode_gid On
php_admin_value include_path /usr/local/share/wl
php_admin_value safe_mode_include_dir /usr/local/share/wl
php_admin_value open_basedir /home/ahank/public_html
However, I get this error when loading a page which includes files in
this shared directory:
Warning: main(): open_basedir restriction in effect.
File(/usr/local/share/wl/hahaha.php) is not
within the allowed path(s): (/home/ahank/public_html) in
/home/ahank/public_html/test.php on line 3
Warning: main(hahaha.php): failed to open stream: Operation not
permitted in /home/ahank/public_html/test.php on line 3
Warning: main(): Failed opening 'hahaha.php' for
inclusion (include_path='/usr/local/share/wl') in
/home/ahank/public_html/test.php on line 3
It would seem that 'safe_mode_include_dir' has nothing to do with
'open_basedir'. Is there an equivalent to 'open_basedir_include_dir'
which will allow one to only interpret files by way of
include/require?
- hank
attached mail follows:
I am in New Mexico and my php system is telling via date() that my timezone is BST (British standard time) and not MST (Mountain Standard Time). Any clue as to why it's doing this??
Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net
attached mail follows:
"Dennis Browne" <dennis_e_browne
hotmail.com> wrote:
> You are correct ... I did not save the files as utf-8. After doing so (to both page.php and lng_page_ja.php). The problem is there is still odd characters on line 1 of the web page after rendering. I believe it is because of the signature on the utf8 files.
>
> Have you had this problem before?
No, not really.
Btw, what editor are you using? And which browser are you testing the page with? Have you tried echo()ing Japanese characters from the same file, without include()ing?
You might want to check this section of the manual as well:
http://www.php.net/manual/en/ref.mbstring.php
- E -
PS
Pls. reply to the list. Somebody else might just have the answer to your problem :) Besides, if you're able to solve it, your post will be archived and somebody else might just benefit from it...
...[snip]...
__________________________________________________
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]