Search Results

Search found 45255 results on 1811 pages for 'php connect'.

Page 82/1811 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • PHP $_GET and $_POST are returning empty arrays--trying to paginate SQL data

    - by George88
    I have set up the following: Database class ($db) Pagination class ($paginator) I am attempting to write a basic system to let me administrate pages. I have a page "page_manager.php" in which I include both my database class (database.php) and my pagination class (paginate.php). In my pagination class I have a function which echoes my SQL data. I've come up with a way to echo an HTML < select element with the necessary IDs, which allows me to successfully echo the corresponding results (10 per page), based on the value of the < select element. So, "1" will echo the first 10 results in the database, "2" will echo from 11-20, "3" will echo from 21-30, etc., etc.. I have added an onChange event to the < select element which will copy its value (using "this.value") to a hidden form field. I then submit this form using document.getElementById().submit(); This will then add the $_GET variable to the URL, so the URL becomes ".../?pagenumber_form=X". However, when I try to grab this value back from the URL, the $_GET['pagenumber_form'] is empty. Some code: <span style='font-family: tahoma; font-size: 10pt;'>Page #</span> <select id="page_number_selection" onchange='javascript: document.getElementById("pagenumber_form").value = this.value; document.getElementById("pagenumber").submit();'> <?php for($i = 1; $i <= $this->num_pages; $i++) echo"<option id='" . $i . "'>" . $i . "</option>"; ?> </select> <form name="pagenumber" id="pagenumber" action="" method="get"> <input type="text" name="pagenumber_form" id="pagenumber_form" /> </form> So, I've tried using $_POST as well, but the same thing happens. I want to use $_GET, for a couple of reasons: it's easier to see what is happening with my values and the data I'm using doesn't need to be secure. To recap: the $_GET variable is being added to the URL when I change the < select element, and the corresponding value gets added to the URL as: ".../?pagenumber_form=X", but when I try to use the value in PHP, for example... $page_number = $_GET['pagenumber_form']; ... I get a NULL value. :-( Can anybody help me out please? Thank you. EDIT: I've just made a discovery. If I move my print_r($_GET) to my main index page, then the superglobals are returning as expected. My site structure is like this: index.php - JavaScript buttons use AJAX HTTP requests to include the "responseText" as the .innerHTML of my main < div . The "responseText" is the contents the page itself, in this case page_manager.php, which in turn includes pagination.php. So in other words, my site is built from PHP includes, which doesn't seem to be compatible with HTTP superglobals. Any idea how I can get around this problem? Thank you :-).

    Read the article

  • PHP5.3 is not working with MySQL5.1 IIS7 Times out

    - by Thorn007
    I have set up PHP5.3, MySQL5.1, and IIS7 on Window 7 but php doesn't want to work with MySQL. I'm assuming it is a configuration error or an incomplete install on my part. MySQL5.1 is working PHP5.3 is working, phpinfo() shows info and that i have enabled MySQL IIS is setup and using fastCgiModule to run PHP IIS registers php.ini updates port 3306 is firewall free and open to the world php.ini is configured correctly I have added c:\php to the Windows systems PATH In the past I remember moving a file, libmysql.dll, to System32 but I doesn't look like that come with php5.3.1, as the driver comes built in now http://us3.php.net/manual/en/mysqlnd.install.php. (This has been giving me so much trouble I have been documenting my findings on my blog as http://inteldesigner.com/2010/code/having-problems-getting-php5-3-to-work-with-mysql5-1 ) NEED: I need to install PHP manually, don't want to use the quick installer or an older version I need to get PHP5.3 to work with MySQL5.1 so i can install Wordpress2.9 and Drupal7a Any links or suggestion would be great, I have already done everything on the iis web site, nothing is working. I'm guessing they have not updated for new software. BUGS/SOLUTION: The solution is here: http://bugs.php.net/bug.php?id=50172 thanks go to don.raman on the iis.net forums http://forums.iis.net/p/1164911/1933894.aspx SYMPTOMS: The php function mysql_connect() in conjunction with php5.3 locks up sever and returns error 500. (IPv6 is the problem see above link) TEST CODE: <?php $con = mysql_connect("localhost","root","***"); if (!$con) { die('Could not connect: ' . mysql_error()); } // some code mysql_close($con); ?> ERRORS: From Browser: HTTP Error 500.0 - Internal Server Error C:\php\php-cgi.exe - The FastCGI process exceeded configured activity timeout When i run php -f c:\public_html\index.php from the command line i got: PHP Warning: mysql_connect(): [2002] A connection attempt failed because the co nnected party did not (trying to connect via tcp://localhost:3306) in C:\public _html\index.php on line 10 Warning: mysql_connect(): [2002] A connection attempt failed because the connect ed party did not (trying to connect via tcp://localhost:3306) in C:\public_html \index.php on line 10 PHP Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connectio n failed because connected host has failed to respond. in C:\public_html\index.php on line 10 Warning: mysql_connect(): A connection attempt failed because the connected part y did not properly respond after a period of time, or established connection fai led because connected host has failed to respond. in C:\public_html\index.php on line 10 Could not connect: A connection attempt failed because the connected party did n ot properly respond after a period of time, or established connection failed bec ause connected host has failed to respond. C:\Users\Kevin>

    Read the article

  • Integrating OpenID into Symfony 1.4?

    - by Steve
    I've tried integrating sfPHPOpenIdPlugin but that hit a dead-end since it's built for Symfony 1.2 and relies on deprecated PHP functionality; I also had a go with sfGoogleLoginPlugin which did authenticate correctly but lacks extended capability to retrieve user details (+ would restrict me to Google; obviously). I'm thinking the most viable solution is to link in one of the various PHP libraries available into my model. I'm wondering if anyone else has had any success/tips with such an integration and what libraries to consider?

    Read the article

  • Changing User/Group to allow PHP to chmod/rename and move_upload_file()

    - by moe
    It seems like I cannot do anything with my PHP script on my VPS. It returns 'Permission denied' when I try to upload something to a directory. Yes, I have changed the permission to 777, and it works, but I do not like the insecurity When running the command: ps axu|grep apache|grep -v grep It returns nobody 7689 0.1 3.8 50604 20036 ? S 21:38 0:00 /usr/local/apache/bin/httpd -k start -DSSL root 13600 0.0 3.8 50304 20348 ? Ss Jun06 0:46 /usr/local/apache/bin/httpd -k start -DSSL nobody 15733 0.1 3.8 50700 20156 ? S 21:39 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 15818 0.1 3.8 51492 20180 ? S 21:39 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 23843 0.1 3.7 51336 19592 ? S 21:40 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30335 0.0 3.5 50436 18496 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30406 0.0 3.5 50444 18544 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30407 0.0 3.5 50556 18696 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30472 0.0 3.6 50828 19348 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30474 0.0 3.5 50668 18868 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30476 0.0 3.6 50532 19064 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 30501 0.0 3.8 50556 20080 ? S 21:36 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32341 0.0 3.5 50444 18492 ? S 21:41 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32370 0.0 3.5 50444 18476 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32414 0.1 3.7 51336 19524 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32416 0.1 3.5 50668 18816 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32457 0.1 3.6 50828 19320 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32458 0.1 3.6 50772 19276 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32459 0.0 3.5 50444 18504 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32460 0.2 3.6 50828 19320 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32463 0.0 3.5 50444 18472 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL nobody 32466 0.0 3.4 50436 17960 ? S 21:42 0:00 /usr/local/apache/bin/httpd -k start -DSSL The owner of the directory is 'user [505]' and the group is 'user[508]' (as seen in WinSCP) What can I do to change the Apache Handler to the right owner and group to allow my PHP scripts to work? P.S My PHP is not set to safe mode, and the open_basedir is set to no value EDIT: This is what my httpd.conf looks like (for the associative domain) <VirtualHost *:80> ServerName domain.com ServerAlias www.domain.com DocumentRoot /home/domain/public_html ServerAdmin info@domain ## User <theUsername> # Needed for Cpanel::ApacheConf <IfModule mod_userdir.c> Userdir disabled Userdir enabled <userName> </IfModule> <IfModule mod_suphp.c> suPHP_UserGroup <userName> <userName> </IfModule> <IfModule !mod_disable_suexec.c> SuexecUserGroup <userName> <userName> </IfModule> CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ." CustomLog /usr/local/apache/domlogs/domain.com combined ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/ #Options -ExecCGI -Includes #RemoveHandler cgi-script .cgi .pl .plx .ppl .perl

    Read the article

  • Installing PHP extensions in Debian

    - by Nick Sabatino
    I'm trying to install the PECL extension pecl_http so that I can use PHP's http_negotiate_language() function. I'm running PHP5 on Apache2 and Debian Lenny. I installed the php_http package from the debian repo, however, I still can't use that function in my php scripts! The package also doesn't show up under phpinfo(). I tried installing it from PECL, but I could not. Is there some procedure for enabling these extensions in PHP? Kind of like a2enmod for apache? Note: This is a repost from http://forum.slicehost.com/comments.php?DiscussionID=4650 I also tried adding extension=pecl_http.so to my apache2/php.ini with no effect. Any guesses?

    Read the article

  • Unknown Host error when attempting to connect to connect to Eclipse plugin repository

    - by BordrGuy108
    Hello, I am running Ubuntu 9.10 and I'm attempting to install a plugin for Eclipse 3.5 from a repository that my company created. This worked in the past on this linux box and also works just fine on my laptop which has Windows XP installed. The exact error message I'm getting in Eclipse is: Unknown Host: <location of repository> org.eclipse.equinox.internal.provisional.p2.core.ProvisionException Any ideas what might be causing something that used to work not to work anymore? Thanks! EDIT: Also, it might be useful to know that I can connect to other eclipse plugin repositories fine; it seems that only my company's internal one is the problem.

    Read the article

  • php vs python. scalability

    - by Quamis
    Why is PHP considered more scalable than python? I've heard may times that one of the reasons PHP is "better" than python is that PHP is more easily scalable, and that Yahoo proves that(assumig Yahoo still uses PHP). Whats the difference between PHP and Python when it comes to scalability? -- edit -- well, i have no evidence, the question arose after a discussion with a friend. -- edit2 -- here: http://www.oreillynet.com/ruby/blog/2007/09/7%5Freasons%5Fi%5Fswitched%5Fback%5Fto%5Fp%5F1.html , even if this dosent say anything about scaling..

    Read the article

  • Flash to PHP base64 encode/decode

    - by Gus
    I'm using AS3 to base64 encode a JPG and pass it to Javascript. I'm attempting to use AJAX to pass that base64 encoded string to PHP and have PHP decode it. (I know I could send it back to Flash and Flash could decode it and send it to PHP, but I'm trying to eliminate the need for Flash on the decoding end). It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm, as PHP evaluates it as a base64 encoded object, but does not seem to output it properly. Is there a way to rectify this problem? Note: Please no posts about not needing Javascript. Javascript is a necessary step for reasons not detailed here.

    Read the article

  • Yii include PHP Excel

    - by Anton Sementsov
    Im trying include PHPExcel lib to Yii, put PHPExcel.php in root of extensions, near PHPExcel folder and added that code into config/main.php // application components 'components'=>array( 'excel'=>array( 'class'=>'application.extensions.PHPExcel', ), modify /protected/extensions/PHPExcel/Autoloader.php public static function Register() { $functions = spl_autoload_functions(); foreach($functions as $function) spl_autoload_unregister($function); $functions=array_merge(array(array('PHPExcel_Autoloader', 'Load')), $functions); foreach($functions as $function) $x = spl_autoload_register($function); return $x; }// function Register() Then, trying create PHPExcel object $objPHPExcel = new PHPExcel(); but have an error: include(PHPExcel.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in Z:\home\yii.local\www\framework\YiiBase.php(418)

    Read the article

  • OpenSSL not listed under PHP modules but shows up in the configure command

    - by Lauren
    PHP 5.2.12 OS X 10.5.8 If I compile PHP from source with the following configure command ./configure --disable-all --with-openssl=shared,/opt/local it succeeds. However, after a make and make install, php -m does not list the openssl module. Based on what I've read, I think it may be due to multiple installs of the openssl library. Installing the latest version of openssl from source and trying to specify the path in the configure command, --with-openssl=/usr/local, always results in the following error: Undefined symbols: "_EVP_CIPHER_CTX_block_size", referenced from: _zif_openssl_seal in openssl.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [sapi/cgi/php-cgi] Error 1 I've tried a few different variations on the path with no luck. Based on http://blog.yimingliu.com/2009/02/24/missing-library-symbols-while-compiling-php-528/, I've also tried editing the Makefile so that MH_BUNDLE_FLAGS comes later in the compilation line. After spending a good portion of the day on this issue, I'm at a loss. Any suggestions?

    Read the article

  • jquery $.ajax to php problem

    - by Pouya
    hi.i have two problems with jquery $.ajax. first problem is ihave a php file named action.php and here the code: if($_GET['action']=='add'){ //rest of the code here } And i use jquery $.Ajax function to call that when form fills: $.ajax({type:"POST", url:"action.php?action=add", data:$("#form").serialize(), cache:false, timeout:10000}); this works but i wanted to know is there anyway to send the action=add code with data and not the url? and the second problem that i have is that i have a link: <a href="#" onclick="delete(4);">delete row from mysql where id is 4</a> and a jquery function: function deleteUser(id){ $.ajax({type:"POST", url:"action.php?action=delete", data:"id="+id, cache:false, timeout:10000});} and of course the action.php code: if($_GET['action']=='deletestudent'){ mysql_query("DELETE FROM `students` WHERE `student_id` = {$_POST['id']}"); } but it doesn't work.what should i do?

    Read the article

  • Upload 1GB files using chunking in PHP

    - by rjha94
    I have a web application that accepts file uploads of up to 4 MB. The server side script is PHP and web server is NGINX. Many users have requested to increase this limit drastically to allow upload of video etc. However there seems to be no easy solution for this problem with PHP. First, on the client side I am looking for something that would allow me to chunk files during transfer. SWFUpload does not seem to do that. I guess I can stream uploads using Java FX (http://blogs.sun.com/rakeshmenonp/entry/javafx_upload_file ) but I can not find any equivalent of request.getInputStream in PHP. Increasing browser client_post limits or php.ini upload or max_execution times is not really a solution for really large files (~ 1GB) because maybe the browser will time out and think of all those blobs stored in memory. is there any way to solve this problem using PHP on server side? I would appreciate your replies.

    Read the article

  • jquery repeat process once get reply from php file

    - by air
    i have one php file which process adding of record in Database fro array. for example in array i have 5 items aray an='abc','xyz','ert','wer','oiu' i want to call one php file in j query ajax method um = an.split(','); var counter = 0; if(counter < uemail.length) { $("#sending_count").html("Processing Record "+ ecounter +" of " + an.length); var data = {uid: um[counter] $.ajax({ type: "POST", url: "save.php", data: data, success: function(html){ echo "added"; counter++; } what it do, it complete all the prcess but save.php is still working what i want after one process it stop untill process of save.php complete then it wait for next 10 sec and start adding of 2nd element. Thanks

    Read the article

  • How to get XDebug working on Mac command line PHP

    - by Eugene M
    I recently installed Zend Server Community Edition on a Mac with Snow Leopard. I can't get XDebug to work ... it shows up in the output for phpinfo from a web browser, but when I var_dump() a variable, there is no special output, and when I run phpunit, code coverage reports aren't generated. Also when I type php -m at the command line, there is nothing for XDebug. I suspect that it's because the Mac is running the executable of PHP that was bundled with it instead of the executable of PHP that came with the Zend Server install. When I type /usr/local/zend/bin/php -m, XDebug does show up. I followed the instructions at http://akrabat.com/php/some-notes-on-zend-server-ce-for-mac-os-x/. Also I downloaded the xdebug.so from the Komodo web site. Zend Debugger and all other Zend extensions are disabled. So how can I get XDebug working correctly?

    Read the article

  • Can one .PHP file edit another?

    - by Ole Jak
    So I have a file for constants. I want to let user define them and then edit my .php filr with that global constants (not xml - real PHP file ) With such code for example <?php // Database Constants define("DB_SERVER", "localhost"); define("DB_USER", "root"); define("DB_PASS", "000000"); define("DB_NAME", "cms"); ?> How to edit this .php file from another PHP file? Is it possible? Btw in future I want to implement not only constants redefining but some smart code that will be able to modify itself.

    Read the article

  • Need to eliminate GOTO in PHP script but dont know how

    - by DomingoSL
    Hello i have this code: <?php include("/LIB/error.php"); session_start(); if (isset($_POST['Submit1'])) { if (!isset($_SESSION['token'])) {goto dale;} if((time() - $_SESSION['token']) < 5) { error('Debes esperar 5 segundos para poder enviar otra informacion.'); } else { dale: $_SESSION['token'] = time(); include("/LIB/HeadSQL.php"); include("/LIB/comprueba.php"); } } ?> I want to eliminate the GOTO instruction (because as you know is supported only in the last versions of php) in order to make more compatible my code, but i really cant figure out how to change the flow of the code without the GOTO. Thanks for your help.

    Read the article

  • Ending php sessions for debugging purposes

    - by Bill Zimmerman
    Hi, This might be very easy to do, but I haven't been able to figure it out. Basically, I have a loosely couple web-app written in python and php. The python code uses PHP sessions (generated from the PHP app when the user logs in) to check if the user is logged in/has permission to access the given python resource. My question is this: What is the easiest way to force all active sessions to timeout. I would like to do this for debugging purposes, to test out the python code. I tried changing the session.max_lifetime PHP variable, but that still doesn't guarantee that the session has ended and is removed. I tried just deleting the file, but this seems to cause problems (when i refresh the php page, errors show up in my apache logs and it won't reload quickly) Any ideas?

    Read the article

  • PHP code to convert text blocks indented by four spaces into a <pre><code> block [Markdown]

    - by Alfonso
    Hi, I'm not very good at PHP and would like to have a PHP function which turns this (text block indented by four spaces): printf("goodbye world!"); /* his suicide note was in C */ Into this: <pre><code> printf("goodbye world!"); /* his suicide note was in C */</code></pre> This is what Markdown does. I found this PHP port of Markdown (see function doCodeBlocks()), but I don't want to use the entire Markdown file, I just want this one function. Can someone provide me with the minimal PHP code required to get this to work? So I can do this: <?php echo markdownPre('Here goes some code: var x = 1, y = 2; alert(x + y); That should be a pre block.'); ?>

    Read the article

  • Evaluating php generated javascript "inline"?

    - by talkingnews
    If you look at the source of this page http://kingston.talking-newspapers.co.uk/ you will see a large amount of inline javascript near the top. I don't really want all this extra stuff floating around in my page source, I'd much rather get it off into a script tag, and then I can minify it and all sorts. If I call it as a php file, this SHOULD work in theory, I just end the js file extension with php instead, and in the header I put the following: header("Content-type:application/x-javascript"); but... a lot of the php variables used to generate the playlist within the javascript are setup at the beginning of the main index.php file, and in calling this php-generated js playlist file like this, it seems to evaluate it entirely separately, so it's full of errors. The only way round it I can think of is to have the page write a file, then immediately read it in. The other thing is, the playlist is likely to change often and dynamically, so I think I need to get minify to NOT cache it?

    Read the article

  • Email php isn't working, please help?

    - by laurence-benson
    Hey Guys, My email code isn't working, can anyone help? Thanks. <?php if(isset($_POST['send'])){ $to = "[email protected]" ; // change all the following to $_POST $from = $_REQUEST['Email'] ; $name = $_REQUEST['Name'] ; $headers = "From: $from"; $subject = "Web Contact Data"; $fields = array(); $fields{"Name"} = "Name"; $fields{"Email"} = "Email"; $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } $subject2 = "Thank you for contacting us."; $autoreply = "<html><body><p>Dear " . $name . ",</p><p>Thank you for registering with ERB Images.</p> <p>To make sure that you continue to receive our email communications, we suggest that you add [email protected] to your address book or Safe Senders list. </p> <p>In Microsoft Outlook, for example, you can add us to your address book by right clicking our address in the 'From' area above and selecting 'Add to Outlook Contacts' in the list that appears.</p> <p>We look forward to you visiting the site, and can assure you that your privacy will continue to be respected at all times.</p><p>Yours sincerely.</p><p>Edward R Benson</p><p>Edward Benson Esq.<br />Founder<br />ERB Images</p><p>www.erbimages.com</p></body></html>"; $headers2 = 'MIME-Version: 1.0' . "\r\n"; $headers2 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers2 .= 'From: [email protected]' . "\r\n"; mail($from, $subject2, $autoreply, $headers2); $send=false; if($name == '') {$error= "You did not enter your name, please try again.";} else { if(!preg_match("/^[[:alnum:]][a-z0-9_.'+-]*@[a-z0-9-]+(\.[a-z0-9-]{2,})+$/",$from)) {$error= "You did not enter a valid email address, please try again.";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); } if(!isset($error) && !$send) $error= "We have encountered an error sending your mail, please notify [email protected]"; } }// end of if(isset($_POST['send'])) ?> <?php include("http://erbimages.com/php/doctype/index.php"); ?> <?php include("http://erbimages.com/php/head/index.php"); ?> <div class="newsletter"> <ul> <form method="post" action="http://lilyandbenson.com/newletter/index.php"> <li> <input size="20" maxlength="50" name="Name" value="Name" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;"> </li> <li> <input size="20" maxlength="50" name="Email" value="Email" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;"> </li> <li> <input type="submit" name="send" value="Send" id="register_send"> </li> </form> <?php ?> </ul> <div class="clear"></div> </div> <div class="section_error"> <?php if(isset($error)) echo '<span id="section_error">'.$error.'</span>'; if(isset($send) && $send== true){ echo 'Thank you, your message has been sent.'; } if(!isset($_POST['send']) || isset($error)) ?> <div class="clear"></div> </div> </body> </html>

    Read the article

  • PHP: Coding long-running scripts when servers impose an execution time limit

    - by thomasrutter
    FastCGI servers, for example, impose an execution time limit on PHP scripts which cannot be altered using set_time_limit() in PHP. IIS does this too I believe. I wrote an import script for a PHP application that works well under mod_php but fails under FastCGI (mod_fcgid) because the script is killed after a certain number of seconds. I don't yet know of a way of detecting what your time limit is in this case, and haven't decided how I'm going to get around it. Doing it in small chunks with redirects seems like one kludge, but how? What techniques would you use when coding a long-running task such as an import or export task, where an individual PHP script may be terminated by the server after a certain number of seconds? Please assume you're creating a portable script, so you don't necessarily know whether PHP will eventually be run under mod_php, FastCGI or IIS or whether a maximum execution time is enforced at the server level.

    Read the article

  • PHP and XSLTProcessor Misbehavior

    - by Aiden Bell
    Hi all, Simple question: Why is a PHP function called from an XSL Stylesheet just returning the last argument passed: foo.xsl: <xsl:template match="/"> <xsl:value-of select="php:function('date','c')" /> </xsl:template> PHP: ... $xsl = new XSLTProcessor(); $xsl->registerPHPFunctions(); $xsl->importStylesheet($fooStylesheet); echo $xsl->transformToXML($myXML); I Get the output c and if I call <xsl:value-of select="php:function('date')" /> I just get date as my output. Seems strange to me. Version info: PHP 5.3.2 libxslt Version 1.1.26 libxslt compiled against libxml Version 2.7.6 EXSLT enabled libexslt Version 1.1.26

    Read the article

  • How reliable are URIs like /index.php/seo_path

    - by Boldewyn
    I noticed, that sometimes (especially where mod_rewrite is not available) this path scheme is used: http://host/path/index.php/clean_url_here --------------------------^ This seems to work, at least in Apache, where index.php is called, and one can query the /clean_url_here part via $_SERVER['PATH_INFO']. PHP even kind of advertises this feature. Also, e.g., the CodeIgniter framework uses this technique as default for their URLs. The question: How reliable is the technique? Are there situations, where Apache doesn't call index.php but tries to resolve the path? What about lighttpd, nginx, IIS, AOLServer? A ServerFault question? I think it's got more to do with using this feature inside PHP code. Therefore I ask here.

    Read the article

  • conditional php help

    - by jeff
    How can I wrap this entire statement below in a condition? So If the variable $uprice = 0 then I don't want to to display any of the code below <?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item- >getWeeeTaxAppliedAmount()): ?> <?php echo $this->helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> <?php else: ?> <?php echo $this->helper('checkout')->formatPrice($_item- >getCalculationPrice()) ?> <?php endif; ?>

    Read the article

  • PHP - HTML Purifier - hello w<o>rld/world tutorial striptags

    - by JW
    I am just looking into using HTML Purifier to ensure that a user-inputed string (that represents the name of a person) is sanitized. I do not want to allow any html tags, script, markup etc - I just want the alpha, numeric and normal punctuation characters. The sheer number of options available for HTML Purifier is daunting and, as far as i can see, the docs do not seem to have a beggining/middle or end see: http://htmlpurifier.org/docs Is there a simple hello world tutorial online that shows how to sanitize a string removing all the bad stuff out of it. I am also considering just using strip tags: http://php.net/manual/en/function.strip-tags.php or PHP's in built data sanitizing http://us.php.net/manual/en/book.filter.php

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >