php-general Digest 5 Aug 2005 06:44:55 - Issue 3607
Topics (messages 220025 through 220045):
Re: How to determine if a script instance is already running?
220025 by: Matthew Weier O'Phinney
Re: Performace and segfault errors with Php5 + Apache 1.3.x + linux-2.6.x
220026 by:
I think this is the way I need to write my if statement.
if ( $min $user[ min ] == $min $user[ pin ] == $pin || $pin ==
'allow')
$min login name entered by the customer at the form.
$user[min] is the login name from my sql db that matches $min
$user[pin] is the password from mysql db that
[EMAIL PROTECTED] wrote:
I think this is the way I need to write my if statement.
if ( $min $user[ min ] == $min $user[ pin ] == $pin || $pin ==
'allow')
try a couple paretheses to make your intension explicit. your if statement might
work the way you want it but I have no idea - and
Matthew Weier O'Phinney wrote:
* Norbert Wenzel [EMAIL PROTECTED]:
Hi, I've done something like this:
class MyClass {
private $var;
function __construct($value) {
$this-var = $value;
}
public function printVar() {
echo($this-var);
}
}
$object = new MyClass('1');
I have a question I can't answer by myself. :)
Do I need to use --with-pic option when configuring php 4?
I'm going to build it as an Apache 1.3 DSO module and going to
run multiple instances of Apache (under different users). I
use Linux (kernel 2.4.30).
Generally, when one may need to use
Hi and thanx for taking the time to read . . .
The issue I'm experiencing appears to be that I cannot pass data (values)
between forms when
the enctype=multipart/form-data attribute is present in the form.
Commenting it out allows data
to pass but prevents uploading of files through the form.
As
On 8/5/05, Tom Chubb [EMAIL PROTECTED] wrote:
On 04/08/05, Dotan Cohen [EMAIL PROTECTED] wrote:
On 8/4/05, suma parakala [EMAIL PROTECTED] wrote:
Hi
Can anyone tell me how can I count how many times my website has been
viewed
using php
Thanks
Suma
Suma,
I am working on
HI
Please advise.
I'm using exponent cms and I creating a technical site,
I want to display code examples , how do I do this and with syntax highlighting,
--
Gregory Machin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.linuxpro.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info
How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
--
Diana Castillo
Destinia.com
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 Ext 216
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
Gregory Machin wrote:
HI
Please advise.
I'm using exponent cms and I creating a technical site,
this is not the 'exponent cms' (whatever that is) user group.
I want to display code examples , how do I do this and with syntax highlighting,
shouldn't we be writing the necessary code for
Diana Castillo wrote:
How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
get the data out of the DB first. stick it in $myString
$myString = wtf I fond a carriage return - horsedrawn even.\n;
if (preg_match(#[\n|\r|\r\n]$#, $myString))
Diana Castillo wrote:
How can I with php detect when there is a carriage return at the end of the
text field in a mysql table?
Something like this perhaps:
$res = mysql_query($query);
$row = mysql_fetch_object($row)
if (preg_match(/\r$/,$row-textfield) {
echo Got CR;
} else {
echo
For anyone who would like a clear answer to the question i politely
asked, here is a good artical ..
http://www.sitepoint.com/article/highlight-source-code-php
Gregory Machin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.linuxpro.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info
If there is a class with a function, that might throw exceptions and
does NOT catch them, may I write that like in Java?
class FooClass {
public function foo() throws Exception {
}
}
Or is there another possibility to tell a function throws an exception
and to force the
Norbert Wenzel wrote:
If there is a class with a function, that might throw exceptions and
does NOT catch them, may I write that like in Java?
class FooClass {
public function foo() throws Exception {
}
}
Or is there another possibility to tell a function throws an
Torgny Bjers wrote:
The Java way doesn't work here. The best approach would be to simply run
a try/catch/finally around the call to your function/method, and inside
the function itself you do the following:
if (...) { throw new Exception(My message.); } }
Hello Torgny,
Thanky you for your
Hi
I am new web application development. Can anyone tell me how can I trace how
many times mywebsite has been viewed by one particular login and password
using postgresql database and php
Thanks
Suma
_
Post FREE Classifieds.
Well, it took about 5 min - checking the PHP site for display and then
for source.
That lead to the display_source() function, an alias for highlight_file(),
which itself had a link for highlight_string(). These functions display PHP
source with syntax highlighting.
It is a fine manual;
At 08:41 AM 8/5/2005, suma parakala wrote:
Hi
I am new web application development. Can anyone tell me how can I trace
how many times mywebsite has been viewed by one particular login and
password using postgresql database and php
Thanks
Suma
Since you are presumably authenticating against
Dear Internals,
class FooBar { public function foo() throws Exception {} }
function fooFoo() throws Exception {}
this came up on php-generals and I wondered if anyone had time/cared
to comment if it (as it does to me) seems like a good idea and/or whether it is
technically feasable. My
On 8/5/05, Tom Chubb [EMAIL PROTECTED] wrote:
I have AWstats on one of my servers which comes with cPanel, but my
main site uses another system for which I can only see upto the end of
the previous day.
I send out a lot of emails to my subscriber database and sometimes I
charge people to use
Gregory Machin wrote:
For anyone who would like a clear answer to the question i politely
asked, here is a good artical ..
A husband will more than likely be pissed at me if I ask him to have his
wife sleep with me...no matter how polite I ask.
Politely asked or not, your question
Let the flaw wares begin ..
sorry guys who have limited bandwith and limited email boxes ..
Bla Bla BLA..
On 8/5/05, John Nichel [EMAIL PROTECTED] wrote:
Gregory Machin wrote:
For anyone who would like a clear answer to the question i politely
asked, here is a good artical ..
A husband
Hello to all,
may anybody give me a tip where to find a documentation for 4.0.6?
Perhaps I'm a little bit blind, but I don't find it.
Unfortunatedly I have to develop an application on this release.
Thanks for your help
Sabine
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
[snip]
Let the flaw wares begin ..
sorry guys who have limited bandwith and limited email boxes ..
Bla Bla BLA..
[/snip]
There will be no flame war over this. You got called out. You got owned.
I am supposing that you are familiar with /dev/null ? You found the
answer on your own didn't you?
On Fri, Aug 05, 2005 at 03:53:41PM +0200, Sabine wrote:
may anybody give me a tip where to find a documentation for 4.0.6?
Perhaps I'm a little bit blind, but I don't find it.
Unfortunatedly I have to develop an application on this release.
Does the documentation at php.net not suffice? It
Gregory Machin wrote:
Let the flaw wares begin ..
Flame war for what?
sorry guys who have limited bandwith and limited email boxes ..
Bla Bla BLA..
Now you're just breaking netiquette 'rules'.
You made a mistake, got called out for it. The only person who will
lose here is you. The
=
Please feel free to add more points and send to the list.
20050322jb - Note the new location of PHP Editors list.
=
1. If you have any queries/problems about PHP try
Hi,
How can i found out the average time users spent on a page. Anyone know a
tutorial?
Thanks in advance for your help !!!
Hi,
How can i found out the average time users spent on a page. Anyone know a
tutorial?
Thanks in advance for your help !!!
Hi,
How can i found out the average time users spent on a page. Anyone
know a tutorial?
Thanks in advance for your help !!!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
How can i found out the average time users spent on a page. Anyone
know a tutorial?
[/snip]
How much time spent creating a page?
How much time spent viewing a page?
How much time the page was left open on the desktop?
http://www.google.com/search?hl=enq=average+time+spent+on+web+page has
Jay Blanchard wrote:
[snip]
How can i found out the average time users spent on a page. Anyone
know a tutorial?
[/snip]
How much time spent creating a page?
How much time spent viewing a page?
How much time the page was left open on the desktop?
Hello,
I am getting this on the following code, and I am not sure what is
causing the error and need some pros to take a look at it for me.
the error is:
Parse error: parse error, unexpected '{' in
/hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form2.php on
line 161
here is the
Jay Blanchard wrote:
6. PHP is a server side scripting language. Whatever processing PHP does
takes place BEFORE the output reaches the client. Therefore, it is not
possible to access users' computer related information (OS, screen size
etc) using PHP. Nor can you modify any the user side
* Bruce Gilbert [EMAIL PROTECTED]:
Hello,
I am getting this on the following code, and I am not sure what is
causing the error and need some pros to take a look at it for me.
the error is:
Parse error: parse error, unexpected '{' in
Kristen G. Thorson wrote:
You said If the user makes changes, those changes get error checked but
do not become part of the sql query. Where in your code is it failing
to become part of the query? Put a check at each level and see where
*exactly* it fails to get deep enough to become one
Hi,
I need to check does URL use http or https?
Right now I use this code:
if(preg_match('/https:/', $_SERVER['SCRIPT_URI']) == false)
{
header('location: [URL]https://www.test.com/test.php[/URL]');
exit;
}
but I am sure there is much better solution.
:)
--
PHP General Mailing List
IIRC, if you're using Apache you can check
If (isset ($_SERVER['HTTPS']))
You can also check this thread:
http://beeblex.com/lists/index.php/php.general/190410?h=%24_SERVER%5B%27HTTP
S%27%5D
--
BeebleX - The PHP Search Engine
http://beeblex.com
On 8/5/05 2:05 PM, [EMAIL PROTECTED] [EMAIL
I recently upgraded my server. It is running Ubuntu Linux with PHP and
MySQL. My site allows people to post content to their own web oages
through a web interface. Many of my customers compose their content on a
word processer and then cust and paste it to the web interface for
insertion to the
This should be a fairly easy question for someone who already knows the
answer...
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the string.
Is this possible? If so, how?
p.s. While I would be interested
Hello Lance--
On 8/5/05 2:18 PM, Lance Earl [EMAIL PROTECTED] wrote:
I recently upgraded my server. It is running Ubuntu Linux with PHP and
MySQL. My site allows people to post content to their own web oages
through a web interface. Many of my customers compose their content on a
word
[snip]
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the
string.
Is this possible? If so, how?
p.s. While I would be interested in possible alternative solutions, I
would like to know how to accomplish
Jay Blanchard wrote:
[snip]
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the
string.
Is this possible? If so, how?
p.s. While I would be interested in possible alternative solutions, I
would like to
Jack Jackson wrote:
Kristen G. Thorson wrote:
You said If the user makes changes, those changes get error checked
but do not become part of the sql query. Where in your code is it
failing to become part of the query? Put a check at each level and
see where *exactly* it fails to get deep
[snip]
Jay Blanchard wrote:
If you place the string into a variable then you would be able to work
with it that way.
Using what functions?
Part of the point was not to need to keep track of the current location
in the string, etc...basically things that streams tend to handle well.
There
Jay Blanchard wrote:
[snip]
Jay Blanchard wrote:
If you place the string into a variable then you would be able to work
with it that way.
Using what functions?
Part of the point was not to need to keep track of the current location
in the string, etc...basically things that streams tend
[snip]
Again, I would like to treat the string as a stream.
One possible way to accomplish this would be to simply write the string
to a temporary file, open the file with fopen and then use fscanf,
fseek, etc. to process the text.
However, I am assuming there is an easier way (i.e. a method
Thanks Marco!
:)
I was looking for something like this on phpinfo() but didn't found?
-afan
Marco Tabini wrote:
IIRC, if you're using Apache you can check
If (isset ($_SERVER['HTTPS']))
You can also check this thread:
On 8/5/05 2:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Thanks Marco!
:)
I was looking for something like this on phpinfo() but didn't found?
That's because it shows up only if you are under HTTPS! :-)
Marco
-afan
Marco Tabini wrote:
IIRC, if you're using Apache you can
Jay Blanchard wrote:
What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
For example, the C++ STL contains istringstream, which allows one to
treat strings as streams.
(http://www.cplusplus.com/ref/iostream/istringstream/)
If you are truly wondering
[snip]
Jay Blanchard wrote:
What, exactly, do you want to accomplish?
I want to be able to treat a string as a stream.
[/snip]
I know C++ and I know what you are talking about here. As I said before,
you would have pretty high overhead to do this in PHP. However, if I
know what you want to do
Matthew Weier O'Phinney wrote:
* Bruce Gilbert [EMAIL PROTECTED]:
Hello,
I am getting this on the following code, and I am not sure what is
causing the error and need some pros to take a look at it for me.
the error is:
Parse error: parse error, unexpected '{' in
Lance Earl wrote:
I recently upgraded my server. It is running Ubuntu Linux with PHP and
MySQL. My site allows people to post content to their own web oages
through a web interface. Many of my customers compose their content on a
word processer and then cust and paste it to the web interface for
Jay Blanchard wrote:
However, if I
know what you want to do with the string more specifically (I asked for
examples, which you have not given) I can get you to the right PHP
functions.
I am familiar with all of the PHP string functions.
PHP does not have a class or function similar to
[snip]
Neither solution was particularly appealing which is why I asked the
question.
[/snip]
I see. Sorry I couldn't be more helpful. And I thought you wore looking
for a more precise function rather than the whole lot of things that can
be accomplished with isstringstream.
--
PHP General
Eric Gorr wrote:
Again, I would like to treat the string as a stream.
One possible way to accomplish this would be to simply write the
string to a temporary file, open the file with fopen and then use
fscanf, fseek, etc. to process the text.
However, I am assuming there is an easier way
Marco Tabini wrote:
On 8/5/05 2:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Thanks Marco!
:)
I was looking for something like this on phpinfo() but didn't found?
That's because it shows up only if you are under HTTPS! :-)
AFAICT tell you should check whether the value is actually
Jay Blanchard wrote:
[snip]
Neither solution was particularly appealing which is why I asked the
question.
[/snip]
I see. Sorry I couldn't be more helpful. And I thought you wore looking
for a more precise function rather than the whole lot of things that can
be accomplished with
[snip]
Looks like it wouldn't be terribly difficult to get something like this
up and running.
I was just taking a look at:
http://us3.php.net/manual/en/function.stream-wrapper-register.php
I'm kinda surprised no one has written a wrapper for strings yet...
[/snip]
Perhaps because there is
On 8/5/05 3:24 PM, Jochem Maas [EMAIL PROTECTED] wrote:
SIDENOTE REGARDING BEEBLEX.COM:
I just added a bookmark in firefox to beeblex.com as follows
http://beeblex.com/search.php?d=ALLDBs=%s
and I gave it a keyword of 'beeb'
now I can go to firefox and type 'beeb HTTPS' to get an direct
kalinga wrote:
On 8/4/05, Kristen G. Thorson [EMAIL PROTECTED] wrote:
kalinga wrote:
if you are quering a external host, the bad network conditions may
cause delay in results.
if your server is connected to a heavily loaded hub/ cheap switch, or
the target hosts DNS servers are
Hi All,
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script calls
my php script on the server and sends the important data
Eric Gorr wrote:
This should be a fairly easy question for someone who already knows the
answer...
What I would like to be able to do is take a string and place it into a
'resource' so I can use functons like fscanf, fseek to process the string.
Is this possible? If so, how?
[snip]
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script calls
my php script on the server and sends the important data to
Paul Nowosielski wrote:
Hi All,
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script calls
my php script on the server and
Marco Tabini wrote:
On 8/5/05 3:24 PM, Jochem Maas [EMAIL PROTECTED] wrote:
SIDENOTE REGARDING BEEBLEX.COM:
I just added a bookmark in firefox to beeblex.com as follows
http://beeblex.com/search.php?d=ALLDBs=%s
and I gave it a keyword of 'beeb'
now I can go to firefox and type 'beeb HTTPS'
Jochem Maas wrote:
http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those built in
string functions :-)
And
But WHY WHY WHY would one want to treat a string as a stream, when PHP has
such good string handling functions?
THATS not been explained.
(Unless, knowing C and its limited string handling capabilities, one is
looking for a familiar hammer.)
It's Friday - time to go socialize - Miles
PS
Eric Gorr wrote:
Jochem Maas wrote:
http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those built in
string
* Jochem Maas [EMAIL PROTECTED] :
Matthew Weier O'Phinney wrote:
* Bruce Gilbert [EMAIL PROTECTED] :
I am getting this on the following code, and I am not sure what is
causing the error and need some pros to take a look at it for me.
the error is:
Parse error: parse error,
Jochem Maas wrote:
Eric Gorr wrote:
Jochem Maas wrote:
http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason php has all those
[snip]
Well, as I mentioned before, you are welcome to look into the
surrounding useful examples for istringstream, etc. I can't think of a
single reason why similar reasons why istringstream, etc. is useful
would not apply to a php stream_wrapper for strings.
As for why things like
Hello,
on 08/05/2005 04:33 PM Paul Nowosielski said the following:
I'm trying to setup a PHP script that will send a POST data request to a
web form. The script needs to be automatic and not driven by a web form.
For example.
I have a cron script that runs every 15 minutes. The cron script
Eric Gorr wrote:
Jochem Maas wrote:
Eric Gorr wrote:
Jochem Maas wrote:
http://php.net/manual/en/function.stream-wrapper-register.php is as
close as it gets
I think. - total overkill for manipulating strings IMHO - (me thinks
there is atleast
one other in agreement) - there is a reason
Right. Tested and found $_SERVER['HTTPS'] has to be 'on' :)
But, there is something in the code Jochem wrote that bothers me for a
while:
if(isset($_SERVER['HTTPS']) $_SERVER['HTTPS']=='on') {
echo 'you are secure(-ish?)';
}
Doesn't
$_SERVER['HTTPS']=='on'
automatically means
So, heres the deal, I'm running Fedora Core 3 on an dual proc AMD64 system.
I have compiled Apache 2.0.54, and PHP 5.0.4, when I try to start apache
I am given an error. The error is as follows...
[EMAIL PROTECTED] conf]# /etc/rc.d/init.d/httpd start
Starting httpd: Syntax error on line 24 of
True, but if you check that it's equal to 'on' and it doesn't exist,
you'll get a warning. If you want to avoid the warning, check that it
exists first.
Matt
I mean, if $_SERVER['HTTPS'] exists doesn't mean it's equal to 'on'
but if $_SERVER['HTTPS'] == 'on' IT MEANS $_SERVER['HTTPS']
Hi Marco,
Thanks for the help, you gave me a place to start. Before doing what would
amount to a lot of coding to correct this problem throughout my site I
wanted to see if it could be corrected on the server side.
I found the following section in the php.ini file:
; As of 4.0b4, PHP always
Hi,
I have a web page (say page1) which refers to a php within javascript tag as:
script type=text/javascript
src=http://mysite.com/javascript_dump.php;/script
As you can see, this calls a php file which dumps javascript. The
problem here is, within this php I couldn't get which page it is
Quoting Jay Blanchard [EMAIL PROTECTED]:
6. PHP is a server side scripting language. Whatever processing PHP does
takes place BEFORE the output reaches the client. Therefore, it is not
possible to access users' computer related information (OS, screen size
etc) using PHP. Nor can you modify any
Rick Emery mailto:[EMAIL PROTECTED]
on Friday, August 05, 2005 4:20 PM said:
Can anybody recommend a good JavaScript mailing list?
If by anybody you mean Google, then yes anybody can recommend a good
JavaScript mailing list.
Hope this helps!
Chris.
--
PHP General Mailing List
Quoting Chris W. Parker [EMAIL PROTECTED]:
Rick Emery mailto:[EMAIL PROTECTED]
on Friday, August 05, 2005 4:20 PM said:
Can anybody recommend a good JavaScript mailing list?
If by anybody you mean Google, then yes anybody can recommend a good
JavaScript mailing list.
Well, as I found
Rick Emery mailto:[EMAIL PROTECTED]
on Friday, August 05, 2005 4:54 PM said:
Well, as I found out when I Google'd before I posted, it *lists*
plenty of JavaScript mailing lists. But it can hardly recommend a
good one, which is what I asked for, can it? I was soliciting
opinions.
Yes I
Hi ,
I wonder if it's possible to retrieve the value from a php session
variable from within a javascript function.
Does anyone have any ideas about this?
Thank you
Mauricio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Quoting Chris W. Parker [EMAIL PROTECTED]:
Rick Emery mailto:[EMAIL PROTECTED]
on Friday, August 05, 2005 4:54 PM said:
Well, as I found out when I Google'd before I posted, it *lists*
plenty of JavaScript mailing lists. But it can hardly recommend a
good one, which is what I asked for,
Hi
Take a look here: http://forums.fedoraforum.org/showthread.php?t=59163
I had that problem too.
Regards
holografix
Joseph Oaks [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
So, heres the deal, I'm running Fedora Core 3 on an dual proc AMD64
system.
I have compiled
Thanks, I will give that a try, and let you know.
Joe
Holografix ([EMAIL PROTECTED]) wrote:
Hi
Take a look here: http://forums.fedoraforum.org/showthread.php?t=59163
I had that problem too.
Regards
holografix
Joseph Oaks [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
I don't seem to be able to set the return path using the mail() function. I
can't figure out why from will let me set it, but not the return path.
$headers = 'From: [EMAIL PROTECTED]' . \r\n .
'Return-path: [EMAIL PROTECTED]' . \r\n .
'X-Mailer: PHP/' . phpversion();
mail($email,
I haven't tested this and it's off the top of my head so don't shoot
me if I'm off track here ;-)
You could possibly use some embedded javascript to set a cookie with
the current URL stored in it. This would be easy to spoof as well,
but not quite as easy as appending ?site=xyz.
(shrug)
90 matches
Mail list logo