SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    APC on Apache 64

    Hi there

    I am pretty new to Apache and PHP, so please be patient with me.

    I have installed the 64 bit version of Apache and PHP, and I cannot get the APC extension to work. The reason I need it is to be able to get a progress bar running for uploading files.

    Please help, if you can, with:
    - a way of getting APC to work; or
    - an upload progress bar that doesn't require APC.

    Thanks in advance.

  2. #2
    SitePoint Member
    Join Date
    Mar 2011
    Location
    Tyne & Wear
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We use a very simple flash application to upload files.

    very simple to make, gives you more client side control and allows for multiple file uploads, limiting filesize, resizing of images client side etc etc.

    Downside is the client requires flash installed.

    Be happy to help you build a flash app for this needed.

  3. #3
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the prompt reply, Dave.

    I wouldn't want you to go to too much trouble. Perhaps you can point me in the right direction, so I can download a script that's already made.

    Regards

    Mills

  4. #4
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,023
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    ?

    APC -> Alternative PHP Cache. Is there another use of the acronym I'm not aware of?

    Using flash to track progress is a different kettle of fish from getting the APC to work.

  5. #5
    SitePoint Member
    Join Date
    Mar 2011
    Location
    Tyne & Wear
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of APC's side features is a callback into the cache for upload progress. Same APC just a minor feature of it.

  6. #6
    SitePoint Member
    Join Date
    Mar 2011
    Location
    Tyne & Wear
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ill upload a demo flash application with source later tonight when I get home for you.

  7. #7
    SitePoint Member
    Join Date
    Mar 2011
    Location
    Tyne & Wear
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As promised, this is an early version of our file upload that I have released for public use.

    The flash application takes 2 parameters.

    uploadLocation : the location to send the files to, this is called for each file in turn. I suggest adding a PHP session id, or security cookie to this url if your protecting your upload system from the public, I have included a PHPSESSID in the example html for your reference. This url must be urlencoded.

    completedFunction : name of the javascript function to call once the upload is complete, this can be used to update your page, or redirect user to another page

    This wont work when run locally via the html file, for flash security reasons.

    Hope this helps, let me know if you have any issues.
    Attached Files Attached Files

  8. #8
    SitePoint Member
    Join Date
    Mar 2011
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Dave, for the file upload.

    I have only noticed this reply now, so I haven't tried it yet. I have been struggling with another Flash utility I downloaded called "in-a-flash Flash upload utility".

    I managed to get it working okay, but I am having a problem with my variables, and I was wondering if your utility will present the same problem.

    Just a quick overview of what I am trying to do: A user registers on the site (info is stored in Mysql database), then logs in. When they upload a file, it needs to go into a folder with their company name (a field that was originally entered in the registration form). I got this working by comparing the logged in user name from the cookie, and then comparing this with the database, and extracting the "company" info from that row in the database. By assigning a variable to this I am able to create a folder with the name of the logged in user's company.

    When I use the above mentioned flash utility, however, I cannot (for some reason - unknown to me) extract the info from the database anymore. Perhaps there is something I don't know about using Flash and Mysql together that is causing the problem??

    So, before I spend countless more hours fighting with another script, would you maybe be able to advise me if this problem will be the same with your script? Or if there is a good way of doing what I want to as described above?

    Thanks for all the help so far.

    Regards

    Mills

  9. #9
    SitePoint Member
    Join Date
    Mar 2011
    Location
    Tyne & Wear
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This will be due to security, the flash application will not be able to send your current session/coookie with its upload request, thats why I included the PHPSESSID in my example. You will have to include some token to a session so the upload script is able to process your user as you expect.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •