Well, I was having problems getting sessions working at all on my FreeBSD
box, but they are now working...
But that leads me to more problems...
For any others that might have a problem w/ FreeBSD, try setting the
referer_check to 0
'session.referer_check = 0'
Once I changed that things seem to
Thanks, everyone for responding... after much headache I seem to have got it
working. (not fixed, but working.) I was running php 4.0.6 on linux where
the code worked. I just installed php 4.0.4pl1 on the freebsd box and now
everything works great. It was probably not the best solution, but it
I think your problem is you are not including whitespace. Also, remember
that . (dot) means any character except newline, so why not try this as your
reg ex:
//.*
Hope that helps.
-Jeff
- Original Message -
From: "José Daniel Ramos Wey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
Sorry, I forgot the newline at the end... your reg ex should look like:
//.*\n
making your command be:
ereg_replace("//.*\n","",$string)
Try that ;)
Jeff
> I think your problem is you are not including whitespace. Also, remember
> that . (dot) means any character except newline, so why not
Yes there is.
http://marc.theaimsgroup.com/?l=php-general
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 6:38 PM
Subject: [PHP] Archive of this is. Is there a URL?
> Please advise.
>
> Thanks, Robin
>
>
> --
> PHP General M
Yes, you can use javascript to get the user's resolution:
screen.width
screen.colorDepth
are two variables that you can access through javascript, which you might
find helpful.
Jeff
> Try Javascript. I dont recall offhand but there are some properties you
can
> use in Javascript to detect thi
Can you show how your mysql table is set up? Otherwise I am not quite sure
what you are trying to do with your SQL statement.
Jeff
> And then I am trying to get the price out of a table in my database with
> this code:
>
>
> $sql = mysql_query("SELECT '$car' FROM varetabell where carid='$carid'
What was the error message given? Are you sure that mysql is running and
working properly?
Jeff
> Hello,
>
> I have installed php4 rpm in my machine.while connecting php with
> mysql it is giving fatal error.I have given like this
>
> mysql_connect("$servername","$username","$password");
>
Well, PHP has 'sessions' which allow you to do just what you are asking,
pass variables between multiple pages. Sessions are somewhat like cookies,
but all data is stored on the server instead of the client, so you don't
have to rely on the user to accept your cookie.
Here's a short intro/tutori
I'm sorry, but I won't be much help on the windows side of things, but for
UNIX, the job is already done for you! There is a utility called 'du',
which will tell you the disk usage of a file (or a folder and its contents).
Specifically, you would want to use the -s flag to specify only to show th
Hi, provided that your initial string will always be in the same format
(same # of numbers) I would use the substr function. substr(string, start,
[length])
Ex:
$mystring = "20020124020555";
$year = substr($mystring,0,4);
$month = substr($mystring,4,2);
$day = substr($mystring,6,2);
etc...
Hope
Hi. Have you tried something like:
\n"); ?>
I've not tried using xml & php, but that may work...
Jeff
- Original Message -
From: "Frans Englich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 2:53 PM
Subject: [PHP] PHP and XHTML
When I have an inside my
It seems that you are running the script on a windows machine... Yet, I
think that your php.ini must be trying to store session files in /tmp
(which does not exist on windows). Perhaps if you change the session path
in the php.ini file it will fix the problem...
Jeff
At 01:50 PM 1/28/2002 +1
Can you paste the code please? You must send the cookie before you send
anything else.
Jeff
At 02:20 PM 1/28/2002 +1300, Philip J. Newman wrote:
>Warning: Cannot send session cookie - headers already sent by (output
>started at d:\website\myphp\fitness\index.php:7) in
>d:\website\myphp\fitne
With a logical OR statement, many languages will evaluate the first
statement, and if the first condition is true, then it will not evaluate
the second condition, because TRUE OR (anything) is TRUE. This saves the
program from executing any more code than it has to. If the first
condition is
At 11:09 PM 1/2/2002 -0500, jtjohnston wrote:
>What is the difference between:
>
>$myconnection = mysql_connect($server,$user,$pass);
>and
>$myconnection = mysql_pconnect($server,$user,$pass);
>
>I read the faq.
mysql_pconnect creates a persistent connection to the server... check here:
http://ww
At 11:40 PM 1/2/2002 -0500, jtjohnston wrote:
>Jim,
>
>Thanks. What I don't really get is what persistent means.
>
>A problem I'm having with my mysql server is that it is a whole bunch of
>messages with in the space of 5 minutes like:
>
>020130 16:11:08 C:\PROGRA~1\EASYPHP\MySql\bin\mysqld.exe:
I'm not sure why you wanted the last word "tHis" to be changed to "That"
(with a capital)... can you explain further?
Jeff
At 10:52 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
>that is not what I meant... I want the cases to remain...
>
>- Original Message -
>From: "Rick
01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote:
>Oh, that was a typo... sorry...
>
>it should be:
>
>"This equals this equals tHis" -> "That equals that equals tHat"
>
>Edward
>
>- Original Message -
>From: "Jeff She
Have you tried running the program from your php script?
Something like:
$stuff = System("cat foo.txt");
I have done something similar, but I don't recall exactly how I did it.
Jeff
At 04:30 PM 1/31/2002 -0800, David Yee wrote:
>How can I access data/parameters piped into a PHP shell script?
You may want to check into some of these:
http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/Upload_Systems/
Jeff
At 05:34 PM 2/1/2002 +0100, ArtistHotel wrote:
>Hi,
>
>I need an upload script that lets predefined users log in and upload files.
>Does such a script exist?
>
>Reg
Why is it that you want to represent an int with leading 0's? Is it just
to print it out that way? If that is the case, then you can use the printf
function for formatted printing.
Jeff
At 10:53 AM 2/2/2002 +0100, Andy wrote:
>Hi guys,
>
>I am trying to force a int to be 8 digits. If it is
I believe that require() and require_once() have a problem with relative paths.
See here for more info:
http://www.php.net/manual/en/function.require-once.php
Jeff
At 01:24 AM 2/3/2002 +0100, Roebie wrote:
>Dear all,
>I have a index.php3 file in a password protected directory (on Windows)
>whic
What you could do is send a newly generated password to them, and then
allow them to change the password on your site to something easier to
remember...
Jeff
At 11:56 PM 2/3/2002 +0800, Phil wrote:
>Hi there,
>I'm creating a user/password table that will use either Mysql Password or
>PHP Crypt
Well, although this won't wait until exactly when the image creation is
done, you could use a meta refresh tag to refresh to your new page after a
certain number of seconds...
Create a php page with whatever code you need, and then have something like
this:
Please Wait
Please wait...
T
Well, the first thing that comes to mind would be using the UNIX tail
command. Of course, this does you no good if you're on windows, but I'm
not sure if that is the case.
if $n is the number of lines specified by the user, then the code would be
like:
System("tail -$n logfile");
Jeff
At 1
You can't send anything before you send headers... the "html" tag is
messing you up I believe.
Jeff
At 08:24 PM 2/4/2002 -0800, Peter Run wrote:
>Hi,
> I get the warning message (see below), whenever I try anything with
>authentication/session with PHP. This is tried under Windows (PHPTriad
Hi, I would use a regular expression to check it. This is a pretty general
one, but I think it should do the trick. It searches for 1 or more upper
or lowercase letters, followed by a literal dot, followed by 2 or 3
lowercase letters. Of course there are valid domains that would not match
t
Hi, looking at your sql statement, it seems like you are always setting
my_job_id and job_id to the same value for each row in the table. "select
job_id AS my_job_id" is just putting the value of job_id in a variable
called my_job_id. Could you tell us the structure of your mysql table please
At 10:27 AM 2/6/2002 -0500, Ben Crawford wrote:
>You also seem to have an extra equals. Your loop should read:
>
>while (false != ($file=readdir($handle))){
I think you could eliminate the "false !=" in the while condition...
It should be just the same if you write
while (($file = readdir($handl
The username will be the same username that apache is running as, which you
can specify in your httpd.conf file.
-Jeff
At 10:32 AM 2/6/2002 -0500, Ben Crawford wrote:
>I apoligize if this question has already been asked but
>
>I am looking to upload files to my server. I use a form and can
Hi, I think that you could still use Chris' method, you will just have to
do it in a loop. Create an array of all the form fields, and then have a
nested for loop which just checks that none of the elements are equal.
$numelements = count($fieldarray);
for($i = 0; $i < $numelements; $i++) {
The plus is a special character for regular expressions. You need to
escape it in order to search for a literal +
Try this:
eregi("\\+", $variable)
Jeff
At 08:40 PM 2/7/2002 -0500, you wrote:
>I'm trying "if(eregi("+",$variable)){", but it gives me an error. What do I
>do?
--
PHP Genera
Not really a php question, is it? But what I would do is have two tables,
a cdrom table and a keyword table. Each cd in the cd table would have a
cd_id, and then the keyword table could have two attributes, cd_id (foriegn
key from cdrom table) and keyword. Make the primary key for the keywor
I would actually do the check inside the function, that way you don't have
to do it each time before you call the function. Also, by doing this you
can set things to a default value (if that is relevant to your code...).
-Jeff
At 08:20 PM 2/8/2002 +0100, Nick Wilson wrote:
>-BEGIN PGP SIG
Hi, try this:
str_replace(""
Jeff
At 03:45 PM 2/8/2002 -0600, Steven Jarvis wrote:
>I'm trying to do some string replaces on XML files to import them into a
>prprietary db that doesn't understand XML.
>
>I need to strip the XML tags out of the file.
>
>However, when I use this line:
>
>$co
It may be having a problem because you are not specifying which connection
to use.
perhaps try something like this:
if(!$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd"))
die("An Error Occured. Unable to connect to the database.");
if(!@mysql_select_db("$dbname",$db))
die("An Er
Hi, for starters, I think you need to change your html... it should read
something like this:
Name:
Jeff
At 03:50 PM 2/14/2002 +, Sean Connelly wrote:
>Hi,
>
>I've just started to learn php. I can't seem to get any data from an
>HTML form to a php script. I've had a look at the manual an
A symbolic link is like a pointer to a file. It is like a "shortcut" on
windows OS's...
Jeff
At 03:44 PM 2/14/2002 -0700, Kevin Stone wrote:
>I did a net wide search on Symbolic links to learn what they are and how
>to use them. Wouldn't you know everyone's talking about them but no one
>expl
Sign me up, too! I'd love to help with any site that promotes good beer! =)
Perhaps we start a database of pubs/bars and they can be browsed from a
map, or a user can search for bars by name/location/rating(maybe), and they
can also search by beers on tap. Sounds like quite a fun project to m
Hi, mine is located here: /usr/bin/php
I don't recall telling it where to put the binary (if such an option
exists) so I assume that is the default location.
Jeff
At 09:28 AM 2/19/2002 -0500, Hunter, Ray wrote:
>Has anyone compiled php on linux and found the binary executable file?
>
>
>Ray Hun
Hi, it sounds like it shouldn't be too bad, but you didn't say where you
plan on getting the information from...
At 11:43 AM 2/20/2002 +1030, Shannon Doyle wrote:
>Hi People,
>
>I have been looking around the web lately and have noted a number of
>sites are running what appears to be php script
I would say it stands for "fixed disk" - it really doesn't format anything
anyway, it is for partitions.
A paste from the man page:
NAME
fdisk - create or modify fixed disk partition table
Jeff
At 11:11 AM 2/20/2002 -0500, Brian V Bonini wrote:
>Anyone know what "fdisk" stands for?
>
>I
Well, I guess many things are "accepted" now, but here's my two cents:
I wouldn't access global variables, instead you should pass everything you
need as parameters. Using global variables can come back to bite you
occasionally because you may think you are changing a local variable at one
po
Well, what you are missing is that those are the number of seconds *on that
machine* since 1970... so actually, if both of your clocks were set
correctly, you should be getting the *same* number returned by
time(). Hope that clears it up a little.
Jeff
At 03:18 PM 2/21/2002 +1100, Justin Fr
Why not download a forum, such as phpbb (www.phpbb.com) and check out their
code? =)
Jeff
At 03:41 PM 2/22/2002 -0500, Leif K-Brooks wrote:
>I'm planning to make a forum built into my site. I know all of the forums
>have bbcode, and I doubt they all programmed it themselves. Is there
>somewhe
If you are setting a variable inside of the if statements, and then
checking that variable later, then I would say you should either use an
else statement to give that variable a default value, or you should set the
variable to a default value before the if statements. Your code is
"legitimat
Search on google! Here's the bzip2 homepage with links to download a
windows executable:
http://www.digistar.com/bzip2/
Jeff
At 10:55 AM 3/1/2002 +0530, dharmavatar wrote:
>Hi,
>Can any one tell me how to decompress .bz2 file,I am using WINDOWS-2000 so
>what are the steps?
>Thanks in advance.
How about just typing 'mysql' (without the quotes)... if it is on the
system and in a directory which is in your path (it should be if your host
knows what they're doing), then that will connect to mysql for you. If
that doesn't work, then you can either try using 'find' (type 'man find')
fo
As far as I know, you can't name different checkboxes with the same name
(seems odd to me to do this anyway...). When you submit a form to a php
page, the php page will have a variable for each input item in your
form. So if you have checkbox items named, "a", "b", "c", and "d", and
submit a
50 matches
Mail list logo