Hi Al,
I am using preg_quote in the live code. I omitted it from the example code
to simplify the example.
Thanks,
Cameron
On 8/18/08 8:31 AM, "Al" <[EMAIL PROTECTED]> wrote:
> Run your pattern thru preg_quote() prior to using it in your preg_replace().
> Don't bac
Hi Simcha,
I tried your suggestion and it does prevent the SID from being inserted
inside the extension, but causes double ?'s and SID's in some cases.
Thanks,
Cameron
On 8/18/08 2:25 AM, "Simcha Younger" <[EMAIL PROTECTED]> wrote:
>
> Hi
>
>
>
xtension.
It's just totally bizarre to me and is why I'm wondering if it's a bug. (See
links 1 & 8 by viewing source at the link above)
You or anyone have other ideas to try?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
alsely matches, it's inserting the SID
in between 2nd and 3rd letters of the extension.
You can see the code in action here:
http://kottmann.com/test.php
The full source for the test code is also available when viewing the source
of this page.
I've tested this on PHP v5.1.6 and
More info can be found here... When I get my Nokia N82 I am going to try
it out.
http://wiki.opensource.nokia.com/projects/PAMP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
One trick that one of my friends has taught me is to only use double
quotes "s where needed as they are parsed by PHP and instead use single
quotes 's
i.e.
$fred['john'] = 10;
is better than
$fred["john"] = 10;
or
echo 'This is some text' . "\n";
instead of
echo "This is some text\n";
He told
Hi All,
Just wondering if anyone has had any success getting a connection
working with PHP via SFTP.
I am running
Win 2003 Server
PHP Version 5.1.6
Win32 OpenSSL v0.9.8e Light is installed
PECL module for SSH2 is installed
The following code
-
// create connetion
Hi,
I have a program which generates classes based on table structures within
a database. However there are a few times where I need to put custom
methods within these generated classes.
I want to be able to do this but php gives an error for the following include
class generatedClass {
var $t
s pieces were built dynamic or static. I would not
> make this assumption.
>
> I thought you said the web server had MySQL 3.23 on it -- do
> you also have a MySQL 4 client there?
No, the webserver only has MySQL v4.x installed from a sparc binary.
I'm going to compile a new
x mysql client worked
from the console, that there was no version problem because it would be
using the same client libraries that PHP is using. Is that not the case?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
proves at least part of PHP can
reach the other machine... Which hopefully rules out a TCP/IP problem. I'm
going to enable debugging on the MySQL server and see if that tells me
anything.
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nclude/errmsg.h'
Example: 2003 - Can't connect to MySQL server on 'xxx.example.com' (10060)
#define CR_CONN_HOST_ERROR 2003
Any ideas on what to do next?
This works as both root and webservd (the user the webserver runs as) :
./mysql -h 192.168.1.44 -u web -p
Thanks,
Cameron
the webserver. I've reinstalled the MySQL
libraries and recompiled PHP on the webserver, but no matter what, it still
won't connect to the MySQL on the dbserver.
Is there some security function in PHP preventing this? Safe_mode is off,
but could there be something else?
Thanks,
Cameron
nternals of PHP and it's ability to connect to
remote hosts, but I think it's something to do with that.
How can I check that?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but I did find something.
The MySQL on the webserver is: mysql-standard-4.0.16-sun-solaris2.9-sparc
The MySQL on the dbserver is: mysql-3.23.54a-sun-solaris2.8-sparc
Do you think the version skew could cause this?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
a
$dbh = mysql_connect($DBhost, $DBuser, $DBpwd)
or die("Could not connect : " . mysql_error());
mysql_select_db($DBconf)
or die("Could not select database");
Could not connect : Can't connect to MySQL server on '192.168.1.44' (2)
Same thing... W
> So what error prints out when you try and connect from PHP?
Could not connect : Can't connect to MySQL server on '192.168.1.44' (2)
Not very helpful huh?
Any ideas?
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
= "192.168.1.44:3306";
$DBuser = "web";
$DBpwd = "user";
$DBreg = "registration";
$DBconf = "config";
$dbh = mysql_connect($DBhost, $DBuser, $DBpwd)
or die("Could not connect : " . mysql_error());
mysql_select_db($DBconf)
or d
#x27;s the mysql_error: Can't connect to MySQL server on '192.168.1.44'
>From the webserver error log:
php4_execute reports: PHP Warning: mysql_connect(): Can't connect to MySQL
server on '192.168.1.44' (2)
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
gt;
> > I'm creating some strings from array elements obviously. The
> issue is, the
> > array elements don't always exist depending on which function you are
> > running. And when they don't, the server log is full of undefined index
> > errors. Is there a way I can avoid these errors without adding a
> > "if(isset(...))" around each one?
> >
> > Thanks,
> > Cameron
> >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
't always exist depending on which function you are
running. And when they don't, the server log is full of undefined index
errors. Is there a way I can avoid these errors without adding a
"if(isset(...))" around each one?
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok, I feel really lame for asking this, but I can I do this in PHP:
$userid =~ /([\D]+)/;
$baseName = $1;
It seems like "Pattern Capture" is not the right term for the similar
function in PHP. I'm not sure what to search for.
Thanks,
Cameron
--
PHP General Mailing List (htt
Hi,
How would I go about determining if a specific key exists in an array?
I want to see if $conf['hOpt'] is defined. is_array only works at the $conf
level.
I tried count(array_keys($conf, 'hOpt')), but always get 0.
What am I doing wrong here?
Thanks,
Cameron
--
PHP
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
if ($line['name'] == $last) {
array_push($conf[$last], $line['value']);
} else {
$last = $line['name'];
$conf[$last] = array ($line['value']);
}
}
mysql_free_resul
f
undefined constant name" errors.
Am I going about this in the right way? Any help would be greatly
appreciated.
Thanks,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sure which
version to use and that didn't work either.
If I configure without LDAP, everything works fine. I desparately need to
get this going as we aren't going to be able to use PHP without LDAP support
and we have deadlines approaching quickly.
Any help or ideas would be greatly a
w PHP implementation. I have
reviewed some template tutorials and looked at some of the Pear modules, but
none seem to work like this.
Can anyone give me some idea of if this is possible and how I might begin?
Any information would be greatly appreciated.
Thanks,
Cameron
--
PHP General Mailing List
Hey, I'm trying to write a script which deletes a String from a file. The
String that the user wants deleted is provided from a form and the file is
named to2do.txt. I have a hidden variable called "deleting" that lets me
know when the string has been submitted.
I have written the following cod
$ndays=14;
function get_next_dates($ndays)
{
$today=date("m-d-Y",mktime(0,0,0,date("m"),date("d"),date("Y")));
$forward_date=date("m-d-Y",mktime(0,0,0,date("m"),date("d")+$few_days,date("Y")));
print "$today === $few_days === $forward_date";
for($i=0;$i<$ndays;$i++)
{
$new_days_array[]=date(
Yep thanx guys they look really cool :), and yes your right google is my
friend lol, ive been looking for days on google with more search terms than
ever but i missed these 2. take care and again thanx :D
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Anybody kno
Anybody know of any real world php class tutorials?, so far ive read ones
about building car and cake classes but i tend to learn better from actually
follow a tutorial and building something though it and i done know jack
about building cars lol.
--
PHP General Mailing List (http://www.php.net/)
Well couldnt this be done with the majority of browsers, im not sure myself
but i remember reading somewhere that you can "ask" the browser where the
the user is ?. I think it has something to do with when the system is setup
the country is recorded ? might be a windows only thing again im not sure
Thanx Tom, i should of realized that lol.
Again Thanx :)
"Tom Rogers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> Friday, October 3, 2003, 8:17:23 PM, you wrote:
> CM> ok im stumped lol i have used this code in the past to insert data
into
> CM> mysql (im relitively new th
ok im stumped lol i have used this code in the past to insert data into
mysql (im relitively new though)
--code
mysql_query("INSERT INTO Images (Image, desc) VALUES ('$name',
'$description')") or die (mysql_error());
--end code-
but i get this error]
-error-
Hi all,
I have a multi upload script, which works, but the end result is that the
files that are uploaded are set to permissions of 600. Im think this is
because they have a tmp name then are written to the "uploads" folder so in
effect they are written by another system user? (lol ok so im new to
If your on windows try this -- http://apache2triad.org/
"Hung Cuong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I need an server to put my php file to post mail.
> So anybody can introduce me some server
> Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Ok i finally got the script going :) If anyones curious heres the code.
exec($path_imagemagick."convert $path_picture -crop $height"."x$width+$x+$y
$path_picture2");
"Cameron Metzke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i have a sc
Ima having problems myself with this, i dont seem to get errors when
entering an invalid .com or .net name i put it down to verisign hijacking
invalid somains?? could this be your problem?
"Phil Ewington - 43 Plc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi All,
>
> I am having
i have a script where people upload an image it is then renamed and is
supposed to be cripped according to the values they submit but i cant seem
to get it to crop it uploads and is renamed fine though. also i wish to use
a static name so when another picture is uploaded the old one is overwritten
Sorry about that . Its my first post, :(
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Cameron Metzke ([EMAIL PROTECTED]):
> > Hi there,
> > I have been trying to make a simple monitor script using fsockopen. here
Hi there,
I have been trying to make a simple monitor script using fsockopen. here it
is
--Start Code-
monitor script
HTTP Server :
");
}
else
{
echo ("");
}
?>
FTP Server :
");
}
else
{
echo ("");
}
?>
POP Server :
");
}
els
Hi there,
I have been trying to make a simple monitor script using fsockopen. here it
is
--Start Code-
monitor script
HTTP Server :
");
}
else
{
echo ("");
}
?>
FTP Server :
");
}
else
{
echo ("");
}
?>
POP Server :
");
}
els
On Tue, 2003-06-03 at 20:59, Lars Torben Wilson wrote:
> On Tue, 2003-06-03 at 19:49, Chris Cameron wrote:
> >
> > An example that looks like it -should- work:
> >
> > $Math = sqrt(81)(5+4)-1;
> >
> What is the relation between the sqrt(81) and the (5+4)-
rt()
mostly) and basic addition and subtraction, which adds a greater
complexity.
Have I missed something obvious? Or am I doomed to do a bunch of smaller
math things so that I can do these bigger ones?
Thanks,
Chris
--
Chris Cameron
UpNIX Internet Administrator
ardvark.upnix.net
bitbucke
g, please point it out. If you've also had this problem, I'd
appreciate you sharing it. But I'm running a setup that hasn't changed
-at all- for months and this is an error that's just popped up today.
Thanks,
Chris
--
Chris Cameron
UpNIX Internet Administrator
ardvark
I have looked at these, and they make no sense to me. I tried the substr
function, but it all went a bit pear shaped.
Cameron
"Noodle Snacks" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> "Cameron Cooke" <[EMAIL
sary to compile php_pdf.so or do I need to install PDFlib, libtiff,
libjpeg, libpng, libzall from their respective sources in order to do
this?
Thanks.
-- Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
That does help, yes. So basically there is no way to access associative
arrays using numerical indices?
I was hoping I could access by either name OR number, but apparently not.
Thanks!
-- Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
', $test)) echo "It works by key name!"; // Works.
print_r(array_keys($test));// outputs "Array ( [0] => a [1] => b [2] =>
c ) "
?>
Any ideas? According to the documentation, it seems like I should be able
to access any key in the array by either name
Sure using MySQL specific calls is faster but makes you more dependant
on MySQL and thus makes your application less portable to other databases.
Cameron
John Holmes wrote:
>
>
> Did you even read the replies? Why are you going to do a bunch of string
> manipulation, mktime, an
Hi,
Just wondering if sessions can be shared on clustered webservers?
ie one location for session.save_path which is shared amongst many machines.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
roblems.
I would love to hear other people's experiences with these editors though.
Cameron .:.
--
--
Tantramar Interactive Inc.
http://www.TantramarInteractive.com/
16 Lorne St., Unit 3, Sackville, NB E4L 3Z7
Phone (506) 364-1097 Fax (506) 536-2409
From cradle to grave is b
I was wondering if anyone could tell me if bug #15983 has been fixed in this
new PHP release. I'd check myself, but I'm a bit short on time (thanks to this
very bug).
http://bugs.php.net/bug.php?id=15983 Specifically.
If ever there was a more maddening bug to run across..
Thanks,
Chris
--
Hi,
Genenally you can use 'localhost' as the hostname username 'root' and the
password is blank.
I beleive this is a default user when mysql is installed.
The details about how to connect are in the database 'mysql' and the
table 'user'. You should probably add a new user specifically for your p
\ / Microsoft Security
> Specialist:
> X The moron in Oxymoron.
> / \ http://www.thebackrow.net
>
> On Mon, 25 Mar 2002, Cameron Just wrote:
"/'([a-z]+)-([a-z]+)\s(?:([0-9]+(?::[0-9]+|))(?:,\s)?)*'/"
>
> --
> Matt
>
> - Original Message -
> From: "Cameron Just" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 25, 2002 6:15 AM
> Subject: [P
Hi,
I am trying to pull out the following information via a regular expression.
The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35'
and I want it to retreive
wed
thurs
9:35
14:56
18:35
The regular expression I am using is
([a-z]+)-([a-z]+) +([0-9]{1,2}:?[0-9]{0,2})[, ]*
It seems to
scary part is the way he repeats "ASP, JSP, or PHP" about 300
times in 3 minutes.
Cameron .:.
--
Tantramar Interactive
http://www.TantramarInteractive.com/
16 Lorne St., Unit 3, Sackville, NB E4L 3Z7
Phone (506) 364-1097 Fax (506) 536-2409
All that glitters has a high refra
ny high byte character - you could replace with null
before displaying if just deleting is all you really need.
why not specify the character set in your html so you can just leave them in?
Cameron .:.
--
Tantramar Interactive
http://www.TantramarInteractive.com/
16 Lorne St., Unit 3, S
Hi,
Is this a bad thing to do have a class stored within another class?
I would also like to store an array of another class within a class.
It seems to work apart from the fact that I can't reference an array of
class directly.
ie
$test_array[0]->get();
This gives an error.
Example code.
-
im going crazy here trying to get this code to work, its complaining on
line 38 but i can see any problems with the file, any suggestions?
Cameron
base_dir = $base_dir;
return (bool) true;
} else {
return (bool) false
I'm having some issues passing a session to a pop-up window.
The pop-up window is you average DreamWeaver popup:
Link
When you click on the link, the session doesn't get passed. I have
trans-sid enabled.
Any ideas on how I could go about passing my sid?
Thanks,
Chris
--
Chr
pache?
Thanks
Chris
-Original Message-
From: Chris Cameron [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 10, 2001 12:40 PM
To: [EMAIL PROTECTED]
Subject: PHP Script causing recursive free() calls (?)
I've got quite a problem with part of a PHP script I wrote causing
Apache too fi
I looked through the archives, and tried finding info in the PHP manual,
but haven't had much luck.
I'm looking for a way to restrict virtual host users to their specific
little directory by putting a thing in my httpd.conf.
It looked like open_basedir should do the trick, but it didn't, and
ob
Just as the solution to spray paint the m/b green made me smile, this did
too.
This will strip out all characters except numerals at the beginning, right!
martin Cameron
On Fri, 03 Aug 2001 11:52, you wrote:
> on 8/2/01 5:32 PM, Jeff Oien at [EMAIL PROTECTED] wrote:
> > Is there
Try Sessions, bud. That's what they're there for.
On Mon, 23 Jul 2001 21:46, you wrote:
> Hi all,
> I need store all the userid's connected to my site, in a
> database. the database, if the user has closed his browser a php script
> will check after intervals of a few minutes, if the user i
Here's a Quick & Dirty script that I ran up to get a display of 10 items per
page with each click on a hyper-linked page returning a new page .. if you
know what I mean. I've even included the headers so that any newbies can see
the complete script and not just bits. The theory is that the firs
I've spent a bit of time on it, and it looks to me that I've gotten an
infinite loop going in a database query. I'm not certain, as something
else has come up, and it's something I'll have to get back to (hopefully
today). This may or may not have been the case with yours. I'll let you
know what I
I'm getting quite the whacked out error when trying to run this one php
file.
FATAL: erealloc(): Unable to allocate 15728640 bytes
When trying to load it as a webpage I get:
Alert!: Unexpected network read error; connection aborted.
from lynx. When running the file from the command line with
I'm a bit unclear as to which result it is I use this function on.
So lets say I;
$Query = mysql_query("SELECT something FROM here");
$Result = mysql_fetch_assoc($Query);
Do I mysql_free_result the $Query or the $Result? If it's $Result, would
this be the same as just going unset($Result)?
Thank
Unless you're using PHP3, I'd try using $HTTP_POST_FILES variable as
suggested in http://www.php.net/manual/en/features.file-upload.php.
Chris
--
"... perhaps yer just such a man you put an embarasing fire in her loins"
- Noah A.
On Sun, 13 May 2001, Matthias Roggendorf wrote:
> Hi,
> s
I suppose when you have so few problems you get to nitpick..
Guess my question is; why doesn't this work?
if(sprintf("%01.2f",$Result[CurrentPrice]+$Result[Increment]) <=
sprintf("%01.2f",$BidAmt)) {
when this works;
if(0.30 <= 1.00) {
I'll just settle with a workaround for now.
Thanks,
Chri
im playing with the cgi version of php for a change and im trying to
work out how to set a different include path on each vhost but i cant
work it out.
TIA,
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
;
> print "";
>
>
> and, the var name is $var_hello
>
> this way, the value of your var do not appear in the URL,
>
> This work for me...
>
>
>
> Martin Cameron wrote:
>
>> Here is a simple form file that needs to pass a variable -
}
?>
The thing is that if you simply hit "enter" - rather than click the
"submit" button, the first directive in the tag is invoked, and
the value of the $hello variable IS passed.
regards
Martin Cameron
guru's like you sascha . . .
oh well, perhaps 4.1 wishlist?
Cameron
Sascha Schumann wrote:
> On Mon, 23 Apr 2001, Cameron wrote:
>
> > well, im not about to test ircg but im going to do the rounds with testing
> > thttpd yet again. would be nice to have some form of limiting
well, im not about to test ircg but im going to do the rounds with testing
thttpd yet again. would be nice to have some form of limiting in thttpd like
the apache stuff how you can set prepends and execuction
limits etc. but i think thats a bit much to get added at this time
Cameron
Sascha
The topic says it, i was wondering if anyone had a how-to on suEXEC CGI
php. I have used the cgi before but havnt ever had the time to setup the
suEXEC. Wondering if there is a guide to save me going crazy.
Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail
My setup is PHP 4.0.4p1 with Apache 1.3.19 (PHP as a module), and sendmail
at /usr/sbin/sendmail. I have sendmail_path = /usr/sbin/sendmail -t -i in
my php.ini. THis is all on Linux.
When I use mail() in any which way, it returns as if it were sucsessful,
but in my maillog I see;
Mar 31 16:22:16
Hi,
Im wondering if anyone knows of a shipping module I can use to
integrate with my shopping cart solution.
Thanks,
Craig
Hello,
We have a shopping cart developed in php and when the cart goes to SSL
the images do not show up in Netscape, only IE. The only way around this
is for me to copy all images into the ssl directory. This is very
inefficient. I know there is a way to have php read the files in SSL.
Any
555 W. University Suite 2, Mesa, Arizona 85205
Hi,
I’m looking for a shipping model
that we can use to integrate into our shopping cart. Does anyone know of any?
Thanks
Craig Cameron
-
Apex Digital
Hi,
We are developing a shopping cart application are wondering if there are
any modules available to integrate with the different shipping
companies. An help would be greatly appreciated.
Thanks,
Craig
important points I have missed?
I know the law is very different from country to country but I'm sure much of this
would be the same.
Cameron Just ([EMAIL PROTECTED])
Phoenix Digital Develo
Does anyone know if it is possible to maintain session state across a
cluster of four web servers?
Regards
Martin Cameron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list
wroot\thisfile.phtml
I have used escape characters when referencing the directories too.
$filename = "nt4server\\wwwroot\\thisfile.phtml"
It still doesn't work.
Is there something on my NT box that I need to set up?
Thanks
*****
Warning: checkdnsrr() is not supported in this PHP build in
/usr/local/apache/htdocs/squirrelmail/plugins/filters/filters.php on
line 203
what module do i need to compile into php to get the function working?
http://www.gattcomp.com.au/~gamr/test.php
for a list of already compiled modules . . .
hen returning data from MySQL that begins with a `$',
> it munges the $ and the first two characters following. This change has
> only been since my upgrade from 4.0.3pl1 to 4.0.4.
>
> Any ideas?
>
> Cameron S. Watters
> [EMAIL PROTECTED]
--
PHP General Mailing List
l1 to 4.0.4.
Any ideas?
Cameron S. Watters
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
ok, im working on a simple and fast templating system for the website im
recreating at the moment. im trying to make it so as the template file
can be opened into a variable before it is passed to the parsing section
so as i dont have to open the file 100 times etc. im not using
fasttemplates beca
90 matches
Mail list logo