[PHP] Found the problem...

2007-07-26 Thread Rob Adams
Found the problem. The piece of code was outside of a block where $db had been created, so it was a non-object the whole time... Easily fixed, but a hard error to find when I'm assuming it's my brand new class that's the problem. -- Rob Rob Adams [EMAIL PROTECTED] wrote in message news

[PHP] Createing a Test DB Object.

2007-07-26 Thread Rob Adams
I need to test a bunch of code that extensively uses a mysql database (both selects and inserts), and I want to do it without actually writing to the database.. Instead of commenting out all of the $db-query($insert_query) statements and echoing $insert_query, I thought I'd make the following

[PHP] Outputting a PDF.

2007-08-22 Thread Rob Adams
I have a pdfs saved in a database (created with pdflib). When I output them in firefox, it works just great everytime. But when I try in IE, it doesn't always work. I know, I know, it sounds like a browser issue, but here's the problem. I figured out that when I run session_start(), the pdf

[PHP] Hidden images.

2005-01-21 Thread Rob Adams
Ok - I've finally got something that sometimes works. http://smada.com/images/hide_image.php I talked to a Delphi programmer, who whipped something out in about 20 minutes. My code is a translation of his. function colorParts($col) { $parts['r'] = ($col 16) 0xFF; $parts['g'] = ($col 8)

Re: [PHP] Hidden images.

2005-01-21 Thread Rob Adams
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Ok - I've finally got something that sometimes works. http://smada.com/images/hide_image.php I dunno what you did to the first file upload button, but as soon as I choose the FIRST file, I get

[PHP] Include wierdness.

2005-03-04 Thread Rob Adams
From the manual on 'include': Files for including are first looked in include_path relative to the current working directory and then in include_path relative to the directory of current script. E.g. if your include_path is ., current working directory is /www/, you included include/a.php and

[PHP] Re: Include wierdness.

2005-03-04 Thread Rob Adams
One correction. The include('lib/test2.php') is actually a require_once('lib/test2.php'). That's why it quits and I don't get the third include. -- Rob Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From the manual on 'include': Files for including are first

Re: [PHP] Re: Include wierdness.

2005-03-04 Thread Rob Adams
a /www/include dir. The reference to that is just from the manual that I quoted. -- Rob Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: One correction. The include('lib/test2.php') is actually a require_once('lib/test2.php'). That's why it quits

Re: [PHP] Re: Include wierdness.

2005-03-04 Thread Rob Adams
Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] My guess is the file *is* in the include path, but the current working directory when require_once() executes is not what the OP thinks it is... I was hoping this was the case, but just checked it with: echo `pwd`; and it

Re: [PHP] Re: Include wierdness.

2005-03-04 Thread Rob Adams
Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jason Barnett wrote: Jochem Maas wrote: Rob Adams wrote: ... you 100% sure your include_path is '.' ? just asking. also you mention a /www/lib and a /www/include dir - maybe thats the problem? maybe you can make

Re: [PHP] Include(remote HTML file) doesn't work since upgrade

