I have a question about global vars. Why is it that I have to declare a var
global if I'm using it across included files. For example the only why I
can get this var to work is by making it global.
main.php
?php
include loader.inc;
include builder.inc;
include render.inc;
?
loader.inc
?php
Hola
Resulta que tengo problemas para que funcione PHP en un
servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al
hacer alguno de los ejemplos que adjunte (codigos) ninguno funciona.
Hicela prueba con Apache/Win98/PHP y ahí me funciono.
No entinedo que
Hola
Resulta que tengo problemas para que funcione PHP en un
servidor NT 4.0 con IIS 3.0 y este no funciona PHP ver. 4.2.1) ya que al
hacer alguno de los ejemplos que adjunte (codigos) ninguno funciona.
Hicela prueba con Apache/Win98/PHP y ahí me funciono.
No entinedo que
On Sunday 02 June 2002 05:54, Nick Patsaros wrote:
Okay so this is what I'm trying, basically for the
purposes of posting a news article I want to be able
to upload supporting text files with the content of
the article. Here's what I've got so far... I think
I've totally missed the mark or
Hi PPL,
Please see if you can solve this problem as its driving me crazy..its for a
small affiliate program.
I have a table with the folling structure:
** table stats(Id bigint,Month tinyint,Year int,Hits bigint)
The client will be given a link like this
**
global $var; does nothing outside of a function. You
do not need to use global for this.
$foo = 'bar';
include 'something_that_uses_foo.inc';
http://www.php.net/manual/en/language.variables.scope.php
regards,
Philip Olson
On Sun, 2 Jun 2002, Anzak Wolf wrote:
I have a question about
MySQL_affected_rows()
---John Holmes...
-Original Message-
From: r [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 02, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Going Crazy Logic.
Hi PPL,
Please see if you can solve this problem as its driving me crazy..its
for
a
small
Maybe a little off-topic, but does anyone have one of those USB thumb
drives? Is it possible to load up Apache, PHP, and MySQL onto one of
them? If you stripped things down, could it be installed on a 64MB drive
(with a little space left over for MySQL data and PHP scripts)? Does
anyone know if
Hello,
i'm using sessions in my application but i found something strange.
when creating new session:
define('S_USER', 0);
define('S_USER_ID', 0);
define('S_USER_NAME', 1);
session_start();
$_SESSION[S_USER][S_USER_ID] = 1;
$_SESSION[S_USER][S_USER_NAME] = 'Michal';
when redirect on next
Hi there,
I did configure php with ldap and everything worked fine!
Then I stoped apache and started it. This cause folloving error:
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server:
Hi there,
I did recompile php with different flags. Phpinfo() tells me that I am still
running the old insatllation! I did restart apache after compiling. So whats
wrong. Did I forget something?
I did
configure with some flags
make
make install
restart apache
Thanx for any help,
Andy
--
On Sunday 02 June 2002 17:32, Andy wrote:
Hi there,
I did recompile php with different flags. Phpinfo() tells me that I am
still running the old insatllation! I did restart apache after compiling.
So whats wrong. Did I forget something?
I did
configure with some flags
make
make install
Hola:
Tienes la misma version de PHP en el servidor Win98?
Sabes que hay diferencias importantes en versiones de PHP mas de 4.1.0
(creo ... seguramente, mas de 4.2.0)? Estas diferencias tienen que ver con
'arrays' superglobales y 'register globals' etc.
Puede ser que una programa PHP que se
Hey all,
I was recently trying my luck at dabbling in some mod_rewrite
stuff, and I have run into numerious errors. Basically my aim is to
re-write my sites URLs so instead of being say,
mysite.com/thumbnails?type=funnygallery=4 the URL is neat, similar to
many sites who would have
Also, if you are really worried about placing too much load on the server,
you could use JavaScript to check the form submission on the client side
using the same technique...
Mikey
Bogdan Stancescu [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
First, you
Does anyone know exactly what the status is on the Verisign Payflow Pro
support for Windows? I've read the manual and all the user submitted
comments. I keep seeing some reference made to a php_pfpro.dll that
doesn't seem to exist. Is it still in development?
It seems most people just
You can do this with just PHP, but I think php must be installed as a
module.
Basically place a file called thumbnails.php in your site route, then
whenever a URL like
mysite.com/thumbnails/funny/4
i called the thumbnails.php is excuted, in which you chop up the URL, and
find all your varibles...
You're right, that wouldn't prove my point. However, you might try a
little piece of code like the following:
?
$a=foo;
$b=bar;
$c=foobar;
if ($a==foo) {
include($b.php);
} else {
include($c.php);
}
?
I hope this proves that includes are included at runtime because PHP
php-general Digest 2 Jun 2002 13:13:58 - Issue 1381
Topics (messages 100265 through 100309):
PHP Coding Problem
100265 by: Christopher J. Crane
Re: New to PHP- Form Validation Logic/Design Question
100266 by: John Holmes
Re: help meS.O.S...my php doesn't ascend
just installed the win32 cgi 4.2.1 last night and discovered this strange thing with
the $to string
in the mail function.
it crashes and gives me a Server Error Warning.
where usually i could go:
$to = Mary[EMAIL PROTECTED] ;
now it wants:
$to = [EMAIL PROTECTED] ;
$from formatting is ok
Hello Jason,
you have been right, I did a new one on a fresh php untared dir. And the new
php install is recognized.
But I am still fighting with the installation. I need freetype2 and I did
configure it ok, compiled freetype, gd2 but still I am getting a:
function: imagettfbbox() not found
I certainly read your reply and tried it with the session_start as the first
line of the php secion. I have since remove the HTML etc. The script
appears to work with out error .
I was able to set session vars etc and the script completed with out error
and the session vars could be printed
whenever a URL like
mysite.com/thumbnails/funny/4
i called the thumbnails.php is excuted, in which you
I think if you call it thumbnails.php it won't work.
however if the script is simply called thumbnails then it'll
work.of course you then must make sure that 'thumbnails'
is parsed as php.do
Page1:
?
Session_start();
$_SESSION['dbauser'] = john;
$_SESSION['dbapassword'] = password;
?
html
body
Variables set
/body
/html
Page2:
?
Session_start();
?
html
body
User: ?=$_SESSION['dbauser']?
Password: ?=$_SESSION['dbapassword']?
/body
/html
Does that work for you?
Normally all PHP
On Sunday, June 2, 2002 at 2:53:30 PM, you wrote:
I certainly read your reply and tried it with the session_start as the first
line of the php secion. I have since remove the HTML etc. The script
appears to work with out error .
session_start must be called before any output in the script,
Hi there,
I am having trouble to get a php installations working on suse72 with
following configure command:
./configure' '--with-gd=/home/andy/sw/gd-2.0.1' '--with-freetype=/usr/lib'
'--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr'
'--with-png-dir=/usr/lib' '--with-zlib'
You have to define the constants on each page. The second page doesn't
know what S_USER, S_USER_ID, or S_USER_NAME are...unless you define them
again.
---John Holmes...
-Original Message-
From: Michal Dvoracek [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 02, 2002 3:59 AM
To: [EMAIL
Hi,
I am compiling PHP 4.2.0 on a RedHat 7.1 system with mnogosearch 3.2.3. I am
running into a problem that I have not seen on my other RedHat systems with
the same configuration (except Redhat 7.2 instead of 7.1), and that is that
the link does not work because there are some symbols that are
Hey try it, it works when are running the PHP Module in apache.
I have a server with proxy.php yet I access it via
myserver.com/proxy/whatever and it works with no special changes to the
config files.
Andrew
- Original Message -
From: Adrian Murphy [EMAIL PROTECTED]
To: Andrew Brampton
Michal Dvoracek wrote:
when creating new session:
define('S_USER', 0);
define('S_USER_ID', 0);
define('S_USER_NAME', 1);
session_start();
$_SESSION[S_USER][S_USER_ID] = 1;
$_SESSION[S_USER][S_USER_NAME] = 'Michal';
Hm, you're defining a session variable called 0? Because PHP will
translate
For tips on doing these things, read this faqt:
http://www.faqts.com/knowledge_base/view.phtml/aid/124
Regards,
Philip Olson
On Sun, 2 Jun 2002, Andrew Brampton wrote:
Hey try it, it works when are running the PHP Module in apache.
I have a server with proxy.php yet I access it via
Hi list,
Sorry if this is a off-topic, but I really don't know where to begin. I
have a mysql database with about 20.000 records, now I need to build a
statistics panel to show for example how many of this record are male,
female, lives in determinated city, school graduation etc, everything
Michael Davey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
You could give the button the same name in each form - only the fields in
between the form/form tags is actually submitted, then put a hidden
field
in the form that uniquely identifies the data
Hi,
I'm a newbie, so please have mercy on my silliness...
I've checked my formats, and can't seem to understand why I can connect to the db, but
not select the db that I want to use. The following code always returns the Couldn't
select database error.
If I use the mysql monitor, I can
Look into cross-tab queries (I think that's what they are called). There
is a good article on Devshed.com about it. You can do a query like this
SELECT SUM(IF(Gender='M'),1,0)) AS Male, SUM(IF(Gender='F',1,0)) AS
Female FROM table
That'll give you two columns, one named Male, one named Female,
After playing around with this further, here is more functional pseudo-code
... Primary change in the placement and method of the waidpid routine.
I'm still open to comments on this ... Otherwise, I hope this snippet is
useful to someone! : )
// run forever if necessary
set_time_limit(0);
//
I have one similar problem.
I had a directory Php under my root directory that was the root for
Apache.
Then I rename Php to php but after restart, reset ecc - some months now-
still recognize only Php and NOT php.
What's wrong?
Makis
-Original Message-
From: Andy [mailto:[EMAIL
Hi Justin:
On Sun, Jun 02, 2002 at 02:13:40PM +1000, Justin French wrote:
(anything)(anything) followed by 1 or more (.anything)
So, what ereg expressions have you tried thus far? It's far cooler to
come to the list saying, I tried x, and it's generating error y, does
anyone have an idea?
Justin French wrote:
my aim will be to strip out anything that doesn't at least LOOK like like an
email address.
Well, instead of coming up with some clever regexp, I'd suggest to
completely dump syntax checks. Instead, I only check if the host has a
MX entry associated. If not, then this
Ok, this did not work, but I have a new idea. From the top
1)Read in the csv file, take the first 18 records and insert them into a
temp db.Ie: $output = array_slice ($fields, 0, 17);
2)Then do a count on the line to see how many records are after 17 and
somehow loop through them 34
Do some error checking. You're turning off all the errors produced by the mysql
statements, so how
are you supposed to know what's wrong?
You could also try:
$db = mysql_select_db($db_name) or exit(mysql_error());
I'm not sure if mysql_error works for selecting the db, but it couldn't hurt to
Hey Everyone,
Been going through the manual and the book PHP BlackBook and am totally
confused about sessions.
Searched google and found a couple of places that seem to be offering
lessons but dont know which is good as there are so many results.
Has anybody here used an online turoral
sitepoint.com has a nice one on restricting pages with login/sessions, etc
by Kevin Yank.
Justin French
on 03/06/02 8:38 PM, r ([EMAIL PROTECTED]) wrote:
Hey Everyone,
Been going through the manual and the book PHP BlackBook and am totally
confused about sessions.
Searched google and
Has anybody here used an online turoral that they feel is
good for a newbie or has done wonders in helping you on when
you were learning php? if so please send me the website name / URL.
http://www.devshed.com/Server_Side/PHP/UserAuth/page1.html
I found this one quite good - not so
Won't that treat all radio buttons on the page as one group, instead of
being separate groups for each form?
No - the form/form tags enclose the data that is being submitted -
nothing outside of the tags will reach the script that handles the request.
Mikey
--
PHP General Mailing List
Do echo $PATH from a shell. This will output a list of several folders,
seperated by a semi-colon. Check each of these folders for a file named
Php. Rename to php. That should do the trick.
On Sunday 02 June 2002 11:01 am, savaidis wrote:
I have one similar problem.
I had a directory Php
The next time I stare at something so long I can't think straight remind
me to take a walk and pull out Rasmus' book! Page 121 array_chunk is my
friend!
Code is ugly, but I am smiling now! Thank you everyone!
$policy = array_slice ($fields, 18, $lineCount);
// I am taking the array from
At 08:32 AM 6/3/2002 +1000, Justin French posted the following...
sitepoint.com has a nice one on restricting pages with login/sessions, etc
by Kevin Yank.
http://www.WebmasterBase.com/article/319
Is that the one you're referring to, Justin? It seems pretty good.. :)
Glenn
---
The original
I've noticed that many people on the list code in 'pure' php, i.e.
?
print input type='text' name='fname' size='50';
// etc
?
Since most of my code is a mixture (the early stuff is 'mixed' html + php),
I've been wondering why code in 'pure' php? Is there some compelling reason
(that I'm
$Tags['issue-name']. So I could print it out. Something like, print
$Tags['issue-name']br\n;
I was able to get a numerical representation of the array like, $Tags[5] and
the value of that tag was RED HAT, but then I would have to know what the
position of the data I am looking for in the array.
No *real* reason - just two not-so-important ones:
1. Clarity
Please compare these two:
-- MIXED
td bgcolor=?php echo $td_col; ? class=?php echo $prefclass; ?
?php $fldcontent=$myrow[0]?$myrow[0]:no data; ?
input type=text name=fname size=50 value=?php echo $fldcontent;
?
/td
-- PURE
Hi,
I'm trying to set a PHP include directory for one of my sites. I'm on a
shared hosting system, so I don't have access to the php.ini file.
My plan was to do it using a .htaccess file in Apache - however I must be
doing something very much wrong, as it isn't working.
Here is what I've
Thanks Bogdan,
That's what I thought, but I was beginning to feel 'guilty' the more I
understood php. It seems to me, from my limited experience, that there's much
mor chance for error using 'pure' php (as in forgetting ' or or closing
with ; -- but . . .
Actually I've found that the
On Sunday 02 June 2002 08:13 pm, you wrote:
On Sun, Jun 02, 2002 at 07:55:09PM -0400, Andre Dubuc wrote:
I've noticed that many people on the list code in 'pure' php, i.e.
?
print input type='text' name='fname' size='50';
// etc
?
Since most of my code is a mixture (the early
I need to do some encryption/decryption of data in PHP. I don't
need anything heavy duty. Just some scheme that obscures strings
in a non-trivial manner.
I am on a shared hosting site which doesn't have the mcrypt suite
installed with PHP ( they won't install it).
Does anyone know of any
I'm not sure what you mean... Is it checking that you fill in the
correct values via PHP or that the submission works - or something else?
Bogdan
Andre Dubuc wrote:
Thanks Bogdan,
That's what I thought, but I was beginning to feel 'guilty' the more I
understood php. It seems to me, from my
However...
From the point of view of someone who has worked in a company where diesign
is separated from development, it is much better to have separate files with
HTML templates with special markers (in the library I use, it is HTML
comments !--element_to_replace--) so that the two processes
That's what I meant. I was referring to verification/validation scripts for
user inputs. I've made a separate page that runs these routines. I have a
feeling I should have incorporated them on the user input page . . . but
does it really amtter if they're on another page?
Andre
On Sunday 02
I would ask the question How much HTML before you break out of PHP and into
HTML. My answer is any. Surely you're making the engine work just to echo
stuff out? But are you asking for more by making it jump in and out between
all those tags?!
Short tags ...
td bgcolor=?=$td_col?
Thanks Michael,
Point well-made. I suppose doing it the mixed way might have repercussions
later on if/when the site grows. Perhaps while the code is still fresh in my
mid, it might be worth the effort to separate it.
However, for a good part of the site, I've used CSS for appearance details,
I've noticed that many people on the list code in 'pure' php, i.e.
?
print input type='text' name='fname' size='50';
// etc
?
Personally, it depends on what I'm doing. I find that excessive use of
? And ? in my code gets distracting so if I need a lot of php code I
will usually
YES
It's been the basis of everything I've done so far with sessions.
Justin
on 03/06/02 9:05 AM, Glenn Sieb ([EMAIL PROTECTED]) wrote:
At 08:32 AM 6/3/2002 +1000, Justin French posted the following...
sitepoint.com has a nice one on restricting pages with login/sessions, etc
by Kevin
I was wondering if theres a server side variable that i can find the web brower
resolution.
JavaScript does something in this direction - you can use a little
JavaScript trick to get it - check some JS docs and mail me if
interested and unable to make it. What you basically need to do is use a
link such as a href=javascript:bla()Continue/a or, more transparent,
create an
No, it doesn't - just go with whatever's simpler for you... and with
what matches your application better - I don't think this does matter at
all.
Bogdan
Andre Dubuc wrote:
That's what I meant. I was referring to verification/validation scripts for
user inputs. I've made a separate page
Here's a newbie question. I installed the Windows CGI InstallShield
version of PHP to use with the MS Personal Web Server I already have
working perfectly on my system.
On restarting my PC and trying a very simple php script, I get the error
at the bottom of this email. Unfortunately there
I fell for this some time ago - but the trick is that
1. You don't do for ($i=0; $i999; $i++) { echo Line $ibr\n;
} in real life - you do stuff, call object methods, run queries,
whatever, and in between those you have both html and php - and the
remote machine waits for you to do all
Point well-made. I suppose doing it the mixed way might have repercussions
later on if/when the site grows. Perhaps while the code is still fresh in
my
mid, it might be worth the effort to separate it.
However, for a good part of the site, I've used CSS for appearance
details,
and
This whole discussion made me really curious - so you might want to
check the attachments (access mixtest.php) for a very surprising result
(please note mixed.php and pure.php are exactly the same size so this
doesn't affect the test).
Bogdan
Marcelo Leitner wrote:
On Mon, Jun 03, 2002 at
That REALLY is a tricky one because it's documented the way you wrote it
in most places, except where you (and I) should've looked:
http://www.php.net/manual/en/configuration.php
The trick is that you must remove the equal sign.
Bogdan
Tim Thorburn wrote:
Hi,
I'm trying to set a PHP
Hello,
On 06/02/2002 01:13 AM, Justin French wrote:
Hi,
I know that there are more complex functions and classes out there for
validating email address', but some of them do return invalid on
*technically* valid, although uncommon email address', so all I want is a
simple test for:
Why can a user force php to create a session he's giving the name in the
URL?
Do you want me to list an half a dozen ways to get rich now with this
holes?
Does anyone understand the malice of this?
Anyone can offer you a click on a session he's going to visit later and
hijack from you?
Anyone
I was getting a typical 2.5% more for pure PHP with the original order -
switching them increases the difference to about 6.5% more for pure PHP.
Make sure you run it several times before drawing any conclusions, BTW.
Strange...
Bogdan
Marcelo Leitner wrote:
On Mon, Jun 03, 2002 at
Hey John:
On Sun, Jun 02, 2002 at 12:10:27AM -0400, John Holmes wrote:
What I'm looking at is if each include .html file is 50K, am I loading
100K into memory and then running the script, or running the script and
only loading the appropriate 50K into memory when it's needed?
As of 4.0.2,
On Monday 03 June 2002 04:42, Alexander Skwar wrote:
Justin French wrote:
my aim will be to strip out anything that doesn't at least LOOK like like
an email address.
Well, instead of coming up with some clever regexp, I'd suggest to
completely dump syntax checks. Instead, I only check if
JH:
On Sat, Jun 01, 2002 at 10:29:38PM -0400, John Holmes wrote:
Is there a way to determine the overhead or memory usage of a PHP script
as it runs?
You could do some sort of exec() or system() type call. For example, on
a NetBSD (and similar unix type machines) you can do ps -o
PHP has a built-in mechanism for logging high-watermark memory usage by
scripts. Make sure you compile PHP using --enable-memory-limit then you
can modify your Apache LogFormat and stick %{mod_php_memory_usage}n in
there somewhere which will be replaced with the peak memory usage for that
script
Hi,
I'm having troubles trying to insert form data into a mysql db, the
thing is my client wants table data to be splitted, I mean some data
comes from the first form, and the rest from another form.
Then this is a portion of the php script.
// Add together proper fields to enter birth date
On Thursday 01 January 1970 08:00, Ricardo Fitzgerald wrote:
Your clock is broken!
I'm having troubles trying to insert form data into a mysql db, the
thing is my client wants table data to be splitted, I mean some data
comes from the first form, and the rest from another form.
Then this is
Hi All,
I have being working on PHP perl compaitable regular expressions for the last
month and cannot work out how to program a preg_match_all that will get the
file.html from the following examples:
a href=file.html
a href='file.html'
a href=file.html
frame src=file.html
frame
80 matches
Mail list logo