php-general Digest 13 Apr 2005 15:38:43 -0000 Issue 3395

2005-04-13 Thread php-general-digest-help
php-general Digest 13 Apr 2005 15:38:43 - Issue 3395 Topics (messages 212982 through 213014): Re: HELP! 212982 by: Stephen Johnson image display 212983 by: Cima 212985 by: Petar Nedyalkov error handling 212984 by: Cima 212986 by: Petar Nedyalkov

php-general Digest 14 Apr 2005 03:39:52 -0000 Issue 3396

2005-04-13 Thread php-general-digest-help
php-general Digest 14 Apr 2005 03:39:52 - Issue 3396 Topics (messages 213015 through 213048): Re: trying to load mysql extensions 213015 by: Richard Davey phpmyadmin blank screen. 213016 by: Ross 213017 by: Joseph Connolly Re: PHP 4 to PHP 5 Migration shortcut

Re: [PHP] image display

2005-04-13 Thread Petar Nedyalkov
On Wednesday 13 April 2005 09:11, Cima wrote: hi, what is the best way to display an image, that is stored in a database in postgres, in a table form along with other fields that are in the same table? postgresql 8.0 e.g my_table(name varchar(15),sex character (1), picture_id oid) in a

Re: [PHP] error handling

2005-04-13 Thread Petar Nedyalkov
On Wednesday 13 April 2005 08:46, Cima wrote: hi, im working with php 4 and postgresql 8 and i would like to know how to handle certain errors generated. in postgresql, i've written a stored function that selects a record from a table and in case no record is found i 'raise an exception'.

Re: [PHP] Defined constant in mysql_query - Question.

2005-04-13 Thread Petar Nedyalkov
On Wednesday 13 April 2005 04:37, Labunski wrote: Hi, Can I use Constant in mysql query like this: define(LANG, eng); mysql_query(SELECT * FROM data WHERE col = 'articles' ORDER BY subjectLANG); You can use: mysql_query(SELECT * FROM data WHERE col = 'articles' ORDER BY subject.LANG);

[PHP] Index of /base-1.1

2005-04-13 Thread Mark Sargent
Hi All, typing localhost/bse-1.1 gives me access, but, in this format, Index of /base-1.1 Icon Name http://localhost/base-1.1/?C=N;O=DLast modified http://localhost/base-1.1/?C=M;O=A Size http://localhost/base-1.1/?C=S;O=A Description

RE: [PHP] error handling

