Upload form problems on Mac web server with PHP

First time using a mac web server and I'm having a heck of a time getting a simple upload form to work in this environment. The errors I'm receiving are:
Warning: move_uploaded_file(/Library/WebServer/Documents/mydirectory/content/mwm/) [function.move-uploaded-file]: failed to open stream: Is a directory in /Library/WebServer/Documents/mydirectory/umin/uploadContent.php on line 66
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/private/var/tmp/php1pRrx5' to '/Library/WebServer/Documents/mydirectory/content/mwm/' in /Library/WebServer/Documents/mydirectory/umin/uploadContent.php on line 66
Usually this problem is resolved by changing permissions on the directory receiving the upload. I've already done that, and set the permissions to 777, though the problem still persists.
I'm basically defining my upload directory, and then moving the file thereafter:
define('UPLOAD_DIR', '/Library/WebServer/Documents/mydirectory/content/'. $category . '/');
move_uploaded_file($_FILES['uploadedFile']['tmp_name'], UPLOAD_DIR);
The rest of the script, without the move execution, works properly. Any help would be appreciated.
Message was edited by: LoopyChicken

BAH!
I had forgotten to add the name of the file to the move command:
Fix here:
move_uploaded_file($_FILES['uploadedFile']['tmp_name'], UPLOAD_DIR.$file);
Thanks.

