RE: [PHP-DB] include_path problem
There is an include_path for unix and an include_path for windows. They both differ slightly but aren't of the same value that is being returned in the php info page or the error that I am receiving. This is the info displayed for my php.ini file. My OS is on G:. G:\WINDOWS\php.ini This is the Include_path directory shown in the phpinfo page. .;c:\php4\pear Thanks very much for your help on this. Let me know if you need me to post anything else that might help. -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 03, 2003 7:18 PM To: 'Bruce Levick' Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] include_path problem On 03 September 2003 01:32, Bruce Levick contributed these pearls of wisdom: Well yes I have restarted my webserver, and the php.ini file is under the windows directory (shown in phpinfo page) and I am definatelty editing it. The current value for my include_path is .;c:\php\includes which is different to whats showing up on the phpinfo page and also the error that is coming up. The wierd thing is I can change anything else in the php.ini file and it updates on the phpinfo page. Just not the include_path attributes. Its as if I am not changing the correct service as there is nothing in the php.ini file that relates to the directory .;c:\php4\pear. Couple more stabs in the dark, then: - Check there is only one entry for include_path. - Make sure it's not commented out! (No ; at the start of the line.) Also, just to be absolutely sure, can you post exactly what your phpinfo shows for the php.ini setting? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] include_path problem
Hi guys, I am re-developing the look and feel of a site and trying to set it up localy. Its all setup and ready to go but I am getting a pear.php include failure. Warning: main(/PEAR.php): failed to open stream: No such file or directory in G:\Inetpub\wwwroot\DB.php on line 25 Fatal error: main(): Failed opening required '/PEAR.php' (include_path='.;c:\php4\pear') in G:\Inetpub\wwwroot\DB.php on line 25 The include path c:\php4\pear is incorrect. This is showing up in my phpinfo file and I can't seem to get it to change in my php.ini file. There are include_path options in the php.ini file but nothing like the directory path in the error I am receiving. Do I have to install further Pear options for this feature to work?? Any clues will be gratefull Regards Bruce -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] include_path problem
Well yes I have restarted my webserver, and the php.ini file is under the windows directory (shown in phpinfo page) and I am definatelty editing it. The current value for my include_path is .;c:\php\includes which is different to whats showing up on the phpinfo page and also the error that is coming up. The wierd thing is I can change anything else in the php.ini file and it updates on the phpinfo page. Just not the include_path attributes. Its as if I am not changing the correct service as there is nothing in the php.ini file that relates to the directory .;c:\php4\pear. I am running xppro, IIS, php 4.3.2 Any other ideas?? Cheers Bruce -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 02, 2003 7:10 PM To: 'Bruce Levick'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] include_path problem On 02 September 2003 08:00, Bruce Levick wrote: Hi guys, I am re-developing the look and feel of a site and trying to set it up localy. Its all setup and ready to go but I am getting a pear.php include failure. Warning: main(/PEAR.php): failed to open stream: No such file or directory in G:\Inetpub\wwwroot\DB.php on line 25 Fatal error: main(): Failed opening required '/PEAR.php' (include_path='.;c:\php4\pear') in G:\Inetpub\wwwroot\DB.php on line 25 The include path c:\php4\pear is incorrect. This is showing up in my phpinfo file and I can't seem to get it to change in my php.ini file. There are include_path options in the php.ini file but nothing like the directory path in the error I am receiving. OK; '.;c:\php4\pear' is the default value for include_path, so PHP is not seeing your edited php.ini. Let's try a couple of basic questions (forgive me if these are obvious to you, but you haven't covered them in your message): 1) Did you restart your Web server after editing php.ini? 2) Where does the phpinfo() output say your php.ini file should be (look at the Configuration File (php.ini) Path entry right near the top)? And is your php.ini there? If the answer to both of these is yes, and you're still having problems, get back to the list with some more detail and maybe someone will have some other bright ides. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Storing browser stats
Is there a method for storing each users browser stats within a database table. So everytime someone visits the browser info is gathered and stored as a unique row in the 'browser' table in the database. Any advice?? Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] first 10 or so words
Howdy, I have a SELECT query displaying the results in repeated rows in a table. I have a COMMENTS column coming out of the database table which will likely contain a paragraph of information. I would like to display only the first 10 or so words and then have a more link that people can click on to display all the info. Is there a simple method for this?? Cheers
[PHP-DB] Flash/PHP Resources
Bruce Levick - VivamotionWhere can I find some good resources for tutorials to pass php queries into flash?? Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] ``List-Unsubscribe''
``List-Unsubscribe''
[PHP-DB] Insertion upon upload
Hi all, I have a simple upload form. /// upload.php ## form enctype=multipart/form-data method=post action=process.php?tsk=?php echo $tsk; ? pstrongFile to Upload:/strongbr input type=file name=img1 size=30/p Pinput type=submit name=submit value=Upload File/p /form //# Which loads up a process page. //## process.php ### ?php if (is_uploaded_file($_FILES['img1']['tmp_name'])) { $filename = $_FILES['img1']['tmp_name']; print $filename was uploaded successfuly; $realname = $_FILES['img1']['name']; $fnme = $realname; copy($_FILES['img1']['tmp_name'], /Inetpub/wwwroot/_tasks/images/ . $realname); $flctn = /Inetpub/wwwroot/_tasks/images/; $fid = $tsk; } else { echo Possible file upload attack: filename . $_FILES['img1']['name'] . .; } ? // The upload works great. But I need to pass the three variables created in the above code to a table files in the database. $fnme $fid $flctn Any ideas on how to incorporate an insertion method into the code above?? Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] guestbook to db to email
I know this allready, I explained this in the original message. I know how to manage sending simple form elements to an email (email,subject,body) and so on How do I FORMAT the body of an email when there are multiple variable inputs for the body?? Formatting as in Line Breaks etc etc. Cheers - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Bruce Levick' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 1:08 PM Subject: RE: [PHP-DB] guestbook to db to email I am going to build some form elements to use as submitting to a DB for a guestbook. Then display those inputs on another page as the entries to the guestbook. I also want to send the information they submit to an email address. I know how to manage sending simple form elements to an email (email,subject,body) and so on. But with a guestbook there will be a few more elements in the body of my email. Does anybody know of a very good way to format the body of an email when form elements are sent into the body?? Form elements are just variables. Insert them into a string and make that your message... $message = This is a message from {$_POST['name']}. They said this: {$_POST['message']}; etc... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] guestbook to db to email
Bruce Levick - Vivamotion Hi, I am going to build some form elements to use as submitting to a DB for a guestbook. Then display those inputs on another page as the entries to the guestbook. I also want to send the information they submit to an email address. I know how to manage sending simple form elements to an email (email,subject,body) and so on. But with a guestbook there will be a few more elements in the body of my email. Does anybody know of a very good way to format the body of an email when form elements are sent into the body?? Cheers Bruce -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Relationship or not.
I have a bit of a challenge on and only being a newbie I will need to call on some experienced PHP'ers. I have two tables in a databse. Tasks and Files. They relate to each other via Tasks.ID and Files.FID. I have successfully created an uploading form which adds images to a directory and records the files details into the files table. So I can now display the results If I need to from the files table. My challenge is this. I have created a Result set which displays all the Tasks. This displays through a repeated row and so on. What I need to do is some sort of an if statement in each task display. If (there are files.fid that relate to this tasks.ID){ Display results !!! //Calls on some HTML/PHP and attatchs file info to a generic image to click on. } Else { Display Nothing !!! } So to put it simple. I need to display all the tasks (got that) and also the file info that realtes to each task. I am unsure of how to code this relational stuff. A bit out of my reach at the moment. Cheers Bruce -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Relationship or not.
I forgot to mention there will likely be more than the one file that relates to a task. -Original Message- From: Bruce Levick Sent: Friday, January 10, 2003 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Relationship or not. I have a bit of a challenge on and only being a newbie I will need to call on some experienced PHP'ers. I have two tables in a databse. Tasks and Files. They relate to each other via Tasks.ID and Files.FID. I have successfully created an uploading form which adds images to a directory and records the files details into the files table. So I can now display the results If I need to from the files table. My challenge is this. I have created a Result set which displays all the Tasks. This displays through a repeated row and so on. What I need to do is some sort of an if statement in each task display. If (there are files.fid that relate to this tasks.ID){ Display results !!! //Calls on some HTML/PHP and attatchs file info to a generic image to click on. } Else { Display Nothing !!! } So to put it simple. I need to display all the tasks (got that) and also the file info that realtes to each task. I am unsure of how to code this relational stuff. A bit out of my reach at the moment. Cheers Bruce -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] php variables to JS
Bruce Levick - VivamotionI am opening a chromless window with some JS code. I need to pass some variables which come from rows in my database into the jscript which will determine the size and URL of the window. Before I go about drawing the info from the database I have set up some hard code php variables just so i could test how to pass these into js. Does anybody know how I can code these variables into my jscript?? Cheers ## ?php $h = 600; $w = 343; $theURL = test.php; $wname = test; ? ### ## script language=javaScript type=text/javascript SRC=js/java.js/SCRIPT script !-- function openIT() { theURL=wesley.php//php variable here wname =CHROMELESSWIN //php variable here W=300; //php variable here H=100; //php variable here windowCERRARa = images/close_a.gif windowCERRARd = images/close_d.gif windowCERRARo = images/close_o.gif windowNONEgrf = images/none.gif windowCLOCK = images/clock.gif windowREALtit = nbsp;? Task title windowTIT = font face=verdana size=1nbsp;your chromless/font windowBORDERCOLOR = #00 windowBORDERCOLORsel = #00 windowTITBGCOLOR = #FF0033 windowTITBGCOLORsel = #FF0033 openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel) } //-- /script ## -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mmmmmmm.....merry xmas
Bruce Levick - VivamotionIts been a hard day...christmas celebrations and I have stopped my development thought. I am passing two variables in a link like such. http://localhost/starttest.php?titlelink=illustrations?ITID=5 Am I connecting these variables correctly?? I am using the 2 variables passed to perform a query select from a table. I am getting an undefined variable. The $ITID variable. It seems to be reading the two variables as one whole one. Can anybody point out the obvious for me?? Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] random select
Bruce Levick - VivamotionI was curious as to what is the best way to select a random row from a table in my database. I have currently five rows and will be expanding on that as well. I have tried this code. //retrieve random row ?php $rndm = mysql_query(SELECT * FROM Illustrations ORDER BY RAND() LIMIT 1); if (!$rndm) { echo(PError performing query: . mysql_error() . /P); exit(); } ? ## output random row ?php print b$rndm[titletext]/b\n; ? ## but am not getting anything when output with PHP in a browser. I am working off localhost on a WINXP machine. PHP 4.2.2. Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] random rows...what about tables
Bruce Levick - Vivamotion Been searching for an answer to selecting a random table and then a random row within the selected table. I have this code which successfully selects a random row within a hard coded table. But just can't get the random table working. ?php //trying to select all tables from the database portfoliopfff $alltables = mysql_list_tables(portfolio); //trying to get the array value of the alltables...there are 4 tables in the database. So as far as I know the value of $alltables should be 3. (0table, 1table, 2table, 3table) $randtabnum = array($alltables); // this selects everything from the Illustrations table. I need to make the FROM table_name a random selection $all = mysql_query(SELECT * FROM Illustrations); //acquires total rows $totalRows_Recordset1 = mysql_num_rows($all); // selects random row from total rows $rndm = mysql_query(SELECT * FROM Illustrations ORDER BY RAND() LIMIT 4,$totalRows_Recordset1); if (!$rndm) { echo(PError performing query: . mysql_error() . /P); exit(); } $randrow = mysql_fetch_array($rndm); ? Anybody see the solution?? Winxp Pro, php 4.2.2 Mysql 3.2 Cheers -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] random rows...what about tables
Sorry, Have updated my script with a little help. Upon output i am recieving this. Warning: Argument to array_rand() has to be an array in C:\WORKING\portfolio\vivamotion\site\php\request.php on line 51 this is the code below. / ?php //listing table in database $alltables = mysql_list_tables(portfolio); //random array $randomtable = array_rand($alltables); $all = mysql_query(SELECT * FROM Illustrations); $totalRows_Recordset1 = mysql_num_rows($all); $rndm = mysql_query(SELECT * FROM Illustrations ORDER BY RAND() LIMIT 4,$totalRows_Recordset1); if (!$rndm) { echo(PError performing query: . mysql_error() . /P); exit(); } $randrow = mysql_fetch_array($rndm); ? //output to browser ?php print $randomtable\n; ? Hope that helps - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 11:48 PM Subject: Re: [PHP-DB] random rows...what about tables On Tuesday 17 December 2002 21:38, Bruce Levick wrote: Bruce Levick - Vivamotion Been searching for an answer to selecting a random table and then a random row within the selected table. I have this code which successfully selects a random row within a hard coded table. But just can't get the random table working. [snip] Anybody see the solution?? First we need to know _what_ the problem is. I think we can assume your code doesn't work the way you expected. Can you tell us _how_ it doesn't work? Error messages? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* We place two copies of PEOPLE magazine in a DARK, HUMID mobile home. 45 minutes later CYNDI LAUPER emerges wearing a BIRD CAGE on her head! */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php