2005-04-13 Thread Stephen March
Personally, I create a custom error handler for all my apps (currently 4.3.* compliant). While I normally use Smarty and have separate error templates, here is a quick example. function errorHandler($errno, $errstr, $errfile, $errline ) { print Error #: $errno br/Error Message:

[PHP] Problem with recorset

2005-04-13 Thread kioto
Hi all sorry for the newbie's question but i want understand the problem. I have use a simple command with sqlite to get a data from a table. $dbFile = realpath(./)./data.db; $db = sqlite_open($dbFile); if (!(is_resource($db))) { die(Impossibile aprire uno stream: .

[PHP] User Management

2005-04-13 Thread Dasmeet Singh
Hi! I am developing an applicaton in PHP where different users would have different permissions and access to different functions/pages of website. Now whats the best way to do tht? One way I can think of is keep all permissions in a table and divide everyting on site into functions..and when

[PHP] How get words on a webpage

2005-04-13 Thread Ken
On 4/13/05, issin [EMAIL PROTECTED] wrote: Ken, Echo and printf can't get words on other webpage. I want get words, no only show. Thanks! Issin -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 3:16 PM To: issin Subject:

[PHP] php SMPP

2005-04-13 Thread kyriacos sakkas
Hi all, Just wondering if anybody has had experience using SMPP with php. I have used the one available class that has limited functionality for sending simple messages, but would like to do a little bit more (concatenated messages over 170 chars.). Ipworks has some libraries, but

Re: [PHP] User Management

2005-04-13 Thread angelo
use an include file at the top of each page. in this include file you will check to see whether that user has access to see that page, if they dont then just redirect to the main menu page or an error page. hope this helps Angelo Zanetti Z Logic www.zlogic.co.za

Re: [PHP] collect2: ld returned 1 exit status, make: *** [sapi/cli/php] Error 1

2005-04-13 Thread Marek Kilimajer
Mark Sargent wrote: Mark Sargent wrote: Hi All, keep getting this error with make on Fedora 3, home machine. Successfully installed on work FC3 machine earlier today. I did make twice, to no avail, and then redid the configure then another make, with the same results. collect2: ld returned 1

[PHP] Re: Index of /base-1.1

2005-04-13 Thread David Robley
Mark Sargent wrote: Hi All, typing localhost/bse-1.1 gives me access, but, in this format, Index of /base-1.1 Icon Name http://localhost/base-1.1/?C=N;O=DLast modified http://localhost/base-1.1/?C=M;O=A Size http://localhost/base-1.1/?C=S;O=A Description

Re: [PHP] User Management

2005-04-13 Thread Dasmeet Singh
Thanks.. And how to manage user and their permissions.. should I store each page name in a table and then store permissions of each and every user to individual pages in another table? Is there any other way to do this? [EMAIL PROTECTED] wrote: use an include file at the top of each page. in

RE: [PHP] User Management

2005-04-13 Thread Stephen March
This is one of the many reasons I've been using Fusebox for the past few years. http://www.fusebox.org It's an open sourced framework that provides you with an interesting way to do includes, to break your application out into MVC (Model View Controller) and allows you to provide a better

Re: [PHP] User Management

2005-04-13 Thread Satyam
One of the most flexible ways to do this is to have one table with each user information, then a table of groups and group members. Users, per se, don't have permissions, they acquire them from the groups they belong to, it is easier that way than to assign permissions to each individual user,

Re: [PHP] User Management

2005-04-13 Thread Dasmeet Singh
Thanks I checked fusebox.. its really nice and interesting.. Still I wasnt able to find anything related to managing users on its site.. or I have to seperately built a user authentication system? Stephen March wrote: This is one of the many reasons I've been using Fusebox for the past few

Re: [PHP] Re: Index of /base-1.1

2005-04-13 Thread Mark Sargent
David Robley wrote: Mark Sargent wrote: Hi All, typing localhost/bse-1.1 gives me access, but, in this format, Index of /base-1.1 Icon Name http://localhost/base-1.1/?C=N;O=DLast modified http://localhost/base-1.1/?C=M;O=A Size http://localhost/base-1.1/?C=S;O=A

Re: [PHP] Drop down list - persistant value

2005-04-13 Thread Peter H. Lemieux
I use a function to create select boxes: function make_select($fieldname,$options,$selected,$opt=) { # make a select box with option text $opt # $fieldname = name of html field # $options = associative array of select options # $selected = field key of selected item

[PHP] Selectively Extract Sub-Array from an Array

2005-04-13 Thread Tom Rawson
On PHP 4.3.x ... (not using PHP 5) Say I have two arrays, the first has keys 'key1' ... 'key20'. The second has some other keys with different names (i.e. they do not overlap those in the first array). I want to add certain elements from array1 to array2. I can do it like this:

[PHP] OT - Blank subject lines!!!

2005-04-13 Thread Miles Thompson
I assume others are seeing these as well - infrequent postings with blank subject lines. Always throws me for a bit of a loop, forcing a pause and adjust. For those replying to them, or hijacking them, please stop. Regards - Miles Thompson PS Truly Canadian - note the please! /mt -- PHP General

[PHP] Re: HELP! HELP !

2005-04-13 Thread chris
Read in the manual about the $_GET variable Justin Joe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] HI, Any body give me any hinder I would be very appreciated! I want to use a parameter of the second page in the first page, how can I realize it. For example, there is a

[PHP] Re: scripting workflow

2005-04-13 Thread chris
I hand code everything I do in php. I separate functions and class in referenced files that are grouped by function in the site(i.e. - all queries are in queries.php, the db connection is done in dbconn.php, etc...). This will allow a project to grow without having to rewrite everything. Also

[PHP] Re: [NOVICE] error handling

2005-04-13 Thread John DeSoi
On Apr 13, 2005, at 1:46 AM, Cima wrote: im working with php 4 and postgresql 8 and i would like to know how to handle certain errors generated. in postgresql, i've written a stored function that selects a record from a table and in case no record is found i 'raise an exception'. fine, now in my

[PHP] Re: User Management

2005-04-13 Thread chris
Use an $_SESSION array variable to contain the pages they can access. Dasmeet Singh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi! I am developing an applicaton in PHP where different users would have different permissions and access to different functions/pages of website.

[PHP] trying to load mysql extensions

2005-04-13 Thread Ross
I get the following warning when trying to load this extension. (php_mssql) PHP Warning: PHP Startup: Unable to load dynamic library 'c:\PHP\ext\php_msql.dll' (All the other extensions load ok.) I am runnning php5 with IIS 5.1 and mysqlserver 4.1. The server works fine and mysql server is

[PHP] PHP 4 to PHP 5 Migration shortcut

2005-04-13 Thread Vishal Kashyap @ [SaiHertz]
Dear PHP enlightened , I was planning to move my PHP 4.3.x based product t PHP 5.x and for this I was looking for some kinda shortcut scripts or utility to migrate the 4.3.x file to PHP 5.x . Any pointers would be appreaciated. -- With Best Regards, Vishal Kashyap. Lead Software Developer,

Re: [PHP] trying to load mysql extensions

2005-04-13 Thread Greg Donald
On 4/13/05, Ross [EMAIL PROTECTED] wrote: I get the following warning when trying to load this extension. (php_mssql) PHP Warning: PHP Startup: Unable to load dynamic library 'c:\PHP\ext\php_msql.dll' (All the other extensions load ok.) I am runnning php5 with IIS 5.1 and mysqlserver

[PHP] database querying form in php

2005-04-13 Thread babu
HI, I ilke to create user interface for a group of people for entering the queries and to see the results in a browser. The users have the knowledge of database. for example: the users will have a login check, and if successful they will see a window where they can enter the sql queries and

Re: [PHP] User Management

2005-04-13 Thread aznFETISH
I use something like this the numbers 1,2,3,4 are an array of member group ID's so it checks the users session to see if they are a member to one of those groups $_product_id = array(1,2,3,4); require_once(/home/blah/public_html/members/plugins/protect/php_include/check.inc.php); [EMAIL

[PHP] uploading files

2005-04-13 Thread marc serra
Hi, i want to create a form to upload a file on a server. My problem is that i want to check the filesize before sending it because if the filesize is superior than 2 MB it failed and i don't want to wait for a long time for uploading a file that will fail. Can you please give me a solution to

Re: [PHP] trying to load mysql extensions

2005-04-13 Thread Richard Davey
Hello Ross, Wednesday, April 13, 2005, 4:16:07 PM, you wrote: R I get the following warning when trying to load this extension. R (php_mssql) R PHP Warning: PHP Startup: Unable to load dynamic library R 'c:\PHP\ext\php_msql.dll' Well which of the two DLLs do you actually want to use?

[PHP] phpmyadmin blank screen.

2005-04-13 Thread Ross
Thanks for the replies to my php_mssql problem. I have a problem that when I try and run phpmyadmin locally the screen is just blank. Any ideas? R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] phpmyadmin blank screen.