Similar Messages

  • How to install Apache Web Server with PHP on Sun Solaris Sparc machine

    Hi,
    We are trying to install the Apache Web Server and the PHP package on a Sun Solaris Sparc machine running on SunOS 5.8. We are having compilation problems with the source code of both these packages.
    Does anybody know if there are ready solaris packages for Apache and PHP available from where we can download and install instead of source code compilation?
    Or any instructions / things to watch for when installing Apache with PHP (if anybody has tried installing Apache with PHP on Sun Solaris earlier) is most welcome.
    Thanks,
    Harish

    Apache should be bundled along with Solaris check in "/var/apache" in Solaris 8 and Solaris 9
    php is available at www.php.net
    I found an old document for installing PHP maybe this will help.
    Cheers
    -Dhruva
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++Installing PHP 3.x for Apache 1.x.x on Solaris
    Introduction
    This document describes how to install PHP for Apache on Solaris.
    You should have Apache installed before trying to install PHP.
    If you want to use PHP with MySQL then you must install MySQL first.
    Before we Begin
    1. These instructions assume that you have Apache installed according to instructions.
    Getting PHP
    1. You must be logged in as root to perform this installation.
    su root
    2. I save all my downloads in:
    /usr/local/dist
    If you don't already have one, you may need to create that directory now:
    mkdir /usr/local/dist
    3. You can get PHP 3.0.14 from here(www.php.net).
    cd /usr/local/dist
    ftp ftp.php.net
    cd pub/distributions
    bin
    get php-3.0.14.tar.gz
    bye
    Installing PHP
    1. We will install PHP in /usr/local/build, but use a tricky tar command
    to do it in on hit from the download directory:
    cd /usr/local/dist
    tar xvfz php-3.0.12.tar.gz -C ../build
    Compiling PHP
    1. First let's get where the action is:
    cd /usr/local/build/php-3.0.14
    2. You now have 3 options:
    * Simple PHP install without MySQL - goto step 3
    * Simple PHP install with MySQL - goto step 4
    * Custom PHP install - goto step 5
    3. Simple PHP install without MySQL. Next, jump to step 6.
    ./configure --with-apache=../apache_1.3.12
    4. Simple PHP install with MySQL. MySQL must be installed before you can configure PHP to use it. I recommend that MySQL should always be reachable with /usr/local/mysql. Even if you install it else where you
    should create a symbolic link from /usr/local/mysql. Otherwise the compiler can have problems finding the mysqlclient library. The command
    should look like this:
    ./configure with-mysql=/usr/local/mysql with-apache=../apache_1.3.12
    Next, jump to step 6.
    5. Custom PHP install. Take a look at the available configuration directives by using this command:
    ./configure --help
    6. Now we can make the PHP executable. This may take a while.
    make
    7. Now we install the PHP module with:
    make install
    Adding the PHP Module to Apache
    1. Now we have to setup Apache to include the PHP module:
    cd ../apache_1.3.12
    2. Re-configure Apache to use the PHP module. You should use your previous Apache configure command along with the PHP activate module directive.
    You can see your previous Apache configure command by doing:
    cat config.status
    You can configure Apache using the previous command with the added PHP module by doing:
    ./config.status --activate-module=src/modules/php3/libphp3.a
    If you used the simple Apache install from instructions the command will look like this:
    ./configure prefix=/usr/local/apache activate-module=src/modules/php3/libphp3.a
    3. Make and install Apache with PHP enabled:
    make
    4. We need to stop the server before installing the files:
    /usr/local/apache/bin/apachectl stop
    5. Now we can install the new binaries:
    make install
    6. Start apache again (now running the new php enabled version):
    /usr/local/apache/bin/apachectl start
    Setting Up PHP
    1. We have to tell Apache to pass certain file extensions to PHP. We do this in Apache's httpd.conf file.
    cd /usr/local/apache/conf
    2. Edit the httpd.conf file. If you do a search for php you will find a couple of commented out lines telling Apache to use the PHP module. You should uncomment them to look like this.
    AddType application/x-httpd-php3 .php3
    AddType application/x-httpd-php3-source .phps
    3. I prefer to use the extension .phtml, you can use whatever extension you like (even .html) by adding lines to httpd.conf like this:
    AddType application/x-httpd-php3 .phtml
    Check that it Works
    1. We have to restart Apache to make these changes take effect on the running server.
    cd /usr/local/apache/bin
    ./apachectl restart
    2. Apache should now be running with PHP enabled. The server version should include PHP/3.0b2.
    ./apachectl status
    Apache Server Status for dev.synop.com
    Server Version: Apache/1.3.9 (Unix) PHP/3.0.12
    Server Built: Oct 25 1999 00:37:07
    3. Now it is time to test PHP with a page. The simplest thing to do is create a page called test.php3. My file is here. This file contains the
    following text:
    <?php phpinfo(); ?>
    4. Point your browser at this file on the virtual host which you used:
    http://localhost/test.php3

  • I am using the "G Web Server" with Bridgeview 2.1. The problem I am having is that I have to

    restart the web server once every 2 to 3 days, or the web pages don't show the vi (images). Any ideas to trouble shoot - I dont know if the problem is related to my workstation hardware or a setting that needs to be tweaked on the G Web Server. Thank you.I am using a Pentium 233 machine/ Win 95. The PLC I am collecting info from is a GE Fanuc Series 9030 (?). Ethernet connection.

    restart the web server once every 2 to 3 days, or the web pages don't show the vi (images). Any ideas to trouble shoot - I dont know if the problem is related to my workstation hardware or a setting that needs to be tweaked on the G Web Server. Thank you.Hi,
    we are using the G Web Server with LabVIEW on a WinNT 4 machine. Up to now these works fine. Therefore I would recommend you to choose a more stable OS.
    Maybe you can try to programmatically restart the server every 2 days. Within LabVIEW you would do this by running "HTTP Server Control.vi". Unfortunatly all connections will be closed, thus be aware of that!
    Hope that helps
    chris

  • Need help setting up web server with WRT54GS

    Hello,
    I am trying to set up a web server with my linksys router. For the network settings, I have used 192.168.001.150 as my primary IP (192.168.1.150, all 3 numerical characters have to be filled in), 255.255.255.000 as my primary netmask and 192.168.001.001 (192.168.1.1) as my gateway. I have gone into my router and then enabled port fowarding for port 80 to 192.168.1.150 but I still cannot access my web server. What could be the problem?
    Any help would be greatly appreciated. I'm trying to set up this server so I can test scripts and things.

    bump

  • How to use webmail address book on Mac Mini Server with Lion Server.

    I have a Mac Mini Server with Lion Server installed; the webmail is setup and working but I can not get the address book to work.
    I have followed an instruction from this website on how to activate the address book icon in webmail but can not add any addresses.  Is there something that needs to be activatied before it will work?

    No, I didn't solve the problem. The monitor still goes to sleep with WIndows but not with my Mac Mini. About 8 months ago I basically wore out the power switch on my monitor so I bought a wireless power switch to shut it off at the outlet. The VX2835wm monitor itself is now starting to fail as well-- a couple of times it's gone through a weird sequence of flashing screen colors on power up and ended up in an overscan mode (that took me for ever to figure out how to fix). I have decided to replace my VX2835wm with a Dell u2412m once it fails for good partly because I really want to keep the 16:10 resolution (very hard to find these days) and partly because I want to see if a different make of monitor will go to sleep properly based upon my Mac Mini power down settings.

  • Uploading a file to the web server

    How can i upload a file to the web server using JSP.

    hello sir,
    Could U even tell me performance which one is better.
    U have mentioned that Multipartrequest is Complex for Beginers,
    but as far as performance is concerned which is better.
    If Taglib is used is it error Free , as I do not know much abt taglib.
    have just read a little abt it , have never created my own Custome Tag.
    Could U just Guide me which is the best site where I could get know a little abt Taglib.An easy tutorial where I could read and start working on My application.
    I have been given a Deadline. So Please help me man.
    If U have the source Code for Uploading of a File Please Cut Paste it.
    I have to finish the project on time .
    Please
    With Regards
    Eklavya

  • Problem connectivity of Web Dympro with SAP Netweaver

    Hi guys,
    I've a problem connectivity of Web Dympro with SAP Netweaver
    I installed Sap NW in a machine on the local network with IP 192.168.x.y, and I can connect to it without problems; I can use the portal and implement jobs in Visual Composer.  
    After installing Sap Developer Studio, I connected it successfully to the NW through the menu "Preferences->SAP j2EE engine" selecting the option "SAP J2EE is installed on remote hosts" and inserting IP address of the machine with NW (192.168.x.y) and port 3900.
    Using these parameters the logon works, in fact I can see the tab "J2EE engine".  
    The problem is that when I try to make the deploy, Web Dynpro asks me the SDM password  (that I'm sure I've inserted correctly) but it returns the following error to me:
    Deployment aborted
    Settings
    SDM host : SVR-NW
    SDM port : 50118
    URL to deploy : file:/C:/DOCUME1/Michele/IMPOST1/Temp/temp59548Welcome.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/Michele/IMPOST1/Temp/temp59548Welcome.ear
    Aborted: development component 'Welcome'/'local'/'LOKAL'/'0.2010.09.01.07.31.29':
    Caught exception while checking the login credentials for SAP J2EE Engine. Check whether the SAP J2EE Engine is up and running.
    com.sap.engine.deploy.manager.DeployManagerException: ERROR: Cannot connect to Host: [svr-nw] with user name: [Administrator]                     Check your login information.                     Exception is: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception while trying to get InitialContext. [Root exception is com.sap.engine.services.security.exceptions.BaseLoginException: Cannot authenticate the user.]
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.checkLoginCredentials.DMEXC)
    Deployment exception : The deployment of at least one item aborted
    I want to add that  I use Win XP Prof, and I set the same credentials (user "Administrator" and the correct password) I used on the machine where SAP NW is installed.

    Hi Michele,
    There were 2 cases I explained, and the second was the one in case your SDM was blocked. Did you try the first one?
    Anyways, here is something more that you can try to get it working. In case the SDM password is valid, did you log into the portal as the Administrator? If yes, then you must have been asked to change the password. If you did change the password there, login to the remoteGUI using the Master password (abcd1234) and change the password there also to the same password you use for Administrator on the Portal. Now try again.
    In case the above doesnt work, start the configtool.bat from \usr\sap\J2E\JC01\j2ee\configtool and go to secure store. Here define the J2E passwords again (the same new password you gave for the Administrator in the portal), save and restart the server. I think it would work then
    Hope that helps you out!
    Bye,
    Sameer
    P.S - the main thing is that the error you got was Authentication failure using the Administrator username. Thats why you have to make sure that the password for the SDM is the same as what you gave for the Administrator login in the portal. So after you login into the remoteGUI, CHANGE the password to what you have for the Administrator(just like the one in the portal).
    Message was edited by: Sameer Jagirdar

  • Event invitations not published to .mac web page with rest of calendar

    I've published a calendar to the .mac web server successfully, and the web page for the named calendar shows up fine in browsers at the appropriate URL.
    However, when I receive an invitation from somebody else, and accept it, and put it into that (published) calendar, that event does NOT get published to the web page. Any idea why?
    Example
    - Joe uses Google Calendar to invite me to a meeting
    - Google calendar sends me a .ics file in email
    - I open the .ics file (click in Apple Mail, which launches iCal)
    - I view the invitation in iCal; then change the status to "Accepted" (from Invited), and change the Calendar for this event to the Calendar I've published on .mac
    - (iCal properly notifies Joe via a reply .ics via email that I've accepted)
    - iCal is properly updating my schedule on .mac for all other events besides this meeting invitation; but the meeting invitation does not get pushed to the .mac web page for my calendar
    Item of note: In this use case, I am NOT the event Organizer; somebody else is. Is this why iCal doesn't do it? Or is there something I'm not setting correctly in iCal? Or...?
    This renders .mac-web-published calendars effectively useless, since a good share of my calendar is made up of people who email me .ics invitations, and (for various reasons) the person who manages my schedule has to use the .mac web UI for my calendar to know when she can dish out my time. (She doesn't actually put things in my schedule; just allots time.)
    HELP!
    PowerBook G4 Mac OS X (10.4.9)
    PowerBook G4   Mac OS X (10.4.9)  

    See also http://forums.adobe.com/thread/1133628

  • I just purchased the Mac Mini Server with the intention of replacing Lion Server with Lion for the first hard drive while installing Windows 7 thru Bootcamp on the second hard drive. Is it possible for me to do this? Thanks.

    I just purchased the Mac Mini Server with the intention of replacing Lion Server with Lion for the first hard drive while installing Windows 7 thru Bootcamp on the second hard drive. Is it possible for me to do this? Thanks.

    I would use Parallels or VMWare and use the second drive to hold the virtual machine. That way the VM only uses the space that it needs and you can still use the remainder of the drive for other things, not to mention that you would not need to reboot to run windows.
    Also Time Machine does not back up a boot camp partition.

  • Calling a Web Server with HTTP POST to retrieve XML in chunks

    Hi,
    I have to call a Web Server with the HTPP POST method by providing the user id and password. I am getting the xml as output from the web server in chunks. This is possible through net.HTTPUrlConnection Java Api. But does any body knows how to implement this through OSB.
    Regards,
    Anuj Maheshwari

    sample usage:
      CALL FUNCTION 'HTTP_POST'
        EXPORTING
          ABSOLUTE_URI                = IM_OFX_CONTROL_DATA-ADDRESS
          REQUEST_ENTITY_BODY_LENGTH  = RESPONSE_ENTITY_BODY_LENGTH
          RFC_DESTINATION             = IM_OFX_CONTROL_DATA-HTTP_RFCDEST
          USER                        = IM_OFX_CONTROL_DATA-HTTP_USER
          PASSWORD                    = IM_OFX_CONTROL_DATA-HTTP_PASSWORD
          BLANKSTOCRLF                = 'X'
        IMPORTING
          STATUS_CODE                 = STATUS
          STATUS_TEXT                 = STATUS_TEXT
          RESPONSE_ENTITY_BODY_LENGTH = RLENGTH
        TABLES
          REQUEST_ENTITY_BODY         = LT_REQUEST
          RESPONSE_ENTITY_BODY        = RESPONSE
          RESPONSE_HEADERS            = LT_RESPONSE_HEADERS
          REQUEST_HEADERS             = LT_HTTP_HEADERS
       EXCEPTIONS
            OTHERS                      = 1.
    Refer the programs:
    LFPIFF02            
    LOFXALSU04          
    LPRGN_URL_RESPONSEU01
    LSBCCU01            
    LSFTPU09            
    for some idea.
    regards,
    ravi

  • Mac Mini Server with Raid 1

    Hi,
    Is it possible to set up a Mac Mini Server with Raid 1 using only another mac computer such as a mac book?

    Yes- Colin Jeukens posted step by step instructions back a couple of months ago. Here it is again...
    Out of the box the mini comes without Raid. You have two identical HDs of 500Gb.
    I have just set it up as Raid1. You can't do this when you use the startup disk from the mini. And as you don't have a Superdrive ... you need to be creative. You need another Mac with Firewire.
    Step 1: Start the Mini in Target Mode. Press the T during start. In a few seconds the firewire logo will appear on your screen.
    Step 2: Go to your second Mac. Connect the firewire cable between second Mac and Mini.
    Step 3: On the second Mac start the disc utility. The two identical drives on your mini will show. Create a new Raid set (mirrored = Raid 1). Include both drives. Confirm the warning that all data on the mini will be lost.
    Step 4: Make sure your second Mac has CD/ DVD sharing option installed. This is tou use the superdrive to install OS X Server on the mini.
    Step 5: Shutdown both Macs
    Step 6: Start your second Mac in target mode. Make sure the firewire cable is still connected.
    Step 7: Start the Mini with the option key pressed.
    Step 8: Insert the OS X Server install disc in your second Mac.
    Step 9: wait till the drive logo apears om the Mini. Continue the install. Will take about an hour.
    Here is a link to the original post...
    http://discussions.apple.com/thread.jspa?threadID=2213470&tstart=0

  • Upload a csv file in application server with the specified codepage(Poland

    Hi,
    i want to upload a csv file in application server with the specified codepage ( for poland ) , please let me know how to use open dataset for that.?
    Anurag

    I would upload the file with transaction CG3Z in binary mode and do the code page translation with a report: read from server an save with different name.

  • Is it possible to upload large files through FTP to server with iWeb?

    Is it possible to upload large files through FTP to server with iWeb like for example with Cyberduck?
    I don't need to publish website with files, I just need to upload files on server. Can it be done somehow with iWeb?

    Here's some info about FTP...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Upload.html
    Make sure you are allowed to store files on your server. Most hosting services don't allow anything to be stored that can't be accessed via the internet. Check the fine print!

  • I recently (4 days ago) bought a Mac mini server with 10.7 lion; will I qualify for a free upgrade to Mountain Lion Server?

    How has Apple honoured buyers of other releases of OS X immediately before a new version was announced?

    omnomnomz wrote:
    How has Apple honoured buyers of other releases of OS X immediately before a new version was announced?
    I recently (4 days ago) bought a Mac mini server with 10.7 lion; will I qualify for a free upgrade to Mountain Lion Server?
    Mtn Lion not due out until the Summer, so no, you will not get a free upgrade.

  • Purchased mac mini server with lion, can i download lion for my macbookpro ?

    Hi,
    I bought a mac mini server with lion server. I have macbookpro with Snowleopard. Do i need to purchase Lion again to install in macbookpro ?
    I registered my mac mini with my apple id .. still when i check app store in my macbook it is asking me to purchase again.
    Can someone clarify ?
    - thanks LP.

    Yes. What came on your Mini cannot be installed on your other computers. You will have to purchase and download Lion for the MBP. If you wish to install Lion server on the MBP, then you will have to purchase and download Lion Server, too.

Maybe you are looking for