php-general Digest 1 Jan 2003 04:58:08 -0000 Issue 1796 Topics (messages 129780 through 129823):
Re: Repeats of values 129780 by: Andrew Brampton 129782 by: Tom Rogers 129783 by: Thomas Seifert MySQL Join 129781 by: John Hinton 129811 by: Jason Wong Re: Function misfunction - 2 129784 by: Andrew Wallace How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL 129785 by: . Nilaab 129788 by: Stephen 129808 by: . Nilaab 129812 by: Jason Wong assigning to $this in constructor? 129786 by: Matt Friedman loading a db table into a php array from mysql 129787 by: David T-G 129791 by: Tularis 129793 by: David T-G 129819 by: Rick Widmer Re: Serializing a DOM object 129789 by: Boget, Chris Re: Keeping script running, but returning control to user? 129790 by: Tularis FastCGI 129792 by: Fernando Serboncini Re: Getting short (DOS) name of file? 129794 by: Leif K-Brooks fwrite() debugging 129795 by: Alberto Brea 129796 by: Timothy Hitchens \(HiTCHO\) 129798 by: Michael J. Pawlowsky SUMMARY - Re: [PHP] Re: loading a db table into a php array from mysql 129797 by: David T-G Running PHP on Windows OS 129799 by: Todd Cary 129804 by: John Nichel 129814 by: Todd Cary 129816 by: David Freeman Re: Flow diagrams.-- Resending 129800 by: Jimmy Brake receiving XML stream as server via PHP 129801 by: Kristopher Yates 129806 by: Timothy Hitchens \(HiTCHO\) 129809 by: Timothy Hitchens \(HiTCHO\) 129813 by: Boget, Chris Missing logos 129802 by: Richard A Downing 129803 by: Tyler Longren 129807 by: Richard A Downing Re: Using strtotime on 'old' dates. 129805 by: David J. Johnson Re: mail() 129810 by: Jason Wong HTTP_IF_MODIFIED_SINCE 129815 by: Ian M. Evans use included GD of external 129817 by: Richard Pijnenburg 129821 by: Rick Widmer 129822 by: Richard Pijnenburg Re: Php 4.3.0 and Mail() function 129818 by: Rick Widmer PHP 4.3.0 (Win32, zip) not bundled with PEAR? 129820 by: Tobias Schlitt makeing an array 129823 by: Philip J. Newman Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---Hi, I think changing while(list (,$value) = each ($line)) { to foreach ($line as $value) { might help but I'm unsure, either way foreach is easier to read :) Andrew ----- Original Message ----- From: "Anthony Ritter" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 4:47 PM Subject: [PHP] Repeats of values > I'm running the following sql query which outputs a repeat value for each > field in the html cell box. > > Like this: > ...................... > 3.3 3.3 78 78 2002-06-11 2002-06-11 > ................... > > which is not what I would like. > > I was trying to get: > ............................. > 3.3 78 2002-06-11 > ........................ > > I thought that by dropping off the $key in the $key - $value pair > to: > > while(list (,$value) = each ($line)) > > would accomplish that. > > The SQL query is: > > SELECT level, pm, date FROM daytime WHERE pm >=75 > ............................ > > The php script is: > > <?php > $link = mysql_connect("", "", "") > or die ("Could not connect"); > mysql_select_db ("water") > or die ("Could not select database"); > > > $query = "SELECT level, pm, date FROM daytime WHERE pm >= 75"; > $result = mysql_query ($query) > or die ("Query failed"); > > // printing HTML result > > > print ("<Font Face=\"arial\" size=3>Dates where water exceeded 75 > degrees<BR> at Callicoon, New York - 2002</FONT>"); > print("<P>"); > print "<table border=1>\n"; > > while($line = mysql_fetch_array($result)){ > print "\t<tr><td bgcolor=\"#CCCCFF\"><Font Face=\"arial\" size =2>\n"; > while(list (,$value) = each ($line)) { > print "<td bgcolor=\"CCCCFF\"><Font Face =\"arial\" > size=2>$value</td>\n"; > } > print "\t</tr>\n"; > } > print "</table>\n"; > > mysql_close($link); > ?> > .......................................... > > Any help would be greatly appreciated. > Happy New Year! > > Tony Ritter > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >--- End Message ---
--- Begin Message ---Hi, Wednesday, January 1, 2003, 2:47:57 AM, you wrote: AR> I'm running the following sql query which outputs a repeat value for each AR> field in the html cell box. AR> Like this: AR> ...................... AR> 3.3 3.3 78 78 2002-06-11 2002-06-11 AR> ................... AR> which is not what I would like. AR> I was trying to get: AR> ............................. AR> 3.3 78 2002-06-11 AR> ........................ AR> I thought that by dropping off the $key in the $key - $value pair AR> to: AR> while(list (,$value) = each ($line)) AR> would accomplish that. AR> The SQL query is: AR> SELECT level, pm, date FROM daytime WHERE pm >=75 AR> ............................ AR> The php script is: AR> <?php AR> $link = mysql_connect("", "", "") AR> or die ("Could not connect"); AR> mysql_select_db ("water") AR> or die ("Could not select database"); AR> $query = "SELECT level, pm, date FROM daytime WHERE pm >= 75"; AR> $result = mysql_query ($query) AR> or die ("Query failed"); AR> // printing HTML result AR> print ("<Font Face=\"arial\" size=3>Dates where water exceeded 75 AR> degrees<BR> at Callicoon, New York - 2002</FONT>"); AR> print("<P>"); AR> print "<table border=1>\n"; AR> while($line = mysql_fetch_array($result)){ AR> print "\t<tr><td bgcolor=\"#CCCCFF\"><Font Face=\"arial\" size =2>\n"; AR> while(list (,$value) = each ($line)) { AR> print "<td bgcolor=\"CCCCFF\"><Font Face =\"arial\" size=2>>$value</td>\n"; AR> } AR> print "\t</tr>\n"; AR> } AR> print "</table>\n"; AR> mysql_close($link); ?>> AR> .......................................... AR> Any help would be greatly appreciated. AR> Happy New Year! AR> Tony Ritter change this line while($line = mysql_fetch_array($result)){ to while($line = mysql_fetch_assoc($result)){ mysql_fetch_array() builds a numerical and a associative array for each row. -- regards, Tom--- End Message ---
--- Begin Message ---On Tue, 31 Dec 2002 10:47:57 -0600 [EMAIL PROTECTED] (Anthony Ritter) wrote: > while($line = mysql_fetch_array($result)){ > print "\t<tr><td bgcolor=\"#CCCCFF\"><Font Face=\"arial\" size =2>\n"; > while(list (,$value) = each ($line)) { Thats just wrong, mysql_fetch_array returns an array with all the fields accessible per field-id and field-name so you have each field twice. You can try this print_r($line); to see that. either access the rows by using mysql_fetch_row (only an enumerated array is returned so each value only once) or better access the values in the array directly: while($line = mysql_fetch_array($result)){ print "\t<tr><td bgcolor=\"#CCCCFF\"><Font Face=\"arial\" size =2>\n"; print "<td bgcolor=\"CCCCFF\"><Font Face =\"arial\" size=2>".$line['level']."</td>\n"; print "<td bgcolor=\"CCCCFF\"><Font Face =\"arial\" size=2>".$line['pm']."</td>\n"; print "<td bgcolor=\"CCCCFF\"><Font Face =\"arial\" size=2>".$line['date']."</td>\n"; print "\t</tr>\n"; } Regards, Thomas--- End Message ---
--- Begin Message ---Stuck on this join temp >From one table I need to mysql_query("CREATE TEMPORARY TABLE temp TYPE=HEAP SELECT DISTINCT field1, field2 FROM $table"); both field1 and field2 have various repeating data and I need to return only the first occurance of the distinct data along with the rest of the data selected below for only those distinct rows. $result = mysql_query("SELECT $table.field3, $table.field2, $table.field1, $table.field4 FROM $table LEFT OUTER JOIN temp ON $table.indexfield0 = temp.indexfield0 ORDER BY $table.field1 DESC"); Running the above kills the distinct select and returns all of the rows. I see where it is broken in that temp.indexfield0 is not being collected into the temp table, but as indexfield0 is a primary key, all values are distinct and when added to the select distinct statement, all rows are returned. Is there any way to SELECT field0, (DISTINCT field1, field2) FROM table? Sure would make this easy! or SELECT field0 WHERE DISTINCT field1, field2 FROM table? There seems to be very little information anywhere on DISTINCT -- John Hinton - Goshen, VA. http://www.ew3d.com Those who dance are considered insane by those who can't hear the music....--- End Message ---
--- Begin Message ---On Wednesday 01 January 2003 00:21, John Hinton wrote: > Stuck on this join temp > > From one table I need to > > mysql_query("CREATE TEMPORARY TABLE temp TYPE=HEAP SELECT DISTINCT > field1, field2 FROM $table"); > > both field1 and field2 have various repeating data and I need to return > only the first occurance of the distinct data along with the rest of the > data selected below for only those distinct rows. > > $result = mysql_query("SELECT $table.field3, $table.field2, > $table.field1, $table.field4 FROM $table LEFT OUTER JOIN temp ON > $table.indexfield0 = temp.indexfield0 ORDER BY $table.field1 DESC"); > > Running the above kills the distinct select and returns all of the rows. > I see where it is broken in that temp.indexfield0 is not being collected > into the temp table, but as indexfield0 is a primary key, all values are > distinct and when added to the select distinct statement, all rows are > returned. > > Is there any way to > > SELECT field0, (DISTINCT field1, field2) FROM table? Sure would make > this easy! > > or SELECT field0 WHERE DISTINCT field1, field2 FROM table? > > There seems to be very little information anywhere on DISTINCT This looks suspiciously like a MySQL question, better to ask on the mysql list. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The end move in politics is always to pick up a gun. -- Buckminster Fuller */--- End Message ---
--- Begin Message --- Um.... where is $lookuptable set? Seems like you should have:
$lookuptable = setCurrentDevGroup($this->ComputerID);
$query = "SELECT name FROM $lookuptable WHERE (ID=$this->ComputerID)";
echo $lookuptable; // gives an empty string.
andy
Martin S wrote:
NOW what am I doing wrong??
function setCurrentDevGroup($devID)
{
$query = "SELECT dev_group FROM tracking WHERE (computer = $devID)";
$sth = $adb->prepare($query);
if($sth)
{
$res = $sth->execute();
$resulttable = $sth->fetchrow_hash();
$lookuptable = $resulttable["dev_group"];
}
echo $lookuptable; // gives e.g. printers
return $lookuptable; // will not return the value to ....
}
.
.
.
setCurrentDevGroup($this->ComputerID); // calling function
$query = "SELECT name FROM $lookuptable WHERE (ID = $this->ComputerID)";
//debug line
echo $lookuptable; // gives an empty string.
-- Give a man a fish and you feed him for a day; teach him to use the Net and he won't bother you for weeks.--- End Message ---
--- Begin Message ---Hello Everyone, I want to DELETE multiple items of multiple TABLES in a MySQL database. My version of MySQL is 3.23, which means this version doesn't support the DELETE functionality on multiple tables. The following is my PHP code, where $item_id is a multi-dimensional array containing the ids of the items I want to delete from the table. # DELETE records for ($i = 0; $i < count($item_id); $i++) { $query_item2 .= "DELETE QUICK FROM item_dimension WHERE item_id = '".$item_id[$i][0]."'; "; $query_item2 .= "DELETE QUICK FROM item_popup WHERE item_id = '".$item_id[$i][0]."'; "; } When I run this through the database using PHP, it returns a syntax error in the SQL. So what I did was echo out $query_item2, then copied and pasted the SQL into the MySQL application manually, and ran it through. Well the exact same SQL statement that I used in PHP worked when I entered it manually in MySQL. In other words it didn't work doing it through PHP, but it worked in MySQL directly. What gives? Is there a better way to delete multiple items from multiple tables with one SQL string? I don't want to separate the two DELETE functions and run them through two separate times because of overhead concerns. I tried looking on the MySQL and PHP website for better ways of using DELETE syntax on multiple tables, but I had no luck finding anything useful with my version of MySQL. Any help would be greatly appreciated.--- End Message ---
--- Begin Message --->From experience, I don't think you can run more then one SQL statement at once in a single time. Try assigning each variable with delete, then query them all seperately. I also don't think you need the ; in the SQL statement... ----- Original Message ----- From: "@ Nilaab" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 1:36 PM Subject: [PHP] How To Delete Multiple Items Of Multiple Tables Using PHP and MySQL : Hello Everyone, : : I want to DELETE multiple items of multiple TABLES in a MySQL database. My : version of MySQL is 3.23, which means this version doesn't support the : DELETE functionality on multiple tables. The following is my PHP code, where : $item_id is a multi-dimensional array containing the ids of the items I want : to delete from the table. : : # DELETE records : for ($i = 0; $i < count($item_id); $i++) { : $query_item2 .= "DELETE QUICK FROM item_dimension WHERE item_id = : '".$item_id[$i][0]."'; "; : $query_item2 .= "DELETE QUICK FROM item_popup WHERE item_id = : '".$item_id[$i][0]."'; "; : } : : When I run this through the database using PHP, it returns a syntax error in : the SQL. So what I did was echo out $query_item2, then copied and pasted the : SQL into the MySQL application manually, and ran it through. Well the exact : same SQL statement that I used in PHP worked when I entered it manually in : MySQL. In other words it didn't work doing it through PHP, but it worked in : MySQL directly. What gives? Is there a better way to delete multiple items : from multiple tables with one SQL string? I don't want to separate the two : DELETE functions and run them through two separate times because of overhead : concerns. I tried looking on the MySQL and PHP website for better ways of : using DELETE syntax on multiple tables, but I had no luck finding anything : useful with my version of MySQL. Any help would be greatly appreciated. : : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, visit: http://www.php.net/unsub.php : : :--- End Message ---
--- Begin Message ---I was hoping for better news. Thanks for the suggestion, but it will put a very big strain on my application since every DELETE query will open and close the mysql connection everytime. Think about deleting 100s of records one at a time. Surely someone has thought of a better way to do this with MySQL 3.23. Also, I don't want to run persistent connections, as I only have a limited number of simultaneous connections to the database currently. Is there a better way to do all this? Anyone? > -----Original Message----- > From: Stephen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 31, 2002 1:10 PM > To: @ Nilaab > Cc: PHP List > Subject: Re: [PHP] How To Delete Multiple Items Of Multiple Tables Using > PHP and MySQL > > > From experience, I don't think you can run more then one SQL statement at > once in a single time. Try assigning each variable with delete, then query > them all seperately. I also don't think you need the ; in the SQL > statement... > > > ----- Original Message ----- > From: "@ Nilaab" <[EMAIL PROTECTED]> > To: "Php-General" <[EMAIL PROTECTED]> > Sent: Tuesday, December 31, 2002 1:36 PM > Subject: [PHP] How To Delete Multiple Items Of Multiple Tables > Using PHP and > MySQL > > > : Hello Everyone, > : > : I want to DELETE multiple items of multiple TABLES in a MySQL > database. My > : version of MySQL is 3.23, which means this version doesn't support the > : DELETE functionality on multiple tables. The following is my PHP code, > where > : $item_id is a multi-dimensional array containing the ids of the items I > want > : to delete from the table. > : > : # DELETE records > : for ($i = 0; $i < count($item_id); $i++) { > : $query_item2 .= "DELETE QUICK FROM item_dimension WHERE item_id = > : '".$item_id[$i][0]."'; "; > : $query_item2 .= "DELETE QUICK FROM item_popup WHERE item_id = > : '".$item_id[$i][0]."'; "; > : } > : > : When I run this through the database using PHP, it returns a > syntax error > in > : the SQL. So what I did was echo out $query_item2, then copied and pasted > the > : SQL into the MySQL application manually, and ran it through. Well the > exact > : same SQL statement that I used in PHP worked when I entered it > manually in > : MySQL. In other words it didn't work doing it through PHP, but it worked > in > : MySQL directly. What gives? Is there a better way to delete > multiple items > : from multiple tables with one SQL string? I don't want to > separate the two > : DELETE functions and run them through two separate times because of > overhead > : concerns. I tried looking on the MySQL and PHP website for > better ways of > : using DELETE syntax on multiple tables, but I had no luck > finding anything > : useful with my version of MySQL. Any help would be greatly appreciated. > : > : > : -- > : PHP General Mailing List (http://www.php.net/) > : To unsubscribe, visit: http://www.php.net/unsub.php > : > : > : > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >--- End Message ---
--- Begin Message ---On Wednesday 01 January 2003 06:30, [EMAIL PROTECTED] wrote: > I was hoping for better news. Thanks for the suggestion, but it will put a > very big strain on my application since every DELETE query will open and > close the mysql connection everytime. Think about deleting 100s of records > one at a time. Surely someone has thought of a better way to do this with > MySQL 3.23. Also, I don't want to run persistent connections, as I only > have a limited number of simultaneous connections to the database > currently. Is there a better way to do all this? Anyone? You can use something like: DELETE FROM table WHERE column IN (val1, val2, val3, ..., valN); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Most people want either less corruption or more of a chance to participate in it. */--- End Message ---
--- Begin Message ---I think I was once able to assign to the $this reference in the constructor of a php class. I don't seem to be able to do this anymore. Is this new in 4.3? Is there anyway to alter what object is returned from a php class constructor? For instance, there might have been an error so you would return an error object instead of the requested object. Thanks, Matt Friedman--- End Message ---
--- Begin Message ---Hi, all -- I'm so far about knee-deep in my project where I'll be using php to talk to the mysql database and spit out my web pages. I wonder if I should be making individual calls to the database or loading a table into an array so that I can walk it without those calls. For instance, I have an instructors table, a clients table, and a schedule table that has an instructor number column, a client number column, and a time slot column. In order to print an instructor's schedule for the day, I have to query the instructors table to get the id where the name matches, and then query the schedule table to get the clients and times where the time slot matches some time today, and then I have to repeatedly query the clients table to get the names where the returned id matches. Since the schedule should be arranged in time order, I might even have client 1 and then client 2 and then client 1 again -- but I've already switched to 2 so I have to start over for 1. It seems a bit silly to, say, load the entire clients table into an array because there could be thousands or millions of clients, but it's an awful pain to go and make all of those mysql_query calls to walk the clients list. Should I just build a huge query something like $query = "select fname,lname from clients where " ; foreach ($results_from_previous_query_somehow as $clinum) { $query .= "id = '$clinum' or "; } $query .= "id = ''" ; # nice always-failing value; easier than pruning and then query that way, to get all of what I need in one shot but not the whole table (unless I need it all)? Does sql like big OR clauses like that? I don't know if this is a PHP or a MySQL question, so this once I've posted it to both lists. I'll also summarize to both. TIA & HAND & Happy New Year :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!--- End Message ---
msg91164/pgp00000.pgp
Description: PGP signature
--- Begin Message --- Usually,
using mysql to handle your tables is *way* faster than letting php handle it.
That's what it was made for, speed...!
In your case, you could just do a complex join I think. That would give all results in one table, and you could just order that on scheduletime, and voila, you'd have a pretty nice outcome, namely the schedule you were making via a complex way ;)
David T-G wrote:
Hi, all -- I'm so far about knee-deep in my project where I'll be using php to talk to the mysql database and spit out my web pages. I wonder if I should be making individual calls to the database or loading a table into an array so that I can walk it without those calls. For instance, I have an instructors table, a clients table, and a schedule table that has an instructor number column, a client number column, and a time slot column. In order to print an instructor's schedule for the day, I have to query the instructors table to get the id where the name matches, and then query the schedule table to get the clients and times where the time slot matches some time today, and then I have to repeatedly query the clients table to get the names where the returned id matches. Since the schedule should be arranged in time order, I might even have client 1 and then client 2 and then client 1 again -- but I've already switched to 2 so I have to start over for 1. It seems a bit silly to, say, load the entire clients table into an array because there could be thousands or millions of clients, but it's an awful pain to go and make all of those mysql_query calls to walk the clients list. Should I just build a huge query something like $query = "select fname,lname from clients where " ; foreach ($results_from_previous_query_somehow as $clinum) { $query .= "id = '$clinum' or "; } $query .= "id = ''" ; # nice always-failing value; easier than pruning and then query that way, to get all of what I need in one shot but not the whole table (unless I need it all)? Does sql like big OR clauses like that? I don't know if this is a PHP or a MySQL question, so this once I've posted it to both lists. I'll also summarize to both. TIA & HAND & Happy New Year :-D--- End Message ---
--- Begin Message ---Tularis, et al -- ...and then Tularis said... % % Usually, % using mysql to handle your tables is *way* faster than letting php % handle it. Hmmm... OK. But that's so many queries... "Or is it?", he asks, reading farther. % % That's what it was made for, speed...! Well, yeah, I figured that :-) % % In your case, you could just do a complex join I think. That would give Ahhh... A new term. Back to the books for me! % all results in one table, and you could just order that on scheduletime, That certainly would be lovely :-) % and voila, you'd have a pretty nice outcome, namely the schedule you % were making via a complex way ;) I've been known to do that sort of thing :-) Thanks! & HAND & HNY :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!--- End Message ---
msg91164/pgp00001.pgp
Description: PGP signature
--- Begin Message ---At 02:57 PM 12/31/02 -0500, David T-G wrote:Yes, do as much as you can in the database. The people who wrote it spent a lot of time trying to optimize it....and then Tularis said... % % Usually, % using mysql to handle your tables is *way* faster than letting php % handle it.
Here is a query from one of my projects...% % In your case, you could just do a complex join I think. That would give Ahhh... A new term. Back to the books for me!
$R1 = $DB->Query( "SELECT ScheduleID, CourseName, DepartmentName, " .
" TimeStart, TimeStop, BuildingName, " .
" BuildingNumber, RoomName, RoomNumber, " .
" a.GradeLevel AS MinGrade, " .
" b.GradeLevel AS MaxGrade " .
"FROM Schedule " .
"LEFT JOIN Courses USING( CourseID ) " .
"LEFT JOIN Departments " .
" ON Schedule.DepartmentID = Departments.DepartmentID " .
"LEFT JOIN Periods " .
" ON Schedule.PeriodID = Periods.PeriodID " .
"LEFT JOIN Rooms " .
" ON Schedule.RoomID = Rooms.RoomID " .
"LEFT JOIN Buildings USING( BuildingID ) " .
"LEFT JOIN Levels a " .
" ON a.LevelID = MinLevel " .
"LEFT JOIN Levels b " .
" ON b.LevelID = MaxLevel " .
"WHERE YearID = '$CurrYearID' " .
" AND TeacherID = '{$_SESSION[ 'CurrentUserID' ]}' " .
"ORDER BY TimeStart " );
This combines data from seven different tables, and pulls two different values out of one of the tables (Levels) to create a single result set. In many cases you can collect all the data you need in a single query.
Every field in the Schedule table is a key to another table that has to be looked up and translated to something people will understand. Note the two different ways of connecting tables with LEFT JOIN. USING( fieldname ) connects the table being joined, with the table listed right before it, using the same fieldname in both. The ON syntax allows you to use differently named fields, and/or a different table.
Courses has two fields (MinLevel, MaxLevel) that contain the highest and lowest grade that is allowed to take the course. Look closely at how the table aliases (a and b) are used to join two different fields to the same table. (Levels)
The table structures are listed below.
Rick
CREATE TABLE Buildings (
BuildingID bigint(20) NOT NULL auto_increment,
BuildingName varchar(20) default NULL,
BuildingNumber varchar(20) default NULL,
NumRooms int(11) default NULL,
FirstYear bigint(20) default NULL,
LastYear bigint(20) default NULL,
PRIMARY KEY (BuildingID),
KEY BuildingName (BuildingName)
) TYPE=MyISAM;
CREATE TABLE Courses (
CourseID bigint(20) NOT NULL auto_increment,
DepartmentID bigint(20) NOT NULL default '0',
CurriculumID bigint(20) NOT NULL default '0',
CourseName varchar(20) default NULL,
MinLevel bigint(20) NOT NULL default '0',
MaxLevel bigint(20) NOT NULL default '0',
BeginYear bigint(20) default NULL,
EndYear bigint(20) default NULL,
PRIMARY KEY (CourseID),
KEY DepartmentID (DepartmentID),
KEY CurriculumID (CurriculumID)
) TYPE=MyISAM;
CREATE TABLE Departments (
DepartmentID bigint(20) NOT NULL auto_increment,
DepartmentHead bigint(20) default NULL,
DepartmentName varchar(30) default NULL,
MinGrade int(11) default NULL,
MaxGrade int(11) default NULL,
DepartmentOrder decimal(4,2) default NULL,
PRIMARY KEY (DepartmentID)
) TYPE=MyISAM;
CREATE TABLE Levels (
LevelId bigint(20) NOT NULL auto_increment,
DepartmentID bigint(20) NOT NULL default '0',
LevelName varchar(30) default NULL,
GradeLevel int(11) default NULL,
PRIMARY KEY (LevelId)
) TYPE=MyISAM;
CREATE TABLE Periods (
PeriodID bigint(20) NOT NULL auto_increment,
PeriodGroupID bigint(20) default NULL,
TimeStart time default NULL,
TimeStop time default NULL,
Days set('Sun','Mon','Tue','Wed','Thu','Fri','Sat') default NULL,
RollReqd char(2) default NULL,
PRIMARY KEY (PeriodID),
KEY DepartmentID (PeriodGroupID)
) TYPE=MyISAM;
CREATE TABLE Rooms (
RoomID bigint(20) NOT NULL auto_increment,
BuildingID bigint(20) NOT NULL default '0',
RoomName varchar(20) default NULL,
RoomNumber varchar(20) default NULL,
PRIMARY KEY (RoomID),
KEY BuildingID (BuildingID)
) TYPE=MyISAM;
CREATE TABLE Schedule (
ScheduleID bigint(20) NOT NULL auto_increment,
YearID bigint(20) NOT NULL default '0',
DepartmentID bigint(20) NOT NULL default '0',
PeriodID bigint(20) NOT NULL default '0',
RoomID bigint(20) NOT NULL default '0',
CourseID bigint(20) NOT NULL default '0',
TeacherID bigint(20) NOT NULL default '0',
PRIMARY KEY (ScheduleID),
KEY YearID (YearID),
KEY DepartmentID (DepartmentID),
KEY PeriodID (PeriodID),
KEY RoomID (RoomID)
) TYPE=MyISAM;
--- End Message ---
--- Begin Message ---> Try encoding like this: > $retval = base64_encode(serialize( domxml_open_mem( $xml ))); > and on the next page: > $xml = unserialize(base64_decode($xml)); > It works via html but don't know enough about soap Well, you don't have to use soap - you can use sessions and get the same result. As for your suggestion, it didn't work. :( I can do a print_r() and a var_dump() on the variable before and after I serialize/encode it and get the save values each time: var_dump(): object(domdocument)(9) { ["name"]=> string(9) "#document" ["url"]=> string(0) "" ["version"]=> string(3) "1.0" ["standalone"]=> int(-1) ["type"]=> int(9) ["compression"]=> int(-1) ["charset"]=> int(1) [0]=> int(14) [1]=> int(138478176) } print_r(): domdocument Object ( [name] => #document [url] => [version] => 1.0 [standalone] => -1 [type] => 9 [compression] => -1 [charset] => 1 [0] => 14 [1] => 138478176 ) When I try to $DOMobject->dump_mem() before I serialize/encode it, I get the underlying XML. However, when I use dump_mem() afterwards, I am getting those errors mentioned in my previous post. I just don't understand why. I'm having no problems serializing and passing (through sessions or otherwise) other object, I'm just not having any luck with the internal DOM object. Chris--- End Message ---
--- Begin Message --- What you could do is put your 'lengthy process' in a shutdow function (register_shutdown_function()), and just do the header.
There is actually even a simpler way to do this, but it's not advised:
-------------------------
first
<?php
@set_time_limit(0); // Make sure there is no limit
ob_start(); // Start output buffering
if(array_key_exists('secondrun',$_GET)) {
print "Processing complete!";
exit();
}else{
header("Location:http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?secondrun=1");
ob_flush(); // This sends the output to your browser
ignore_user_abort(true);// Makes sure the script continues...
... // Lengthy process here
}
?>
-------------------------
Basicly, what it does here, is force the engine to flush the output (the redirect) to your browser, next,
because the set_time_limit is set to 0 (unlimited), your script still goes on... While you can follow the other link.
The ignore_user_aboort(true), makes sure the server continues till the script finishes. Otherwise it would kill it as soon as you'd press stop on your browser :)
Hope that helps,
- Tularis
Leif K-Brooks wrote:
I need a way to keep the script running on the server, but control to the user. I'm doing some lengthy processes on the server, and it seems stupid to keep the user waiting pointlessly. I'm trying to do something like:
<?php
header("Location: http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?secondrun=1");
//Do long processing here
?>
but it waits till the long processing is done, and then redirects. Is there another way to do this?
--- End Message ---
--- Begin Message ---Hi, obviously, I don't if this is the right newsgroup to ask such questions, but here it goes... what has happened with FastCGI support on the 4.3 version of PHP? On changelog I saw that SAPI/FastCGI was discontinued. But when I do phpinfo() it reports "Server API : CGI/FastCGI" and when I go with "php -v" the answer is: PHP 4.3.0 (cgi-fcgi), Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies and when I go with "php -h" there's an option : -b <address:port>|<port> Bind Path for external FASTCGI Server mode But when I do "php -b localhost:5000" it says there's no "b" command. What's up with FastCGI? Was it really discontinued? If so, where can I find good alternatives to FastCGI for my home made webserver running on WinXP and where can I find the reasons that lead to this? thankz Fernando--- End Message ---
--- Begin Message ---I'm using exec(). Frank M. Kromann wrote:PHP should not have any problems with long file names. I use it often on
both WIndows 2000 and Windows XP without anu problems.
What is it you are trying to do ?
- Frank
Thanks... thing is, it can be anything from c:\whatever.exe to c:\program files\program name\bin\program.exe. I'll write a function that goes to each directory in a string and does a dir /x if I have to,
but isn't there a simpler way?server.
Michael Sims wrote:
On Tue, 31 Dec 2002 01:12:47 -0500, you wrote:
I'm trying to run some (often user-defined) files on my windows
nameThing is, it seems to want short names (like C:\PROGRA~1\WHATEVER\PROG.EXE). Is there any way to get the short
unauthorized attempt to decrypt it will be prosecuted to the full extent--Take a look at this:
from a long name?
http://makeashorterlink.com/?V25A32BE2
The above message is encrypted with double rot13 encoding. Any
of the law.
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.--- End Message ---
--- Begin Message ---Could somebody please tell me what I'm doing wrong here? The code is: <?php $filename= "tables/contacts.txt"; $fd=fopen($filename, "a"); fwrite($filename, "xyz"); fclose($fd); ?> And I get the following error message: "Warning: fwrite(): supplied argument is not a valid File-Handle resource in c:\archivos de programa\apache group\apache\htdocs\visitrep\report_options.inc on line 111" Thanks a lot in advance and happy new year! Alberto Brea http://estudiobrea.com--- End Message ---
--- Begin Message ---The $fd is the file handler now not the $filename. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] HiTCHO | Open Platform Web Development Consutling - Outsourcing - Training - Support ----- Original Message ----- From: "Alberto Brea" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 6:27 AM Subject: [PHP] fwrite() debugging Could somebody please tell me what I'm doing wrong here? The code is: <?php $filename= "tables/contacts.txt"; $fd=fopen($filename, "a"); fwrite($filename, "xyz"); fclose($fd); ?> And I get the following error message: "Warning: fwrite(): supplied argument is not a valid File-Handle resource in c:\archivos de programa\apache group\apache\htdocs\visitrep\report_options.inc on line 111" Thanks a lot in advance and happy new year! Alberto Brea http://estudiobrea.com--- End Message ---
--- Begin Message ---Try <?php $filename= "tables/contacts.txt"; $fd=fopen($filename, "a"); if(!($fd)){ die("Unable to open file"); } fwrite($fd, "xyz"); fclose($fd); ?> *********** REPLY SEPARATOR *********** On 31/12/2002 at 5:27 PM Alberto Brea wrote: >Could somebody please tell me what I'm doing wrong here? > >The code is: ><?php $filename= "tables/contacts.txt"; >$fd=fopen($filename, "a"); >fwrite($filename, "xyz"); >fclose($fd); ?> > >And I get the following error message: >"Warning: fwrite(): supplied argument is not a valid File-Handle resource >in c:\archivos de programa\apache >group\apache\htdocs\visitrep\report_options.inc on line 111" > >Thanks a lot in advance and happy new year! >Alberto Brea >http://estudiobrea.com--- End Message ---
--- Begin Message ---Tularis, et al -- ...and then David T-G said... % % ...and then Tularis said... % % % % Usually, % % using mysql to handle your tables is *way* faster than letting php % % handle it. ... % % % % In your case, you could just do a complex join I think. That would give % % Ahhh... A new term. Back to the books for me! A little RTFMing later, our hero returns... % % % all results in one table, and you could just order that on scheduletime, % % That certainly would be lovely :-) Look at that; I get out what I want in the order I'll want it in a single query! mysql> select substring(s.timeslot,1,13),i.fname,concat(c.fname,' ',c.lname) from personnel as i, clients as c, schedule as s where i.id = s.instr and c.id = s.client and i.fname = 'penelope' order by timeslot; +----------------------------+----------+-----------------------------+ | substring(s.timeslot,1,13) | fname | concat(c.fname,' ',c.lname) | +----------------------------+----------+-----------------------------+ | 2002-12-27 06 | penelope | david t-g | | 2002-12-27 07 | penelope | david t-g | | 2002-12-27 08 | penelope | laura t-g | | 2002-12-27 10 | penelope | david t-g | +----------------------------+----------+-----------------------------+ 4 rows in set (0.00 sec) I'll probably have to refine this a bit as I also learn more about how to use this, but I'm well on my way.. Thanks again & HAND & HNY :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!--- End Message ---
msg91164/pgp00002.pgp
Description: PGP signature
--- Begin Message --- I am having a problem getting Apache to load the php4apache.dll.
I have tried putting the "/" and "\" in every way I can think of and I get an error that Apache cannot find
c:/active_php/sapi/php4apache.dll (and it IS there).
LoadModule php4_module c:/active_php/sapi/php4apache.dll
I have even tried
LoadModule php4_module php4apache.dll
Where I put php4apache.dll in the base directory and I get the error that Apache cannot find it.
--- End Message ---
--- Begin Message --- I don't do Windows all that often, so I'm not sure this will work, but I seem to remember this problem a while back. You may want to try putting the php4apache.dll in the same directory as all the dll's that came with Apache, and load it like this....
LoadModule php4_module php4apache.dll
HTH
Todd Cary wrote:
I am having a problem getting Apache to load the php4apache.dll.
I have tried putting the "/" and "\" in every way I can think of and I get an error that Apache cannot find
c:/active_php/sapi/php4apache.dll (and it IS there).
LoadModule php4_module c:/active_php/sapi/php4apache.dll
I have even tried
LoadModule php4_module php4apache.dll
Where I put php4apache.dll in the base directory and I get the error that Apache cannot find it.
-- By-Tor.com It's all about the Rush http://www.by-tor.com--- End Message ---
--- Begin Message --- After wasting a day on trying to get Apache to load PHP, I discovered what I believe to be the probllem, but no solution: M$!!!
I have another box that has Win 2K running on it *AND* it does not have SP 3! Apache loads like a dream and so does PHP!!!!
So, there is something in the new security of XP and Win 2K SP 3 that does not let the dll load and run. Ever since I loaded SP 3 I have had problems - like many others!
Now to figure why it will not let Apache load and run the dll?
Todd
--- End Message ---
--- Begin Message ---> So, there is something in the new security of XP and Win 2K > SP 3 that > does not let the dll load and run. Ever since I loaded SP 3 > I have had > problems - like many others! Don't know about Win2k as I haven't tried it but Apache/PHP/MySQL is working perfectly well on my Win XP laptop. CYA, Dave--- End Message ---
--- Begin Message ---On Mon, 2002-12-30 at 06:59, Sridhar Moparthy wrote: > Hi Jimmy, > > Thank You for the your reply. Here is the example. > > If > 1. Jobs 'B' and 'C' starts immediately after Completion of job'A' > 2. Job 'D' starts after completion of both Jobs 'B' and 'C'. > 3. Job 'E' starts after completion of job 'C' > 4. ... > job = object What makes the jobs different -- should the images for different jobs be different images? Do the connecting lines need to represent objects bouncing around inside a computer, a network or the real world? Do the objects transition between the real world - inside a computer and through networks? I just need to get a grasp. Do the connecting lines always connect to the same place or are they places on an object can connecting lines have bends? If they bend can they cross other lines or pass through objects they are not related to? (lots of other questions like this) Can you show me data from your db(change the names if security is an issue). Also some general descriptions or what each job is would be great. Such as is it a function or an object or class or is this data bouncing between servers and respective processes. And things that you are looking for in the image. Hmmmm if the layout is always the same then the graphic class can be quite simple but if the layout changes it could make things much more complex. > The I would like to see the following image. > > > [image] > > > If you can not see the image, Please see the attached file. > > Thank you. > Sridhar. > > > > > > -----Original Message----- > From: Jimmy Brake [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 27, 2002 4:23 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Flow diagrams.-- Resending > > > can you give us some examples of the data .. > > the example I would like to see is: based on this information this is > what should be displayed > > > > On Fri, 2002-12-27 at 11:48, Sridhar Moparthy wrote: > > Hi Every one, > > > > I have information about some processes in the database that tells > different > > process dependencies. I need to display that information as a > process flow > > diagram. Do you know how to prepare and display process flow > diagrams > > dynamically. Do you know anything like JPGraph or Java script or > java applet > > that can do this? If so Please help me. > > > > I am using PHP 4.xx and IIS on Win NT platform. Please help me if > you know > > how to do. > > > > Thank You, > > Sridhar Moparthy > > -- Jimmy Brake <[EMAIL PROTECTED]>--- End Message ---
--- Begin Message --- Hi,
Using PHP with cURL, I am currently able to dynamically create XML documents and HTTP POST to a remote server, receive an XML response, and parse XML as needed.
What I am having trouble finding information on is doing the reverse. Basically, I am trying to create a PHP script that acts as a server, so that a remote computer can HTTP POST XML to said script and then I parse and respond in XML. Again, I already have the reverse working using CURL - so basically I have created a client and now I need to create the server.
The only part I need help understanding is how do I get the XML into an array/variable when my script is hit with someone using HTTP POST to pass XML to it. I have an idea below (vague)..
I had the server guy HTTP POST some XML to a script which just had
<? phpinfo(); ?>
I see in the HTTP Request Headers of the phpinfo() output that it received content type text/xml but nowhere do I see what was actually received (the actual xml that was sent). I thought maybe PHP would take the stuff after the header and push it into an array/variable but no such luck (argv?).
I am wondering if anyone has any helpful information. I imagine something like the following psuedo code:
if($HTTP_CONTENT_TYPE=="text/xml"){
//use some php function(s) to pass incoming xml stream to an array that I can then pass to my
//xml parser
}
I hope this gives you enough information to figure out my dilema. If someone can shed a little light on this subject it would be GREATLY appreciated.
Thanks,
Kris
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---The variables will created (as of 4.x) in the $_POST and $_GET global arrays and you can then access them using what ever functions you need to use. As for XML if it is posted as raw you will get an error from Apache saying Bad Request. I have just setup an example to see what is possible to get around this... keep you posted. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] HiTCHO | Open Platform Web Development Consutling - Outsourcing - Training - Support ----- Original Message ----- From: "Kristopher Yates" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 7:20 AM Subject: [PHP] receiving XML stream as server via PHP > Hi, > > Using PHP with cURL, I am currently able to dynamically create XML > documents and HTTP POST to a remote server, receive an XML response, and > parse XML as needed. > > What I am having trouble finding information on is doing the reverse. > Basically, I am trying to create a PHP script that acts as a server, so > that a remote computer can HTTP POST XML to said script and then I parse > and respond in XML. Again, I already have the reverse working using > CURL - so basically I have created a client and now I need to create the > server. > > The only part I need help understanding is how do I get the XML into an > array/variable when my script is hit with someone using HTTP POST to > pass XML to it. I have an idea below (vague).. > > I had the server guy HTTP POST some XML to a script which just had > <? phpinfo(); ?> > > I see in the HTTP Request Headers of the phpinfo() output that it > received content type text/xml but nowhere do I see what was actually > received (the actual xml that was sent). I thought maybe PHP would take > the stuff after the header and push it into an array/variable but no > such luck (argv?). > > I am wondering if anyone has any helpful information. I imagine > something like the following psuedo code: > > if($HTTP_CONTENT_TYPE=="text/xml"){ > //use some php function(s) to pass incoming xml stream to an array > that I can then pass to my > //xml parser > } > > I hope this gives you enough information to figure out my dilema. If > someone can shed a little light on this subject it would be GREATLY > appreciated. > > Thanks, > > Kris > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---You can post to your server with a mimetype of "text/xml" and in your script pickup the raw post as: $HTTP_RAW_POST_DATA Then just process this string as XML and return to buffer or not. Have fun. Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] HiTCHO | Open Platform Web Development Consutling - Outsourcing - Training - Support ----- Original Message ----- From: "Kristopher Yates" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 01, 2003 7:20 AM Subject: [PHP] receiving XML stream as server via PHP > Hi, > > Using PHP with cURL, I am currently able to dynamically create XML > documents and HTTP POST to a remote server, receive an XML response, and > parse XML as needed. > > What I am having trouble finding information on is doing the reverse. > Basically, I am trying to create a PHP script that acts as a server, so > that a remote computer can HTTP POST XML to said script and then I parse > and respond in XML. Again, I already have the reverse working using > CURL - so basically I have created a client and now I need to create the > server. > > The only part I need help understanding is how do I get the XML into an > array/variable when my script is hit with someone using HTTP POST to > pass XML to it. I have an idea below (vague).. > > I had the server guy HTTP POST some XML to a script which just had > <? phpinfo(); ?> > > I see in the HTTP Request Headers of the phpinfo() output that it > received content type text/xml but nowhere do I see what was actually > received (the actual xml that was sent). I thought maybe PHP would take > the stuff after the header and push it into an array/variable but no > such luck (argv?). > > I am wondering if anyone has any helpful information. I imagine > something like the following psuedo code: > > if($HTTP_CONTENT_TYPE=="text/xml"){ > //use some php function(s) to pass incoming xml stream to an array > that I can then pass to my > //xml parser > } > > I hope this gives you enough information to figure out my dilema. If > someone can shed a little light on this subject it would be GREATLY > appreciated. > > Thanks, > > Kris > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---> Using PHP with cURL, I am currently able to dynamically > create XML documents and HTTP POST to a remote server, > receive an XML response, and parse XML as needed. > What I am having trouble finding information on is doing > the reverse. Basically, I am trying to create a PHP script > that acts as a server, so You might want to look into SOAP. It sounds like it will fit your needs very well. PEAR has a SOAP implementation that's still in testing and there is a class out there called NuSOAP that's supposedly very good. I just started toying around with it recently and it seems to work very well. Chris--- End Message ---
--- Begin Message ---I have just installed 4.3.0 with apache2.0.43. Running a standard test.php file consisting solely of: <?phpinfo(); ?> results in incorrect html with the image sources of the logo incorrectly formed. See below. The src="d/public_html/test.php?=PHP... should, I think be src="~/public_html/test.php?=PHP. I regret I'm neither an html expert nor, yet, a PHP user, the objective as to get a system to learn with. As I can't find this reported here or in the bugs database, I suspect I have made in installation error. Can anyone enlighten me? Thanks, Richard <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html><head> <style type="text/css"><!-- body {background-color: #ffffff; color: #000000;} body, td, th, h1, h2 {font-family: sans-serif;} pre {margin: 0px; font-family: monospace;} a:link {color: #000099; text-decoration: none;} a:hover {text-decoration: underline;} table {border-collapse: collapse;} .center {text-align: center;} .center table { margin-left: auto; margin-right: auto; text-align: left;} .center th { text-align: center; !important } td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;} h1 {font-size: 150%;} h2 {font-size: 125%;} .p {text-align: left;} .e {background-color: #ccccff; font-weight: bold;} .h {background-color: #9999cc; font-weight: bold;} .v {background-color: #cccccc;} i {color: #666666;} img {float: right; border: 0px;} hr {width: 600px; align: center; background-color: #cccccc; border: 0px; height: 1px;} //--></style> <title>phpinfo()</title></head> <body><div class="center"> <table border="0" cellpadding="3" width="600"> <tr class="h"><td> <a href="http://www.php.net/"><img border="0" src="d/public_html/test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 4.3.0</h1> </td></tr> </table><br /> <table border="0" cellpadding="3" width="600"> <tr><td class="e">System </td><td class="v">Linux rad1 2.4.21-pre1 #2 Wed Dec 18 13:34:39 UTC 2002 i686 </td></tr> <tr><td class="e">Build Date </td><td class="v">Dec 28 2002 12:59:37 </td></tr> <tr><td class="e">Configure Command </td><td class="v"> './configure' '--prefix=/opt/httpd-2.0.43' '--with-config-file-path=/opt/httpd-2.0.43/conf' '--with-openssl' '--with-zlib' '--with-bz2' '--enable-calendar' '--with-gdbm' '--with-db3' '--with-gmp' '--with-mysql' '--with-ncurses' </td></tr> <tr><td class="e">Server API </td><td class="v">CGI </td></tr> <tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr> <tr><td class="e">Configuration File (php.ini) Path </td><td class="v">/opt/httpd-2.0.43/conf </td></tr> <tr><td class="e">PHP API </td><td class="v">20020918 </td></tr> <tr><td class="e">PHP Extension </td><td class="v">20020429 </td></tr> <tr><td class="e">Zend Extension </td><td class="v">20021010 </td></tr> <tr><td class="e">Debug Build </td><td class="v">no </td></tr> <tr><td class="e">Thread Safety </td><td class="v">disabled </td></tr> <tr><td class="e">Registered PHP Streams </td><td class="v">php, http, ftp, https, ftps, compress.bzip2, compress.zlib </td></tr> </table><br /> <table border="0" cellpadding="3" width="600"> <tr class="v"><td> <a href="http://www.zend.com/"><img border="0" src="d/public_html/test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a> This program makes use of the Zend Scripting Language Engine:<br />Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies </td></tr> </table><br />--- End Message ---
--- Begin Message -------- Original Message ----- From: "Richard A Downing" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 5:54 AM Subject: [PHP] Missing logos > I have just installed 4.3.0 with apache2.0.43. > Running a standard test.php file consisting solely of: > > <?phpinfo(); ?> > > results in incorrect html with the image sources of the logo incorrectly > formed. See below. The src="d/public_html/test.php?=PHP... should, I > think be src="~/public_html/test.php?=PHP. > > I regret I'm neither an html expert nor, yet, a PHP user, the objective as > to get a system to learn with. > > As I can't find this reported here or in the bugs database, I suspect I have > made in installation error. Can anyone enlighten me? > > Thanks, > Richard Nothing is wrong with your installation. The image is just being pulled from a non-traditional location. tyler--- End Message ---
--- Begin Message ---I have just installed 4.3.0 with apache-2.0.43. I did not have this problem with 4.3.0RC4 which this build overwrote. My system is Linux-2.4.21pre1, gcc-3.2.1, glibc-2.3.1. Running a standard test.php file consisting solely of: <?phpinfo(); ?> results in incorrect html with the image sources of the php and zend logos incorrectly formed. See below. The src="d/public_html/test.php?=PHP... should, I think be src="~/public_html/test.php?=PHP. The page is being served from the public_html directory in my home directory. I regret I'm neither an html expert nor, yet, a PHP user, the objective as to get a system to learn with. As I can't find this reported here or in the bugs database, I suspect I have made in installation error. Can anyone enlighten me? Thanks, Richard snip <a href="http://www.php.net/"><img border="0" src="d/public_html/test.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 4.3.0</h1> snip <a href="http://www.zend.com/"><img border="0" src="d/public_html/test.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a> snip--- End Message ---
--- Begin Message ---Sorry to bug, but any ideas? "David J. Johnson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is there any way to use strtotime on dates earlier than the Unix epoch? I'm > using strtotime to reformat the date information for insertion into MySQL. > I know that if strtotime is not accomodating, I can use a javascript to > force the date to be entered in a certain format. But now I think that the > 'last week' type input to strtotime is very valuable. > > Thanks, > David > >--- End Message ---
--- Begin Message ---On Tuesday 31 December 2002 22:05, Edward Peloke wrote: > Hello all, > > For some reason, I have one computer running php that I can't get the mail > function to work on. I get this error: Warning: Failed to Receive in > c:\program files\apache group\apache\htdocs\mailtest.php on line 2 > > The machine is running windows and apache as the web server. In my php.ini > file, I have the smtp set to localhost. > > Any suggestions? You're running Windows and you're telling PHP to use the SMTP server at localhost -- do you actually have an SMTP running on that same server? If not then you'll have to do the obvious, ie either install an SMTP server, or point php.ini to a valid server. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I once decorated my apartment entirely in ten foot salad forks!! */--- End Message ---
--- Begin Message ---Are there any settings I need to change in order to get the HTTP_IF_MODIFIED_SINCE variable set when applicable? I saw some threads on google about session_cache_limiter() but even after following that, I still don't get access to the HTTP_IF_MODIFIED_SINCE variable when revisiting a page with the Last-Modified header. The page I'm testing this on _is_ sending the Last-Modified header, but the HTTP_IF_MODIFIED_SINCE variable is not available. Thanks. -- Ian Evans Digital Hit Entertainment http://www.digitalhit.com--- End Message ---
--- Begin Message ---Hi list, What is better to use? The included GD library or the external ( Boutell.com ) GD library? On the Boutell.com site I found that the included GD version is alike to 2.0.2 from their site. But sins 2.0.9 is out, I would like to know witch version to use. Thanks in advance, and a happy new year Richard Pijnenburg--- End Message ---
--- Begin Message ---At 03:13 AM 1/1/03 +0100, Richard Pijnenburg wrote:Unless you have to use the external library because other things are sharing it, just use the GD that comes with PHP.Hi list, What is better to use? The included GD library or the external ( Boutell.com ) GD library?
We are talking about 4.3.0, right?
Rick
--- End Message ---
--- Begin Message ---Yeah, I want to install 4.3.0 And I only want to use GD with php. But isn't it so that the external GD version is "more advanced" then the internal? I've got this from the GD site: php 4.3.0 is available, and it includes a version of gd as "standard equipment." I have only taken a brief preliminary look at it, but it seems to include mainstream gd fixes up through version 2.0.2. but sins 2.0.9 is out, witch version should I use ? thanks. Richard Pijnenburg Klik-on Internet Solutions > -----Original Message----- > From: Rick Widmer [mailto:[EMAIL PROTECTED]] > Sent: 01 January 2003 04:18 > To: Richard Pijnenburg; [EMAIL PROTECTED] > Subject: Re: [PHP] use included GD of external > > At 03:13 AM 1/1/03 +0100, Richard Pijnenburg wrote: > >Hi list, > > > >What is better to use? The included GD library or the external ( > >Boutell.com ) GD library? > > Unless you have to use the external library because other things are > sharing it, just use the GD that comes with PHP. > > We are talking about 4.3.0, right? > > Rick--- End Message ---
--- Begin Message ---At 10:11 AM 12/31/02 -0500, Carl Bélanger wrote:I just upgraded to php 4.3.0 and all by bulletin board are now returning error about the mail function:
Fatal error: Call to undefined function: mail() in /var/wwwx/htdocs/forum/private.php on line 687
What could be missing?
./configure looks for sendmail if it is not found the mail function is not compiled in, resulting in the undefined function call. Mine is in /usr/sbin/sendmail. Grep the results of ./configure for 'sendmail' to see what happened.
./configure ... > tempfile
grep sendmail tempfile
Rick
--- End Message ---
--- Begin Message ---Hi PHP-lovers! Happy new year! I just downloaded the PHP 4.3.0 binaries (Win32, zip) and saw, that no PEAR related stuff is included... is that right or is there a mistake in it? I thought, PEAR would be integral part of PHP since some versions... Regards! Toby -- <?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2* 5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2* 23,105,11*10,2*51,111);'); function f($a){print eval('eval($a);while(list(,$b)=each($a))echo chr($b);');} ?>--- End Message ---
--- Begin Message ---Can someone help me make an array ... I have $foo amount of loops to preform (1-20), and would like to make the veriable work for me like $comment_1, $comment_2 etc etc. http://nz.php.net/manual/en/function.array.php makes no sence to me after i read it and read it ... help me please --- Philip J. Newman. Head Developer. PhilipNZ.com New Zealand Ltd. http://www.philipnz.com/ [EMAIL PROTECTED] Mob: +64 (25) 6144012. Tele: +64 (9) 5769491. VitalKiwi Site: Philip J. Newman Internet Developer http://www.newman.net.nz/ [EMAIL PROTECTED] ***************************** Friends are like Stars, You can't always see them, But you know they are there. ***************************** ICQ#: 20482482 MSN ID: [EMAIL PROTECTED] Yahoo: [EMAIL PROTECTED] AIM: newmanpjkiwi--- End Message ---