2005-04-13 Thread Joseph Connolly
1- are you loading the mssql extensions or the mysql extensionsyou keep interchanging the two and they ARE NOT the same 2- in addition you may have to load the mysqli extension if you want to run phpMyAdmin. 3- re read the php manual and the phpMyAdmin If the screen is blank trying to read

Re: [PHP] PHP 4 to PHP 5 Migration shortcut

2005-04-13 Thread Rasmus Lerdorf
Vishal Kashyap @ [SaiHertz] wrote: Dear PHP enlightened , I was planning to move my PHP 4.3.x based product t PHP 5.x and for this I was looking for some kinda shortcut scripts or utility to migrate the 4.3.x file to PHP 5.x . Any pointers would be appreaciated. Chances are pretty good that you

[PHP] Re: uploading files

2005-04-13 Thread Matthew Weier O'Phinney
* Marc Serra [EMAIL PROTECTED]: Hi, i want to create a form to upload a file on a server. My problem is that i want to check the filesize before sending it because if the filesize is superior than 2 MB it failed and i don't want to wait for a long time for uploading a file that will fail.

[PHP] uploading file

2005-04-13 Thread marc serra
Hi, i want to create a form to upload a file on a server. My problem is that i want to check the filesize before sending it because if the filesize is superior than 2 MB it failed and i don't want to wait for a long time for uploading a file that will fail. Can you please give me a solution to

Re: [PHP] uploading file

2005-04-13 Thread Richard Davey
Hello Marc, Wednesday, April 13, 2005, 3:08:06 PM, you wrote: ms Hi, i want to create a form to upload a file on a server. My ms problem is that i want to check the filesize before sending it ms because if the filesize is superior than 2 MB it failed and i ms don't want to wait for a long time

Re: [PHP] uploading file

2005-04-13 Thread Joseph Connolly
I though you could limit it in the php.ini file. OR, you can determine it's length through php and then discard it. I remember reading something about limiting file size and overidding that limit in the script. If i find it i will post it here. Richard Davey wrote: Hello Marc, Wednesday, April

Re[2]: [PHP] uploading file

2005-04-13 Thread Richard Davey
Hello Joseph, Wednesday, April 13, 2005, 5:42:42 PM, you wrote: JC I though you could limit it in the php.ini file. OR, you can JC determine it's length through php and then discard it. I remember JC reading something about limiting file size and overidding that JC limit in the script. If i find

