Tag Archives: php.ini

Can't save php.ini

I have PHP for FastCGI installed on Windows 7 through the Web Platform Installer. I need to edit php.ini to enable logging, but I’m not able to overwrite the existing file, apparently because something has it open and/or locked.
Stopping… Continue reading

Tagged , , , | 2 Comments

Extending the Session in PHP with gc_maxlifetime not working

I have the following code to extend my $_SESSION[] variables. They expire after around 2-3 hours.
I tried to extend to 22h by changing the session.gc_maxlifetime, but im still losing my session after a couple of hours.

//start sessions

Continue reading

Tagged , , | 1 Comment

Prevent access to files from Apache without .htaccess

(LAMP server configuration)
As a workaround for another problem, I need PHP to be able to access local files, but prevent these files from being served over http by Apache.
Normally, I would just use .htaccess to accomplish this, however… Continue reading

Tagged , , , | Leave a comment

How can I get php to execute NOT as the default apache user?

(LAMP server configuration)
As a workaround for another problem, I need PHP to be able to access local files, but prevent these files from being served over http by Apache.
Normally, I would just use .htaccess to accomplish this, however… Continue reading

Tagged , , , | Leave a comment

php webpayments pro install.php not working

I am trying to run php install.php for paypal webpayments pro. However when I try to do this from the command line on windows server 2003, by doing php -the directory- install.php it returns the error:

INSTALLATION ERROR: one or 

Continue reading

Tagged , , , | Leave a comment

How to debug browser hang during upload

I am writing a simple file uploader in CodeIgniter 2.0.2. Pasting code below.
Under certain conditions… the browser hangs during this upload and I get “waiting for localhost” in the browser status bar (identical behavior in FF and Chrome).
I Continue reading

Tagged , , , | Leave a comment

Php file uploading warning message

I need to upload a video file. Here’s my code

 if(($_FILES["file"]["type"]=="application/octet-stream") || ($_FILES["file"]["type"]=="video/x-ms-wmv"))
          {
        if($_FILES["file"]["error"] > 0)
          {
          echo "Error: ".$_FILES["file"]["error"]."<br />";

          }
        else if(file_exists("videos/" . $_FILES["file"]["name"]))
              {
              echo $_FILES["file"]["name"] . " already exists. ";
              }
            else
              {
              move_uploaded_file($_FILES["file"]["tmp_name"],"videos/".$_FILES["file"]["name"]);

        $filename=$_FILES["file"]["name"];
        

Continue reading

Tagged , , | 1 Comment

max_execution_time Alternative

So here’s the lowdown:
The client i’m developing for is on HostGator, which has limited their max_execution_time to 30 seconds and it cannot be overridden (I’ve tried and confirmed it cannot be via their support and wiki)
What I’m have… Continue reading

Tagged , , , , | Leave a comment

Solution for “Fatal error: Maximum function nesting level of '100' reached, aborting!” in PHP

I have made a function that finds all the URLs within an html file and repeats the same process for each html content linked to the discovered URLs. The function is recursive and can go on endlessly. However, I have… Continue reading

Tagged , , , , | 2 Comments

Configure XDebug for PHP

I want to debug PHP from NetBeans 7.1. My web server is IIS.
I’ve first of all discovered that NetBeans tries to use XDebug, downloaded it, copied DLL to appropriate folder. Now I would like to know how to configure… Continue reading

Tagged , , , | Leave a comment
3 pages