2003-07-25 Thread Rob Adams
Police Trainee [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Warning: main(http://143.43.222.103/sga) [function.main]: failed to create stream: Invalid argument in /hsphere/local/home/domain/mydomain.com/includesite.php on line 2 Warning: main() [function.main]: Failed opening

[PHP] Re: Freeze Pane

2003-07-25 Thread Rob Adams
I recently had to do something similar, except with the first row, instead of the the first columns. The way I did it was by creating two different tables, and putting the second table inside a div tag something like follows: div style={width:xxx; height:xxx; overflow:scroll;} Here is an

Re: [PHP] Store array as Session Variable

2003-07-28 Thread Rob Adams
Pushpinder Singh Garcha [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $details is empty !! I'd check your sql query and see if any rows are being returned. Also, put the initializing of the array ($company_name = array()) outside of your loop, just in case. I used to think that

[PHP] Re: include and imagejpg() weird behavior - maybe header?

2003-07-29 Thread Rob Adams
Oli [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a function that resizes images. If I put it in the same php file that calles it it workes fine. Gives a nice thumbnail or whatever size I choose to display. If I however put it in a seperate file and include it and call it I

[PHP] Re: include and imagejpg() weird behavior - maybe header?

2003-07-30 Thread Rob Adams
script and all is fine, with or without the header function. Oli Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Oli [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have a function that resizes images. If I put it in the same php file that calles

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Rob Adams
Cpt John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: Steve Buehler [EMAIL PROTECTED] hm. Looks like on my localhost I can't seta cookie like this: setcookie (coach_access[login_id], coach,0,/,$cookhost); if I change it to just: setcookie

[PHP] Re: global scope issue

2003-08-14 Thread Rob Adams
Shawn McKenzie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm having problems using global vars. I have read the docs and all of the notes but it's not helping. Simplified example: Simplified? So maybe what you're giving us doesn't include the problem? The scripts below work

Re: [PHP] strtotime()

2003-08-14 Thread Rob Adams
Jennifer Goodie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] strtotime( '+1 month', mktime( 0, 0, 0, 1, 1, 2003 )); I get back the timestamp for 1/31/2003 and not 2/1/2003. Are you sure? Yeah, but I missed something in my above example. If I did this: strtotime(

[PHP] Re: global scope issue

2003-08-14 Thread Rob Adams
Don't you just hate it when the thread your replying to has gone on to some other thread that you didn't notice? -- Rob Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shawn McKenzie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm having problems using

Re: [PHP] Mail problem

2003-09-22 Thread Rob Adams
[snip] I have about 9000 addresses and can only successfully send about 2000 mails before the page say complete/done. [/snip] Depending on your error reporting level, instead of ending normally you should get a script timed out message. If you're not getting that message, it may be that your

[PHP] Re: ereg_replace question

2003-06-11 Thread Rob Adams
Todd Cary [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip I have a string, This does not work $fullpath = $HTTP_SERVER_VARS[PATH_TRANSLATED]; $fullpath = ereg_replace(\\[^\\]+$,,$fullpath) . '\\'; What have I missed? Todd /snip -- You could just use: $path =

[PHP] Re: ignored php.ini?

2003-06-27 Thread Rob Adams
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I have php 4.3.2 running as isapi module on windows 2000. I have a php.ini in d:\winnt but when I edit it the output from ? phpinfo(); ? is as before. Any hints? Many thanks in advance, bye

[PHP] Weird comparison error.

2003-06-27 Thread Rob Adams
I don't need anything fixed, I'm just curious about something I noticed. I'm doing a comparison between a variable and a hard coded char. Like this: if ($k1 == n) The variable is usually the first key in an array (0) so it should usually evaluate false, but it was true every time until I

Re: [PHP] Re: Weird comparison error.

2003-06-30 Thread Rob Adams
Lars Torben Wilson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2003-06-28 at 11:28, Bobby Patel wrote: In PHP there are two operators for comparisons, the double and triple equivalance. Double equivalance just check's the boolean type so if (0 == 'n') is

Re: [PHP] nested for loops

2003-07-09 Thread Rob Adams
You're getting the data from your query outside of your loop. That needs to be part of your loop, otherwise, as you've seen, it just displays the first record. You could try something like this: $cnt = 0; while ($row = mysql_fetch_object($result)) { echo td$row-file_name/tdtd$row-file_id/td;

[PHP] Re: php mysql array question

2003-07-11 Thread Rob Adams
It shouldn't take a lot of code to put results into an array: $query = select * from table; $r = mysql_result($query); while ($row = mysql_fetch_object($r)) $hold[] = $row; (OR, to index by some id field in the database:) $hold[$row-id] = $row; mysql_free_result($r); Total of 5 lines. --

Re: [PHP] Writing to files

2003-07-11 Thread Rob Adams
You could try using the file() function. Then loop backward through the array or use array_reverse. -- Rob Jason Giangrande [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Any ideas on how I can print the lines of my file in reverse order, then? Does fgets() always process

Re: [PHP] Array Question

2003-04-01 Thread Rob Adams
Creating an array that holds the 11 combined records from the two tables, and sorting the array according to date: (This depends on what type your using to store dates in MySQL, and that the exact date is unique for each record across both tables. If the date isn't unique, it requires a little

[PHP] Re: 4 or 5 Fridays this month

2003-04-01 Thread Rob Adams
Liam Gibbs [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there any easy way of figuring out if there are 4 or if there are 5 Fridays in a given month? I have it figured out using a loop, but I was just wondering if there was a way that date() or strtotime() could do it. K - given

[PHP] Re: Smarty problem

2003-10-08 Thread Rob Adams
Webmaster [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I already posted this question in the Smarty group, without success. I have a problem with Smarty. I wrote the following function that gets data from a mysql database: function showHeadlines() { global $db;

[PHP] Re: what is the best PHP editor?

2003-10-13 Thread Rob Adams
I like EditPlus too, but recently I've been using UltraEdit. http://www.ultraedit.com/ $35 registration. Has great column mode support. I use the macros and templates all the time. Has a word file for PHP. -- Rob Dougd [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I currently

Re: [PHP] Re: what is the best PHP editor?

2003-10-13 Thread Rob Adams
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] http://www.phpedit.net It's good. How good, is up to you. --- Rob Adams [EMAIL PROTECTED] wrote: I like EditPlus too, but recently I've been using UltraEdit. http://www.ultraedit.com/ $35 registration. Has great column mode

[PHP] Re: Foreach Array Help

2003-10-14 Thread Rob Adams
Jed R. Brubaker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Okay, total newbie when it comes to arrays, and I could really use some help. I sure this will be an easy one for you veterans out there. Here is the array ($code): array(2) { [total]= int(1) [assign]=

[PHP] Re: Foreach Array Help

2003-10-14 Thread Rob Adams
approaching this whole array thing wrong? I still don't understand exactly what you want to do, but see below... Thanks. Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Jed R. Brubaker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Okay, total newbie when

[PHP] Re: Simple array question

2003-10-22 Thread Rob Adams
René fournier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a simple way to return the key (name) of one element in an array? I looked up key() in the docs, but there are no examples or notes... key() will do it, but you have to have the internal pointer already on the

[PHP] Re: including files from different sub directories

2003-10-24 Thread Rob Adams
Allex [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, What's the syntax for including/requiring files located in directories different than the root directory? Especially files from different sub directories under the root? Going down (classes/globals.php) is ok, but going

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- S.P.Vimala [EMAIL PROTECTED] wrote: How to create a unique session for every new browser instance? I'm not sure if this fits your definition of new browser instance, but there is no way for a remote Web server to

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Rob Adams [EMAIL PROTECTED] wrote: I'm not sure if this fits your definition of new browser instance, but there is no way for a remote Web server to distinguish between two instances of the same browser running

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
different requests from two different windows on the same computer. -- Rob Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- Rob Adams [EMAIL PROTECTED] wrote: Test it yourself. With all due respect, it seems you should be doing the testing. Login to a PHP app

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
] wrote in message news:[EMAIL PROTECTED] From: Chris Shiflett [EMAIL PROTECTED] --- Rob Adams [EMAIL PROTECTED] wrote: Test it yourself. With all due respect, it seems you should be doing the testing. Login to a PHP app using a standard browser and session cookies and see

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Rob Adams ([EMAIL PROTECTED]): I will test it, because it seems I don't understand this issue as much as I could. But I can already tell you results I see right now: I open a web browser (IE) and login

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
understand how it works. Thanks for the discussion. -- Rob Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Rob Adams ([EMAIL PROTECTED]): I will test it, because it seems I don't understand

Re: [PHP] php sessions

2003-10-28 Thread Rob Adams
Chris Shiflett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- CPT John W. Holmes [EMAIL PROTECTED] wrote: If you are not relying on a cookie based session, then this will work. Each login could be assigned a different session ID, so the requests for each browser will be

[PHP] Re: Problem connecting to remote MySQL Server

2003-11-03 Thread Rob Adams
Donald Tyler [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I am publishing a site I have developed and I am having problems with the scripts being able to access the remote MySQL server. When I try to connect using the PHP scripts I just get an error saying that access is

[PHP] Re: mysql_field_type() ...

2003-11-03 Thread Rob Adams
René fournier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ...will say if a field is of type ENUM, but not its possible values (including default). Does anyone know how I can fetch possible values of a field type of ENUM? desc $tbl_name; You'll have to parse it, but it will give

Re: [PHP] Problems using gethostbyname() to resolve *.net.au

2003-11-03 Thread Rob Adams
Dan Anderson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] the firewall is configured to block pings from outside - security reasons - so called stealth mode No, you are wrong. If you're going to ask for help, you should take it in whatever form it comes. Perhaps he wasn't

[PHP] Re: phpmyadmin foulup

2003-11-04 Thread Rob Adams
Joffrey L Leevy [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all: I was trying to use phpmyadmin for the first time and messed up when trying to give the [EMAIL PROTECTED] a password. I did that because phpmyadmin told me something about lax security using root with no

[PHP] Re: Handling checkboxes that aren't checked!!!

2003-11-04 Thread Rob Adams
Kb [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a page with a Form and a Checkbox. I have a second page which wants to do something depending on if the checkbox is selected or not. If its selected there is no problem. But if I tryand do anything if it isn't

[PHP] Re: Handling checkboxes that aren't checked!!!

2003-11-04 Thread Rob Adams
All these posts as replies that are not linked to the originals (and sometimes show up timewise BEFORE the original!) throw me off. I'll try to not answer already answered questions anymore. -- Rob Rob Adams [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Kb [EMAIL PROTECTED

[PHP] Re: get some part of text

2003-11-14 Thread Rob Adams
Try a regular expression. /errorCode=\([~\]+)\/ I'm not good at that kind of syntax, but something very similar to that should work. -- Rob Qt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] dear Sirs, I have this string; job_resp errorCode=4194337 description=Originator you

Re: [PHP] PHP-Only Polling Script?

2003-11-20 Thread Rob Adams
John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] For premade scripts, there's always here too... http://www.phpresourceindex.com Is this page a joke? When I go there, I get this message: error Active Server Pages error 'ASP 0241' CreateObject Exception /Default.asp

Re: [PHP] What do you say to someone who says...

2003-12-04 Thread Rob Adams
snip Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There are several large complex projects using PHP as the language, jsut as there are several large projects out there using C++, JAVA, Fortran, Cobol etc.etc.etc. /snip I'm cringeing! Did you just compare C++, Java,

Re: [PHP] Show Results one at a time ?

2004-01-29 Thread Rob Adams
If you're using the command line, ignore this comment. Dave Carrera [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] --- updated with Sleep() --- function TestFunc(){ $cnt = array(1,2,3,4,5,6,7,8,9,10); $i=0; while($i =count($cnt)){ //sleep(1); set_time_limit(2); //sleep(1);

[PHP] Re: random?

2004-01-29 Thread Rob Adams
Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $sql = SELECT * FROM agentdb WHERE ((OfficeID 214) and (agentdb.agent_id 1115421) and (agentdb.agent_id 100) and agentdb.agent_id 333)) ORDER BY RAND() LIMIT 1; The above code should generate a random agent upon

Re: [PHP] random?

2004-01-29 Thread Rob Adams
Chris, I've checked your site and see you're still having the problem. What exactly isn't working? -- Rob Chris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Rob, Thanks for the ideaI think it is probably a better way to go also. Hers what I came up iwth...and the rest

[PHP] Re: starting a session

2004-02-03 Thread Rob Adams
Angelo Zanetti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, is there ever a certain situation where you would have something at the top of your page before session_start();? If so why would it be before session_start();? I have a situation where I'm saving an object in

Re: [PHP] beginner question about while loops

2004-02-06 Thread Rob Adams
Paul Furman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Eric Gorr wrote: [snip] while ($file = readdir($fh)){ if (strstr ($file, '.jpg')){ $pictures[] = $file; #print $pictures[]; #Fatal error: Cannot use [] for reading Which element are you trying

Re: [PHP] check if user session exists

2004-02-09 Thread Rob Adams
Christian Calloway [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yeah thats pretty much what I have concluded. I was absolutely sure there would be a way to check if a session was still active, but I guess not :-(. Thanks though It depends on your definition of 'active.' If you

Re: [PHP] Get nice variables from POST

2004-03-11 Thread Rob Adams
Mike Mapsnac [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: Marek Kilimajer [EMAIL PROTECTED] $fields = array('username', 'password', ...); foreach($fields as $key) $$key = $_POST[$key]; Thanks. It looks much nicer :) Along the same lines, I've found this helpful when

[PHP] Re: tracking emails

2004-03-15 Thread Rob Adams
Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Problem: After sending the newsletter try to see how many people have actually opened the email. Send as html and call a script via a img tag passing the member id (Problem: html messages is usually off) HTML is the only

Re: [PHP] Re: tracking emails

2004-03-15 Thread Rob Adams
Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yep, am going with html but am having a few problemsyahoo and hotmail totally screw up the email and I dont get any confirmation :-(, after going into view- source I see that the IMG src address is being over written by

[PHP] Re: determine logged in user

2004-03-16 Thread Rob Adams
Ashley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Can PHP determine the username of the person currently logged into a Windows 2K machine? On the machine running the client (web browser) or the machine running the server? On the client, no. At least, I hope not. On the server...

Re: [PHP] Image info?

2004-03-19 Thread Rob Adams
Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] RTFM http://us4.php.net/image I was reading the ... manual a little while ago, and I could've sworn I came across a part that said: 'ATFNG' We may have an infinite loop going. -- Rob -- PHP General Mailing List

[PHP] Re: Can't to insert data ( via variable ) into MS-SQL

2004-03-26 Thread Rob Adams
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $str = INSERT INTO staff (name,job,subject) 1 2 3 VALUES('$name','$job','$date','$subject',); 1 2 - 3 -- Rob --

[PHP] Re: simple, but missing something?

2004-03-26 Thread Rob Adams
Jas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] So something like this? function database_connection() { global = $cfg['hostname'],$cfg['username'],$cfg['password']; global = $cfg; From that page that was linked in the previous post: ?php $a = 1; $b = 2; function Sum() {

Re: [PHP] Re: Can't to insert data ( via variable ) into MS-SQL

2004-03-27 Thread Rob Adams
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $str = INSERT INTO staff (name,job,subject) 1 2 3 VALUES('$name','$job','$date

Re: [PHP] PHP Programming Innovation Award

2004-04-15 Thread Rob Adams
Hello. Manuel Lemos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This award was created mainly to make potential contributors rethink what they submit. It is probably not very useful to contribute more template engines or MySQL database access classes if what is submitted does

[PHP] Re: Why are Session Variables carried over into a brand new browser window?

2004-04-19 Thread Rob Adams
Bob Bruce - Programmer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] A target=blank href=http://www.themuralsofwinnipeg.com/Mpages/index.php?action=gotomuralm uralid=179 so this opens a new browser window, but it is inheriting the session values from the browser window that

Re: [PHP] What is the GD library and what can I do with it ?

2004-05-11 Thread Rob Adams
Pete [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Unfortunately I don't have it on my local php installation. How can I get it ? What is your local environment? (OS, PHP version, etc.) If you're running windows, most likely all you will have to do is change your php.ini. -- Rob

Re: [PHP] Class Help Extended

2004-05-06 Thread Rob Adams
Php Email List [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $smiley = :); include_once(evil_laugh.php); echo $laugh $smiley; //Echo'd: Muuuhahahahahah :) You're syntax is a little off here. You need to use: echo $laugh . $smiley; or echo $laugh $smiley; -- Rob -- PHP

Re: [PHP] Simplistic PHP tutorial

2004-05-25 Thread Rob Adams
Gabino Travassos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Personally, if I was teaching someone programming concepts from scratch I would start them with Javascript. It's mostly platform-independent, you From my experience, PHP is much better at running the same code on

Re: [PHP] Best way to sort?

2004-06-03 Thread Rob Adams
Angelo Zanetti [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] select thename, count(thename) from tablename order by thename asc group by thename or... to sort by number of records select name, count(name) as ncnt from table group by name order by ncnt desc -- Rob -- PHP

[PHP] Re: weird error

2004-06-03 Thread Rob Adams
Pagongski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snipped / Here are some example errors: Notice: Use of undefined constant REMOTE_ADDR - assumed 'REMOTE_ADDR' in c:\win2kapp\easyphp1-7\www\index.php on line 35 These aren't exactly 'errors.' If this is

[PHP] Re: $_FILES passed by value

2004-06-03 Thread Rob Adams
Daniel Guerrier [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If I pass a $_FILES to an object by value. Does it create a copy of the actual posted files as well? In other words if I post a 2MB file to save.php and in turn pass $_FILES to an object $file-fileis($_FILES); Does

[PHP] Re: Total Server Sessions

2005-01-03 Thread Rob Adams
HarryG [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there an easier way to count the total number of sessions running on a PHP webserver? something like session_count(); If you're using file based sessions, you could count the number of files in the directory where the

[PHP] Hidden Images.

2005-01-18 Thread Rob Adams
I've been figuring out how to create hidden images. The concept is: when you highlight an image in Internet Explorer (and Mozilla too, though the grid is reversed) it puts a grid over the image. If you put another image in between what the grid covers, you can kind of hide the image that then

[PHP] Re: Hidden Images.

2005-01-18 Thread Rob Adams
:[EMAIL PROTECTED] Rob Adams wrote: I've been figuring out how to create hidden images. The concept is: when you highlight an image in Internet Explorer (and Mozilla too, though the grid is reversed) it puts a grid over the image. If you put another image in between what the grid covers

[PHP] Re: Hidden Images.

2005-01-18 Thread Rob Adams
Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Ok - Let me restate some of this: I am creating these images in PHP. I have a script right now that accepts two images. A main one, and the one that will be hidden. These can be either jpg, gif

[PHP] Re: Hidden Images.

2005-01-18 Thread Rob Adams
PROTECTED] Rob Adams wrote: I've been figuring out how to create hidden images. The concept is: when you highlight an image in Internet Explorer (and Mozilla too, though the grid is reversed) it puts a grid over the image. If you put another image in between what the grid covers, you can

Re: [PHP] Re: Hidden Images.

2005-01-18 Thread Rob Adams
Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Ok - Let me restate some of this: I am creating these images in PHP. I have a script right now that accepts

Re: [PHP] Re: Hidden Images.

2005-01-18 Thread Rob Adams
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rob Adams wrote: Ok - Let me restate some of this: I am creating these images in PHP. I have a script right now that accepts two

[PHP] Slow sessions.

2011-03-24 Thread Rob Adams
I have a load balanced website with 5 web servers. Currently, they run php 5.1.4 (for pdflib reasons). I'm going to upgrade them, so I removed one from the load balancer and installed php 5.2.17 on it. I originally installed 5.3, but some of the code was causing problems, so I went back to

[PHP] Re: Slow sessions.

2011-03-25 Thread Rob Adams
I decided to try changing the session.save_path, and I've had some interesting results. First I changed it to a local directory. Originally it was on a mounted directory on our main file server. When I switched to a local directory, everything started working fast again on the php 5.2.17

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
On 3/26/2011 11:07 AM, Bostjan Skufca wrote: Can you strace it's execution and see where your delay is comming from? If you are using apache, make it create just one child and strace that one when you generate a request. Thanks for the advice. I installed strace on the new server, and it has

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
on it now though. -- Rob On 3/28/2011 12:08 PM, Rob Adams wrote: On 3/26/2011 11:07 AM, Bostjan Skufca wrote: Can you strace it's execution and see where your delay is comming from? If you are using apache, make it create just one child and strace that one when you generate a request. Thanks

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
From: Bostjan Skufca bost...@a2o.si When you say you installed php 5.3.x and then reverted to 5.2, did you reinstall/upgrade OS and/or kernel too? Yes. The old servers were running some version of FreeBSD. The new server is running CentOS 5.5. -- Rob -- PHP General Mailing List

Re: [PHP] Re: Slow sessions.

2011-03-30 Thread Rob Adams
On 3/28/2011 3:40 PM, Bostjan Skufca wrote: Great, please report back if/when you discover the cause. After searching for some information about the error messages I was getting on the file server, I found this: http://www.spinics.net/lists/linux-nfs/msg14679.html I ran 'server nfslock