Re: [PHP] uploading file

2005-04-13 Thread John Nichel
Joseph Connolly wrote: I though you could limit it in the php.ini file. OR, you can determine it's length through php and then discard it. I remember reading something about limiting file size and overidding that limit in the script. If i find it i will post it here. You can limit it with PHP.

[PHP] Hosting - NoMonthlyFees

2005-04-13 Thread Miles Thompson
NoMonthlyFees has been spoken of highly on this list in the past. Do they still have a good reputation? How's speed? Client will be fetching news stores for display through Flash; MySQL and PHP (of course) back end. May be some streaming audio in future. If you don't want to clog the list with

[PHP] Re: database querying form in php

2005-04-13 Thread Satyam
The following used to work, though I haven't used it for a while. Please be carefull of who are you letting do what. A little checking, for example, only 'select' statements with no semi-colons or any other trick to modify the database might be good. Assumes there is a style sheet with a

[PHP] Re: php SMPP

2005-04-13 Thread Catalin Trifu
Hi, If you are into C programming try kannel (www.kannel.org); they fully implement SMPP protocol into their gateway, so you could take a look at their code. Catalin Kyriacos Sakkas wrote: Hi all, Just wondering if anybody has had experience using SMPP with php. I have

Re: [PHP] database querying form in php

2005-04-13 Thread Marek Kilimajer
babu wrote: HI, I ilke to create user interface for a group of people for entering the queries and to see the results in a browser. The users have the knowledge of database. for example: the users will have a login check, and if successful they will see a window where they can enter the sql

Re: [PHP] uploading file

2005-04-13 Thread Joseph Connolly
Thanks for the info. That makes sense. John Nichel wrote: Joseph Connolly wrote: I though you could limit it in the php.ini file. OR, you can determine it's length through php and then discard it. I remember reading something about limiting file size and overidding that limit in the script. If

Re: [PHP] uploading file

2005-04-13 Thread Greg Donald
On 4/13/05, Joseph Connolly [EMAIL PROTECTED] wrote: I though you could limit it in the php.ini file. You can. OR, you can determine it's length through php and then discard it. You can. I remember reading something about limiting file size and overidding that limit in the script. If i

Re: [PHP] Re: User Management

2005-04-13 Thread Eugene Voznesensky
Yoy can try this one: http://pear.php.net/package/LiveUser Hi! I am developing an applicaton in PHP where different users would have different permissions and access to different functions/pages of website. Now whats the best way to do tht? One way I can think of is keep all

[PHP] is fwrite atomic?

2005-04-13 Thread Cabbar Duzayak
Hi, As the subject mentions, is fwrite method atomic in PHP? What I mean by that is, does fwrite function acquire an implicit lock while writing or do I need to explicitly acquire an EXCLUSIVE lock on the file before I call fwrite? The problem I am having is that, I want to track user requests

[PHP] enterprise patterns headache

2005-04-13 Thread Robert Janeczek
Hi! I`m currently working on PHP5-based extranet system which makes intensive use of enterprise patterns. Some problems encountered during developement cause serious haeadaches, but we`re going forward :) I`m not 100% happy with architecture decisions we`ve made in the process and therefore I came

Re: [PHP] is fwrite atomic?

2005-04-13 Thread Philip Hallstrom
As the subject mentions, is fwrite method atomic in PHP? What I mean by that is, does fwrite function acquire an implicit lock while writing or do I need to explicitly acquire an EXCLUSIVE lock on the file before I call fwrite? While I haven't checked, I would imagine the answer is NO. The problem

[PHP] image calculation problem

