Hello;
I have been writing a php script which is supposed to open and edit a
php file on the same server,
in the same directory. But I have not been able to get regex as in
function ereg() to work to match
a line of code to alter. I also have not been able to get strpos() to
work in this code.
Hello php list:
If I include a php script inside a php function definition and then
call the
function in another script. What is the scope of variables in the
included
script? Are they local to the function that calls include with the file
name?
Thanks in advance;
I'm not sure where to look fo
Hello php developers:
I am having a problem with the following code:
OS: FreeBSD v6.0
Apache 1.3.34
php 5.1.2
-> $cont is an array produced from opening and reading a
directory:
for($i = 0; $i < count($cont); $i++)
{
print $cont[$i].'';
if(is_file($cont[$i]))
{
On Jan 22, 2007, at 10:20 PM, Chris wrote:
jekillen wrote:
Hello php developers:
I am having a problem with the following code:
OS: FreeBSD v6.0
Apache 1.3.34
php 5.1.2
-> $cont is an array produced from opening and reading a
directory:
for($i = 0; $i < count($cont); $i++)
{
On Jan 22, 2007, at 11:18 PM, clive wrote:
everything without an extension is a directory
You will notice that the only directory detected
by this code is templates. There are no files
detected by this code. Does this have something
to do with stat cache? I want to make one array
with directo
Thanks all.
**
As far as I know is_dir and is_file require a full path , ...
This did the trick. I kind of assumed that the path info would be
understood by is_file() and is_dir().
But explicitly adding the path info solved the problem.
Now I have a beautiful array with 38 items just as I ne
Hello php list;
I am having trouble with ereg().
The following is the problem code
$x = ereg("", $get_route,
$m);
testing $route I get:
$route = $m[1];
print $route.'';
jk/in' rec='a_378e6dc4.xml' /> (out put of print)
jk is all I am looking for but
is it greed that is missing the
forward slash
Hi again;
(Blush)
I just did noticed that I
did not mask out the
two dots:
$x = ereg("", $get_route,
$m);
I am trying again..
I still get the same result
jk/in' rec='a_378e6dc4.xml' />
JK
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Jan 31, 2007, at 8:13 AM, Jim Lucas wrote:
jekillen wrote:
Hello php list;
I am having trouble with ereg().
The following is the problem code
$x = ereg("", $get_route,
$m);
do we need to break out of the text to include the $to variable??
The $to variable is what I use to id
Hi
In reference to my query about 'greed' in regex in php and the following
code
$x = ereg("",
$get_route, $m);
I solved the immediate problem with the following:
as you can see, the regex is quite a bit more complicated and I
do not know if it will match all the possibilities that it will have
On Jan 31, 2007, at 4:38 PM, Richard Lynch wrote:
On Tue, January 30, 2007 8:36 pm, jekillen wrote:
I am having trouble with ereg().
The following is the problem code
$x = ereg("", $get_route,
$m);
testing $route I get:
$route = $m[1];
print $route.'';
jk/in' rec=
Hello;
I really am trying to use this as a last resort but sometimes the
solution refuses to present itself just by swearing and
staring and poking around with comments and print statements.
line 197: $rdata = str_replace("// \$routes[] = '';\n",
"\$routes['$usr'] = '../$path/in';\n// \$routes
Hello all;
Is there a way to un include a file once it has been included in a
script?
I have a situation where I need to include a php file for a variable and
its value. Then I need to open the file and modify it in the same
function
'that included the file. So far the function, as I test it do
On Feb 11, 2007, at 1:16 PM, Larry Garfield wrote:
You're using str_replace() on PHP code to control configuration
variables?
There's a half dozen better ways that are less error prone and faster
and
more secure.
My recommendation:
- If the config is all simple values, use an ini file. Y
Hello;
I solved this problem, I think. It is the only thing I could find
different between
two other wise identical strings in two php files with identical names
(in different
dirs). One was formatted for Unix (linefeed line ending) and the one,
that was
not responding, was formatted for Mac (
Hello;
I am having trouble with a loop in scripts run under
php v5.1.2.
I have produced a form in a web page that has a variable number
of text fields. These fields represent the result of opening a file
and populating the fields with the corresponding value data found
in the file. The field name
Sorry all;
regarding recent post list troubles with code below
in the loop I was using count($value) instead of just $value
for($i = 0; $i < count($flen); $i++) // should be $flen instead of
count($flen)
{
array_push($edata, $_POST["a_$z"]); // this loop
terminat
On Mar 7, 2007, at 10:24 AM, Ed Curtis wrote:
Edward Kay wrote:
you've got a stay quote mark in one of your PHP vars.
Not it, I looked and there's nothing there.
I'm sure it's because you've got some stray characters in your output
that
mess it up. It would help if you actually posted the
Hello;
Is there a way to un include a file once it has been included in a
script.
My concern is where two php files might be included in another php
file they might have code or variables that conflict. I am thinking
of including files with different names but follow the same pattern
of code and
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote:
No there is not, because an included file *executes* at the time it is
included and is then done. Any memory-resident objects (function/class
definitions, variables, etc.) that it defies then exist until you make
them
un-exist (with unset() f
On Mar 8, 2007, at 5:30 AM, Delta Storm wrote:
Hi,
again me with the silly questions...
I need a script that will take data from MySQL database and display
one row each day.
I have googled, but with no luck.
The database retrieving mechanism is of course clear but I really dont
know how
On Mar 7, 2007, at 11:46 PM, Tijnema ! wrote:
Just a little side note, you said that firefox wasn't giving an error,
i think it does, but that it hides the error.
Open your page, and then go to Tools->javascript console.
There it will display all javascript errors. And gives a nice detailed
e
On Mar 12, 2007, at 3:32 PM, Richard Lynch wrote:
On Sat, March 10, 2007 12:41 pm, Alain Roger wrote:
I'm continuing to work on securing my administration part of the
website.
based on previous posts and reading materials, I was thinking to use
the
following process :
Think of HTTPS as like
Hello;
The following regex:
ereg("id='$m[1]'>", $groups, $m1);
is causing the following error:
Warning: ereg() [function.ereg]: REG_ERANGE in _proc.php on
line 81
Can someone tell me what this means?
What I am trying to do is pick out some info from an xml tag the is
id'd by
$m[1] ( a ma
Hello again;
Regarding the error I was inquiring about:
Warning: ereg() [function.ereg]: REG_ERANGE in _proc.php on
line 81
I still would like to know what it means but
I solved the script problem.
I found that since $groups is a string that was exploded to form the
$g_list array
it may ha
Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite
--enable-shared=max
Then tried to install
php 5.2.1 --with-apxs=/usr/local/apache/bin etc etc
libphp5.so is no where to be found. It sure is not
in apache/lib
On Mar 18, 2007, at 7:51 PM, Haydar TUNA wrote:
Hello,
This is php.install question but I can help you. Two weeks
ago, I
faced same problem with Apache 2.2.4 and PHP 5.2.1 in Redhat Linux AS 4
Update 3 operating system. I tried to install apache and php together
but I
faced to same
On Mar 18, 2007, at 10:54 PM, Chris wrote:
jekillen wrote:
Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite
--enable-shared=max
Then tried to install
php 5.2.1 --with-apxs=/usr/local/apache/bin etc etc
On Mar 19, 2007, at 5:58 PM, Chris wrote:
jekillen wrote:
On Mar 18, 2007, at 10:54 PM, Chris wrote:
jekillen wrote:
Hello;
Well, this one I cannot seem to figure out:
I installed Apache 1.3.37 with
./configure --enable-module=so --enable-module=rewrite
--enable-shared=max
Then tried to
Hello again;
I have a directory that I am opening and reading to produce an
array of contents; files and subdirectories. There are a number
of subdirectories that I do not want to open and read the contents
of, and others that I do want to open and read the contents of.
This code is supposed to pr
On Aug 15, 2007, at 4:28 AM, David Powers wrote:
Jay Blanchard wrote:
If there was a best practices book would you buy it?
I write books on PHP aimed at the beginner/intermediate level, and
have a considerable collection of PHP books written by others. Two
relatively recent books that stru
Hello again;
I have a question about upload temp dir as defined in php.ini;
I have been working on a project that has registered users, each having
a user space portion of the web site file system. I want them to be
able to upload images and such and have the stuff transfered to their
own user
On Aug 26, 2007, at 9:15 AM, brian wrote:
jekillen wrote:
Hello again;
I have a question about upload temp dir as defined in php.ini;
I have been working on a project that has registered users, each
having
a user space portion of the web site file system. I want them to be
able to upload
On Aug 26, 2007, at 2:56 PM, Richard Lynch wrote:
On Sun, August 26, 2007 10:34 am, jekillen wrote:
I have been working on a project that has registered users, each
having
a user space portion of the web site file system. I want them to be
able to upload images and such and have the stuff
On Aug 31, 2007, at 6:26 PM, Robert Cummings wrote:
On Fri, 2007-08-31 at 15:56 -0700, Dan wrote:
Sanjeev is right. You're thinking about the problem backwards.
You're
trying to build a Switch inside a loop. Remember, if you ever have
to do
some operating multiple times you're using a forlo
Hello;
I have not had the necessity to deal with php.ini files for some time.
Now, because I switch from Sendmail to Postfix on one system I
need to adjust the sendmail path variable. I cannot find a php.ini file
in the specified location. That is not a problem because I can use
ini_set(). What is
On Dec 28, 2007, at 10:40 PM, Jochem Maas wrote:
jekillen schreef:
Hello;
I have not had the necessity to deal with php.ini files for some time.
Now, because I switch from Sendmail to Postfix on one system I
need to adjust the sendmail path variable.
are you sure you need to change it
Hello;
I have this section of code:
@include('tmp_index.php');
foreach($index as $key -> $value)
{
if($input == $key)
{
$target_file = $value;
}
}
And I am getting this error:
Fatal error: Cannot access empty property in /
Thank you for the response;
I should have known. I don't use this type of loop often enough
to get it straight the first time.
Jeff K
jekillen wrote / napísal(a):
Hello;
I have this section of code:
@include('tmp_index.php');
foreach($index as $key -> $value)
Hello again;
I have two variables declared in the global scope of a script.
$string_a = 'stuff $string_b and more stuff';
$string_b = '';
One is a string with a reference for substitution to the other
string which is empty.
In the processing body of the script are if/if else blocks.
In these block
On Jan 1, 2008, at 3:34 PM, Richard Lynch wrote:
Hit send too soon. Sorry!
On Tue, January 1, 2008 2:05 pm, jekillen wrote:
Several questions:
How long can an index be in an associative array? (the indexes I
use
in this array are 32 character hashes)
As far as I know, it can be as big as
On Jan 1, 2008, at 3:31 PM, Richard Lynch wrote:
On Tue, January 1, 2008 4:17 pm, jekillen wrote:
Hello again;
I have two variables declared in the global scope of a script.
$string_a = 'stuff $string_b and more stuff';
$string_b = '';
One is a string with a reference for
On Jan 1, 2008, at 3:48 PM, James Ausmus wrote:
On Jan 1, 2008 2:17 PM, jekillen <[EMAIL PROTECTED]> wrote:
Hello again;
I have two variables declared in the global scope of a script.
$string_a = 'stuff $string_b and more stuff';
$string_b = '';
One is a s
Hello;
I have a login panel that is opened as a javascript window.
In the processing script, a successful login uses the
header function to send the user to the restricted content
index page.
But this page is loading into the javascript window instead
of the opener window of the browser. Is it po
Hello;
I am running a server that is using UTC
and I want to be able to convert to
clients local time in some display presentations.
Is this indicated by $_SERVER["REQUEST_TIME"]?
If not, is there a way to get the requesting host's
time zone so I can offset the servers clock value correctly?
Thank
On Jan 5, 2008, at 3:09 PM, Casey wrote:
Try adding "target="_top"" or "target="_parent"" to the form element
in HTML.
On 1/5/08, Bastien Koert <[EMAIL PROTECTED]> wrote:
this would be an html / js issue...
why have a popup login in this case? just show the logon in the main
window
and t
ted, they may be in a time zone that does
not use daylight savings time, or some other difference.
Jeff K
jekillen wrote:
Hello;
I am running a server that is using UTC and I want to be able to
convert to clients local time in some display presentations.
Is this indicated by $_SERVER["REQUEST_
Hello again;
I am developing an application that uses php with Apache.
A user requests a script file from a web site and the server
takes such things as $_SERVER['REMOTE_ADDRESS']
and uses php's time() function to record the time in utc
code (which would be the server's system time)
and other bit
Hello:
I have a form that has a textarea and I do not want to
disallow the use of single quote as apostrophe, or
for any other normal stylization. So I am using html
entities to change these characters into html entities.
But the function does not remove the escapes added
by the browser when sendi
On Jan 27, 2008, at 10:37 AM, Nathan Nobbe wrote:
On Jan 27, 2008 1:27 PM, jekillen <[EMAIL PROTECTED]> wrote:
I have a form that has a textarea and I do not want to
disallow the use of single quote as apostrophe, or
for any other normal stylization. So I am using html
entities to
On Apr 24, 2007, at 8:26 PM, Seth Price wrote:
Hi all! I've been programming GD and PHP for a while, but I haven't
done much with font drawing. I'm trying to layout and draw text, but
the text actually changes size and shape depending on the angle it's
drawn at. This is making it extremely diff
Hello again;
can someone point me to a system for cleaning
uploaded files; embedded php scripts in image
files, viruses etc, shell escape chars, anything
that would be hazardous?
The idea is when a file is uploaded, as soon
as it gets to the server it is inspected, cleaned/rejected
before it is us
On May 9, 2007, at 8:04 AM, Emil Edeholt wrote:
Hi!
What do you guys use to develop ajax applications and do you have any
good articles on the subject?
I've just about finished an ajaxish site but it wasn't fun. A lot of
nesting javascript inside php calls, having to write the logic both i
On May 11, 2007, at 1:43 PM, Chris wrote:
Hello,
According to the PHP manual on functions
(http://www.php.net/manual/en/language.functions.php):
"In PHP 3, functions must be defined before they are referenced. No
such requirement exists since PHP 4. Except when a function is
conditionally
Hello again;
In my frustration and laziness (tired of probing around to solve syntax
errors that are not obvious)
I have encountered the following error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in
groups_proc.php on line 585
The two lines immediately proceeding the
Hello again;
(Blush);
I was looking at the wrong line. Somehow the line numbers changed on me
and the error was actually at a suspect line that I had changed. But the
file that was giving the error was a file that was not updated.
Now it works,
I was trying to do $list_length -1 in the middle of
Hello again;
does the following test pass if the file is successfully included:
if( include( some file ) )
or does it pass with:
if( ! include( some file ) )
Thanks
JK
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Jun 25, 2007, at 5:13 PM, Marius Toma wrote:
I can not create .php files from PHP. I can save them as *.php5,
*.php3, asp, *.txt , etc... but not as .php. I tried both touch and
fopen but
none of them worked.
I'm running PHP 5.1.6 on Apache 2, safe_mode is off
Is this a security measure
On Jun 25, 2007, at 9:08 PM, jekillen wrote:
On Jun 25, 2007, at 5:13 PM, Marius Toma wrote:
I can not create .php files from PHP. I can save them as *.php5,
*.php3, asp, *.txt , etc... but not as .php. I tried both touch and
fopen but
none of them worked.
I'm running PHP 5.1.6 on A
Hello;
I have the following code:
$prps = str_replace("\n", ' ', $input[3]);
$request = str_replace("// var purpose = {} ;\n", "var purpose =
'$prps';\n", $request);
In the first line $input[3] is a string formatted with new lines at the
end of each line.
It is to be used to initialize a ja
On Jul 2, 2007, at 6:07 PM, jekillen wrote:
On Jul 2, 2007, at 3:15 PM, Greg Donald wrote:
On 6/30/07, jekillen <[EMAIL PROTECTED]> wrote:
Hello;
I have the following code:
$prps = str_replace("\n", ' ', $input[3]);
Are you sure $input[3] doesn't have tw
On Jul 4, 2007, at 3:22 AM, Ross wrote:
http://amazon.co.uk/s/ref=nb_ss_w_h_/203-1671317-2810350?
initialSearch=1&url=search-alias%3Daps&field-
keywords=php+security&Go.x=0&Go.y=0&Go=Go
looking at the top 3 on the list here, personally I quite like the
O'Reilly
books. Can someone recom
On Jul 10, 2007, at 3:59 PM, k w wrote:
I'm trying to make a button execute some php code when the button is
clicked. I'm not sure if it is the button i'm coding wrong or the php
code.
Here is the code I am using.
echo "";
?>
I've got all my variables stored in the php page, and I know the
On Jul 10, 2007, at 5:33 PM, David Wonderly wrote:
I am trying to create a small script to open a file and edit it.
However, when I open a file with PHP in it the PHP is stripped out. It
open as if I was viewing the page source. How do I fix this?
Here is the code I am using.
Filewri
Hello again;
I have a question about including php files that are outside of
the web server document root. What permission does Apache
use to access files outside of the document root?
Here is the situation:
I want to store sensitive data such as login/pw data for
registered users. I also want to
On Aug 8, 2007, at 9:34 PM, Richard Lynch wrote:
On Wed, August 8, 2007 7:52 pm, jekillen wrote:
I have a question about including php files that are outside of
the web server document root. What permission does Apache
use to access files outside of the document root?
Here is the situation:
I
Hello:
I have a directory on a server that has php code that creates and
writes to directories as such; /tiles_.*/.
Each directory with a matching name has graphics files written to it.
i'm trying to write a script the will
eliminate the graphics files and the directories they are in
(tiles_.*
Hi:
I have a web application that creates files and directories to save info
for a user. If the user decides to link to another page or site
altogether
I want to run a script that will clean up after him or her but won't
interfere with where they are going. It will eventually expand
to asking th
Hello;
I am having a strange breakdown in some dhtml that
uses php to dynamically generated images and support data.
The program is supposed to generate 9, 16, or 25 images.
It does 9 without problems but breaks with 16, and 25.
I've written the code to accommodate different numbers
of images, not
Hello again;
I'm wondering if it is possible to create an $_ENV var with a php
script running under a web server. I'm not sure where to look
in the manual or other documentations for this. Isn't there a
set_env() function or something like it? (would apply to php 4 0r 5x)
Thanks in advance.
JK
--
Hello all;
I am scratching my head over the following:
I have written code that is supposed to format text
sent from a form in a textarea form element.
This text does not have new lines added if
the text is allowed to automatically wrap to the
next line. I want to automatically add new lines
to th
Hello;
I am writing some code that will format results of a search for display.
I need to split an array into several different arrays but I won't know
before hand how many, so, I am looking for a way to dynamically
generate arrays for this purpose.
My present direction is to use the following cod
On Nov 26, 2006, at 5:11 AM, Stut wrote:
jekillen wrote:
I am writing some code that will format results of a search for
display.
I need to split an array into several different arrays but I won't
know
before hand how many, so, I am looking for a way to dynamically
generate array
The following is a response to a message I sent to the link in a
bounced e-mail notice from this list:
This is an automated response to your message to
"[EMAIL PROTECTED]"
If you are trying to post to one of the PHP mailing lists, the correct
address looks something like [EMAIL PROTECTED]
If
On Dec 20, 2006, at 3:14 PM, Niels wrote:
Hi,
On Wednesday 20 December 2006 19:47, Ray Hauge wrote:
I think all this talk goes to show you that the differences between
PHP4
and PHP5 are somewhat personal at this point in the game. Some people
like the better OOP features of PHP5, some peop
Hello,
Am having trouble with some code.
I have been developing a web based application on
a machine running php v4.3x, Apache 1.3x Mac OSX 10.3
The application works as expected on this machine.
So I copied the code to my server which is running FreeBSD
v6.0, Apache 1.3.34, php v5.1.2.
On this ma
On Dec 25, 2006, at 7:21 AM, Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2006-12-24 18:11:03 -0800:
function display($list, $in, $out, $save, $req, $x)
{
for($i = 0; $i < count($in); $i++)
{$j = $i + 1;
// two sets of links displayed instead of one
for($i = 0; $i <
On May 19, 2006, at 8:20 AM, Jay Blanchard wrote:
[snip]
http://us2.php.net/variables.external
[/snip]
BINGO! We have a winner!
It can be as simple as adding an id to each checkbox;
By doing this I did not have to change the function or the function
calls. JS recognizes the boxes by id, PH
tever
you were trying to solve this issue? the code that uses JS functions
not supported for all the browsers that will potentially run the
script (as well as what these browsers are) Most likely someone will
be able to help you this way.
Thanks for the attitude.
jk
jekillen wrote:
Hello;
On Jun 11, 2006, at 1:21 PM, Rafael wrote:
jekillen wrote:
[···]
You misunderstand my question. I know the limitations of javascript.
The server won't respond to events registered in the browser. I write
tons of forms that are all processed
by the client with javascript. I have wr
80 matches
Mail list logo