[PHP] error on array loop through foreach?
I'm using the foreach to loop through a array that is passed from a form. The form has a multiple select field and the field sends a list of selected image locations (i.e. c:\\myimages\\rabbit.gif). All the fields are selected by use of JavaScript before the form is submitted. Anyway, I am getting the error: Parse error: parse error, unexpected T_FOREACH in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 39 Here is the code that I am using. The foreach statement is line 39. //loop through all the chosen file names and input them individually $count = 0 foreach ($filename as $filevalue){ //get file size function function fsize($file) { $a = array(B, KB, MB); $pos = 0; $size = filesize($file); while ($size = 1024) { $size /= 1024; $pos++; } return round($size,2). .$a[$pos]; } $file_size = !fsize($filevalue); //get specific file name $parts=explode(\\,$filevalue); $file_name=$parts[sizeof($parts)]; //get file type function $ext = strrchr($file_loc_name,'.'); $file_type = $ext; //write information from file to db $sql = INSERT INTO images . (img_location, img_name, img_type, img_size, category_id) ; $sql.= VALUES (; $sql.= '{$filevalue}', '{$file_name}', '{$file_type}', '{$file_size}', '{$catID}'); mssql_query ($sql); $count++; //end of loop ;} Anyone see what may be causing this? When I do a simple foreach ($filename as $filevalue){ echo ($filevalue);}, it will return all the files names chosen from the form. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] error on array loop through foreach?
On Mon, 2003-07-07 at 00:16, Micah Montoy wrote: I'm using the foreach to loop through a array that is passed from a form. The form has a multiple select field and the field sends a list of selected image locations (i.e. c:\\myimages\\rabbit.gif). All the fields are selected by use of JavaScript before the form is submitted. Anyway, I am getting the error: Hi there, Parse error: parse error, unexpected T_FOREACH in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 39 Here is the code that I am using. The foreach statement is line 39. //loop through all the chosen file names and input them individually $count = 0 You need a semicolon at the end of the above line. foreach ($filename as $filevalue){ //get file size function function fsize($file) { $a = array(B, KB, MB); $pos = 0; $size = filesize($file); while ($size = 1024) { $size /= 1024; $pos++; } This function definition should not be inside the foreach(), since the second time the loop executes, it will stop and tell you that you can't redeclare an already defined function (and it was defined on the first loop). I haven't checked the rest of it; try the above ideas and see if they help. Good luck, Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Request Network ID
Hi, I need you help please. I am looking for a function can give the Network ID from LAN. For example, our LAN is based on Windows 2000. How can I get user network account. VB.NET has this built in function Request.ServerVariables(LOGON_USER) Can you help?:
[PHP] php 4.3.2 problem
Hi We're trying to upgrade to php-4.3.2. when we install libphp.so and restart apache, it fails to start with the error Invalid command 'php_admin_value', perhaps mis-spelled I don't understand what's wrong. The syntax of our httpd.conf is working just fine with our current version (4.2.3). Does php needs to be compiled with a special parameter in order for php_admin_value and php_admin_flag (this also doesn't work for us on 4.3.2)? Appreciate the help.. -R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Refresh in PHP
Hi Everyone, My user has reported a problem when he loads a page. The page grabs data from MSSQL and displays this on the screen. However, it is not updated. Is there any way in getting the page to automatically refresh itself ONCE when it is loaded, without ending up in a loop? Many thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 7 Jul 2003 09:52:10 -0000 Issue 2161
php-general Digest 7 Jul 2003 09:52:10 - Issue 2161 Topics (messages 154146 through 154162): Re: Warning: Invalid argument supplied for foreach() 154146 by: Sævar Öfjörð 154147 by: Dave [Hawk-Systems] 154148 by: Philip Olson Re: Having problems with an IF statement, just doesn't make sense 154149 by: Chris Hayes print vs. heredoc 154150 by: Sparky Kopetzky 154151 by: Greg Donald Re: PHP crashing with using Oracle 154152 by: Lang Sharpe multiple sessions 154153 by: David T-G Re: Optional form variables (IDEA?) 154154 by: Miranda, Joel Louie M Passing multiple form values in if statement 154155 by: Miranda, Joel Louie M Looking for a good coder 154156 by: Darin Re: include/require inside of function 154157 by: Ow Mun Heng error on array loop through foreach? 154158 by: Micah Montoy 154159 by: Lars Torben Wilson Request Network ID 154160 by: Haitham A. Khaiyat php 4.3.2 problem 154161 by: user.domain.invalid Refresh in PHP 154162 by: Gary Ogilvie 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] -- ---BeginMessage--- Don't you think it should be like this? foreach($champs as $key=$value) { echotd class='$value'$key/td; //--^ } -Original Message- From: arnaud gonzales [mailto:[EMAIL PROTECTED] Sent: 6. júlí 2003 20:51 To: Php-General Subject: [PHP] Warning: Invalid argument supplied for foreach() Hi all, I am getting crazy, can't understand what i missed! Does anybody know? $champs = array (titre_art = h3 ,nom = bleu, prenom = green, resume = bold); foreach($champs as $key = $value) { echo td class='$value'$row($key))/td; } TIA. zeg ---End Message--- ---BeginMessage--- Hi all, I am getting crazy, can't understand what i missed! Does anybody know? $champs = array (titre_art = h3 ,nom = bleu, prenom = green, resume = bold); foreach($champs as $key = $value) { echo td class='$value'$row($key))/td; } never used foreach()... but I would check the following: $row($key)) = appears to have an extra ) though it would just be printed in your example $row($key) = if it is an array reference, should be $row[$key] Here is another way to do your problem though while(list($key,$value)=each($champs)){ echo td class='$value'$key/td; } Dave ---End Message--- ---BeginMessage--- On Sun, 6 Jul 2003, arnaud gonzales wrote: Hi all, I am getting crazy, can't understand what i missed! Does anybody know? $champs = array (titre_art = h3 ,nom = bleu, prenom = green, resume = bold); foreach($champs as $key = $value) { echo td class='$value'$row($key))/td; } It works fine, you are using different code then the above. In your actual code, make sure you pass in an array that exists, as currently you are not. One example reason, the foreach is inside a function and $champs isn't available in the functions scope (global). At any rate, before your foreach, var_dump($champs) and it'll let you know what is up. Regards, Philip p.s. In case $row is an array, you actually mean to write it as $row[$key], but this is unrelated to the error that foreach is providing. ---End Message--- ---BeginMessage--- At 19:18 7-7-2003, you wrote: I am using the following if statement ... if (isset($theme)) { print(Current theme is $theme); require content/header_$theme.php; } else { print($theme); require content/header.php; } now one would think that if it didn't return true that the else statement wouldn't print anything for $theme ... but it does. Also if I use !isset it returns true with a null value for $theme ... This doesn't make sense to me ... maybee I am doing something wrong, if I am someone please correct me heh. If i use this bit of code it acts as you and I expect. So there may be something in the previous code that is acting up here. Do you see any value in $theme when you do echo [$theme]; ? Spaces should show up this way. Are you working for a CMS? If so, which one? (i ask because i know the nukes family uses $theme) ---End Message--- ---BeginMessage--- Hi, again!! I'm looking for opinions as to which is better, print or heredoc. print makes the code layout look nice and eazy to debug, where heredoc IS faster but makes the code look like a nightmare and I'm pretty picky about what looks good. Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net ---End Message--- ---BeginMessage--- I'm looking for opinions as to which is better, print or heredoc. I prefer heredoc mostly because I do not enjoy editing html that is full of backslashes. I build up the html and only output
Re: [PHP] instanceof on class (not objects) php 5
Maybe if (new MyClass instanceof_equiv tester) { ... } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Having problems with an IF statement, just doesn't make sense
if (isset($theme)) { print(Current theme is $theme); require content/header_$theme.php; if you try to send headers in header_$theme.php, this wont work, because you can't send headers after you've printed or echoed something. try this: if (isset($theme)) { require content/header_$theme.php; print(Current theme is $theme); } else { require content/header.php; print($theme); } mfg. harry wiens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Read a file and scroll it?
Hi All I know that some level of JS will be needed for this but how can I do this. 1) I have a script that writes to a file. All ok there ;-) 2) I want to load this contents of the file, line by line, so that it scrolls upwards. So how can I do that. What JS would I need and how do I read the file line be line into an array and let the JS bit use it. Very Very new to this so please be gentle. Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.497 / Virus Database: 296 - Release Date: 04/07/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php pages without .php extension on linux and windows
I try to use PHP and Apache on both Linux (SuSE 8.1) and Windows (2K). On Linux I can access the PHP scripts without adding the .php extension. E.g. http://mydomain/myscript?para1=TRUE for http://mydomain/myscript.php?para1=TRUE But on Windows it doesn't work (page not found - HTTP 404) How do I switch on 'adding .php' on windows? Does it run on windows too? What is responsible for that functionality, Apache/PHP? Which module or directive? My system: SuSE Linux 8.1 - PHP 4.2.2 - Apache/1.3.26 Windows 2000 - PHP 4.2.3 - Apache/1.3.24 Thanks for helping Heiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX, Windows, and the Sharpe family of Linux PDAs
Hi Do you want to create, edit, or update your PHP databases remotely within a nice Graphic User Interface without having to use your Web Browser, well you can do that with Rekall and last week Rekall V2.0.0 was finally released for KDE3. QT3-only, Windows and Sharp Zaurus. We even have a run time only version so that you can distribute your Rekall applications. Yes, that's true, you create applications in much the same way can with MS Access, since Rekall is a programmable database client. For more information, tutorials, HOWTOs, examples, etc. please visit http://www.rygannon.com We are pleased to announce the 2.0 release of Rekall, a personal, programmable DBMS system for Linux and Windows. Rekall is the only viable alternative to MS Access for Linux. With Rekall you will be able to quickly and easily build database applications using Rekall forms and reports. A full complement of widgets means that applications built in Rekall will be able to have the look and feel of any other application. Rekall applications can be extended in their functionality to perform virtually any task via embedded Python as a scripting language. Ever since the release of dBase many years ago, the idea of a programmable DBMS has become increasingly popular. Major systems have been written in applications like Paradox and MS Access. By focusing on the database, users are able to leverage their business knowledge into working applications. One of the limitations of the aforementioned products is that their native database didn't scale well or support multiple users very well. Rekall avoids this problem by dispensing with a native database. The biggest addition to Rekall 2.0.0 is reusable components. Rekall now comes with a selection of components that you can use in forms; these include standard buttons and navigation tools. In addition to these components, you can also construct your own for use as often as you want. You can store your components either in the database itself, or in a local area in the file system. To support reusable components, and to make it easier to script complicated forms, Rekall 2.0.0 introduces an Event/Slot mechanism (akin to Qt's Signal/Slot mechanism). This allows to place all script code which is logically associated with a particular control inside that control, and means you can copy or delete the control without worrying about copying or cleaning up script code inside other controls. Other new features in Rekall 2.0.0 include: * Static images can by displayed in forms * Data controls can appear in menu-blocks * Spin box control * Link controls can display multiple colums * Link controls can use Queries as well as tables * Event logger for debugging * Raw SQL window for direct SQL execution * Forms, Reports, etc. can run modally * Fast table filters for predefined table data display * Modal forms can be used as dialog boxes * Explanation of queries generated by Rekall * Menu and toolbar hiding * MySQL and PostgreSQL connections over SSH tunnels (Linux only) In addition, Rekall comes with a thorough demonstration database that illustrates the various features of the applications. There are actually three copies of the database, one using MySQL, one PostgreSQL and one using XBase/XBSQL. Optional drivers are currently available for DB2 and ODBC with Oracle9i coming later this summer (the Windows version is ready now). By purchasing Rekall you are getting the source for the application and free electronic updates to the core application. You get all supported platforms for one price regardless of when they are released. Rekall is priced at $79.95 for the physical package and $69.95 for the electronic package. Rekall can be purchased from www.thekompany.com/products/rekall. Rekall V2.0.0 demo version can be downloaded from http://www.rygannon.com by selecting downloads from the navigation menu or by clicking on the downloads button on the top navigration bar . Regards John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Having problems with an IF statement, just doesn't make sense
I've tried...print nothing in my browser then it seems to me correct. The condition ELSE is satisfied. bye. codeused: if (isset($theme)) { print(Current theme is $theme); require content/header_$theme.php; } else { print($theme); require content/header.php; } codeused. Bobb [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] I am using the following if statement ... if (isset($theme)) { print(Current theme is $theme); require content/header_$theme.php; } else { print($theme); require content/header.php; } now one would think that if it didn't return true that the else statement wouldn't print anything for $theme ... but it does. Also if I use !isset it returns true with a null value for $theme ... This doesn't make sense to me ... maybee I am doing something wrong, if I am someone please correct me heh. -- /* BoBB * AIM: Jodokast49 ICQ: 151495596 * Jabber: [EMAIL PROTECTED] * http://knightsofchaos.com/~BoBB/new/ * I geek, therefor I am. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Security-other than safe mode?
Hello, I have many of my clients set up in 'safe_mode' mainly for security reasons. Well, as many of you know, that limits the way PHP functions. Especially on complex apps. Here is what I include in their httpd configs now... php_admin_flag safe_mode on php_admin_flag register_globals off php_admin_flag allow_url_fopen off php_admin_value doc_root /sites/site.com/www php_admin_value open_basedir /sites/site.com php_admin_value session.save_path /sites/site.com/sessiondata php_admin_value upload_tmp_dir /sites/site.com/uploadtemp php_value upload_max_filesize 1024000 Can anyone else give me some other options that will make things secure, but have safe_mode turned off? I mainly don't want them able to execute shell commands, view info not in their directory, etc.. Etc.. ANY help or insight would greatly be appreciated. TIA ++ Mike Yrabedra (President) 323 Incorporated Home of MacDock, MacAgent and MacSurfshop ++ W: http://www.323inc.com/ P: 770.382.1195 F: 734.448.5164 E: [EMAIL PROTECTED] I: ichatmacdock ++ Whatever you do, work at it with all your heart, as working for the Lord, not for men. ~Colossians 3:23 {{{ ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and MYSQL
Please help I am going quite mad. I am trying to install PHP-4. I purchased the PHP and MySQL web development book to this end. I am running under Win2000 and IIS. I downloaded from the PHP web site to get the latest versions. I first tried to do a manual installation but this appeared to fail so after trying many things as detailed in the book I gave up and after erasing all I had installed, used the installer program (advanced). This is giving me exactly the same results. Namely:- a script in the root directory (local Host) when viewed gives a copy of my script code and nothing else. I have checked the default DBase entry is correct (PHP/PHP.exe). The exec file Iuser_home and PHP4ts.dll has executable set. I have started and stopped ISS many times. The PHP.INI file is in the PHP directory. I have not modified it in any way (Yet). Here is the script for what it's worth. html head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 h2IS IT WORKING?/h2 plt;?php phpinfo(); ?gt; /p /body /html and the result is IS IT WORKING? ?php phpinfo(); ? NO ERROR MESSAGES. I am using Internet explorer and incidentally all my ASP still work normally. I know I have missed something but any pointers as to what would be much appreciated. Thanks BOBG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Frustrating problem with log-in script
Hi, I' running a self-registration script. On the login page are 2 fields: 'username' and 'paswd'. The contents are checked against a db. New users must enter 'new' and 'user' into these fields and that will skip the db check and dump them into a registration page. On testing (after it worked fine last week) I find that new/user dumps me back into the login page (home.html). The code is ... ?php include(functions.php); include(local.php); $login=$url.home.html; if(isset($_REQUEST[username]) $_REQUEST[username]!=''){ $username=$_REQUEST[username]; } else { header(Location: $login); } if(isset($_REQUEST[paswd]) $_REQUEST[paswd]!=''){ $paswd=$_REQUEST[paswd]; } else { header(Location: $login); } if( $username == 'new' ){ $new_u=$url.user_new.php; header(Location: $new_u); } $strSQL = select * FROM user WHERE (Username='$username' AND Paswd='$paswd'); $cur = odbc_exec( $conn, $strSQL ); if (!$cur) { Error_handler( #1 Error in odbc_exec( no cursor returned ) .$strSQL , $conn ); } .. ? Any suggestions? This is running on Win NT. Chers George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Frustrating problem with log-in script - DOHHH - Solved
Sorry guys, I wasted your time if you looked at this. The local.php as copied from my local machine and had 'localhost' as the base url rather than the proper web address. Meet Dumbererer! George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to insert a variable into a PHP template.
Hi, I want to write a PHP template with a variable number of the last recordset in a MySQL DB being the number referenced in the file. This is so my file can be saved as a PHP page looking at the right content in a database for a content management system. I am stuck on the way to do it. The code below is the part I want to change: So I need to do two things: 1) Select the last record in a database table. 2) get PHP to write all the code below on the fly. db_connect(); // This is the query number which needs to be changed and written every time as the last record in the DB $query = select * from crm_content where PageID='1'; $result = mysql_query($query) or die(Error: Query failure withBR$queryBR.mysql_error()); while ($array = mysql_fetch_array($result)) { $PageTitle = {$array[Title]}; $BodyText = {$array[BodyText]}; $Picture1 = {$array[PictureOne]}; $Picture2 = {$array[PictureTwo]}; $CatID = {$array[CatID]}; } // then write the function to call the page here // Any ideas thoughts or help much appreciated. Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] daemonized php
Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- Best regards, Uros -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refresh in PHP
My user has reported a problem when he loads a page. The page grabs data from MSSQL and displays this on the screen. However, it is not updated. Is there any way in getting the page to automatically refresh itself ONCE when it is loaded, without ending up in a loop? Javascript will do that. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and MYSQL
Here is the script for what it's worth. ... body bgcolor=#FF text=#00 h2IS IT WORKING?/h2 plt;?php phpinfo(); ?gt; /p /body /html and the result is IS IT WORKING? ?php phpinfo(); ? are your trying to fool the list? whate else do you expect than when you write gt; ?? would ASP work if your write lt;% [ASP-CODE] %gt; ?? i think not, in short just write and rather then lt; and gt; html body bgcolor=#FF text=#00 h2IS IT WORKING?/h2 p?php phpinfo(); ? /p /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
start your PHP files with: #! /usr/bin/php Replace /usr/bin/php with the path to php. You will need to make the file executable by chmod ing it. (try: $ chmod +x ./yourscript.php ) As a side note, starting any text file with #! followed by the path to a language interpreter, and chmoding the file so that it is executable will allow you to send the rest of the file to the interpreter and run it as a full fledged program. -Dan On Mon, 2003-07-07 at 08:41, Uros wrote: Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- Best regards, Uros -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
Uros -- ...and then Uros said... % % Hello! Hi! % % Can somebody give me any workable example how to run some script written in % PHP in Unix console. Sure. php -q /path/to/script/name (assuming you have the command-line version of php, which you may not, and that your script doesn't need apache to feed it env vars). % % I wan't to write some server aplication. So it has to be run in the % backgroud. Then tack '' on the end of the line above. HTH HAND :-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! pgp0.pgp Description: PGP signature
[PHP] what licence for documentation ?
Hi, I'd like to know which licence has the documentation. PHP licence ? free licence ? public domain ? other ? In other words, I want to include some parts in a commercial product, can I ? Please answer only if you *know*, I can't go with suppositions. -- E.D. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Refresh in PHP [solved]
Yeah I found that out eventually. Thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
Can somebody give me any workable example how to run some script written in PHP in Unix console. #!/usr/local/bin/php -q ?php echo Example script; ? I wan't to write some server aplication. So it has to be run in the backgroud. Have a look at the process control functions: http://php.net/pcntl -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to insert a variable into a PHP template.
- Original Message - From: Steve Jackson [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:34 PM Subject: [PHP] How to insert a variable into a PHP template. Hi, I want to write a PHP template with a variable number of the last recordset in a MySQL DB being the number referenced in the file. This is so my file can be saved as a PHP page looking at the right content in a database for a content management system. I am stuck on the way to do it. The code below is the part I want to change: So I need to do two things: 1) Select the last record in a database table. mysql_insert_id(); 2) get PHP to write all the code below on the fly. db_connect(); // This is the query number which needs to be changed and written every time as the last record in the DB $query = select * from crm_content where PageID='1'; $result = mysql_query($query) or die(Error: Query failure withBR$queryBR.mysql_error()); while ($array = mysql_fetch_array($result)) { $PageTitle = {$array[Title]}; $BodyText = {$array[BodyText]}; $Picture1 = {$array[PictureOne]}; $Picture2 = {$array[PictureTwo]}; $CatID = {$array[CatID]}; } // then write the function to call the page here // Any ideas thoughts or help much appreciated. Can't help with this bit. Apart from putting it into a string and then writing it to a file. Regards Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] daemonized php
Hello, Ok let be more specific about my idea. Because I'm better php programer than C I decided to write this in php. I use comandline php. I want to write some daemon to be started ./myprog Than this has to be run until I cancel it. But I also want to check somehow, what this proces is doing right now. for example like in apache. you start it with apachectl start. than you can say apachectl restart to reread config. And for example you could use apachectl status to output some info about runing server. This program I'll make will be run in infinite loop. It will be reading some file on disk and doing something with this data. Do I have to use any usleep function. What is with CPU % when i run such script. Is there any real examples. I read on devshed article about TCP socket listenig, but I don't like this. tia Uros Monday, July 7, 2003, 2:58:52 PM, you wrote: Can somebody give me any workable example how to run some script written in PHP in Unix console. GD #!/usr/local/bin/php -q GD ?php GD echo Example script; ? I wan't to write some server aplication. So it has to be run in the backgroud. GD Have a look at the process control functions: GD http://php.net/pcntl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what licence for documentation ?
Check out: http://www.php.net/license/ -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] daemonized php
Remember to ?php set_time_limit(0); ? http://us4.php.net/manual/en/function.set-time-limit.php That will allow your PHP program to run infinitely long -- and not time out after x seconds. -Dan On Mon, 2003-07-07 at 09:08, Uros wrote: Hello, Ok let be more specific about my idea. Because I'm better php programer than C I decided to write this in php. I use comandline php. I want to write some daemon to be started ./myprog Than this has to be run until I cancel it. But I also want to check somehow, what this proces is doing right now. for example like in apache. you start it with apachectl start. than you can say apachectl restart to reread config. And for example you could use apachectl status to output some info about runing server. This program I'll make will be run in infinite loop. It will be reading some file on disk and doing something with this data. Do I have to use any usleep function. What is with CPU % when i run such script. Is there any real examples. I read on devshed article about TCP socket listenig, but I don't like this. tia Uros Monday, July 7, 2003, 2:58:52 PM, you wrote: Can somebody give me any workable example how to run some script written in PHP in Unix console. GD #!/usr/local/bin/php -q GD ?php GD echo Example script; ? I wan't to write some server aplication. So it has to be run in the backgroud. GD Have a look at the process control functions: GD http://php.net/pcntl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
#!/usr/local/bin/php -q ?php set_time_limit(0); while(true) { // do something } ? Then: chmod u+x scriptname ./scriptname On Mon, 2003-07-07 at 08:41, Uros wrote: Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- Best regards, Uros -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to insert a variable into a PHP template.
mysql_insert_id(); How would I call that in my query? Because I tried that and I get resource ID=2 Also putting it into a string and writing it to a file, sounds good to me, that's what I was thinking but how do you do it? Can it just be written as: $string =all my code including ;''=}{[] etc; And then calling the string with fwrite? Or am I going to run into serious problems? Steve Jackson Web Development and Marketing Manager Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -Original Message- From: Andrew McCombe [mailto:[EMAIL PROTECTED] Sent: 7. heinäkuuta 2003 16:05 To: [EMAIL PROTECTED]; Steve Jackson Subject: Re: [PHP] How to insert a variable into a PHP template. - Original Message - From: Steve Jackson [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:34 PM Subject: [PHP] How to insert a variable into a PHP template. Hi, I want to write a PHP template with a variable number of the last recordset in a MySQL DB being the number referenced in the file. This is so my file can be saved as a PHP page looking at the right content in a database for a content management system. I am stuck on the way to do it. The code below is the part I want to change: So I need to do two things: 1) Select the last record in a database table. mysql_insert_id(); 2) get PHP to write all the code below on the fly. db_connect(); // This is the query number which needs to be changed and written every time as the last record in the DB $query = select * from crm_content where PageID='1'; $result = mysql_query($query) or die(Error: Query failure withBR$queryBR.mysql_error()); while ($array = mysql_fetch_array($result)) { $PageTitle = {$array[Title]}; $BodyText = {$array[BodyText]}; $Picture1 = {$array[PictureOne]}; $Picture2 = {$array[PictureTwo]}; $CatID = {$array[CatID]}; } // then write the function to call the page here // Any ideas thoughts or help much appreciated. Can't help with this bit. Apart from putting it into a string and then writing it to a file. Regards Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fsockopen - returning results from port 80, 8080 and 443 requests
any takers on this, before I give up and drop to curl for those types of requests? Dave Creating a quick script where we can poll the services on a particular server to verify if they are running or not. this will be included in a larger scope application once the details are worked out. Am having a problem getting results from queries to web server ports though. Port 80(std), 8080(FP), and 443(SSL) either timeout without returning any results, or error with some of the other attempts at illiciting a response that we have tried (like specifying ssl:// prior to the hostname). Code and two smaple outputs below. Thoughts? Dave !-- begin socket.php -- ?PHP # get form submitted host $host=$_POST['host']; $portstring=array(Testing SSH:br\n,Testing TELNET:br\n,Testing FTP:br\n,Testing HTTP:br\n,Testing HTTPS:br\n,Testing SMTP:br\n,Testing POP3:br\n,Testing IMAP:br\n); $portput=array(,,,GET / HTTP/1.1\r\nHost: $host\r\n\r\n,GET / HTTP/1.1\r\nHost: $host\r\n\r\n,,,); $portprepend=array(,,,tcp://,ssl://,,,); $port=array(22,23,21,80,443,25,110,143); for($i=0;$icount($port);$i++){ $result=date(H:i:s).-; $fp = fsockopen($portprepend[$i].$host, $port[$i], $errno, $errstr,5); if (!$fp){ $result=$portstring[$i].nbsp;nbsp;nbsp;Error($errno): $errstrbr\n; }else{ # see if we have to nudge for a response if(strlen($portput[$i]0)){ fputs ($fp, $portput[$i]); } # get the response $result.=$portstring[$i].nbsp;nbsp;nbsp;; $result.= fgets($fp,1024); fclose ($fp); $result.=br\n; $result=trim($result); } echo $result; flush; } ? !-- end socket.php -- !-- begin sample output with tcp:// for 80 and ssl:// for 443 -- 12:20:13-Testing SSH: SSH-1.99-OpenSSH_3.5p1 FreeBSD-20030201 12:20:13-Testing TELNET: Error(61): Connection refused 12:20:13-Testing FTP: 220 isp1.nexusinternetsolutions.net FTP server (Version 6.00LS) ready. 12:20:13-Testing HTTP: Error(0): 12:20:13-Testing HTTPS: Error(0): 12:20:13-Testing SMTP: 220 isp1.nexusinternetsolutions.net ESMTP 12:20:13-Testing POP3: Error(61): Connection refused 12:20:13-Testing IMAP: Error(61): Connection refused !-- end sample output with tcp:// for 80 and ssl:// for 443 -- !-- begin sample output with for 80 and for 443 -- 12:21:44-Testing SSH: SSH-1.99-OpenSSH_3.5p1 FreeBSD-20030201 12:21:44-Testing TELNET: Error(61): Connection refused 12:21:44-Testing FTP: 220 isp1.nexusinternetsolutions.net FTP server (Version 6.00LS) ready. 12:21:44-Testing HTTP: 12:26:46-Testing HTTPS: 12:31:47-Testing SMTP: 220 isp1.nexusinternetsolutions.net ESMTP 12:31:47-Testing POP3: Error(61): Connection refused 12:31:47-Testing IMAP: Error(61): Connection refused !-- end sample output with for 80 and for 443 -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] daemonized php
Hello, ok what about checking status what this program is doing right now. can this be done with http://www.php.net/manual/en/ref.pcntl.php tia Uros Monday, July 7, 2003, 3:16:35 PM, you wrote: AV #!/usr/local/bin/php -q AV ?php AV set_time_limit(0); AV while(true) AV { AV // do something AV } ? AV Then: AV chmod u+x scriptname AV ./scriptname AV On Mon, 2003-07-07 at 08:41, Uros wrote: Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] daemonized php
Umm, have your PHP program output a integer to a file somewhere, and just map the integer to a status, example, if 1 exists in the file, it's doing step 1, etc. On Mon, 2003-07-07 at 09:30, Uros wrote: Hello, ok what about checking status what this program is doing right now. can this be done with http://www.php.net/manual/en/ref.pcntl.php tia Uros Monday, July 7, 2003, 3:16:35 PM, you wrote: AV #!/usr/local/bin/php -q AV ?php AV set_time_limit(0); AV while(true) AV { AV // do something AV } ? AV Then: AV chmod u+x scriptname AV ./scriptname AV On Mon, 2003-07-07 at 08:41, Uros wrote: Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] print vs heredoc
Hi, again!! I'm looking for opinions as to which is better/faster, print or heredoc. print makes the code layout look nice and eazy to debug, where heredoc IS faster but makes the code look like a nightmare with everything jammed against the left side of the code. I'm pretty picky about what looks good and heredoc is a nightmare of horrors... Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
Re[4]: [PHP] daemonized php
Hello Adam, I was thinking about using parent and child proces. So when i start server it will call some child process and that I can ask parent what his child is doing. I found some examples on php.net. But I sill wan't to hear from you php experts. Anybody do such thing in real example or this is can only be my dream. tia Uros Monday, July 7, 2003, 3:33:47 PM, you wrote: AV Umm, have your PHP program output a integer to AV a file somewhere, and just map the integer to AV a status, example, if 1 exists in the file, it's AV doing step 1, etc. AV On Mon, 2003-07-07 at 09:30, Uros wrote: Hello, ok what about checking status what this program is doing right now. can this be done with http://www.php.net/manual/en/ref.pcntl.php tia Uros Monday, July 7, 2003, 3:16:35 PM, you wrote: AV #!/usr/local/bin/php -q AV ?php AV set_time_limit(0); AV while(true) AV { AV // do something AV } ? AV Then: AV chmod u+x scriptname AV ./scriptname AV On Mon, 2003-07-07 at 08:41, Uros wrote: Hello! Can somebody give me any workable example how to run some script written in PHP in Unix console. I wan't to write some server aplication. So it has to be run in the backgroud. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] daemonized php
Uros wrote: Than this has to be run until I cancel it. But I also want to check somehow, what this proces is doing right now. If you want it to be realy nice, use shared memory. But this extension is not enabled by default and is available only on unices. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Embedding an image in an email
I would like to encode and embed an image in a file that can be emailed. Is there some documentation on how to do this? Todd -- inline: NewLogo.gif
[PHP] Re: Embedding an image in an email
Todd Cary [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I would like to encode and embed an image in a file that can be emailed. Is there some documentation on how to do this? First, it's a bad idea... if you *must* show images, it's far better to stick them on a web server and refer to them from your email. Second, if you really have to know how - look at the source of the posting you just made, and/or look at the relevant RFCs. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L+$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(++) h-- r- y+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Catch Signals
I have a PHP script that is running constantly in the background, and I've used CYGWIN to register it as a service, but the problem is when I try to stop/start (restart) it from the service control manager, it just sits and spins on the stop portion. I'm fairly sure this is because the PHP program is still in it's infinite loop doing what it's supposed to be doing, and doesn't realize it's been sent a shutdown signal. So, is there anyway to listen for a shutdown signal on a console based PHP script under Windows? -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session start problem
We are using php 4.0.6 here on a dev server and we are getting a weird session_start() problem. After setting up the login on another page, if we register any of our three required varaibles to go on, the session_start() will simply crash and loop endlessly. We have tested everything: - setting values after registering, before registering, not registering at all and as soon as we register a variable it loops endlessly when we start the session. Needless to say that we NEED to fix that or else we have a wonderfull system with no login nor sessions... here is the code: [[[LOGIN.PHP]]] ? session_start(); include('../includes/open.php'); function verifypass($login, $password) { global $sql, $result; $req=SELECT * FROM giuser WHERE login= ' . $login . ' AND password =' . md5($password) .'; $result=mysql_query($req, $sql); if(mysql_num_rows($result) 1) // le resultat est unique { return 'Erreur: mot de passe invalide'; } return ''; } if($submit == '' || $login == '' || $password == '' || ($moo = verifypass($login, $password))!='') { echo 'htmlheadtitleGestion des projets/titlemeta http-equiv=Content-Type content=text/html; charset=iso-8859-1 link href=../css/giprojects.css rel=stylesheet type=text/css/head body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 class=giprojects'; echo 'FORM name=loginform method=post action=login.php?submit=1 table width=100% height=100% border=0 cellpadding=5 cellspacing=0 class=txt11px tr tdp align=centerimg src=../images/logo.gifbrbrbrbrNom d\'usager : INPUT name=login type=text id=projet25 size=18 maxlength=15 '; if($submit!='' $login=='') echo 'nbsp; *'; echo 'brMot de passe : INPUT name=password type=password id=login size=20 maxlength=15'; if($submit!='' $password=='') echo 'nbsp; *'; echo 'brbra href=# onClick=document.loginform.submit(); return true;Entrer/a/p/td /tr/tablediv align=center/div/body/html'; } else { $req=SELECT * FROM giuser WHERE login= ' . $login . ' AND password =' . md5($password) .'; $result=mysql_query($req, $sql); if(mysql_num_rows($result) 1) // le resultat est unique { include( 'login.php?e=1'); } else { $row = mysql_fetch_array($result); session_register(session_user); session_register(session_niveauusager); session_register(session_nomusager); $session_user = $login; $session_nomusager = $row[nom]; $session_niveauusager=$row[level]; echo 'HTMLHEADTITLEGI Projects/TITLEMETA http-equiv=refresh content=5; URL=todo.php?user=' . $login .'/HEADBODY'; $req=SELECT nom FROM person WHERE id = . $row[personid] ; $result = mysql_query($req, $sql); $row = mysql_fetch_array($result); echo 'centerh3Bienvenu '. $row[nom] . '!/h3/center'; echo 'center[niveau d\'access: '. $session_niveauusager . ']'; } } include('../includes/close.php'); ? [[TODO.PHP (File that we get redirected to after loging in that loops edlessly) ?php session_start();//--- JAMS HERE exit(A); //include('secur.php'); ? ?php include('../includes/open.php'); ? HTML HEAD ?php //include('../includes/helpers.php'); /HEAD /HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Embedding an image in an email
Hugh Bothwell wrote: First, it's a bad idea... if you *must* show images, it's far better to stick them on a web server and refer to them from your email. In fact this is discouraged. This is the way spammers get confirmation of active email addresses, so most mail clients loading of remote images disabled by default. If you realy must, use www.phpclasses.org/mimemessage class, there might be also an example for this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php pages without .php extension on linux and windows
On Jul 7, 2003, Heiko Mundle claimed that: |I try to use PHP and Apache on both Linux (SuSE 8.1) and Windows (2K). | |On Linux I can access the PHP scripts without adding the .php extension. |E.g. |http://mydomain/myscript?para1=TRUE |for |http://mydomain/myscript.php?para1=TRUE |But on Windows it doesn't work (page not found - HTTP 404) | |How do I switch on 'adding .php' on windows? Does it run on windows too? |What is responsible for that functionality, Apache/PHP? |Which module or directive? | |My system: |SuSE Linux 8.1 - PHP 4.2.2 - Apache/1.3.26 |Windows 2000 - PHP 4.2.3 - Apache/1.3.24 | |Thanks for helping | |Heiko This might be better done in httpd.conf. See what's going on at http://www.phpbuilder.com/columns/tim19990117.php3 It might be able to do what you're looking for. Jeff -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] instanceof on class (not objects) php 5
Hi, I can't instantiate the class, as there is no way to guarantee that the constructor doesn't require arguments, and I don't want to halt program execution if it doesn't implement tester Greg Marek Kilimajer wrote: Maybe if (new MyClass instanceof_equiv tester) { ... } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call by reference to function arguments
Hi, I want to write a function (as I have written in several other languages) that obtains it's arguments dynamically (using func_get_arg()) and then assigns to that argument. Think of the way that scanf() works -- that sort of thing. I have distilled what I want to do in the code below. foo adds 1 to all of it's arguments. function foo () { $count = func_num_args(); for($i = 0; $i = $count; $i++) { $var = func_get_arg($i); // The following line should do it, but throws a syntax error $var = $var + 1; } } $a = '1'; $b = '2'; $c = '3'; foo($a, $b, $c); What I am doing is quite different than the above (and more complex), but I will be able to achieve what I want if I can get the above to work. -- Alain Williams #include std_disclaimer.h -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function
Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() function
Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php5 methode + num parameters
Hi i have the fallowing code (simplified) class FormElement { private $element_id = null; private $element_name = null; private $element_type = null; private $element_style = null; private $element_string = null; public function FormElement($properties) { $this-SetStyle($properties[default_style],$properties[error_style]); } private function SetStyle($element_style) { $this-element_style = $element_style; } } Avisouly i pass it 2 parameters and it is expecting only 1. Usually PHP Bugs when this kind of thing happen right ? (php 4 anyways) But not in PHP5 it seems. Anybody else has experienced this problem ? Thanks -- Yann Larrivee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Session start problem
Problem was that the TMP dir was full and we couldn'T write down the session file... Seems this jams the server completly. Be aware that if anything like that happen to you that you have to check fro the TMP files that might be overflooding your partition. Mathieu Dumoulin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] We are using php 4.0.6 here on a dev server and we are getting a weird session_start() problem. After setting up the login on another page, if we register any of our three required varaibles to go on, the session_start() will simply crash and loop endlessly. We have tested everything: - setting values after registering, before registering, not registering at all and as soon as we register a variable it loops endlessly when we start the session. Needless to say that we NEED to fix that or else we have a wonderfull system with no login nor sessions... here is the code: [[[LOGIN.PHP]]] ? session_start(); include('../includes/open.php'); function verifypass($login, $password) { global $sql, $result; $req=SELECT * FROM giuser WHERE login= ' . $login . ' AND password =' . md5($password) .'; $result=mysql_query($req, $sql); if(mysql_num_rows($result) 1) // le resultat est unique { return 'Erreur: mot de passe invalide'; } return ''; } if($submit == '' || $login == '' || $password == '' || ($moo = verifypass($login, $password))!='') { echo 'htmlheadtitleGestion des projets/titlemeta http-equiv=Content-Type content=text/html; charset=iso-8859-1 link href=../css/giprojects.css rel=stylesheet type=text/css/head body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 class=giprojects'; echo 'FORM name=loginform method=post action=login.php?submit=1 table width=100% height=100% border=0 cellpadding=5 cellspacing=0 class=txt11px tr tdp align=centerimg src=../images/logo.gifbrbrbrbrNom d\'usager : INPUT name=login type=text id=projet25 size=18 maxlength=15 '; if($submit!='' $login=='') echo 'nbsp; *'; echo 'brMot de passe : INPUT name=password type=password id=login size=20 maxlength=15'; if($submit!='' $password=='') echo 'nbsp; *'; echo 'brbra href=# onClick=document.loginform.submit(); return true;Entrer/a/p/td /tr/tablediv align=center/div/body/html'; } else { $req=SELECT * FROM giuser WHERE login= ' . $login . ' AND password =' . md5($password) .'; $result=mysql_query($req, $sql); if(mysql_num_rows($result) 1) // le resultat est unique { include( 'login.php?e=1'); } else { $row = mysql_fetch_array($result); session_register(session_user); session_register(session_niveauusager); session_register(session_nomusager); $session_user = $login; $session_nomusager = $row[nom]; $session_niveauusager=$row[level]; echo 'HTMLHEADTITLEGI Projects/TITLEMETA http-equiv=refresh content=5; URL=todo.php?user=' . $login .'/HEADBODY'; $req=SELECT nom FROM person WHERE id = . $row[personid] ; $result = mysql_query($req, $sql); $row = mysql_fetch_array($result); echo 'centerh3Bienvenu '. $row[nom] . '!/h3/center'; echo 'center[niveau d\'access: '. $session_niveauusager . ']'; } } include('../includes/close.php'); ? [[TODO.PHP (File that we get redirected to after loging in that loops edlessly) ?php session_start();//--- JAMS HERE exit(A); //include('secur.php'); ? ?php include('../includes/open.php'); ? HTML HEAD ?php //include('../includes/helpers.php'); /HEAD /HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call by reference to function arguments
On Mon, 7 Jul 2003 17:36:26 +0100, you wrote: I want to write a function (as I have written in several other languages) that obtains it's arguments dynamically (using func_get_arg()) and then assigns to that argument. Think of the way that scanf() works -- that sort of thing. I have distilled what I want to do in the code below. foo adds 1 to all of it's arguments. function foo () { $count = func_num_args(); for($i = 0; $i = $count; $i++) { $var = func_get_arg($i); // The following line should do it, but throws a syntax error $var = $var + 1; } } $a = '1'; $b = '2'; $c = '3'; foo($a, $b, $c); What I am doing is quite different than the above (and more complex), but I will be able to achieve what I want if I can get the above to work. Well this would work function foo () { $count = func_num_args(); for($i = 0; $i $count; $i++) { $var = func_get_arg($i); $var = $var + 1; echo ($var); } } But I get the feeling you're trying to modify the elements in-place? Any particular reason? If it's because you want to return multiple values from the function, consider this: function foo () { $args = array(); for ($i = 0; $i func_num_args(); $i++) { $args[] = func_get_arg($i); } $args = array_map (create_function ('$a','return($a+1);'), $args); return ($args); } list ($a, $b, $c) = foo(1, 2, 3); echo ($a, $b, $c); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] daemonized php
Ok let be more specific about my idea. Because I'm better php programer than C I decided to write this in php. I use comandline php. I want to write some daemon to be started ./myprog Than this has to be run until I cancel it. But I also want to check somehow, what this proces is doing right now. ps ax will tell you if it is still running or not. If you need more info you can check out /proc. for example like in apache. you start it with apachectl start. than you can say apachectl restart to reread config. And for example you could use apachectl status to output some info about runing server. They coded it that way. If ps ax and /proc are not enough info for you then you'll need to code whatever else you need into your script. This program I'll make will be run in infinite loop. It will be reading some file on disk and doing something with this data. Do I have to use any usleep function. What is with CPU % when i run such script. usleep sleeps, there is very little overhead in sleeping. The cpu usage will be determined more by what you make it do when it's not sleeping than when it is. Is there any real examples. Yes, I already gave you the url: http://php.net/pcntl There's an example right there on the page. It lets you handle hangups, restarts, etc. Copy and paste that and add your own code in the while(1) loop. I read on devshed article about TCP socket listenig, but I don't like this. That's pretty much how it's done. If you want to listen to a program you have to use some type of socket, tcp is they way I'd go. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] daemonized php
But I sill wan't to hear from you php experts. Anybody do such thing in real example or this is can only be my dream. Although I may not be the PHP expert you seek, I do have lots of command line PHP scripts: mailings, spam filter, db maintenance.. I even have an IRC bot written in PHP. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php5 methode + num parameters
Hi Yann, In my experience, PHP 4 only complains if you pass in too few arguments, not too many. If you would like an exception, you could try class MyException extends Exception { private $_msg; function __construct($msg = '';) { $this-_msg = $msg; } public function showError() { return 'ERROR ' . $this-_msg; } } class FormElement { ... // variable declarations private function SetStyle($element_style) { if (func_num_args() 1) { throw(new MyException('too many arguments')); } ... // normal code here } } Regards, Greg -- phpDocumentor http://www.phpdoc.org Yann Larrivee wrote: Hi i have the fallowing code (simplified) class FormElement { private $element_id = null; private $element_name = null; private $element_type = null; private $element_style = null; private $element_string = null; public function FormElement($properties) { $this-SetStyle($properties[default_style],$properties[error_style]); } private function SetStyle($element_style) { $this-element_style = $element_style; } } Avisouly i pass it 2 parameters and it is expecting only 1. Usually PHP Bugs when this kind of thing happen right ? (php 4 anyways) But not in PHP5 it seems. Anybody else has experienced this problem ? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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
RE: [PHP] mail() function
I've gotten that error message when running PHP from the command line. The script still works even though it gives me that error though. If anyone figures out what it's from or how to fix it I'd be interested in their solution. -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
Can you run a regular phpinfo() command? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL problem
Hi! I'm passing this url to the script: http://www.fttta.com/auction.php and intercepting it with: if ($_SERVER['QUERY_STRING'] = ) { disp_cat(); } However, nothing is happening. phpinfo show $_SERVER['QUERY_STRING'] as 'no value', so this should work. Anyone know why this doesn't work?? Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
RE: [PHP] mail() function
Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR
hi i'm interested in learning more about the PEAR project, and the possibility of incorporating PEAR code in my future projects. i was wondering if anyone can recommend some good PEAR tutorials. i also wanted to get an idea as to the percentage of people who use PEAR on a regular basis in their projects. any comments welcome thanks redmond -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP and MYSQL
Bob G [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Please help I am going quite mad. ... The PHP.INI file is in the PHP directory. the php.ini in your PHP directory is useless It needs to be in 1 of 3 places... 1) the IIS root directory, meaning where IIS EXE is at, *not* the web root 2) C:\WINNT (or where ever your system directory is called) 3) C:\php4 (this is HARD CODED as a last resort) I have mine in my web server directory *and* in my PHP directory. That way I can run it via web server or command line. Walter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL problem
Sparky Kopetzky wrote: and intercepting it with: if ($_SERVER['QUERY_STRING'] = ) { disp_cat(); } However, nothing is happening. phpinfo show $_SERVER['QUERY_STRING'] as 'no value', so this should work. Anyone know why this doesn't work?? Yes. You are using an assignment operator where you should be using a comparison operator. Try using == (or ===): if ($_SERVER['QUERY_STRING'] == ) { disp_cat(); } http://us4.php.net/manual/en/language.operators.assignment.php http://us4.php.net/manual/en/language.operators.comparison.php Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Advise needed - rateing/voteing system
Hey Guys, I need a little help coz I dont know if i have missed anything in my design 1) I want to make rateing/voteing system (something like the one that is being used at hotscripts) that will take around 5 parameters via radio buttons and make sure that the person cant rate/vote more than once, what i plan to do is first check sessions if session is not set check cookie if cookie is not set checkip if ip is not set do a reverse ip check if that too comes clean then allow the person a vote as you can see i am trying my best to make sure that the visitor only votes once, if he/she changes machines this wont work of course but as far as i can see this should take care of around 99% of the visitors and allow a fair voteing system... If i have missed anything in the above or my logic is not good I am totally open to suggestions/advise because as far as i know there is nothing out there that is so secure...or am i wrong? 2) Rather than starting from scratch if any of you guys could recomend a voteing system which i could tear its guts out and tailor to my needs, it would be appreciated. I have already checked at hotscripts/scriptsSearch and google and found quite a few but dont know which is good and have had no experience with any of them.. 3) (OT) sorry for the off topic bit here but i'm wondering if any of you guys had this problem, suddenly my internet explorer (ver 5.5) is displaying large fonts and something like 640x480 when my screen is on 800x600, this problem is only with IE, the funny thing is it used to work fine before. Thanks in advance, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] qry not running??
Anyone see what is wrong with this? //get category info $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_id = '$cat_name'); $catID = mssql_result($result,0,cat_id); //line 32 $catName = mssql_result($result,0,cat_name); //line 33 I'm getting the error: Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 32 Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 33 thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] qry not running??
Micah Montoy wrote: //get category info $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_id = '$cat_name'); $catID = mssql_result($result,0,cat_id); //line 32 $catName = mssql_result($result,0,cat_name); //line 33 I'm getting the error: Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 32 Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 33 Is your WHERE clause what you want it to be? WHERE cat_id = '$cat_name' I don't know what $cat_name is, but since you have a cat_name column, I am wondering if you are comparing two different things. Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] connect to MAS 90 200 with PHP
I am curious if anyone is using PHP to connect to a MAS 90 or 200 database?? I am interested in any info on this if anyone has any... THX, Joe
RE: [PHP] mail() function
They have it set to Show all errors except for notices. -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:18 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function Ok, so if it is a command line issue it's not the problem you are having with the mail script. Does it give you any sort of error from the browser or are the errors turned off in the php.ini? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:17 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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 -- 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
Re: [PHP] Advise needed - rateing/voteing system
On Mon, 7 Jul 2003 21:07:14 +0100, you wrote: check sessions if session is not set check cookie if cookie is not set checkip if ip is not set do a reverse ip check if that too comes clean then allow the person a vote as you can see i am trying my best to make sure that the visitor only votes once, if he/she changes machines this wont work of course but as far as i can see this should take care of around 99% of the visitors and allow a fair voteing system... What happens when many users are behind a single proxy? Or two people log on to the same machine? Just go with the cookie, and recognise that ballot stuffing is inevitable without user authentication, IMO. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] qry not running??
Micah, Echo your SELECT statement to make certain it reads the way it should. Test for number of rows returned, or an error - $result probably contains nothing, that is it's not pointing to an array. Miles At 01:23 PM 7/7/2003 -0600, Micah Montoy wrote: Anyone see what is wrong with this? //get category info $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_id = '$cat_name'); $catID = mssql_result($result,0,cat_id); //line 32 $catName = mssql_result($result,0,cat_name); //line 33 I'm getting the error: Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 32 Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 33 thanks -- 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
[PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
STOP SPAMING the list. Is your product free of charge/ opensource? NO! If you are charing for your product and your source is not open, you have no place on opensource lists. This is 3rd list you are spamming. Somebody block this free-rider from this list. BTW, MSAccess can be had for less and you can run it via Wine on Linux with no problems! Quoting [EMAIL PROTECTED]: Hi Do you want to create, edit, or update your PHP databases remotely within a nice Graphic User Interface without having to use your Web Browser, well you can do that with Rekall and last week Rekall V2.0.0 was finally released for KDE3. QT3-only, Windows and Sharp Zaurus. We even have a run time only version so that you can distribute your Rekall applications. Yes, that's true, you create applications in much the same way can with MS Access, since Rekall is a programmable database client. For more information, tutorials, HOWTOs, examples, etc. please visit http://www.rygannon.com We are pleased to announce the 2.0 release of Rekall, a personal, programmable DBMS system for Linux and Windows. Rekall is the only viable alternative to MS Access for Linux. With Rekall you will be able to quickly and easily build database applications using Rekall forms and reports. A full complement of widgets means that applications built in Rekall will be able to have the look and feel of any other application. Rekall applications can be extended in their functionality to perform virtually any task via embedded Python as a scripting language. Ever since the release of dBase many years ago, the idea of a programmable DBMS has become increasingly popular. Major systems have been written in applications like Paradox and MS Access. By focusing on the database, users are able to leverage their business knowledge into working applications. One of the limitations of the aforementioned products is that their native database didn't scale well or support multiple users very well. Rekall avoids this problem by dispensing with a native database. The biggest addition to Rekall 2.0.0 is reusable components. Rekall now comes with a selection of components that you can use in forms; these include standard buttons and navigation tools. In addition to these components, you can also construct your own for use as often as you want. You can store your components either in the database itself, or in a local area in the file system. To support reusable components, and to make it easier to script complicated forms, Rekall 2.0.0 introduces an Event/Slot mechanism (akin to Qt's Signal/Slot mechanism). This allows to place all script code which is logically associated with a particular control inside that control, and means you can copy or delete the control without worrying about copying or cleaning up script code inside other controls. Other new features in Rekall 2.0.0 include: * Static images can by displayed in forms * Data controls can appear in menu-blocks * Spin box control * Link controls can display multiple colums * Link controls can use Queries as well as tables * Event logger for debugging * Raw SQL window for direct SQL execution * Forms, Reports, etc. can run modally * Fast table filters for predefined table data display * Modal forms can be used as dialog boxes * Explanation of queries generated by Rekall * Menu and toolbar hiding * MySQL and PostgreSQL connections over SSH tunnels (Linux only) In addition, Rekall comes with a thorough demonstration database that illustrates the various features of the applications. There are actually three copies of the database, one using MySQL, one PostgreSQL and one using XBase/XBSQL. Optional drivers are currently available for DB2 and ODBC with Oracle9i coming later this summer (the Windows version is ready now). By purchasing Rekall you are getting the source for the application and free electronic updates to the core application. You get all supported platforms for one price regardless of when they are released. Rekall is priced at $79.95 for the physical package and $69.95 for the electronic package. Rekall can be purchased from www.thekompany.com/products/rekall. Rekall V2.0.0 demo version can be downloaded from http://www.rygannon.com by selecting downloads from the navigation menu or by clicking on the downloads button on the top navigration bar . Regards John -- 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
[PHP] Re: connect to MAS 90 200 with PHP
I have used MAS90. If you're using MAS90 you'll need to create an ODBC connection (http://us3.php.net/manual/en/ref.odbc.php). If it's MAS200 (SQL) use mssql functions (http://us3.php.net/manual/en/ref.mssql.php). By installing the MAS90 client software you install the necessary ODBC drivers assuming a Windows box). Joe Harman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am curious if anyone is using PHP to connect to a MAS 90 or 200 database?? I am interested in any info on this if anyone has any... THX, Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] web site security: how to hide login info for mysql-connection
On Mon, 30 Jun 2003, Peter Janett wrote: This issue seems to be a huge issue, and I've been looking for a good solution for quite a long time. My concern is that a shell emulating PHP or Perl script run as Apache can read or copy ANY PHP script used with PHP as an Apache module. The reason I use php_value settings in Apache configuration files is to get round these problems. Provided these configuration files are only able to be read by Apache when starting up (running as root, binding to port 80, opening log files etc) no users' login shells, perl CGI scripts, or shell CGI scripts can read them. The only place that they are available is to PHP scripts run in the relevant directory. They cannot be seen by PHP scripts run in other virtual servers or outwith the specified directory tree. As far as I can see the only downside is that they are still held in plain text anywhere, and that Apache has to be restarted (gracefully) whenever they are changed. It does of course assume that whoever is managing the server (has root access) is trusted with the MySQL passwords. The only real doubt at the back of my mind about this is that a clever mod_perl programmer might be able to get Apache to disclose the information that should only be seen by PHP. But then, you don't go around letting just anyone install mod_perl hacks in your server do you? I'd be very grateful if anyone out there who can see any problems with my approach would let me know. Graham -- Graham Rule [EMAIL PROTECTED] Computing Services, The University of EdinburghPhone: +44 131 650 6628 Main Library, George Sq, Edinburgh EH8 9LJ Fax: +44 131 650 6547 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what licence for documentation ?
On Mon, 2003-07-07 at 05:49, E.D. wrote: Hi, I'd like to know which licence has the documentation. PHP licence ? free licence ? public domain ? other ? In other words, I want to include some parts in a commercial product, can I ? Please answer only if you *know*, I can't go with suppositions. -- E.D. Ask for permission on the phpdoc mailing list, since that's where the people who know are. This is actually a big topic for discussion right now, since there are few people who would like to put the manual into commercial products. Also, simply searching the PHP site for the license will give results very quickly, and it's linked to from the front manual page. Here's the text of the copyright (note that this is NOT the whole of the license: -- Copyright Copyright © 1997 - 2003 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder. The members of the PHP Documentation Group are listed on the front page of this manual. In case you would like to contact the group, please write to [EMAIL PROTECTED] The 'Extending PHP 4.0' section of this manual is copyright © 2000 by Zend Technologies, Ltd. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). -- Hope this helps, Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Request Network ID
Are you trying to find out who is currently logged on locally? Who the webserver is running as? If you want to know who is logged in locally, you can use whoami from the command line (or via exec, passthru, or system). You can also check out http://www.sysinternals.com for some neat comand line tools for Win2k. --- Haitham A. Khaiyat [EMAIL PROTECTED] wrote: Hi, I need you help please. I am looking for a function can give the Network ID from LAN. For example, our LAN is based on Windows 2000. How can I get user network account. VB.NET has this built in function Request.ServerVariables(LOGON_USER) Can you help?: = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] web site security: how to hide login info for mysql-connection
On Mon, 7 Jul 2003 21:01:40 +0100 (BST), Graham Rule wrote: The only place that they are available is to PHP scripts run in the relevant directory. Which means that if a hacker finds a cross script hack in one of those directories (ie, if you have a security hole in one of your php scripts), then it would be possible to access mysql.default_user and mysql.default_password via ini_get()... wouldn't it? And yes, I understand you could turn on safe_mode or turn off the ini_get() function. I think the answer is that there isn't a 100% secure way to store user_id / passwords that can be reconstituted. Unfortunately, I don't know what the most secure way to do this would be. Your way MAY be the best that we can get, but it kinda give me the heebie jeebies. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Content Management
Just a quick message to let everyone know that after ten months I have finally released the first official open source version of eNetwizard Matrix Server, my sophisticated content management system and application server. All it needs is PHP, MySQL, and Apache. Full instructions are included on the website. More information about it is below... http://matrix.enetwizard.net/default.rsw About eNetwizard Matrix Server eNetwizard Matrix Server takes content management and web application serving to levels undreamt, infusing your web environment with sheer power and possibility. Cutting Edge Technology - Never before has a content management system been designed around the concept of a universal point of contact for all requests. This server knows all, and delivers all. - Never before has a content management system been designed to render and manage the content of an unlimited number of domains and websites for an unlimited number of businesses and organizations. Expect nothing less from our server. Core Features - Production Environment Ready. The server before you has had no corners cut in its design. It is stable and ready for production environments, with only a few minor limitations or idiocyncracies. And it's free and open source. - Infinitely Expansive Design. The server was designed to manage an infinite number of domains, websites, components, organizations, groups, and users, all from a single running copy of its distribution. - Complete Content Management. The server manages the content of all mime types and can deliver the content to the requesting client based on customizable settings of the server for each mime type. - Seemless Integration with Other Server Software. The server was designed to complement the job of the web server and server side scripting languages, and does not replace nor interfere with their purposes. In fact, you can utilize all of them from within the system in a myriad of useful ways. - Language Independent. The server, objects, and wizards were all designed to contain its strings in an XML localization file, allowing it to run in any language it has been translated into. In a near future release, it will also be possible to render content into the language appropriate for the visitor. - Cascading Templates. Web page design and layout are controlled by templates, allowing for quick and cost-effective website redesigns. Templates can be modified in real time, changing the layout, colors, and other style properties instantaneously. Templates are cascading through the matrix folder, meaning templates can be defined for a single page or an entire domain or website. - Workflow Ready. This version of the server includes everything needed to manage an infinite number of organizations, groups, and users, all with unique roles, policy permissions, and access rights throughout the matrix. It lacks only a few things when it comes to workflow, and these added features will be included in a near future release. - Inclusive Session Management. The server does not rely upon cookies at all to manage the individual sessions of each user accessing the server. Instead, it automatically and uniquely propagates this information into each request and embeds the information into every link managed by the server. - Search Engine Aware. The server automatically disables sessions for known search engines, preventing them from including session information in their indexes. This is also useful if you wish to create a page for the search engine that does not include the template, thereby only showing the content of the page to the search engine for indexing. - Browser Aware. The server automatically determines browser information from each visitor and assigns it to their session. Some of the collected information includes the user's languages and screen resolution, as well as their browser capabilities. This information is made available via the $Core-BrowserInfo[] array. - Extensive Logging. The server logs activity to all components, from websites and pages to files and objects. It logs all form post and get data, cookies, system functions, and script warnings and errors, depending upon your configuration. It also logs all attempts at treacherous activity anywhere within the system! - Wizardly Management. The server includes a built-in wizard component, which includes the eNetwizard Control Panel, for easy management of every aspect of the server. As expressed by a recent user of the Control Panel, it's overwhelmingly powerful. - Customizable Website Applications. Objects are a powerful way to make use of the server, allowing you to click once and build anything from a guestbook or newsletter to a first-class e-commerce application, rendered in the style properties appropriate for the website, and fully managed from the eNetwizard Control Panel. - Much More!
[PHP] a recommended FREE PHP shopping cart
Hello can any one recommended a FREE PHP /MYSQL shopping cart,,that they have set up themselves?? thanks so much -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
At 7/7/2003 03:07 PM, Apollo (Carmel Entertainment) wrote: If you are charing for your product and your source is not open, you have no place on opensource lists. Just out of curiosity, where did you get the idea this is an open source mailing list? There are plenty of commercial PHP products that have been mentioned and recommended by list members, including Zend products. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] reposting data into forms after confirmation screen
Anyone know where I can view some sample code that does the following? When the user clicks on SUBMIT, they are taken to a confirmation screen which they can click an EDIT button or SUBMIT button. If they click on the EDIT button they are taken back to the first form. How do you repost the data the user entered into the first form, as I get a empty form when I click on EDIT? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] reposting data into forms after confirmation screen
You could save all of the form data in session variables, when they click edit re-populate the form fields with the session data. Artoo [EMAIL PROTECTED] 07/07/03 04:00PM Anyone know where I can view some sample code that does the following? When the user clicks on SUBMIT, they are taken to a confirmation screen which they can click an EDIT button or SUBMIT button. If they click on the EDIT button they are taken back to the first form. How do you repost the data the user entered into the first form, as I get a empty form when I click on EDIT? Thanks -- 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
[PHP] PHP+MySQL on Apache running on WinXP
I have set up a new development machine on my windows xp using APACHE version 2.0.46. Next, I set up PHP version 4.3.2 and MySQL version 4.0.13. Then, when I tested the installation, phpinfo() lists my CLIENT API VERSION for MYSQL as 3.23.49. 1. Is this normal? 2. If not, what have I done wrong? and 3. How do I fix it so that the correct version numbers appear? Thanks in advance == Vincent P. Vicente Manila, Philippines - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
Well, lets see. I want free advertising too. How about I go to all the lists I am member of and send emails like John from Rekall did announcing widgets or services my company does. How will you react to that? We all have something to sell or advertise. Opensource or non-opensource, if you are charging for something you can not free-ride on free mailing lists, pay for adveritising. If something like that is tolerated, maybe I should start marketing my stuff on all the lists I am. At 7/7/2003 03:07 PM, Apollo (Carmel Entertainment) wrote: If you are charing for your product and your source is not open, you have no place on opensource lists. Just out of curiosity, where did you get the idea this is an open source mailing list? There are plenty of commercial PHP products that have been mentioned and recommended by list members, including Zend products. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I am receiving the same posting TWICE
Help! I am receiving the same posting TWICE how do I configure things to just get one copy of postings?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
If you had actually read the reply, you would have seen that Steve was commenting on your declaring the list an open-source list, not saying it was fine for John to send his email to this list (or any other list). --- Apollo (Carmel Entertainment) [EMAIL PROTECTED] wrote: Well, lets see. I want free advertising too. How about I go to all the lists I am member of and send emails like John from Rekall did announcing widgets or services my company does. How will you react to that? We all have something to sell or advertise. Opensource or non-opensource, if you are charging for something you can not free-ride on free mailing lists, pay for adveritising. If something like that is tolerated, maybe I should start marketing my stuff on all the lists I am. At 7/7/2003 03:07 PM, Apollo (Carmel Entertainment) wrote: If you are charing for your product and your source is not open, you have no place on opensource lists. Just out of curiosity, where did you get the idea this is an open source mailing list? There are plenty of commercial PHP products that have been mentioned and recommended by list members, including Zend products. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
IntrestingI have created 4 products that sell and a few scripts for free (which helped me learn php) plus I co-webmaster for 2 sites that sell scripts, around 40 of them totallycan i advertise for each of them here one by one or do i have to do it by website or all 44 at once?? I know the above question is really stupid as its totally unacceptable but in my opinion I think a person should be able to come here and announce his/her product/site if its beneficial to a lot of ppl... eg: the php classes site (excellient site) a php resource site a fantastic new editor, hopefully free (no offense ZEND :-) ) announcing something like Rekall to me does not qualify...but thats my opinion i am sure a lot of you will disagree with the way i see things.. just my two cents. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP
Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren
Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....
At 7/7/2003 04:09 PM, Apollo (Carmel Entertainment) wrote: Well, lets see. I want free advertising too. How about I go to all the lists I am member of and send emails like John from Rekall did announcing widgets or services my company does. How will you react to that? Your level of reading comprehension is astounding. I'm hoping you were being deliberately obtuse when you ignored the part where I said I'm not condoning posting ads to the list. You must have. Nobody could be that stupid. I'm not condoning posting ads to the list the way John, but I think that declaring it an open source list will discourage people who have created PHP-based systems that aren't free or open-source from contributing. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] script not stopping
Anyone see why this will not stop executing the script when any of the conditions are true. thanks if ($_POST[imgList] = ){ die (strongMissing information for uploading./strongbr - The Image List is empty. Please go back and enter in at least one file.); } elseif ($_POST[cat_nameID] $_POST[new_cat] = ){ die (strongMissing information for uploading./strongbr - A category was not selected from Active Categories and New Category was blank. Please go back and either choose or fill in the missing information.); } else{ $filename = $_POST[imgList]; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script not stopping
On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP+MySQL on Apache running on WinXP
If i am not mistaken your phpinfo is picking up the bundled mysql package that comes with php. You should still be able to connect to mysql. However, if you downloaded the zip file instead of the installer then you should have a php_mysql.dll file that you can put in your path that php should pick up that might be different. I am not 100% up-to-date on the dlls that are available in the php zip file. -- BigDog On Mon, 2003-07-07 at 15:07, Vince wrote: I have set up a new development machine on my windows xp using APACHE version 2.0.46. Next, I set up PHP version 4.3.2 and MySQL version 4.0.13. Then, when I tested the installation, phpinfo() lists my CLIENT API VERSION for MYSQL as 3.23.49. 1. Is this normal? 2. If not, what have I done wrong? and 3. How do I fix it so that the correct version numbers appear? Thanks in advance == Vincent P. Vicente Manila, Philippines - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] New to PHP
Hi Hiren, PHP is a great choice, there are a wealth of tutorials on the Internet!!! I would recommend a great book for people like yourself... PHP Fast and Easy by Julie Meloni... You can visit her website at http://www.thickbook.com I have both of her PHP books, and out of the 8 books on PHP hers are the ones I still use the most... Good luck Joe -Original Message- From: Hiren Mehta [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 5:28 PM To: PHP Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
here is what you can do: 1. buy a php book and go throw the basics. 2. read the php manual because it has tons of information. 3. write any type of program that you can to get familiar w/ language. 4. get a fundamental understanding of programming, object oriented programming Just my $0.02 for ya -- BigDog On Mon, 2003-07-07 at 15:27, Hiren Mehta wrote: Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I am receiving the same posting TWICE
Submit code that we can review. there is not enough info here for you to recieve a complete response to your question. -- BigDog On Mon, 2003-07-07 at 15:11, Noah Solodky wrote: Help! I am receiving the same posting TWICE how do I configure things to just get one copy of postings?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP
Do you suggests any pre-requisites before starting off with the books? Someone told me it would be much better if I learn Linux first Hiren - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Hiren Mehta [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:18 AM Subject: Re: [PHP] New to PHP There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- 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
Re: [PHP] qry not running??
Well, I redid the code a bit but it is still blowing up with the same error message. I also did the echo bit and it returned Resource id #10. What ever that is. At least I know its returning something. But when I did mssql_row_nums($result), it returned the value 0. I'm not sure if this is where its encountering problems or not. Here is the script that I'm using for everything. I believe the syntax is correct but let me know if you see anything out of place. //check through to see if new category or an existing if ($_POST[cat_nameID] = ){ $cat_name = $_POST[new_cat]; //insert new category $new_cat = INSERT INTO category . (cat_name); $new_cat = VALUES (; $new_cat = '{$cat_name}'; mssql_query ($new_cat); } else { //get active category info $cat_name = $_POST[cat_nameID]; $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_id = '$cat_name'); } //get new category info if ($_POST[cat_nameID] = ){ $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_name = '$cat_name'); } //get values for $cat_name $catID = mssql_result($result,0,cat_id); $catName = mssql_result($result,0,cat_name); thanks Miles Thompson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Micah, Echo your SELECT statement to make certain it reads the way it should. Test for number of rows returned, or an error - $result probably contains nothing, that is it's not pointing to an array. Miles At 01:23 PM 7/7/2003 -0600, Micah Montoy wrote: Anyone see what is wrong with this? //get category info $result = mssql_query(SELECT cat_id, cat_name FROM category WHERE cat_id = '$cat_name'); $catID = mssql_result($result,0,cat_id); //line 32 $catName = mssql_result($result,0,cat_name); //line 33 I'm getting the error: Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 32 Warning: mssql_result(): Bad row offset (0) in c:\inetpub\wwwroot\webpage10\example\u_images\act_load_imgs.php on line 33 thanks -- 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
Re: [PHP] PHP/Content Management
Do you realize that link does not work with the Safari browser? it just shows up blank :( Rick When one door closes, another opens; but we often look so long and so regretfully upon the closed door that we do not see the one which has opened for us. - Alexander Graham Bell From: Robert Samuel White [EMAIL PROTECTED] Reply-To: Robert Samuel White [EMAIL PROTECTED] Date: Mon, 07 Jul 2003 16:54:11 -0400 To: [EMAIL PROTECTED] Subject: [PHP] PHP/Content Management Just a quick message to let everyone know that after ten months I have finally released the first official open source version of eNetwizard Matrix Server, my sophisticated content management system and application server. All it needs is PHP, MySQL, and Apache. Full instructions are included on the website. More information about it is below... http://matrix.enetwizard.net/default.rsw About eNetwizard Matrix Server eNetwizard Matrix Server takes content management and web application serving to levels undreamt, infusing your web environment with sheer power and possibility. Cutting Edge Technology - Never before has a content management system been designed around the concept of a universal point of contact for all requests. This server knows all, and delivers all. - Never before has a content management system been designed to render and manage the content of an unlimited number of domains and websites for an unlimited number of businesses and organizations. Expect nothing less from our server. Core Features - Production Environment Ready. The server before you has had no corners cut in its design. It is stable and ready for production environments, with only a few minor limitations or idiocyncracies. And it's free and open source. - Infinitely Expansive Design. The server was designed to manage an infinite number of domains, websites, components, organizations, groups, and users, all from a single running copy of its distribution. - Complete Content Management. The server manages the content of all mime types and can deliver the content to the requesting client based on customizable settings of the server for each mime type. - Seemless Integration with Other Server Software. The server was designed to complement the job of the web server and server side scripting languages, and does not replace nor interfere with their purposes. In fact, you can utilize all of them from within the system in a myriad of useful ways. - Language Independent. The server, objects, and wizards were all designed to contain its strings in an XML localization file, allowing it to run in any language it has been translated into. In a near future release, it will also be possible to render content into the language appropriate for the visitor. - Cascading Templates. Web page design and layout are controlled by templates, allowing for quick and cost-effective website redesigns. Templates can be modified in real time, changing the layout, colors, and other style properties instantaneously. Templates are cascading through the matrix folder, meaning templates can be defined for a single page or an entire domain or website. - Workflow Ready. This version of the server includes everything needed to manage an infinite number of organizations, groups, and users, all with unique roles, policy permissions, and access rights throughout the matrix. It lacks only a few things when it comes to workflow, and these added features will be included in a near future release. - Inclusive Session Management. The server does not rely upon cookies at all to manage the individual sessions of each user accessing the server. Instead, it automatically and uniquely propagates this information into each request and embeds the information into every link managed by the server. - Search Engine Aware. The server automatically disables sessions for known search engines, preventing them from including session information in their indexes. This is also useful if you wish to create a page for the search engine that does not include the template, thereby only showing the content of the page to the search engine for indexing. - Browser Aware. The server automatically determines browser information from each visitor and assigns it to their session. Some of the collected information includes the user's languages and screen resolution, as well as their browser capabilities. This information is made available via the $Core-BrowserInfo[] array. - Extensive Logging. The server logs activity to all components, from websites and pages to files and objects. It logs all form post and get data, cookies, system functions, and script warnings and errors, depending upon your configuration. It also logs all attempts at treacherous activity anywhere within the system! - Wizardly Management. The server includes a built-in wizard component, which includes the eNetwizard
Re: [PHP] New to PHP
If you are on developing on linux then that would be good. however, i strongly encourage gaining knowledge of programming concepts if that is what you are doing with php. Having a solid foundation of programming concepts will help you in php and any other language. -- BigDog On Mon, 2003-07-07 at 15:49, Hiren Mehta wrote: Do you suggests any pre-requisites before starting off with the books? Someone told me it would be much better if I learn Linux first Hiren - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Hiren Mehta [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:18 AM Subject: Re: [PHP] New to PHP There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- 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
Re: [PHP] New to PHP
Only if you are planning on using PHP MySQL on Linux. If you are going the windows direction, then you don't need too. good luck Hiren Mehta [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Do you suggests any pre-requisites before starting off with the books? Someone told me it would be much better if I learn Linux first Hiren - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Hiren Mehta [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:18 AM Subject: Re: [PHP] New to PHP There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- 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
Re: [PHP] New to PHP
Thnx alot guys You have been of great help :D Regards, Hiren Mehta - Original Message - From: Ray Hunter [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:26 AM Subject: Re: [PHP] New to PHP If you are on developing on linux then that would be good. however, i strongly encourage gaining knowledge of programming concepts if that is what you are doing with php. Having a solid foundation of programming concepts will help you in php and any other language. -- BigDog On Mon, 2003-07-07 at 15:49, Hiren Mehta wrote: Do you suggests any pre-requisites before starting off with the books? Someone told me it would be much better if I learn Linux first Hiren - Original Message - From: Kevin Stone [EMAIL PROTECTED] To: Hiren Mehta [EMAIL PROTECTED]; PHP [EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:18 AM Subject: Re: [PHP] New to PHP There are many great books to help get you started. Infact.. believe it or not.. for the complete newbie PHP for Dummies is a great chioce. It's very well written and starts with no assumptions about your skill level. But if you do happen to have some programming experience try PHP and MySQL Web Development (do a search on Amazon). That's the book that helped me out the most. It has some great real-world examples with complete walk-through tutorials. Don't bother purchasing a function reference becuase the php.net reference is the best there is. And it's free. :) HTH, Kevin - Original Message - From: Hiren Mehta [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Monday, July 07, 2003 3:27 PM Subject: [PHP] New to PHP Hi I am new to PHP and would like to learn more about it. Which would be the best place to start with besides the manual and what would you suggest is a pre-requiste for learning PHP. Thanks Regards, Hiren -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: script not stopping
How do I specify it that I just want to check to see if the form field was blank and if so, inform the user? I know I could do this with JavaScript but I need to be able to do correct conditions. thanks Paul Chvostek [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, Jul 07, 2003 at 03:28:27PM -0600, Micah Montoy wrote: if ($_POST[imgList] = ){ You're *assigning* a variable in this condition. -- Paul Chvostek [EMAIL PROTECTED] it.canadahttp://www.it.ca/ Free PHP web hosting!http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php