2005-04-13 Thread Ryan A
Hi, I copied this from the php site, but trying to modify it is driving me nuts coz its not working. Basically I am trying to make a thumb where the width is 87px...I dont care what the height is, heres the code: function prop_thumb_height() { // The file $filename = 'cat.jpg'; // Set a maximum

Re: [PHP] image calculation problem

2005-04-13 Thread Philip Hallstrom
see below... Basically I am trying to make a thumb where the width is 87px...I dont care what the height is, heres the code: function prop_thumb_height() { // The file $filename = 'cat.jpg'; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width_orig, $height_orig)

Re: [PHP] image calculation problem

2005-04-13 Thread Ryan A
Thanks mate, it works perfectly. -Ryan On 4/13/2005 11:35:23 PM, Philip Hallstrom ([EMAIL PROTECTED]) wrote: see below... Basically I am trying to make a thumb where the width is 87px...I dont care what the height is, heres the code: function prop_thumb_height() { // The

Re: [PHP] is fwrite atomic?

2005-04-13 Thread Rasmus Lerdorf
Cabbar Duzayak wrote: As the subject mentions, is fwrite method atomic in PHP? What I mean by that is, does fwrite function acquire an implicit lock while writing or do I need to explicitly acquire an EXCLUSIVE lock on the file before I call fwrite? That depends on your mode. If you opened the

[PHP] app to create directories with a browser...

2005-04-13 Thread bruce
hi... i'm trying to find an app to allow me to somehoe specify a dir/folder structure and to be able to create the dir on the hard drive, using the browser... in other words, if i have a project: proj --include --docs --bin --src --obj i'd like to be able to somehow

[PHP] Creating intelligent forms

2005-04-13 Thread dan
Hello, all - I had some questions regarding the creation of intelligent forms - forms that take data, and then parse it for errors, real data, etc etc. The first idea I had was to make a function to display the form. When the form is submitted, the page would be called again (i.e. the form's

RE: [PHP] Creating intelligent forms

2005-04-13 Thread Mike
The first idea I had was to make a function to display the form. When the form is submitted, the page would be called again (i.e. the form's ACTION=itself), and then the POST or GET or SESSION variables will be the arguments to the form. The idea is, when this happens, the form will

Re: [PHP] enterprise patterns headache

2005-04-13 Thread Richard Lynch
On Wed, April 13, 2005 2:01 pm, Robert Janeczek said: I can't claim a detailed understanding of what you are doing, and, frankly, it sounds like you are creating a BUNCH of over-engineered headache-inducing code without a good, proven need for it. YMVV. That said, one thing I *did* understand

Re: [PHP] Storing password in cookie

2005-04-13 Thread Richard Lynch
On Tue, April 12, 2005 8:03 pm, [EMAIL PROTECTED] said: On 11 Apr 2005 Chris Shiflett wrote: DO NOT STORE PASSWORDS ON USERS COMPUTER A couple of people have stated this but I think it is incorrect. Please refrain from such speculation, because it does nothing to improve the state of

Re: [PHP] Finding records within 15 minutes from now?

2005-04-13 Thread Richard Lynch
On Tue, April 12, 2005 12:33 pm, J J said: I'm struggling with the php or mysql query to find records within my database that are within 15 minutes from now and prior. Example: It's 2:30pm on 4/12/05 I need to find all records with a RecordTime of 2:45pm and previous. So it should find:

Re: [PHP] Storing password in cookie

2005-04-13 Thread Richard Lynch
On Tue, April 12, 2005 4:40 am, [EMAIL PROTECTED] said: [lots and lots of stuff, mostly valid, about Security being applied in ratio with the data being protected] I don't have the time to answer this point by point. So I'll stick with some generalizations. I have what I consider a MINIMUM

[PHP] Dedicated server (0T)

2005-04-13 Thread Ryan A
Hey, Can anyone recommend a host for dedicated hosting? Hopefully one that you have used. Please reply offlist so as not to disturb anyone else. Thanks, Ryan -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.9 - Release Date:

Re: [PHP] Storing password in cookie

2005-04-13 Thread Richard Lynch
On Mon, April 11, 2005 8:12 pm, Chris Shiflett said: Richard Lynch wrote: On a shared server, every other PHP scripter can read your session data, if they work at it a little bit. You should mention that this is assuming a default configuration. There are ways to avoid this. There aren't a

Re: [PHP] dynamic image will not print properly

2005-04-13 Thread Richard Lynch
On Mon, April 11, 2005 5:48 pm, DuSTiN KRySaK said: On 11-Apr-05, at 5:05 PM, Richard Lynch wrote: On Mon, April 11, 2005 3:04 pm, DuSTiN KRySaK said: Fourth: On the broken server, take *OUT* the header() lines in your script, and surf directly to the image URL. If you see PHP messages,

Re: [PHP] php and javascript

2005-04-13 Thread Richard Lynch
On Mon, April 11, 2005 5:04 pm, Marek Kilimajer said: Richard Lynch wrote: On Mon, April 11, 2005 4:23 pm, Jared Williams said: Hmm, document.forms['Selection'].elements['distID[]'][0].value is perfectly valid, and should work in any decent browser. There is also document.getElementsByName()

Re: [PHP] Re: Index of /base-1.1

2005-04-13 Thread Mark Sargent
Mark Sargent wrote: David Robley wrote: Mark Sargent wrote: Hi All, typing localhost/bse-1.1 gives me access, but, in this format, Index of /base-1.1 Icon Name http://localhost/base-1.1/?C=N;O=DLast modified http://localhost/base-1.1/?C=M;O=A Size