php-general Digest 4 Apr 2005 10:25:49 - Issue 3377
Topics (messages 212140 through 212157):
What's the going rate for making websites ?
212140 by: -{ Rene Brehmer }-
212142 by: Robby Russell
212144 by: Leif Gregory
212149 by: Miles Thompson
Re: HUMAN CHECK
I have problem with creating word file in PHP script. I create table in
word document but sometimes php send me error message : *Warning*:
(null)(): Invoke() failed: Exception occurred. *Source*: Microsoft Word
*Description*: There is insufficient memory and then php script
generate only word
Hi all i have a question. There si an how-to that explain step by step
all necessary to create
a myself compiled php distribution ?
I have read about: http://docs.php.net/en/install.windows.building.html
Can you send a new link about this issue.
Thanks so much again and good work to all.
--
PHP
-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]
Sent: Friday, April 01, 2005 7:43 PM
You could modify your app so that upon the first request (randomly
picked)
the client will then continue to use that server until they quit their
browser.
That would break the
Kioto wrote:
Hi all i have a question. There si an how-to that explain step by step
all necessary to create a myself compiled php distribution ?
yes, there is.
I have read about: http://docs.php.net/en/install.windows.building.html
which is exactly that resource.
Can you send a new link about
-Original Message-
From: HarryG [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 02, 2005 6:29 AM
I am connecting to two database in my index.php.
If the 2 databases are on the same mysql server and the MySQL user has access
to both databases, You can easily use join:
Select name
Dan Rossi wrote:
I was wonderiing how I would go about something like this
$class = 'classname';
return $class::staticMethod(); , not happy isnt working. Any ideas
lemme know.
class MyClass {
function static_method() {
echo 'I'm in static_method !';
}
}
You can call the function
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 03, 2005 6:03 PM
To: php-general@lists.php.net
Subject: [PHP] Re: eregi problem
i'm not familliar with regular expresions but i think that ^a-z - means
that variable must start witx a-z
Hello,
How can I exchange data among processes (i.e. two or more users
accessing a php webpage)? The two usual ways would be using either a
database or file, so I was wondering if there is another, more fast
(with reduced latency) for different pages being processed to exchange
information.
Matheus,
As a start I would check out using sockets:
http://uk.php.net/sockets
rgds
Chris Ramsay
Test
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok, apparently I wasn't clear enough with my explanation due to the
responses I have received.
I have a webserver (not on the same computer as the users) that is
hosting an Intranet app. I want to obtain the username of the current
person logged into the workstation that is connecting to the
Kim Madsen wrote:
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 03, 2005 6:03 PM
To: php-general@lists.php.net
Subject: [PHP] Re: eregi problem
i'm not familliar with regular expresions but i think that ^a-z - means
that variable must start witx
Good test!
On 4/4/2005 2:46:14 PM, [EMAIL PROTECTED] wrote:
Test
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
--
No virus found in this outgoing
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 3:08 PM
Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in
the string it´s NOT matched.
actually, that's not entirely correct. The regexp basically means that
if
At the most basic level a class allows you to group your functions
together. On small projects, grouping of functions may not seem to buy
you anything. But the bigger the project gets, the more you would like
to be able to keep your functions separated into groups.
One simple advantage of
Kim Madsen wrote:
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Monday, April 04, 2005 3:08 PM
Putting the ^ _inside_ [] means NOT, so if any of the chars a-z0-9 is in
the string it´s NOT matched.
actually, that's not entirely correct. The regexp basically means
Hello,
I might have asked this already but I am still ignorent ;-)
How to check if a same name file already exists in a upload directory when
uploading new file?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley wrote:
Ok, apparently I wasn't clear enough with my explanation due to the
responses I have received.
I have a webserver (not on the same computer as the users) that is
hosting an Intranet app. I want to obtain the username of the current
person logged into the workstation that is
Just so that I don't start working in the wrong direction, do you mean
that I can get the same information from the activeX control directly
from PHP rather than having to do it with vbscript?
I am not much of a coder so any help porting the vbscript to PHP would
be great. The code that I am
That would be between $10 and $150 per hour or more. One can easily
find and hire a college kid to slap together some open source programs,
maybe throw a bit of Flash and fancy graphics on a web page and the
project is done for $10 per hour. Of course, there is no cohesiveness
or consistency
I know I sure appreciate reading any discussions on OOP issues, as they
are something I just cannot seem to grasp.
Thanks!
Martin Austin
Brent Baisley [EMAIL PROTECTED]
04/04/2005 08:44 AM
To: DuSTiN KRySaK [EMAIL PROTECTED]
cc: PHP php-general@lists.php.net
Search the list archives for (noob) file
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
Ok, I did a quick scan of the COM section on PHP's site (linked below)
and found this requirement:
COM functions are only available for the Windows version of PHP.
In my first post, I mentioned that I am running my webserver on a
Netware 6.5 server.
In light of this I am guessing that this
I might have asked this already but I am still ignorent ;-)
How to check if a same name file already exists in a upload directory
when
uploading new file?
Use the appropriately named file_exists() function.
L.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello Chris,
Matheus,
As a start I would check out using sockets:
http://uk.php.net/sockets
Did some experiments, and it seems this would work great. Thanks a lot! :)
The only problem is that not all (if not almost all) hosting services
disable sockets...
Thanks.
--
PHP General Mailing List
Ashley wrote:
Just so that I don't start working in the wrong direction, do you mean
that I can get the same information from the activeX control directly
from PHP rather than having to do it with vbscript?
Yes, that is exactly what I mean.
I am not much of a coder so any help porting the
How to check if a same name file already exists in a upload
directory when uploading new file?
Use the file_exists() function (oddly named, I know).
http://us4.php.net/manual/en/function.file-exists.php
-M
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Mon, 2005-04-04 at 17:07 +0300, William Stokes wrote:
Hello,
I might have asked this already but I am still ignorent ;-)
How to check if a same name file already exists in a upload directory when
uploading new file?
Thanks
-Will
http://www.php.net/file_exists
-Robby
--
One way you can do it is to put an invisible iframe on the same page as
the object which provides you the user information. When you get, via
vbscript or javascript, the userid, then you set the src property of the
iframe to that of a page where you will process that info, appended with
the
Somewhere around here I asked about human-readable serialization and
there was no solution that fitted my needs. So I wrote my own
serialize/deserialize pair. The decode function is different from the
one I posted here before. This function, in my opinion, is written very
efficiently, but it's
Until some time I could make a new empty line in mysql with this query:
INSERT INTO `.$_SESSION['type'].`() VALUES ()
where $_SESSION['type'] was the table I wanted to use but now I get an
error and since I use DB I just get this error
INSERT INTO `authors`() VALUES ()
*Warning*: Cannot modify
Please replace die($res-getMessage()) with
user_error($res-getMessage(), E_USER_ERROR) and then post the output.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
class MyClass {
function static_method() {
echo 'I'm in static_method !';
}
}
You can call the function statically using the double colon ( :: )
operator :
Ahem. Double colon does now works with dynamic names. If I'm not
mistaken, call_user_func(array('class', 'function')) is the
GamblerZG wrote:
Please replace die($res-getMessage()) with
user_error($res-getMessage(), E_USER_ERROR) and then post the output.
If I uncomment this it seems to work. Not error or anything in the code.
Truely don't know what the error is.
--
PHP General Mailing List (http://www.php.net/)
To
I ment: Double colon does no_t_ works with dynamic names.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From what I have read this is impossible to accomplish from
the server
without prompting for a username/password. I found an
activeX control
(called NWSess from Novell) that will provide the currently
logged in user.
You have not mentioned what network you are running. IF it is a
You might have changed inadvertently one of the include files. It might
have trailing blanks after the final ?, which obviously you don't see,
being blank, but they are echoed to the browser, and the header('location
... then gives an error. Might have nothing to do with the SQl instructions
Perhaps a memory based database?
http://dev.mysql.com/doc/mysql/en/memory-storage-engine.html
Might not be supported by all ISPs, though.
Matheus Degiovani [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hello Chris,
Matheus,
As a start I would check out using sockets:
GamblerZG wrote:
Please replace die($res-getMessage()) with
user_error($res-getMessage(), E_USER_ERROR) and then post the output.
on one table it still does not work:
this is the error:
DB Error: constraint violation
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi,
I've downloaded the 5.0.4 targz and installed on a new server using
the same ./configure settings I use in a nother server that runs php
5.0.3.
I did a make/make install and everything runs fine excepth the fact
that I can no longer pear install because there is no pear in
That could be caused by http://bugs.php.net/bug.php?id=32525 .
Though I don't know much about PEAR.
mbneto wrote:
Hi,
I've downloaded the 5.0.4 targz and installed on a new server using
the same ./configure settings I use in a nother server that runs php
5.0.3.
I did a make/make install and
Hi Neo
Just some observations and hints.
I see you use the contents of a user variable ($_POST,$_GET,$_REQUEST,
$_SESSION) without check. Possibly you checked them on another page but you
shouldn't rely on that. You should take NOTHING for granted. You should
escape the input by using a
On Monday 04 April 2005 18:45, Andy Pieters wrote:
After the ? must be NO character, not even a CR or LF
Best way to check this is to put your cursor right next to the and press
the left key. If you r cursor moves then press left followed by del. Keep
pressing the del key until all the
I'm writing a web app that passes values in the URL separated by a / .
I'm passing these values by supplying links to them.
The writing and reading of these values is fine, I'm just stuck at the
differing ways IE handles urlencoding the data..
IE will not work unless I double urlencode it
Hello,
I am in the process of integrating my site with UPS' Online Tools.
Specifically Address Validation, and Rates and Service.
The problem I'm seeing is that it's quite slow. I'm doing all my tests
on the test server and thought that querying the test server would be
the reason for the
You could base64_encode it... you'll run into url length issues at some
point, but I believe that's around 4kbytes or so...
I've done this before... something like:
base64_encode(serialize($my_object));
then undo it on the other end.
On Mon, 4 Apr 2005, Chris wrote:
I'm writing a web app that
Running PHP 4.3.9, apache, mysql, qmail
I know it's possible to pipe an incoming mail message to a script in
qmial by creating a .qmail file for the user like:
|script
What I'd like to do is pipe incoming mail for a specific user into a php
script that parses it out (using mailparse I imagine)
what is the structure of your table?
JoShQuNe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi, i have a strange problem. In my site i have to counters for file
downloads. One is general, other is weekly. On the main page i
display a list sorted according to weekly hits. The
I am using JPGraph for a project that I am working on right now and I have
hit a small snag -
My client wants to have the user be able to select from a list of about 20
30 standard fonts. JPGraph only has about six built into it and the
support in the docs is not very helpful since it wants you
Hello Satyam,
Perhaps a memory based database?
http://dev.mysql.com/doc/mysql/en/memory-storage-engine.html
Might not be supported by all ISPs, though.
Nice tip! Thanks! :)
Cya.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$buffer = file_get_contents(php://stdin);
will read the contents of standard input into the string $buffer.
-philip
On Mon, 4 Apr 2005, Jeff McKeon wrote:
Running PHP 4.3.9, apache, mysql, qmail
I know it's possible to pipe an incoming mail message to a script in
qmial by creating a .qmail file
Get it in writing...
--
Find out what they want and have them sign the design targets.
Price depends on the complexity
---
I break a job done by functional areas and how much time I expect to spend
developing each section (i.e. -
Ave,
I¹ve written a code that is able to extract the Column names and Records
from a simple dbf (foxpro) file and create an INSERT INTO sql statement
which can be used to insert all those records with their corresponding field
names in an existing mySQL table. (A CREATE TABLE code I wrote is
I wanted to setup a good 'contact me' page on my website. I do not want
to reveal my e-mail address, so I was going to use a form.
The PHP script with the actual mail() function would define the To and
Subject parameters, so these could not be faked.
I also plan to use a captcha.
The only
Hey Josh... make sure your mysql table column is a integer... not a
varchar.. i've done that by mistake a few times!
On Apr 4, 2005 3:22 PM, chris [EMAIL PROTECTED] wrote:
what is the structure of your table?
JoShQuNe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi, i have a
Eric Gorr mailto:[EMAIL PROTECTED]
on Monday, April 04, 2005 2:01 PM said:
The only concern I had was how to process the body text. Any
recommendations?
One useful function would appear to be strip_tags, so no one could
embed annoying or destructive HTML, etc. which I may accidentally
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). br; //2005/04/04/18
echo date('Y/m/d/H', strtotime(-1 day)). br;
//2005/04/03/18
echo date('Y/m/d/H', strtotime(last Sunday)). br;
//2005/04/02/23
Chris W. Parker wrote:
www.php.net/addslashes
I am uncertain what dangerous/annoying things might happen if I did not
call this function. Can you come up with any?
Remember, the text being processed goes straight from $_POST[ 'body' ]
through strip_tags (+ more?) into mail().
It would seem
Eric Gorr wrote:
Any other suggestions?
Well see this example :
function clean_body($body_text) {
if(ini_get('magic_quotes_gpc')) $body_text =
stripslashes($body_text); // If magic_quotes are on, strip the
extra-added slashes
return htmlentities($body_text); // Return the value
}
This is
Eric Gorr mailto:[EMAIL PROTECTED]
on Monday, April 04, 2005 3:13 PM said:
Remember, the text being processed goes straight from $_POST[ 'body' ]
through strip_tags (+ more?) into mail().
Remember? You didn't mention this is your original email so how could I
be told to recall this
I'm having trouble figuring out why subtraction of two floats are giving
me a very small number. I'm thinking it has something to do with the
internals of type casting, but i'm not sure. If anyone has seen this or
can give me some suggestions, please.
I have 2 variables that go through a while
Chris W. Parker wrote:
It seems as if strip_tags strip out everything that htmlentities would
change and would therefore be unnecessary.
strip_tags() and htmlentities() both perform seperate functions (hence
they have different names). htmlentities() encodes special characters,
strip_tags()
Josip Dzolonga wrote:
Eric Gorr wrote:
Any other suggestions?
Well see this example :
function clean_body($body_text) {
if(ini_get('magic_quotes_gpc')) $body_text =
stripslashes($body_text); // If magic_quotes are on, strip the
extra-added slashes
return htmlentities($body_text); //
Hi all,
I am looking for a php tool that will provide email tracking and a web
interface to an email box. Pretty much, we get lots of emails directed to
an administrative email account (most of the valid emails) that need
response. To the point that one person is getting over whelmed.
It
Eric Gorr wrote:
Shouldn't strip_tags be enough? What dangerous/annoying things might
happen if I replaced htmlentities with strip_tags in the above
function and then passed the body text to the mail() function?
Nothing, but with htmlentities() you can be sure if the user has tried
to inject
Eric Gorr mailto:[EMAIL PROTECTED]
on Monday, April 04, 2005 3:48 PM said:
htmlentities would potentially make the body text messier then seems
necessary.
Then just use strip_tags() and be done with it.
It's not like nuclear missiles are going to be launched via your email
form if you use
Chris W. Parker wrote:
Or in a less extreme case, your
computer get hijacked and used to send spam because you used
htmlentities() instead of strip_tags().
Well, this is why I asked the question to begin with. I am concerned (as
everyone _should_ be) about such things and desire to do my best to
Eric,
It sounds like you just need to do some reading on best practices of
security when writing php code. It's pretty vast what one can do when
trying to hack a php application and depending on what php server
settings are set, you may need to do certain things. I'd suggesting
reading / google
Ok i've narrowed it down a little bit but still can't figure it out..
Here's the code and what I get for the output. Does anyone know what's
going on? Can someone else run it on their computer and see if they get
the same results?
?php
$a = 17.00 * 1;
$a+= 1.10 * 1;
$a+= 0.32 * 1;
$a+= 0.07 *
Floats are NEVER going to be coming out even reliably.
You'll have to check if the difference is less than X for whatever number
X you like.
Or you can look at something like BC_MATH where precision can be carried
out as far as you like...
But what you are seeing is to be expected.
That's just
I think what you are looking for is a combination of programs. A
mailing list that customers can view answers of emails try mailman or
smartlist. Perhaps just a mailint list would give you want you want.
If you are looking for more of a trouble ticket program, or FAQ program
there are serveral
btw, thanks for your response.
I'm not sure as if I understand why. It's not like I'm using a very
precise number when dealing with the hundreths place.
Even without the multiplication the number gets messed up.
eg.
$a = 17.00;
$a+= 1.10;
$a+= 0.32;
$a+= 0.07;
print $a.br; // 18.49
Howdy,
I'd like to access some of the private members of my classes as
read-only properties without resorting to function calls to access
them. (e.g. $testClass-privateMember instead of
$testClass-privateMember(), etc)
Based on my research and testing, using the __get and __set overloading
Anthony Tippett wrote:
http://www.devshed.com/c/a/PHP/PHP-Security-Mistakes/
thank you for the suggestion.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi!
I am writing a simple shopping cart system which uses sessions and PHP.
I would like a normal link that says Add to cart which the user can
click and the item is added to the cart.
However, i do not want to use GET for this as it could introduce
unwanted features if the user bookmarks the
Anthony Tippett wrote:
http://www.devshed.com/c/a/PHP/PHP-Security-Mistakes/
Actually, I am familiar with everything this document mentions.
Unfortunately, this document does not discuss what one might need to be
concerned about when passing text to the body parameter of the mail()
function.
If
Hi people.
I submitted the issue below to the bug site, but the people there
suggested I present it here. I've tried some more, but until now, I
couldn't find any cause for the problem.
Any suggestion would be appreciated!
John
Description:
I have a very
Shi MuQi
LangFang ABC (China) v
Tel:(86)-316-68382!^ /(_)\
E-mail:[EMAIL PROTECTED] ^ ^
-
?php
/*
Stephen Johnson c | eh
The Lone Coder
http://www.thelonecoder.com
[EMAIL PROTECTED]
562.924.4454 (office)
562.924.4075 (fax)
continuing the struggle against bad code
*/
?
From: [EMAIL PROTECTED]
Date: Tue, 5 Apr 2005 09:40:55 +0800
To: php-general@lists.php.net
Subject:
Al wrote:
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). br;//2005/04/04/18
echo date('Y/m/d/H', strtotime(-1 day)). br;
//2005/04/03/18
echo date('Y/m/d/H', strtotime(last Sunday)). br;
//2005/04/02/23
Sunday shows as
Thanks to everyone that helped. After further googling, bug 9288 had a
good explanation of what was going on ( which is not a bug)
http://bugs.php.net/bug.php?id=9288edit=3
I'll just include the answer for anyone that comes upon this tread on a
search engine.
[15 Feb 2001 2:55pm CET] hholzgra
Hello,
on 04/04/2005 08:56 PM Daniel Baughman said the following:
I am looking for a php tool that will provide email tracking and a web
interface to an email box. Pretty much, we get lots of emails directed to
an administrative email account (most of the valid emails) that need
response. To the
Hello Kent,
Monday, April 4, 2005, 6:21:41 PM, you wrote:
K It would have been easy if i would have used a normal FORM and
K would have had a button called Add to cart. But i would like it
K to be in url-style or using some img .. which i understand that
K the BUTTON item does not support (or am
you can use POST with some javascript tricks.
lets assume that you are going to you an image file to submit, then just add
a function andd call that function to handle submitting data.
here is an example:
form name=TestForm action=test.php method=post
input type=hidden name=op value=5
IMG
lol, sorry for mess, I was in a bit hurry.
here is the right one:
form name=TestForm action=test.php method=post
input type=hidden name=op value=5
IMG src=a.gif onclick=SubmitMyForm();'
!--or a text mabe? --
span onclick='SubmitMyForm();'brSubmit/span
/form
then define the javascript
86 matches
Mail list logo