[PHP] Problem with php execution and variables
Hello! Im new to programing and this is the situation I have with a first level basic php tutorial: One of the samples uses a simple order form that submits to this page and is supposed to return the values entered on that form. This is the code not working: Your order"; // Start printing order echo date("jS F,H:i "); echo ""; echo "This is your order:"; echo ""; echo $actionqty." ActionScript"; echo $photoqty." Photoshop"; echo $flashqty." Flash MX"; ?> The problem is that with this code my page does not shows the amounts entered in he form, but the tutorial works with the exact same code, then, the same tutorial showed another "long way" to do the same thing and is using this other code that works on my page: Your order"; // Start printing order echo date("jS F,H:i "); echo ""; echo "This is your order:"; echo ""; echo $HTTP_POST_VARS["actionqty"]." ActionScript"; echo $HTTP_POST_VARS["photoqty"]." Photoshop"; echo $HTTP_POST_VARS["flashqty"]." Photoshop"; ?> I want to use the short way, why doesn't work on my server? Do I have to set some settings in php configuration to be able to use php in the short format? Thanks ! -- View this message in context: http://www.nabble.com/Problem-with-php-execution-and-variables-tp17816172p17816172.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code will not work
Daniel Brown wrote: On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote: Hi. I am new to PHP. I found a tutorial that said to copy and paste the code into a .php document and open it in my browser: I'm pretty sure PHP is enabled on my computer. I've tested code such as: PHP is definitely on your system. [snip!] The error I get when I try is Parse error: syntax error, unexpected T_VARIABLE in /Library/WebServer/Documents/test.php on line 106 What is the code on lines 105 and 106 of test.php? If there's nothing on line 105, please send us the immediately-preceding code. 105: All the code before line 105 is code that I've been messing around with. I tried testing those three lines in its own file. But I still get the same error: Parse error: syntax error, unexpected T_VARIABLE in /Library/WebServer/Documents/error.php on line 2 By the way, a T_VARIABLE is just a variable --- anything beginning with a $dollar_sign. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP connection to external application
On Thu, Jun 12, 2008 at 9:30 PM, Stut <[EMAIL PROTECTED]> wrote: > On 12 Jun 2008, at 12:20, hce wrote: >> >> What is the best way for a PHP web application to connect to an >> external application written by C in Linux OS? >> >> (1) Can PHP directly call external C functions, or similar solution? > > No, but you can wrap the C functions in a PHP extension. Ok, that is not an option. >> (2) Can PHP pass messages to message queue which external C program can >> access? > > Depends on the implementation of the queue, but the answer is almost > certainly yes. I am not certain if the msg_send / msg_receive in PHP can talk to the external C program msg_send / msg_receive as PHP and external C program are in different processes, different memory spaces. Unless wrap the C functions in a PHP extension as your suggested in (1). >> (3) Socket connection between the PHP and external C program. > > This would usually be my preferred choice unless there is a particular > reason to avoid this in which case I would go down the PHP extension route. > > A lot will depend on what the C code is doing and how your PHP scripts will > interact with it. Let me first describe the requirement more: The C program is a major business server which accesses the database, exchanges information to other remote servers and it has many other background tasks running concurrently for doing monitor, statistic report, real time update data, etc. The PHP web application connects to the C program to get data and information and to display on user's web browser. I know socket works between the PHP and external C server, but there are many concerns depends on different implementations: (a) A simple way is if for every PHP request, it opens socket, sends a request and gets a response from the C server then closes the socket. It should work, but I am not sure: (i) if the open / close socket per request will cause delays and performance issues. (ii) What is the maximum number concurrent requests in a PHP web application? Will the maximum socket number / or port number (up to 2^16) be a bottleneck for large number of concurrent requests (hundred and thousands)? (b) If for all PHP requests share only one socket to connect to the external C server, I am not sure if the PHP is able to do multiplex responses for each request as the PHP is stateless. Thank you. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] class? package?
On Thu, Jun 12, 2008 at 3:01 PM, Iv Ray <[EMAIL PROTECTED]> wrote: > Shelley wrote: > >> Probably you have noticed this: >> The classes in a package are reused together. If you reuse one of the >> classes in a package, you reuse them all. >> If that's the case, then why not just use one class as one package? >> What's the point of splitting a package into several classes? :-( >> > > I think somebody already answered. > > It is actually up to you. > > My grandmother used to write letters starting with a capital letter, > writing the whole letter as one long sentence and ending with a dot. This > would perhaps confuse most high school teachers, but in her case it somehow > worked :) > > If we take this worn out example - if you have a class "dog" and a class > "cat" - it becomes quite clear why you need several classes. You can put > them in a package called "animals" - but as other people already noted, the > "packages" in php have only a symbolic role, just for clarity of code > organization. > Yeah, that's it. -- Regards, Shel
Re: [PHP] a questoin about the "#" char
On Thu, 2008-06-12 at 22:03 -0400, Robert Cummings wrote: > On Fri, 2008-06-13 at 11:10 +1000, Chris wrote: > > Sebastian Camino wrote: > > > Hello, > > > > > > I want to know what the "#" char does. > > > > In a url it's an anchor tag (http://www.w3schools.com/HTML/html_links.asp). > > > > In php it's used to mark a comment. > > > > > # this is a comment and not executed. > > ?> > > > > It means nothing specific in a filename. > > CVS conflict?? :) Actually, I should say... the backup file due to a CVS conflict or auto merge. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] class? package?
On Wed, Jun 11, 2008 at 12:02 PM, Larry Garfield <[EMAIL PROTECTED]> wrote: > On Tuesday 10 June 2008, Shelley wrote: > > Hi all, > > > > If you are designing with OO principles, could you give an explanation of > > what is the difference classes and packages? > > > > Several principles talks about classes and packages, such as: > > The classes in a package are reused together. If you reuse one of the > > classes in a package, you reuse them all. > > > > but few explains the difference between them. > > > > When I was summarizing the OO principles, that question confused me: > > > http://phparch.cn/index.php/php/43-php-advanced-programming/170-principles- > >of-object-oriented-design > > > > Thanks in advance. :) > > A class is a syntactic way of grouping behavior and data together in an > encapsulated fashion (at least that's the PHP definition). > > A formal package is a syntactic way of grouping related classes together, > either for easier distribution, somewhat tighter coupling, or syntactic > sugar. For instance, you could have 5 classes that make up your "Database > abstraction" package; they're all discrete, but all work in concert. > > PHP does not have a syntactic "package" concept. The closest thing would > be > namespaces as implemented in PHP 5.3, but that's not out yet. Many systems > emulate packages with verbose class naming (eg, Database_Connection, > Database_Query, Database_Transaction, Database_Query_Select, etc.), but I > personally find that ugly. :-) > > Thank you very much for the explanation. I think I got some. Maybe I am already using them: I am working on a sns site, and now my practice is grouping classes of a function (i.e. subscription) together. When I need it, just load the "package": subscription. Right? ;) -- Regards, Shelley
Re: [PHP] a questoin about the "#" char
On Fri, 2008-06-13 at 11:10 +1000, Chris wrote: > Sebastian Camino wrote: > > Hello, > > > > I want to know what the "#" char does. > > In a url it's an anchor tag (http://www.w3schools.com/HTML/html_links.asp). > > In php it's used to mark a comment. > > # this is a comment and not executed. > ?> > > It means nothing specific in a filename. CVS conflict?? :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a questoin about the "#" char
Sebastian Camino wrote: > Hello, > > I want to know what the "#" char does. In a url it's an anchor tag (http://www.w3schools.com/HTML/html_links.asp). In php it's used to mark a comment. It means nothing specific in a filename. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink oddity
> > function saveRecord ($db,$POST) { >$bd = "/absolute_path_to_document_root"; >$fp = "/path_to_files_from_document_root/"; >$ud = $bd . $fp; > $path = $ud.$file; // absolute path to newly named file > if ($fail || !$name || !$temp) continue; > // @unlink($ud.$file); > @move_uploaded_file($temp, $path); > @chmod($path, 0777); Why not just unlink($path) ? It's the same thing but you take 2 variables out of the problem. While you're trying to debug this remove the '@' signs. An error message will be particularly useful. Check your logs if you can, otherwise turn up error reporting and display errors until you work out what's going on. error_reporting(E_ALL); ini_set('display_errors', true); -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a questoin about the "#" char
Inside a php script the '#' denotes the beginning of a comment. I don't know that it has any use at all in the address line. What specifically is the error? I'd guess that php would ignore the rest of the line following the '#' and so this could generate any number of errors depending on what information is carried in the address and what that info is for. I'm not aware of any way to scan the address within php, this might need to be done with a proxy of some kind. If it can be done or if you can talk to the owner of the site you're trying to get the file from, you might try replacing the '#' with a '%23'. -Allen Hello, I want to know what the "#" char does. On a website I was working at, I tried to open a file with a "#" in it's name and I got an error. So I'd really appreciate any help to know how to avoid the error and what does the character do. Thanks a lot Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a questoin about the "#" char
On Thu, Jun 12, 2008 at 8:18 PM, Sebastian Camino <[EMAIL PROTECTED]> wrote: > Hello, > > I want to know what the "#" char does. On a website I was working at, I > tried to open a file with a "#" in it's name and I got an error. So I'd > really appreciate any help to know how to avoid the error and what does the > character do. That's pretty vague there, Sebastian. What error are you getting? What operating system? How are you attempting to open the file? What is the file name? Details, man! ;-P -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] a questoin about the "#" char
Hello, I want to know what the "#" char does. On a website I was working at, I tried to open a file with a "#" in it's name and I got an error. So I'd really appreciate any help to know how to avoid the error and what does the character do. Thanks a lot Sebastian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code will not work
On Wed, Jun 11, 2008 at 11:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote: > Hi. > > I am new to PHP. I found a tutorial that said to copy and paste the code > into a .php document and open it in my browser: > > echo $_SERVER['HTTP_USER_AGENT']; > ?> > > I'm pretty sure PHP is enabled on my computer. I've tested code such as: PHP is definitely on your system. [snip!] > The error I get when I try > > > echo $_SERVER['HTTP_USER_AGENT']; > ?> > > is > > Parse error: syntax error, unexpected T_VARIABLE in > /Library/WebServer/Documents/test.php on line 106 What is the code on lines 105 and 106 of test.php? If there's nothing on line 105, please send us the immediately-preceding code. By the way, a T_VARIABLE is just a variable --- anything beginning with a $dollar_sign. -- Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP code will not work
On Wed, Jun 11, 2008 at 9:51 PM, Joseph Subida <[EMAIL PROTECTED]> wrote: > Hi. > > I am new to PHP. I found a tutorial that said to copy and paste the code > into a .php document and open it in my browser: > > echo $_SERVER['HTTP_USER_AGENT']; > ?> > > I'm pretty sure PHP is enabled on my computer. I've tested code such as: > > //Function arguments > function writeMyName2($fname) > { > echo $fname . " Refsnes."; > } > echo "My name is "; > writeMyName2("Kai Jim"); > echo "My name is "; > writeMyName2("Hege"); > echo "My name is "; > writeMyName2("Stale"); > ?> > > which works fine. > > The error I get when I try > > > echo $_SERVER['HTTP_USER_AGENT']; > ?> > > is > > Parse error: syntax error, unexpected T_VARIABLE in > /Library/WebServer/Documents/test.php on line 106 > > I tried Googling "T_VARIABLE" and haven't found any useful solutions. Any > ideas? Thanks! im guessing isnt the complete file thats giving you troubles, because theres only one line in it. whichever file is giving you troubles has a syntax error on line 106. -nathan
[PHP] PHP code will not work
Hi. I am new to PHP. I found a tutorial that said to copy and paste the code into a .php document and open it in my browser: I'm pretty sure PHP is enabled on my computer. I've tested code such as: "; } echo "My name is "; writeMyName2("Kai Jim"); echo "My name is "; writeMyName2("Hege"); echo "My name is "; writeMyName2("Stale"); ?> which works fine. The error I get when I try is Parse error: syntax error, unexpected T_VARIABLE in /Library/WebServer/Documents/test.php on line 106 I tried Googling "T_VARIABLE" and haven't found any useful solutions. Any ideas? Thanks! -J.C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML 5
On Thu, Jun 12, 2008 at 4:05 PM, M. Sokolewicz <[EMAIL PROTECTED]> wrote: > Nathan Nobbe wrote: > >> On Thu, Jun 12, 2008 at 7:37 AM, Colin Guthrie <[EMAIL PROTECTED]> >> wrote: >> >> Pavel wrote: >>> >>> В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): This may be of interest (HTML 5 diffences to HTML 4 overview): > > what about xHTML? html died few years ago and i thought is was official.. Oh there are *lots* of discussions about that. Personally I'm sticking >>> with >>> XHTML. >>> >> >> >> i imagine at some point we will see a revision of xhtml that incorporates >> the changes from html4 -> 5. something like xhtml 1.1 or 2.0. at version >> 1.0, its still just a pup }:D >> >> -nathan >> > > uuuhhmmm 1.0? The thing is already at 1.1 and 2.0 is in the make... > http://www.w3.org/TR/xhtml2 is the latest (xhtml 2.0) draft. > XHTML™ 2.0 W3C Working Draft 26 July 2006, not that new anymore after 2 > years, most browsers even have good support for it these days. i suppose i put too much faith in the right hand nav on the w3cschools site =/ http://www.w3schools.com/ -nathan
Re: [PHP] Re: HTML 5
Nathan Nobbe wrote: On Thu, Jun 12, 2008 at 7:37 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote: Pavel wrote: В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): This may be of interest (HTML 5 diffences to HTML 4 overview): what about xHTML? html died few years ago and i thought is was official.. Oh there are *lots* of discussions about that. Personally I'm sticking with XHTML. i imagine at some point we will see a revision of xhtml that incorporates the changes from html4 -> 5. something like xhtml 1.1 or 2.0. at version 1.0, its still just a pup }:D -nathan uuuhhmmm 1.0? The thing is already at 1.1 and 2.0 is in the make... http://www.w3.org/TR/xhtml2 is the latest (xhtml 2.0) draft. XHTML™ 2.0 W3C Working Draft 26 July 2006, not that new anymore after 2 years, most browsers even have good support for it these days. - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Forum coded in PHP with mail and news gateway
Usamah M. Ali wrote: On Thu, Jun 12, 2008 at 4:34 PM, Bastien Koert <[EMAIL PROTECTED]> wrote: PHP does not support threading AFIAK. He probably meant "threading" as in "forum threads", i.e. topics where discussions are presented in a threaded way. I assumed exactly that :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forum coded in PHP with mail and news gateway
On Thu, Jun 12, 2008 at 4:34 PM, Bastien Koert <[EMAIL PROTECTED]> wrote: >> >> PHP does not support threading AFIAK. > > He probably meant "threading" as in "forum threads", i.e. topics where discussions are presented in a threaded way. Regards, Usamah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: HTML 5
On Thu, Jun 12, 2008 at 7:37 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote: > Pavel wrote: > >> В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): >> >>> This may be of interest (HTML 5 diffences to HTML 4 overview): >>> >> >> what about xHTML? html died few years ago and i thought is was official.. >> > > Oh there are *lots* of discussions about that. Personally I'm sticking with > XHTML. i imagine at some point we will see a revision of xhtml that incorporates the changes from html4 -> 5. something like xhtml 1.1 or 2.0. at version 1.0, its still just a pup }:D -nathan
RE: [PHP] Command-line PHP memory limit
> -Original Message- > From: Shawn McKenzie [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 11:06 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Command-line PHP memory limit > > Per Jessen wrote: > > Rene Fournier wrote: > > > >> Is it possible to set a unique memory limit for PHP scripts that are > >> run from the command line? (That is, different from what's specified > >> in php.ini.) > > > > This might specific to openSUSE, but the typical installation comes > with > > separate php.inis for apache and cli. > > > > /etc/php5/cli/php.ini > > /etc/php5/apache2/php.ini > > > > > > /Per Jessen, Zürich > > > > K/Ubuntu, I would assume Debian as well. Correct. I am running Debian etch, and I have two separate php.ini files (automatically configured as such)--one for Apache, one for command line. Todd Boyd Web Programmer
Re: [PHP] Command-line PHP memory limit
Per Jessen wrote: Rene Fournier wrote: Is it possible to set a unique memory limit for PHP scripts that are run from the command line? (That is, different from what's specified in php.ini.) This might specific to openSUSE, but the typical installation comes with separate php.inis for apache and cli. /etc/php5/cli/php.ini /etc/php5/apache2/php.ini /Per Jessen, Zürich K/Ubuntu, I would assume Debian as well. -Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Runs But Does Not Display on Linux
Wei, Alice J. wrote: Hi, Guys: Thanks for all of you who helped out, and I can now get this to work, by installing the PHP into the Linux Fedora box I have. What is odd is that on the download page of http://www.php.net, it mentioned the following on the downloads page: We do not distribute UNIX/Linux binaries. Most Linux distributions come with PHP these days, so if you do not want to compile your own, go to your distribution's download site. Binaries available on external servers: I have followed all the prompts to download it just then, and thanks to those of you reminding me to shut down the apache before I restart it, it is now displaying Hello where it is supposed to be on the PHP page. Would anyone say that the statement on the php page above should be modified somehow? No. php.net does not provide Linux binaries. They provide source that you can compile into a binary if you need to modify the build. Their point is that most distributions (Fedora, Debian, etc...) provide a PHP binary in the form of a RPM, DEB package etc... that in your case you can install using yum, etc... -Shawn Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: Thijs Lensselink [EMAIL PROTECTED] Sent: Thursday, June 12, 2008 10:44 AM To: php-general@lists.php.net Subject: RE: [PHP] PHP Runs But Does Not Display on Linux Quoting "Wei, Alice J." <[EMAIL PROTECTED]>: Hello, I have reinstalled Apache back into my Linux machine, and placed the code Test This is test into the apache/htdocs folder titled hello.php When I execute it from the browser using an http:// address followed by the IP address and hello.php, I get this pop up message that asks me if I wanted to open up my file and what I want to do with it. Is it necessary for me to install anything else? I have added the AddType application/x-httpd-php .php into the httpd.conf file, so now it is not giving me "file does not exist" error anymore, but how do I get thie accurate output to show up from the browser? I welcome any suggestion. Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: DeadTOm [EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 11:15 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux With localhost I was assuming that the files resided on your local machine, my bad. How are you accessing these files? The location you are getting them from has to be running a web server of some kind with php or the php scripts will not run and you'll only see the html output as you described. I run a linux server with apache2, php and mysql and I believe that the purpose of the php5-mysql package is to add files that define those mysql function calls. I'm sure that there is something similar for mssql. -Allen Wei, Alice J. wrote: Hi, -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:58 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux OK, I see now. When you open the script from your browser are you accessing it via a server like Http://localhost/some/file.php or are you just opening a php file on your hard drive? I'm guessing you're accessing it on the hard drive directly, which will not work since PHP scripts are executed server side. So you will need to install apache2 with php. As far as the mssql_connect error goes, the same rule applies. You need to have the proper php module installed to define for php what the mssql_connect function does, otherwise php doesn't know what it is and yells at you for not defining the function. -Allen Thanks for clarifying the first point, and that is probably why. As for the second point, according to http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect defined already as something internal within PHP? Or, am I missing something here? Plus, I connect this not to the localhost, but to a different Windows machine, so does this mean that I have to install it? One of the members on the list suggested something from http://www.freetds.org/, if this is something I have to install, I will definitely give it a shot. Alice Wei, Alice J. wrote: Hi, For testing purpose, I have something like Test This is test I see the following from the command prompt when I execute the above script: Test This is testHello On the browser, I only see: Test This is test I just realized that the mysql_connect error is a typo, I should have typed mssql_connect. I call this from a di
Re: [PHP] Redirect after pdf / file download
On Jun 12, 2008, at 8:32 AM, Bastien Koert wrote: On Thu, Jun 12, 2008 at 7:46 AM, Yashesh Bhatia <[EMAIL PROTECTED]> wrote: What about doing it the other way ... submitting the page to a script that calls on the pdf creation, yet doesnt leave this script - then proceed to redirect when that script (pdf) has been completed? S steven: the steps u'r suggesting are 1 - submit form (1.html) to script (2.php) 2 - 2.php generates the pdf but does not give it for download 3 - after generating the pdf , 2.php then redirects to 3.html.. so where does the download happen ? in 3.html ? thx. yashesh Force the download thru a new window or a frame inside the main window. Then you can redirect the main window to where you need it Frames = Bad! (and that's not an assignment ;) As Richard provided the link (http://www.w3.org/TR/2008/WD-html5-diff-20080610/ ) in a different thread, this comes straight from the article about HTML 5: "The following elements are not in HTML 5 because their usage affected usability and accessibility for the end user in a negative way: * frame * frameset * noframes" I know we're not in HTML5 yet, but might as well prepare. Sorry to go a bit off topic, but I had to throw that out. =D ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] unlink oddity
Ok, here is my problem. Using the code below, I am saving a posted form to a database including the files it contains. There is one line commented out.. The unlink command. Without the command, the script works fine and new files Overwrite the old files when uploaded. If, however, I uncomment the unlink line, the new files are still saved and the "if (file_exists($path)) {" line evals to true, but the file disappears after program Execution. The net result of having the unlink command in seems to be that it executes after program termination leaving a record of the successful upload in the database, but no file found on the server where the upload occurred. Does anyone have any idea of why this would be occurring? The php docs for unlink do not talk about delayed execution and other scripts I researched seems to use unlink before the move command with success. Any help would be greatly appreciated. Please reply to: [EMAIL PROTECTED] $name ,'type' => $type ,'size' => $size ,'file' => $file ,'path' => $fp ); $OBJ[$objID] = serialize($dbDAT); } } } } /* All the actual code to save the record in the database has been removed, and a fake if/then statement added. */ If ($record_successfully_created) { Return $newRecordID; } else { Return 0; } } If ($_POST[obj]) saveRecord($db,$_POST); ?>
RE: [PHP] PHP Runs But Does Not Display on Linux
> -Original Message- > From: Wei, Alice J. [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 9:02 AM > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Subject: RE: [PHP] PHP Runs But Does Not Display on Linux > > Hello, > > I have reinstalled Apache back into my Linux machine, and placed the > code > > > >Test > > This is test > > > > > into the apache/htdocs folder titled hello.php > > When I execute it from the browser using an http:// address followed > by the IP address and hello.php, I get this pop up message that asks me > if I wanted to open up my file and what I want to do with it. > Is it necessary for me to install anything else? I have added the > AddType application/x-httpd-php .php into the httpd.conf file, so now > it is not giving me "file does not exist" error anymore, but how do I > get thie accurate output to show up from the browser? Alice, As others have mentioned thus far, having Apache is simply not enough. You can even try and configure it yourself via the .conf files, but it still won't properly process tags. In fact, the reason you see absolutely nothing in their place is that is a complete tag--though unrecognized--and Apache treats it as such. Since it doesn't know what to do with a tag, it simply doesn't display anything when rendering the tag. Apache needs a module installed, such as libapache2-mod-php5 (in Debian, I believe) in order to parse PHP files and tags properly. There are .deb (Debian pacakage), .rpm (RedHat package), and plain ol' .tgz (GZipped Tar-ball) distributions of the PHP5 Apache2 module. Without this, there will be no bridge between Apache(2) and your PHP interpreter. HTH, Todd Boyd Web Programmer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Runs But Does Not Display on Linux
Hi, Guys: Thanks for all of you who helped out, and I can now get this to work, by installing the PHP into the Linux Fedora box I have. What is odd is that on the download page of http://www.php.net, it mentioned the following on the downloads page: We do not distribute UNIX/Linux binaries. Most Linux distributions come with PHP these days, so if you do not want to compile your own, go to your distribution's download site. Binaries available on external servers: I have followed all the prompts to download it just then, and thanks to those of you reminding me to shut down the apache before I restart it, it is now displaying Hello where it is supposed to be on the PHP page. Would anyone say that the statement on the php page above should be modified somehow? Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: Thijs Lensselink [EMAIL PROTECTED] Sent: Thursday, June 12, 2008 10:44 AM To: php-general@lists.php.net Subject: RE: [PHP] PHP Runs But Does Not Display on Linux Quoting "Wei, Alice J." <[EMAIL PROTECTED]>: > Hello, > > I have reinstalled Apache back into my Linux machine, and placed the code > > > >Test > > This is test > > > > > into the apache/htdocs folder titled hello.php > > When I execute it from the browser using an http:// address > followed by the IP address and hello.php, I get this pop up message > that asks me if I wanted to open up my file and what I want to do > with it. > Is it necessary for me to install anything else? I have added the > AddType application/x-httpd-php .php into the httpd.conf file, so > now it is not giving me "file does not exist" error anymore, but how > do I get thie accurate output to show up from the browser? > > > I welcome any suggestion. > > Alice > == > Alice Wei > MIS 2009 > School of Library and Information Science > Indiana University Bloomington > [EMAIL PROTECTED] > > From: DeadTOm [EMAIL PROTECTED] > Sent: Wednesday, June 11, 2008 11:15 PM > To: Wei, Alice J. > Cc: php-general@lists.php.net > Subject: Re: [PHP] PHP Runs But Does Not Display on Linux > > With localhost I was assuming that the files resided on your local > machine, my bad. How are you accessing these files? The location you are > getting them from has to be running a web server of some kind with php > or the php scripts will not run and you'll only see the html output as > you described. > I run a linux server with apache2, php and mysql and I believe that the > purpose of the php5-mysql package is to add files that define those > mysql function calls. I'm sure that there is something similar for mssql. > > -Allen > > Wei, Alice J. wrote: >> Hi, >> >> -Original Message- >> From: DeadTOm [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, June 11, 2008 10:58 PM >> To: Wei, Alice J. >> Cc: php-general@lists.php.net >> Subject: Re: [PHP] PHP Runs But Does Not Display on Linux >> >> OK, I see now. >> When you open the script from your browser are you accessing it via a >> server like Http://localhost/some/file.php or are you just opening a php >> file on your hard drive? I'm guessing you're accessing it on the hard >> drive directly, which will not work since PHP scripts are executed >> server side. So you will need to install apache2 with php. >> As far as the mssql_connect error goes, the same rule applies. You need >> to have the proper php module installed to define for php what the >> mssql_connect function does, otherwise php doesn't know what it is and >> yells at you for not defining the function. >> >> -Allen >> >> Thanks for clarifying the first point, and that is probably why. >> As for the second point, according to >> http://us.php.net/manual/en/function.mssql-connect.php, isn't >> mssql_connect defined already as something internal within PHP? Or, >> am I missing something here? >> >> Plus, I connect this not to the localhost, but to a different >> Windows machine, so does this mean that I have to install it? One >> of the members on the list suggested something from >> http://www.freetds.org/, if this is something I have to install, I >> will definitely give it a shot. >> >> Alice >> >> >> Wei, Alice J. wrote: >> >>> Hi, >>> >>>For testing purpose, I have something like >>> >>> >>> Test >>> >>>This is test >>> >>> >>> >>> >>> I see the following from the command prompt when I execute the >>> above script: >>> >>> >>> Test >>> >>>This is testHello >>> >>> >>> >>> On the browser, I only see: >>> >>> >>> Test >>> >>>This is test >>> >>> >>> >>> I just realized that the mysql_connect error is a typo, I should >>> have typed mssql_connect. I call this from a different machine, >>> so I sh
Re: [PHP] Redirect after pdf / file download
Yashesh Bhatia wrote: What about doing it the other way ... submitting the page to a script that calls on the pdf creation, yet doesnt leave this script - then proceed to redirect when that script (pdf) has been completed? S steven: the steps u'r suggesting are 1 - submit form (1.html) to script (2.php) 2 - 2.php generates the pdf but does not give it for download 3 - after generating the pdf , 2.php then redirects to 3.html.. so where does the download happen ? in 3.html ? thx. yashesh 1. Collect Information from client & submit data 2. Process data and generate PDF, write PDF, display error/success message 3. If successful, have a javascript or redirect to then download PDF generated in step 2. I would do it this way so in case their were any problems generating the PDF, you would have a way to indicate that to the client. Rather then trying to force them to download a broken PDF document. One suggestion to go along with this is that you will need to have a routine that will clean out all the generated PDF's every now and again. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Runs But Does Not Display on Linux
Quoting "Wei, Alice J." <[EMAIL PROTECTED]>: Hello, I have reinstalled Apache back into my Linux machine, and placed the code Test This is test into the apache/htdocs folder titled hello.php When I execute it from the browser using an http:// address followed by the IP address and hello.php, I get this pop up message that asks me if I wanted to open up my file and what I want to do with it. Is it necessary for me to install anything else? I have added the AddType application/x-httpd-php .php into the httpd.conf file, so now it is not giving me "file does not exist" error anymore, but how do I get thie accurate output to show up from the browser? I welcome any suggestion. Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: DeadTOm [EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 11:15 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux With localhost I was assuming that the files resided on your local machine, my bad. How are you accessing these files? The location you are getting them from has to be running a web server of some kind with php or the php scripts will not run and you'll only see the html output as you described. I run a linux server with apache2, php and mysql and I believe that the purpose of the php5-mysql package is to add files that define those mysql function calls. I'm sure that there is something similar for mssql. -Allen Wei, Alice J. wrote: Hi, -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:58 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux OK, I see now. When you open the script from your browser are you accessing it via a server like Http://localhost/some/file.php or are you just opening a php file on your hard drive? I'm guessing you're accessing it on the hard drive directly, which will not work since PHP scripts are executed server side. So you will need to install apache2 with php. As far as the mssql_connect error goes, the same rule applies. You need to have the proper php module installed to define for php what the mssql_connect function does, otherwise php doesn't know what it is and yells at you for not defining the function. -Allen Thanks for clarifying the first point, and that is probably why. As for the second point, according to http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect defined already as something internal within PHP? Or, am I missing something here? Plus, I connect this not to the localhost, but to a different Windows machine, so does this mean that I have to install it? One of the members on the list suggested something from http://www.freetds.org/, if this is something I have to install, I will definitely give it a shot. Alice Wei, Alice J. wrote: Hi, For testing purpose, I have something like Test This is test I see the following from the command prompt when I execute the above script: Test This is testHello On the browser, I only see: Test This is test I just realized that the mysql_connect error is a typo, I should have typed mssql_connect. I call this from a different machine, so I shouldn't get this kind of error even if I don't have it installed, right? Or, am I missing something here? Alice -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:46 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux >Otherwise, it consistently gives me errors "Call to undefined function: mysql_connect()...".If you're getting an error... If you're getting this error, there is a line of code in the php script that is trying to connect to a mysql database and the mysql extension for php is not installed. So php doesn't know this function is supposed to do hence, the "undefined function" error. >I can only see the HTML code of the php functions I call within the code at the command output in text format, but I cannot see it on the "browser." I'm a little confused about what you mean here. You shouldn't see any HTML code in your browser. Wei, Alice J. wrote: Hi, I have originally commented out all the MS SQL lines in the php.ini files so that it supports MS SQL, but that does not seem to work. MySQL? Since I am not using that to connect my PHP to, do I still need to install it? By the way, my Microsoft SQL server database is on a different Windows machine. Alice -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:29 PM To: Wei, Alice J
Re: [PHP] Redirect after pdf / file download
You are totally in the wrong way. I would use an tag and onclick property for opening the PDF in popup & relocating the current page HTH Nitsan On 12/06/2008, Yashesh Bhatia <[EMAIL PROTECTED]> wrote: > > Hello: > >I'm trying to emulate a problem i'm trying to solve as follows. > > 1 - user enters information into a html form and submits > 2 - a php script is invoked on the submit and a pdf file is stamped > and made available for download > 3 - the script finally redirects the user to a thank you html page. > > i'm having a problem in the redirect to the thank you page. > here's the 3 files > 1.html > > > First Name: > Last Name: > > > > > > 2.php > // some stamping code ... > // open the file in a binary mode > $name = "2.pdf"; > fp = fopen($name, 'rb'); > > // send headers, dump the pdf file and finally redirect > header("Content-Type: application/pdf"); > header("Content-Disposition: attachment; filename=$name"); > header("Content-Length: " . filesize($name)); > fpassthru($fp); > > echo ''; > echo 'window.location.href="3.html";'; > echo ''; > ?> > > > 3.html > > Thank you for downloading 2.pdf > > > > > The submit works fine and the pdf is availble for download however, > the redirect does not happen. > If i comment the lines > //header("Content-Type: application/pdf"); > //header("Content-Disposition: attachment; filename=$name"); > //header("Content-Length: " . filesize($name)); > //fpassthru($fp); > > then the redirect happens after the submit. > > i'm testing / running it on fedora core 6, Apache 2.2.5, php 5.2.5 and > firefox 1.5 > Any help / pointers is appreciated. > > Thanks. > > Yashesh Bhatia. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] PHP Runs But Does Not Display on Linux
Did you install the apache php module? In Ubuntu the package is called libapache2-mod-php5. Wei, Alice J. wrote: Hello, I have reinstalled Apache back into my Linux machine, and placed the code Test This is test into the apache/htdocs folder titled hello.php When I execute it from the browser using an http:// address followed by the IP address and hello.php, I get this pop up message that asks me if I wanted to open up my file and what I want to do with it. Is it necessary for me to install anything else? I have added the AddType application/x-httpd-php .php into the httpd.conf file, so now it is not giving me "file does not exist" error anymore, but how do I get thie accurate output to show up from the browser? I welcome any suggestion. Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: DeadTOm [EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 11:15 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux With localhost I was assuming that the files resided on your local machine, my bad. How are you accessing these files? The location you are getting them from has to be running a web server of some kind with php or the php scripts will not run and you'll only see the html output as you described. I run a linux server with apache2, php and mysql and I believe that the purpose of the php5-mysql package is to add files that define those mysql function calls. I'm sure that there is something similar for mssql. -Allen Wei, Alice J. wrote: Hi, -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:58 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux OK, I see now. When you open the script from your browser are you accessing it via a server like Http://localhost/some/file.php or are you just opening a php file on your hard drive? I'm guessing you're accessing it on the hard drive directly, which will not work since PHP scripts are executed server side. So you will need to install apache2 with php. As far as the mssql_connect error goes, the same rule applies. You need to have the proper php module installed to define for php what the mssql_connect function does, otherwise php doesn't know what it is and yells at you for not defining the function. -Allen Thanks for clarifying the first point, and that is probably why. As for the second point, according to http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect defined already as something internal within PHP? Or, am I missing something here? Plus, I connect this not to the localhost, but to a different Windows machine, so does this mean that I have to install it? One of the members on the list suggested something from http://www.freetds.org/, if this is something I have to install, I will definitely give it a shot. Alice Wei, Alice J. wrote: Hi, For testing purpose, I have something like Test This is test I see the following from the command prompt when I execute the above script: Test This is testHello On the browser, I only see: Test This is test I just realized that the mysql_connect error is a typo, I should have typed mssql_connect. I call this from a different machine, so I shouldn't get this kind of error even if I don't have it installed, right? Or, am I missing something here? Alice -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 10:46 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux >Otherwise, it consistently gives me errors "Call to undefined function: mysql_connect()...".If you're getting an error... If you're getting this error, there is a line of code in the php script that is trying to connect to a mysql database and the mysql extension for php is not installed. So php doesn't know this function is supposed to do hence, the "undefined function" error. >I can only see the HTML code of the php functions I call within the code at the command output in text format, but I cannot see it on the "browser." I'm a little confused about what you mean here. You shouldn't see any HTML code in your browser. Wei, Alice J. wrote: Hi, I have originally commented out all the MS SQL lines in the php.ini files so that it supports MS SQL, but that does not seem to work. MySQL? Since I am not using that to connect my PHP to, do I still need to install it? By the way, my Microsoft SQL server database is on a different Windows machine. Alice -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11
RE: [PHP] PHP Runs But Does Not Display on Linux
Hello, I have reinstalled Apache back into my Linux machine, and placed the code Test This is test into the apache/htdocs folder titled hello.php When I execute it from the browser using an http:// address followed by the IP address and hello.php, I get this pop up message that asks me if I wanted to open up my file and what I want to do with it. Is it necessary for me to install anything else? I have added the AddType application/x-httpd-php .php into the httpd.conf file, so now it is not giving me "file does not exist" error anymore, but how do I get thie accurate output to show up from the browser? I welcome any suggestion. Alice == Alice Wei MIS 2009 School of Library and Information Science Indiana University Bloomington [EMAIL PROTECTED] From: DeadTOm [EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 11:15 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux With localhost I was assuming that the files resided on your local machine, my bad. How are you accessing these files? The location you are getting them from has to be running a web server of some kind with php or the php scripts will not run and you'll only see the html output as you described. I run a linux server with apache2, php and mysql and I believe that the purpose of the php5-mysql package is to add files that define those mysql function calls. I'm sure that there is something similar for mssql. -Allen Wei, Alice J. wrote: > Hi, > > -Original Message- > From: DeadTOm [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 11, 2008 10:58 PM > To: Wei, Alice J. > Cc: php-general@lists.php.net > Subject: Re: [PHP] PHP Runs But Does Not Display on Linux > > OK, I see now. > When you open the script from your browser are you accessing it via a > server like Http://localhost/some/file.php or are you just opening a php > file on your hard drive? I'm guessing you're accessing it on the hard > drive directly, which will not work since PHP scripts are executed > server side. So you will need to install apache2 with php. > As far as the mssql_connect error goes, the same rule applies. You need > to have the proper php module installed to define for php what the > mssql_connect function does, otherwise php doesn't know what it is and > yells at you for not defining the function. > > -Allen > > Thanks for clarifying the first point, and that is probably why. > As for the second point, according to > http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect > defined already as something internal within PHP? Or, am I missing something > here? > > Plus, I connect this not to the localhost, but to a different Windows > machine, so does this mean that I have to install it? One of the members on > the list suggested something from http://www.freetds.org/, if this is > something I have to install, I will definitely give it a shot. > > Alice > > > Wei, Alice J. wrote: > >> Hi, >> >>For testing purpose, I have something like >> >> >> Test >> >>This is test >> >> >> >> >> I see the following from the command prompt when I execute the above >> script: >> >> >> Test >> >>This is testHello >> >> >> >> On the browser, I only see: >> >> >> Test >> >>This is test >> >> >> >> I just realized that the mysql_connect error is a typo, I should have >> typed mssql_connect. I call this from a different machine, so I shouldn't >> get this kind of error even if I don't have it installed, right? Or, am I >> missing something here? >> >> Alice >> >> -Original Message- >> From: DeadTOm [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, June 11, 2008 10:46 PM >> To: Wei, Alice J. >> Cc: php-general@lists.php.net >> Subject: Re: [PHP] PHP Runs But Does Not Display on Linux >> >> >Otherwise, it consistently gives me errors "Call to undefined >> function: mysql_connect()...".If you're getting an error... >> >> If you're getting this error, there is a line of code in the php script >> that is trying to connect to a mysql database and the mysql extension >> for php is not installed. So php doesn't know this function is supposed >> to do hence, the "undefined function" error. >> >> >I can only see the HTML code of the php functions I call within the >> code at the command output in text format, but I cannot see it on the >> "browser." >> >> I'm a little confused about what you mean here. You shouldn't see any >> HTML code in your browser. >> >> Wei, Alice J. wrote: >> >> >>> Hi, >>> >>> I have originally commented out all the MS SQL lines in the php.ini files >>> so that it supports MS SQL, but that does not seem to work. MySQL? Since I >>> am not using that to connect my PHP to, do I still need to install it? By >>> the way, my Microsoft SQL server database is on
Re: [PHP] error "Failed opening for inclusion"
Hello, Sorry to brother you but I'm really in a pinch with this problem and I need to resolve it. The older Fedora Apache server runs just fine with "DocumentRoot" pointing to the NFS share. The NFS share is on our OS X file server. The new CentOS runs fine when "DocumentRoot" is pointing to the local file systems. When I move "DocumentRoot" to the NFS share I can not even run "phpinfo()". [root@ ~]# more /projects/proj2/www/html/php_info.php root@ ~]# ls -als /projects/proj2/www/html/php_info.php 4 -rwxrwxrwx 1 root apache 19 Jun 10 16:58 /projects/proj2/www/html/php_info.php I've checked permissions, paths, etc... and can not find a cause to this problem. I've compared php.ini and httpd.conf from both fedore and centos and they are the pretty much the same. Both fodera and centos are on the same subnets. After further investigation I'm find that some php files, below the root directory, run successfully, but now if I edit it or copy it to other name the new php file will not run anymore. I end up with the errors listed below. I could use some help, Thanks. Lou Lou Baccari wrote: sorry if I double posted: Hello, I'm trying to move my apache server from a Fedora Core 1 with PHP V 4.3.8 onto a newly built Centos 5 with PHP 5.1.6, all applications installed by rpms. The www root dir is "/projects/proj2/www/html" and it is a nfs mounted share. During the installation I had moved all of the contents from the remote mount "/projects/proj2/www/html" to a local disk on the CentOS, I tested and I believed I had resolved all issues on the new server. Now when I changed my httpd.conf to point to the nfs share "/projects/proj2/www/html" my php scripts fail, even " phpinfo(); " fails. All errors are identical to the following except for the php file name. *Warning*: Unknown: failed to open stream: Value too large for defined data type in *Unknown* on line *0* *Warning*: Unknown: Failed opening '/projects/proj2/www/html/php_info.php' for inclusion (include_path='.:/usr/share/pear') in *Unknown* on line *0 * Again when I run these same scripts from the local disk I do not received any errors. Any ideas to correcting this problem? Thanks, Lou. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UK PHP Host/Developer Required OT
tedd wrote: > For sake of discussion -- why would one want to be specific about > hosting in the UK? Why not just hosting, regardless of where the host > is located? > > After all, hopefully the site will be accessible globally, right? So, > why the need for a specific geographical location for a host? Local clients quite often have much better connectivity to a local host. > Are there UK laws that require businesses to be totally self-contain > within the UK? Or, is this just a limitation of management to > understand what the net is? I don't know about the UK, but Swiss banking legislation does have clauses about the location of data processing equipment. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UK PHP Host/Developer Required
2 reasons- 1. Google and other search engines return local results and the clients will all be in the UK 2. It's useful if the host company and the client keep the same office hours. Regards, Colin Colin Sidwell wrote: Hi, We are looking for someone to develop & host a PHP site in the UK. The site is a corporate rewards site that enables users to buy gifts with with points they have been given by their employer. URL is here- http://www.waystoamaze.co.uk/ There are databases of users, companies, products and categories. An admin section allows for product and user updating etc. Interested parties should contact the client directly on +44 7970 461 295 or email [EMAIL PROTECTED] Regards, Colin Sidwell http://www.idealinternet.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTML 5
Pavel wrote: В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): This may be of interest (HTML 5 diffences to HTML 4 overview): what about xHTML? html died few years ago and i thought is was official.. Oh there are *lots* of discussions about that. Personally I'm sticking with XHTML. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Forum coded in PHP with mail and news gateway
On Thu, Jun 12, 2008 at 5:05 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote: > Michelle Konzack wrote: > >> It should support: >> >> 1) PostgreSQL (my own database) >> 2) MySQL (my current hosting provider offer it only) >> 3) Threating >> > ^ > I don't think you'll have to search too far to find some old code with a > very high level of threat.. > > :p > > Col > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > PHP does not support threading AFIAK. -- Bastien Cat, the other other white meat
Re: [PHP] Redirect after pdf / file download
On Thu, Jun 12, 2008 at 7:46 AM, Yashesh Bhatia <[EMAIL PROTECTED]> wrote: > > > > What about doing it the other way ... submitting the page to a script > > that calls on the pdf creation, yet doesnt leave this script - then > > proceed to redirect when that script (pdf) has been completed? > > > > S > > > > steven: > > the steps u'r suggesting are > 1 - submit form (1.html) to script (2.php) > 2 - 2.php generates the pdf but does not give it for download > 3 - after generating the pdf , 2.php then redirects to 3.html.. > > so where does the download happen ? in 3.html ? > > thx. > > yashesh > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Force the download thru a new window or a frame inside the main window. Then you can redirect the main window to where you need it -- Bastien Cat, the other other white meat
Re: [PHP] UK PHP Host/Developer Required OT
We are looking for someone to develop & host a PHP site in the UK. For sake of discussion -- why would one want to be specific about hosting in the UK? Why not just hosting, regardless of where the host is located? Speed (eg. response time). Technical support hours etc. After all, hopefully the site will be accessible globally, right? The site may be only pertinent to a specific locallity. For example I used to work for an online film rental firm, who only supplied to the UK. Are there UK laws that require businesses to be totally self-contain within the UK? Not at all. -- Richard Heyes Employ me: http://www.phpguru.org/cv ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UK PHP Host/Developer Required OT
Off-Topic At 1:46 PM +0100 6/12/08, Colin Sidwell wrote: Hi, We are looking for someone to develop & host a PHP site in the UK. For sake of discussion -- why would one want to be specific about hosting in the UK? Why not just hosting, regardless of where the host is located? After all, hopefully the site will be accessible globally, right? So, why the need for a specific geographical location for a host? Are there UK laws that require businesses to be totally self-contain within the UK? Or, is this just a limitation of management to understand what the net is? Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UK PHP Host/Developer Required
Hi, We are looking for someone to develop & host a PHP site in the UK. The site is a corporate rewards site that enables users to buy gifts with with points they have been given by their employer. URL is here- http://www.waystoamaze.co.uk/ There are databases of users, companies, products and categories. An admin section allows for product and user updating etc. Interested parties should contact the client directly on +44 7970 461 295 or email [EMAIL PROTECTED] Regards, Colin Sidwell http://www.idealinternet.co.uk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML 5
В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): > This may be of interest (HTML 5 diffences to HTML 4 overview): what about xHTML? html died few years ago and i thought is was official.. //sorry for my english -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: If there were a school for, say, sheet metal workers, that after three years left its graduates as unprepared for their careers as does law school, it would be closed down in a minute, and no doubt by lawyers. -- Michael Levin, "The Socratic Method [fortune]
Re: [PHP] PHP connection to external application
hce wrote: > What is the best way for a PHP web application to connect to an > external application written by C in Linux OS? > > (1) Can PHP directly call external C functions, or similar solution? PHP can call external executables via e.g. exec(). > (2) Can PHP pass messages to message queue which external C program > can access? PHP can write to a FIFO / pipe. > (3) Socket connection between the PHP and externam C program. Yes, that works too. What is "the best" depends on your requirements. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirect after pdf / file download
> > What about doing it the other way ... submitting the page to a script > that calls on the pdf creation, yet doesnt leave this script - then > proceed to redirect when that script (pdf) has been completed? > > S > steven: the steps u'r suggesting are 1 - submit form (1.html) to script (2.php) 2 - 2.php generates the pdf but does not give it for download 3 - after generating the pdf , 2.php then redirects to 3.html.. so where does the download happen ? in 3.html ? thx. yashesh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP connection to external application
On 12 Jun 2008, at 12:20, hce wrote: What is the best way for a PHP web application to connect to an external application written by C in Linux OS? (1) Can PHP directly call external C functions, or similar solution? No, but you can wrap the C functions in a PHP extension. (2) Can PHP pass messages to message queue which external C program can access? Depends on the implementation of the queue, but the answer is almost certainly yes. (3) Socket connection between the PHP and externam C program. This would usually be my preferred choice unless there is a particular reason to avoid this in which case I would go down the PHP extension route. A lot will depend on what the C code is doing and how your PHP scripts will interact with it. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP connection to external application
On Thu, 2008-06-12 at 21:20 +1000, hce wrote: > Hi, > > What is the best way for a PHP web application to connect to an > external application written by C in Linux OS? > > (1) Can PHP directly call external C functions, or similar solution? > > (2) Can PHP pass messages to message queue which external C program can > access? > > (3) Socket connection between the PHP and externam C program. > > Thank you. > If that C program can support SOAP calls ... then that will probably be the best route for you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirect after pdf / file download
On Thu, 2008-06-12 at 16:27 +0530, Yashesh Bhatia wrote: > Aschwin: > > Hi i tried > > -- > //echo ''; > //echo 'window.location.href="3.html";'; > //echo ''; > header("Location: 3.html"); > exit; > -- > but that did not work :(. > > thanks for the tip. > > yashesh bhatia What about doing it the other way ... submitting the page to a script that calls on the pdf creation, yet doesnt leave this script - then proceed to redirect when that script (pdf) has been completed? S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP connection to external application
Hi, What is the best way for a PHP web application to connect to an external application written by C in Linux OS? (1) Can PHP directly call external C functions, or similar solution? (2) Can PHP pass messages to message queue which external C program can access? (3) Socket connection between the PHP and externam C program. Thank you. Kind Regards, Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Runs But Does Not Display on Linux
Hi, I am assuming that once I install apache, (since now I am assuming that with a Linux box, I don't need to install PHP), then this would be a web server with a IP address. I could use something like ipconfig or ifconfig in my case to find the ip address, which I tried to use yum before to retrieve the information, but I still could not read anything from PHP. What I keep having trouble figuring out is, when I installed apache and try to get even something like to show up on the page failed me with only a blank screen. But since you mentioned that I have to install another package, and I am assuming that I can download it from somewhere, this is something I can try. Where did you get your package from? Alice -Original Message- From: DeadTOm [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2008 11:15 PM To: Wei, Alice J. Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Runs But Does Not Display on Linux With localhost I was assuming that the files resided on your local machine, my bad. How are you accessing these files? The location you are getting them from has to be running a web server of some kind with php or the php scripts will not run and you'll only see the html output as you described. I run a linux server with apache2, php and mysql and I believe that the purpose of the php5-mysql package is to add files that define those mysql function calls. I'm sure that there is something similar for mssql. -Allen Wei, Alice J. wrote: > Hi, > > -Original Message- > From: DeadTOm [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 11, 2008 10:58 PM > To: Wei, Alice J. > Cc: php-general@lists.php.net > Subject: Re: [PHP] PHP Runs But Does Not Display on Linux > > OK, I see now. > When you open the script from your browser are you accessing it via a > server like Http://localhost/some/file.php or are you just opening a php > file on your hard drive? I'm guessing you're accessing it on the hard > drive directly, which will not work since PHP scripts are executed > server side. So you will need to install apache2 with php. > As far as the mssql_connect error goes, the same rule applies. You need > to have the proper php module installed to define for php what the > mssql_connect function does, otherwise php doesn't know what it is and > yells at you for not defining the function. > > -Allen > > Thanks for clarifying the first point, and that is probably why. > As for the second point, according to > http://us.php.net/manual/en/function.mssql-connect.php, isn't mssql_connect > defined already as something internal within PHP? Or, am I missing something > here? > > Plus, I connect this not to the localhost, but to a different Windows > machine, so does this mean that I have to install it? One of the members on > the list suggested something from http://www.freetds.org/, if this is > something I have to install, I will definitely give it a shot. > > Alice > > > Wei, Alice J. wrote: > >> Hi, >> >>For testing purpose, I have something like >> >> >> Test >> >>This is test >> >> >> >> >> I see the following from the command prompt when I execute the above >> script: >> >> >> Test >> >>This is testHello >> >> >> >> On the browser, I only see: >> >> >> Test >> >>This is test >> >> >> >> I just realized that the mysql_connect error is a typo, I should have >> typed mssql_connect. I call this from a different machine, so I shouldn't >> get this kind of error even if I don't have it installed, right? Or, am I >> missing something here? >> >> Alice >> >> -Original Message- >> From: DeadTOm [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, June 11, 2008 10:46 PM >> To: Wei, Alice J. >> Cc: php-general@lists.php.net >> Subject: Re: [PHP] PHP Runs But Does Not Display on Linux >> >> >Otherwise, it consistently gives me errors "Call to undefined >> function: mysql_connect()...".If you're getting an error... >> >> If you're getting this error, there is a line of code in the php script >> that is trying to connect to a mysql database and the mysql extension >> for php is not installed. So php doesn't know this function is supposed >> to do hence, the "undefined function" error. >> >> >I can only see the HTML code of the php functions I call within the >> code at the command output in text format, but I cannot see it on the >> "browser." >> >> I'm a little confused about what you mean here. You shouldn't see any >> HTML code in your browser. >> >> Wei, Alice J. wrote: >> >> >>> Hi, >>> >>> I have originally commented out all the MS SQL lines in the php.ini files >>> so that it supports MS SQL, but that does not seem to work. MySQL? Since I >>> am not using that to connect my PHP to, do I still need to install it? By >>> the way, my Microsoft SQL server database is on a different Windows machine. >>> >>> Alice >>> >>> -Original Message- >>> From: DeadTOm [mailto:[EMAIL PROT
Re: [PHP] Redirect after pdf / file download
Aschwin: Hi i tried -- //echo ''; //echo 'window.location.href="3.html";'; //echo ''; header("Location: 3.html"); exit; -- but that did not work :(. thanks for the tip. yashesh bhatia > > Hi, > > What you are doing is: > > header("Content-Type: application/pdf"); > > And after that you try to echo some script. But the browser already thinks > that belongs to the PDF and not to a HTML page. > > What I think should work instead of the script part is just: > > header('Location: 3.html'); > exit; > > But I'm not sure it works. > > -- > > Aschwin Wesselius > > 'What you would like to be done to you, do that to the other' > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTML 5
This may be of interest (HTML 5 diffences to HTML 4 overview): http://www.w3.org/TR/2008/WD-html5-diff-20080610/ -- Richard Heyes Employ me: http://www.phpguru.org/cv ++ | Access SSH with a Windows mapped drive | |http://www.phpguru.org/sftpdrive| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirect after pdf / file download
Yashesh Bhatia wrote: Hello: I'm trying to emulate a problem i'm trying to solve as follows. 1 - user enters information into a html form and submits 2 - a php script is invoked on the submit and a pdf file is stamped and made available for download 3 - the script finally redirects the user to a thank you html page. i'm having a problem in the redirect to the thank you page. here's the 3 files 1.html First Name: Last Name: 2.php '; echo 'window.location.href="3.html";'; echo ''; ?> 3.html Thank you for downloading 2.pdf The submit works fine and the pdf is availble for download however, the redirect does not happen. If i comment the lines //header("Content-Type: application/pdf"); //header("Content-Disposition: attachment; filename=$name"); //header("Content-Length: " . filesize($name)); //fpassthru($fp); then the redirect happens after the submit. i'm testing / running it on fedora core 6, Apache 2.2.5, php 5.2.5 and firefox 1.5 Any help / pointers is appreciated. Thanks. Yashesh Bhatia. Hi, What you are doing is: header("Content-Type: application/pdf"); And after that you try to echo some script. But the browser already thinks that belongs to the PDF and not to a HTML page. What I think should work instead of the script part is just: header('Location: 3.html'); exit; But I'm not sure it works. -- Aschwin Wesselius /'What you would like to be done to you, do that to the other'/
[PHP] Redirect after pdf / file download
Hello: I'm trying to emulate a problem i'm trying to solve as follows. 1 - user enters information into a html form and submits 2 - a php script is invoked on the submit and a pdf file is stamped and made available for download 3 - the script finally redirects the user to a thank you html page. i'm having a problem in the redirect to the thank you page. here's the 3 files 1.html First Name: Last Name: 2.php '; echo 'window.location.href="3.html";'; echo ''; ?> 3.html Thank you for downloading 2.pdf The submit works fine and the pdf is availble for download however, the redirect does not happen. If i comment the lines //header("Content-Type: application/pdf"); //header("Content-Disposition: attachment; filename=$name"); //header("Content-Length: " . filesize($name)); //fpassthru($fp); then the redirect happens after the submit. i'm testing / running it on fedora core 6, Apache 2.2.5, php 5.2.5 and firefox 1.5 Any help / pointers is appreciated. Thanks. Yashesh Bhatia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Forum coded in PHP with mail and news gateway
Michelle Konzack wrote: It should support: 1) PostgreSQL (my own database) 2) MySQL (my current hosting provider offer it only) 3) Threating ^ I don't think you'll have to search too far to find some old code with a very high level of threat.. :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression to find body text in mobile
The server recieve email from mobile phone. I would like to retrieve the text of body of mobile phone, which recieve email from mobile phone email. Of cource, server run php and is able to use regular expression. But the email, which is recieved by mobile phone, retrieve text body on server. Regards, Yui 2008/6/12 Nitsan Bin-Nun <[EMAIL PROTECTED]>: > I'm confused. > PHP runs on the server, so it shouldn't be a problem at all to run regex > search/reaplce/match/whatever on mobile phone internet, maybe you are > talking on JS regex? > > Nitsan > > > On 11/06/2008, Yui Hiroaki <[EMAIL PROTECTED]> wrote: >> >> Doese any know how to find text in mobile using Regular Expression? >> I am using php. >> >> Regards, >> Yui >> >> -- >> 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] class? package?
Shelley wrote: Probably you have noticed this: The classes in a package are reused together. If you reuse one of the classes in a package, you reuse them all. If that's the case, then why not just use one class as one package? What's the point of splitting a package into several classes? :-( I think somebody already answered. It is actually up to you. My grandmother used to write letters starting with a capital letter, writing the whole letter as one long sentence and ending with a dot. This would perhaps confuse most high school teachers, but in her case it somehow worked :) If we take this worn out example - if you have a class "dog" and a class "cat" - it becomes quite clear why you need several classes. You can put them in a package called "animals" - but as other people already noted, the "packages" in php have only a symbolic role, just for clarity of code organization. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php