Need help publishing a php script

I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
The code looks like this now
<?php
$library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
When I press the register button on the page I get this message:
Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
on line 146
Warning: include_once() [function.include]: Failed opening
'Zend/Validate/Stringlength.php' for inclusion
(include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
on line 146
Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
on line 16
Before I had that file path I got this message:
Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
on line 4
Fatal error: require_once() [function.require]: Failed opening required
'Zend/Loader/Autoloader.php'
(include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
on line 4
I am renting a server from domainnameshop.com (in norway)
And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
It is on norwegian, but it is the button that sais registrer that triggers the errors.
I really need help on this, I can't find any solution on my own!

I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
The code looks like this now
<?php
$library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
When I press the register button on the page I get this message:
Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
on line 146
Warning: include_once() [function.include]: Failed opening
'Zend/Validate/Stringlength.php' for inclusion
(include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
on line 146
Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
on line 16
Before I had that file path I got this message:
Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
on line 4
Fatal error: require_once() [function.require]: Failed opening required
'Zend/Loader/Autoloader.php'
(include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
on line 4
I am renting a server from domainnameshop.com (in norway)
And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
It is on norwegian, but it is the button that sais registrer that triggers the errors.
I really need help on this, I can't find any solution on my own!

Similar Messages

  • Need help with Muse PHP (JavaScript error...email)

    Hey all....
    I searched and did not see an answer for this:
    I am exporting my Muse file to HTML and keep getting this error for my Contact Us page (email issue):
    "JavaScript Error:Form PHP Script is missing from web server, or PHP is not configured correctly or your web host provider.  Check if the form PHP script as been uploaded correctly, then contact your hosting provider about PHP configuration."
    What PHP version does MUSE support....5.1?  I contacted HostGator and they just updated my PHP to 5.5 and asked me what PHP MUSE needs. HostGator says 5.1 is old and they do not support 5.1. Can anyone help me?
    Also, when I try to check PHP with: http://my-site.com/scripts/form_check.php I just get an "oops" screen, but does not verify my PHP.????
    Thanks

    Difficult to debug without the URL for the form page on your site...
    Are you using the built-in File > Upload to FTP Host in Muse? Or did you use File > Export as HTML and uploaded with some other tool?
    Does http://<insert your domain name here>/scripts/museutils.js load anything? Or does it also give an "oops" screen? If it gives an "oops" screen, that would imply not all the exported files were uploaded to your server, they weren't uploaded to the correct location, or the permissions aren't set correctly.
    For forms Muse only requires PHP 4.1 or later. PHP version is not the issue.

  • Need help making a simple script for my webcam

    Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
    I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
    tell application "CamTwist" to activate
    delay 10
    tell application "Photo Booth" to activate
    that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
    Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!

    Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
    tell application "System Events"
    tell application "CamTwist" to activate
    delay 0.5
    --Press command+b which is a user defined hot key to load webcam
    key code 11 using command down
    end tell
    delay 0.5
    tell application "Photo Booth" to activate
    My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone.

  • [solved]Need help with a bash script for MOC conky artwork.

    I need some help with a bash script for displaying artwork from MOC.
    Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
    mocp -Q %file
    gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last  '/'?)
    A point in the right direction would be appreciated.
    thanks, d
    Last edited by dgz (2013-08-29 21:24:28)

    Xyne wrote:
    You should also quote the variables and output in double quotes to make the code robust, e.g.
    filename="$(mocp -Q %file)"
    dirname="${filename%/*}"
    cp "$dirname"/front.jpg ~/backup/art.jpg
    Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
    thanks for the tip.
    here it is, anyhow:
    #!/bin/bash
    filename=$(mocp -Q %file)
    dirname=${filename%/*}
    cp ${dirname}/front.jpg ~/backup/art.jpg
    then in conky:
    $alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
    thanks for the help.
    Last edited by dgz (2013-08-29 21:26:32)

  • Help downgrade a php script generated by FB back to the old Mysql way

    hey all
    i am a Flex developer who has written server side stuff with php scripts that were auto-generated by Flash Builder. These scripts use the Mysqli extention, which is not avilable on my shared hosting server. These scripts implement simple CRUD functions to a MySql database. Anyone who has used the data wizard will recognize these scripts.
    Just before i pay more bucks and move to a VPS server in order to enable Mysqli, is there anyone out there who can help me translate this script BACK to the old mysql way?
    much appriciated, Saar
    <?php
    class ClientService {
        var $username = "******";
        var $password = "******";
        var $server = "localhost";
        var $port = "3306";
        var $databasename = "rtdbcbx_saar";
        var $tablename = "clients";
        var $connection;
         * The constructor initializes the connection to database. Everytime a request is
         * received by Zend AMF, an instance of the service class is created and then the
         * requested method is invoked.
        public function __construct() {
            $this->connection = mysqli_connect(
                                    $this->server, 
                                    $this->username, 
                                    $this->password,
                                    $this->databasename,
                                    $this->port
            $this->throwExceptionOnError($this->connection);
         * Returns all the rows from the table.
         * Add authroization or any logical checks for secure access to your data
         * @return array
        public function getAllClient() {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            $rows = array();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            while (mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            mysqli_stmt_free_result($stmt);
            mysqli_close($this->connection);
            return $rows;
         * Returns the item corresponding to the value specified for the primary key.
         * Add authorization or any logical checks for secure access to your data
         * @return stdClass
        public function getClientByID($itemID) {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename where ClientID=?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'i', $itemID);       
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            if(mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              return $row;
            } else {
              return null;
         * Returns the item corresponding to the value specified for the primary key.
         * Add authorization or any logical checks for secure access to your data
         * @return stdClass
        public function createClient($item) {
            $stmt = mysqli_prepare($this->connection, "INSERT INTO $this->tablename (First, Last, Phone, Email, Chain, Branch, Kiosk, SubmitDate) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ssssssss', $item->First, $item->Last, $item->Phone, $item->Email, $item->Chain, $item->Branch, $item->Kiosk, $item->SubmitDate->toString('YYYY-MM-dd HH:mm:ss'));
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);    
            $this->throwExceptionOnError();
            $autoid = mysqli_stmt_insert_id($stmt);
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
            return $autoid;
         * Updates the passed item in the table.
         * Add authorization or any logical checks for secure access to your data
         * @param stdClass $item
         * @return void
        public function updateClient($item) {
            $stmt = mysqli_prepare($this->connection, "UPDATE $this->tablename SET First=?, Last=?, Phone=?, Email=?, Chain=?, Branch=?, Kiosk=?, SubmitDate=? WHERE ClientID=?");     
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ssssssssi', $item->First, $item->Last, $item->Phone, $item->Email, $item->Chain, $item->Branch, $item->Kiosk, $item->SubmitDate->toString('YYYY-MM-dd HH:mm:ss'), $item->ClientID);     
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);    
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
         * Deletes the item corresponding to the passed primary key value from
         * the table.
         * Add authorization or any logical checks for secure access to your data
         * @return void
        public function deleteClient($itemID) {
            $stmt = mysqli_prepare($this->connection, "DELETE FROM $this->tablename WHERE ClientID = ?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'i', $itemID);
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
         * Returns the number of rows in the table.
         * Add authorization or any logical checks for secure access to your data
        public function count() {
            $stmt = mysqli_prepare($this->connection, "SELECT COUNT(*) AS COUNT FROM $this->tablename");
            $this->throwExceptionOnError();
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_bind_result($stmt, $rec_count);
            $this->throwExceptionOnError();
            mysqli_stmt_fetch($stmt);
            $this->throwExceptionOnError();
            mysqli_stmt_free_result($stmt);
            mysqli_close($this->connection);
            return $rec_count;
         * Returns $numItems rows starting from the $startIndex row from the
         * table.
         * Add authorization or any logical checks for secure access to your data
         * @return array
        public function getClient_paged($startIndex, $numItems) {
            $stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename LIMIT ?, ?");
            $this->throwExceptionOnError();
            mysqli_stmt_bind_param($stmt, 'ii', $startIndex, $numItems);
            mysqli_stmt_execute($stmt);
            $this->throwExceptionOnError();
            $rows = array();
            mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            while (mysqli_stmt_fetch($stmt)) {
              $row->SubmitDate = new DateTime($row->SubmitDate);
              $rows[] = $row;
              $row = new stdClass();
              mysqli_stmt_bind_result($stmt, $row->ClientID, $row->First, $row->Last, $row->Phone, $row->Email, $row->Chain, $row->Branch, $row->Kiosk, $row->SubmitDate);
            mysqli_stmt_free_result($stmt);    
            mysqli_close($this->connection);
            return $rows;
         * Utility function to throw an exception if an error occurs
         * while running a mysql command.
        private function throwExceptionOnError($link = null) {
            if($link == null) {
                $link = $this->connection;
            if(mysqli_error($link)) {
                $msg = mysqli_errno($link) . ": " . mysqli_error($link);
                throw new Exception('MySQL Error - '. $msg);
    ?>

    hello derekmosdell, in case this question isn't related to volume of media content in firefox in particular, we probably won't be able to answer that. please refer to apple's support resources or discussion fora instead.
    thank you for your understanding!

  • Need help on lighttpd + php + fastcgi

    I am having one terrible time trying to get the above configured.  Every time I access a .php script I get a "No input file specified" error.  Pulling up .html pages works fine... just not .php.
    The following are installed:
    php 5.2.4-1, lighttpd 1.4.18-1, fcgi 2.4.0-2
    And here is the relevent section of the /etc/lighttpd/lighttpd.conf file:
    server.modules              = (
                                    "mod_rewrite",
                                    "mod_redirect",
                                    "mod_access",
                                    "mod_fastcgi",
                                    "mod_proxy",
                                    "mod_simple_vhost",
                                    "mod_compress",
                                    "mod_accesslog" )
    server.document-root        = "/data/srv/www/"
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    simple-vhost.server-root   = "/data/srv/www/vhosts/"
    simple-vhost.default-host  = "ncc1701a.test.adtran.com"
    simple-vhost.document-root = "/"
    $HTTP["host"] == "ncc1701a.test.xxxxx.com" {
      server.document-root = "/data/srv/www/vhosts/ncc1701a.test.xxxxx.com/"
    server.username             = "lighttpd"
    server.groupname           = "lighttpd"
    fastcgi.server             = ( ".php" =>
                                   ( "localhost" =>
                                       "socket" => "/tmp/php-fastcgi.socket",
                                       "bin-path" => "/usr/bin/php-cgi",
    fastcgi.debug = 1
    All the logs look good (I think)... just cannot get this to work.  If have spent the past six hours reading Google and cannot find anything.  Anyone have any answers?

    Well after about three days of tinkering I finally fixed the problem...
    My original /etc/php.ini did not have the "open_basedir" set... so it was not used.  But when I upgraded the php the new php.ini had a value in it.  Of course that value did not included the path to my scripts... so I added the path to my scripts as follows:
    open_basedir = /data/srv/www/:/tmp/:/usr/share/pear/
    And now everything works fine.

  • Need help to modify vb script used in XP for Windows 7

    Can somebody help me in modifying scripts that were used for Windows XP, to run on Windows 7.
    My friend advised me to change it to .ps1, but still some flaws..
    Cscript \\nologo ????  is used for what purpose ?

    Almost all VBScripts written to work in Windows XP will also work for Windows 7, so there's not much to modify (unless you have specific examples of scripts not working).
    Having said that, PowerShell is the future! It takes a bit more than to just change the file extension to .ps1 though (this may be why your scripts aren't working!).
    The VBScript-to-Windows PowerShell Conversion Guide
    http://technet.microsoft.com/en-us/library/ee221101.aspx
    C:\>cscript /?
    Microsoft (R) Windows Script Host Version 5.7
    Copyright (C) Microsoft Corporation. All rights reserved.
    Usage: CScript scriptname.extension [option...] [arguments...]
    Options:
     //B         Batch mode: Suppresses script errors and prompts from displaying
     //D         Enable Active Debugging
     //E:engine  Use engine for executing script
     //H:CScript Changes the default script host to CScript.exe
     //H:WScript Changes the default script host to WScript.exe (default)
     //I         Interactive mode (default, opposite of //B)
     //Job:xxxx  Execute a WSF job
     //Logo      Display logo (default)
     //Nologo    Prevent logo display: No banner will be shown at execution time
     //S         Save current command line options for this user
     //T:nn      Time out in seconds:  Maximum time a script is permitted to run
     //X         Execute script in debugger
     //U         Use Unicode for redirected I/O from the console
    C:\>
    Andreas Hultgren
    MCTS, MCITP
    http://ahultgren.blogspot.com/

  • Need Help With Custom Calculation Script

    Hey everyone.  I'm using Acrobat Pro X and stumbling a bit on the syntax for the following equation.  I need to add the value of "Cell1" & "Cell2" then add the value of "Cell3".  However,the value of "Cell3" is entered by the user and specifies a percentage of the sum of "Cell1 & "Cell2".  For example: If the user enters "3" into "Cell3" I need the returned value to be 3% of the sum of "Cell1" + "Cell2".  If the user enters "9" into "Cell3" I need the returned value for "Cell3" to be 9% of the sum of "Cell1 & Cell2" and the end result needs to be the sum of "Cell1+Cell2+Cell3".  In greater detail:
    If "Cell1" = $500, "Cell2" = $500 and "Cell3" = "3" then I need the returned value to be $1030.00.
    I hope this makes sense. Here's what I have so far but alas, it's not working.  Any help would be GREATLY appreciated.
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;
    // Get processing field value, as a number
    //var v3 = +getField("Cell3"/100).value;
    // Calculate and set this field's value to the result
    event.value = v3+(v1+v2);
    Thanks,
    Solan

    I posted an answer but realized it wasn't what you wanted. There is some confusion about what you want for Cell3. On the one hand, you say you want the user to enter a vaule in the field, but them you say you want its value to be calculated based on what the user enters and two other field values. It seems to me Cell3 should be the field that the user enters the percentage and the calculated field's (Cell4) script could then be:
    // Get first field value, as a number
    var v1 = +getField("Cell1").value;
    // Get second field value, as a number
    var v2 = +getField("Cell2").value;// Get processing field value, as a number
    // Get the percentage
    var v3 = +getField("Cell3").value;
    // Calculate and set this field's value to the result
    event.value = (1 + v3 / 100) * (v1 + v2);

  • Need help in writing the script in windows to read the file at runtime

    Hi All,
    I need a help with a Script. I need to read a filename from a directorty based on a specific format. I will be looking for the file in a directory that will have a file added to it each month. The script will need to go out to that directory determine the current month and Year and then grab that file based on the MONTHYEAR contained itn the file name and
    in the same script pass the filename to SQL Loader.
    The filename will consist of three parts VARIABLECONSTANTDATE.ext (example: FUELFILE11262007.txt: FUEL is a VARIABLE, FILE is constant, 11 two digit month, 26 two digit day,2007 four digit year.)
    I am stuck as how to how to read that into a string, find the file name and then pass that to sql loader.
    Any help much appreciated..
    Looking forward for your response.

    Use of External Tables will ease your problem...
    Here's what you can do:
    1. Create External tables (fuelfile.asc)
    2. Use Java code to read all filenames in a particular directory and store them in table
    3. Use PL/SQL block to loop through each filename in the table and write the file to the file of external table (fuelfile.asc)
    3.1 Transfer data from External table to main table
    Aalap Sharma :)

  • Need help in execution of script

    Dear experts,
    We have a central database 10g installed on windows server 2008. We have 47 sites and each site has its own database. We created Materialized views in central DB which collect data from all 47 sites. We have a script to refresh these Materialized views. The problem is this when one/ some sites down, the script halts/stop working at that specific point. We want a script which skip that specific (down) site. following is some part of the script.
    start "" /wait /min cmd.exe /c "echo.|sqlplus.exe -S system/password @E:\scripts\CMM\CMM_DIRECTION\CMM_DIRECTION_AFLAGDB.SQL"
    start "" /wait /min cmd.exe /c "echo.|sqlplus.exe -S system/password@rrdb @E:\scripts\CMM\CMM_DIRECTION\CMM_DIRECTION_SLAYELDB.SQL"
    start "" /wait /min cmd.exe /c "echo.|sqlplus.exe -S system/password@rrdb @E:\scripts\CMM\CMM_DIRECTION\CMM_DIRECTION_DWASERDB.SQL"
    (note: AFLAG, SLAYEL & DWASER specifying the site name). Please experts help me in this concern.

    Probably the wrong forum for this question.
    My guess would be that you need to add some sort of check to see if the site is up before running the refresh.
    What is meant by having the site down?
    What kind of script is this?
    If it's a batch script:
    Batch script to test if Oracle instance is up on windows 2003
    Use that and loop through a text files of entries to try to connect to.
    Or you could probably do everything in a PL/SQL stored procedure if links are setup.  Having little idea what is in those SQL scripts I can't say whether or not this would be a good idea.
    There it would be a matter of testing the link by querying dual through the link and handling the particular exception(s) of a bad link properly.
    It would also reduce dependency on several script files.
    Looping through the instances would also probably be easier through a procedure.

  • Need help with a basic script to resize image then resize the canvas

    I am new to photoshop scripting, and have come across a need to force an image to be 8"x10" at 300dpi (whether it is vertical or horizontal)
    I need to maintain the correct orientation in the file, so an Action will not work, I believe I have to implement a script to accomplish this.
    I have the below script so far, but I am not certain of how to input the variables / paramters
    doc = app.activeDocument;
    if (doc.height > doc.width) doc.resizeImage("2400 pixels","3600 pixels", "300", "BICUBIC");
    if (doc.height > doc.width) doc.resizeCanvas("2400 pixels","3000 pixels", "MIDDLECENTER");
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    if (doc.height < doc.width) doc.resizeCanvas(3000,2400,"MIDDLECENTER");
    When I run this script, I get the following error:
    Error 1245: Illegal argument - argument 4
    - Enumerated value expected
    Line: 5
    if (doc.height < doc.width) doc.resizeImage("3600 pixels","2400 pixels",300,"BICUBIC");
    The fact that its failing on lien 5 lets nme know that I have the "If" portions of my script correct, I just dont know how to accomplish the functions correctly.
    Any help would be appreciated!
    Thanks,
    Brian

    I know I'm late here but it seems to me your trying to automate a 8"x10 or 10"x8 300DPI  print.
    To do that you must first crop your image to a 4:5 aspect ratio to prevent distortion unless your shooting with a 4" by 5" camera.   I wrote a Plugin script a couple years ago that could help you do a centered crop.  You could do the whole process by recording a simple Photoshop action that uses two  Plugin Scripts only four steps would be needed.
    Step 1 Menu File>Automate>AspectRatioSelection  (My script based of Adobe Fit Image Plugin script) Set 4:5 Aspect ratio, center,  Rectangle, Replace, no feather. Llike Fit Image this script woks on both Landscape and Portrait images. The Selection will be correct for the images orientation.
    Step 2 Menu Image>Crop
    Step 3 Menu File>Automate>Fit Image set 3000 PX height and 3000 PX width the Image will be Resample so its longest side will be 3000 pixels.  Adobe Fit Image Plugin Script always uses BICUBIC resampling.  I have a modified version of Fit Image  that uses Bicubic Sharper whebndownsizing and BicubicSmoother when up sizing.
    Step 4 Menu Image>Size un check resample set resolution to 300 DPI.
    When you play the actions the Script Dialogs will not be displayed and the setting use when you recorded the action will ne used.
    The Plugin Script are included in my crafting actions package:
    http://www.mouseprints.net/old/dpr/JJMacksCraftingActions.zip
    Contains:
    Action Actions Palette Tips.txt
    Action Creation Guidelines.txt
    Action Dealing with Image Size.txt
    Action Enhanced via Scripted Photoshop Functions.txt
    CraftedActions.atn Sample Action set includes an example Watermarking action
    Sample Actions.txt Photoshop CraftedActions set saved as a text file. This file has some additional comments I inserted describing how the actions work.
    12 Scripts for actions
    My other free Photoshop downloads cam be found here: http://www.mouseprints.net/Photoshop.html

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • I need help making a backup script

    I'm trying to create this full system backup script that I plan to run manually. I have some commands to compress and extract my root directory and everything in it, but they're not complete because there are a few other features I would like to have. The problem is that I have no idea how to implement these specific features, and my googling of bash scripting documentation only left me confused and at square 1. This is what I have so far (just commands I can run in the terminal):
    To compress:
    sudo tar -cpf ~/archive.tar.gz / --exclude=/proc
    To extract & restore:
    sudo tar -xpf /home/agi/archive.tar.gz -C /
    I want this script to:
    1. allows me to run as
    sh ~/.bin/backup.sh [directory to back up]
    What I mean is there should be some sort of parameter in the script so that when I run it, I can choose whatever directory I want to compress rather than just be limited to just /.
    2. puts finished .tar.gz in my home directory (I plan to transfer the archive to external media or online later; this gives me the freedom to not need to have a specific drive connected to run the script). I already have this in the commands, but I just wanted to point out that this is important.
    3. names finished .tar.gz DD-MM-YY-backup.tar.gz where DD is day, MM is month, YY is year.
    4. the "sudo" part works correctly. That is, the script, when run, asks for a password and can be granted root permissions (or is granted root permissions in some other way) so that I can back up all parts of my system without these sorts of errors.
    5. shows some sort of progress indicator. Either a progress bar, shows the tar program output, or something that gives me an indication that the script is working and perhaps how long it will take. This one is really optional, for as long as the process is working properly then I'm ok. But if it is possible and not ridiculously complicated or difficult, it would be very nice.

    What I mean is there should be some sort of parameter in the script so that when I run it, I can choose whatever directory I want to compress rather than just be limited to just /.
    On my backup script, I specify $* which should accept any arguments passed to the script.. ex: $ ./backup.sh /source/folder /source/folder2.
    in the script:
    #!/bin/sh
    tar -cpf $HOME/$(date +%d%m%Y)-backup.tar.gz $* --exclude=/proc
    2. puts finished .tar.gz in my home directory (I plan to transfer the archive to external media or online later; this gives me the freedom to not need to have a specific drive connected to run the script). I already have this in the commands, but I just wanted to point out that this is important.
    In the above script, that is what the ~ or $HOME should do..
    3. names finished .tar.gz DD-MM-YY-backup.tar.gz where DD is day, MM is month, YY is year.
    Same thing, the above script should do the trick, you might want to modify the date parameters (check the date manual)
    4. the "sudo" part works correctly. That is, the script, when run, asks for a password and can be granted root permissions (or is granted root permissions in some other way) so that I can back up all parts of my system without these sorts of errors.
    You could put something to prevent the script from running unless you are root, or you could have it prompt for a password and use sudo within the script. I would recommend the first. Here is a code snippet:
    #Check for root
    if [ $(whoami) != "root" ]; then
    echo "Error: You cannot perform this operation unless you are root"
    exit 1
    fi
    5. shows some sort of progress indicator. Either a progress bar, shows the tar program output, or something that gives me an indication that the script is working and perhaps how long it will take. This one is really optional, for as long as the process is working properly then I'm ok. But if it is possible and not ridiculously complicated or difficult, it would be very nice.
    You might be able to use a similar program to tar, but with progress. Maybe someone else could shed some light here..
    Hope this helps...

  • Need help with Flash/PHP online form, please help, URGENT!

    ive made my online form with the scripts shown below, when i
    submit i dont get any errors... but i also dont receive any emails
    from the form, if you can see anything that ive done wrong please
    help me out..
    -------------------------------------------------------PHP
    mailer.php------------------------------------------------------------------
    <?php
    $fname = $_REQUEST["fname"];
    $mail = $_REQUEST["mail"];
    $add1 = $_REQUEST["add1"];
    $add2 = $_REQUEST["add2"];
    $add3 = $_REQUEST["add3"];
    $town = $_REQUEST["town"];
    $county = $_REQUEST["county"];
    $postcode = $_REQUEST["postcode"];
    $telephone = $_REQUEST["telephone"];
    $subject = $_REQUEST["subject"];
    $message = $_REQUEST["message"];
    $full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
    $message= $full_message;
    $fname = stripslashes($fname);
    $mail = stripslashes($mail);
    $add1 = stripslashes($add1);
    $add2 = stripslashes($add2);
    $add3 = stripslashes($add3);
    $town = stripslashes($town);
    $county = stripslashes($county);
    $postcode = stripslashes($postcode);
    $telephone = stripslashes($telephone);
    $subject = stripslashes($subject);
    $message = stripslashes($message);
    $subject = "Vision Ten Online Form ". $subject;
    if(isset($fname) and isset($mail) and isset($add1) and
    isset($add2) and isset($add3) and isset($town) and isset($county)
    and isset($postcode) and isset($telephone) and isset($subject) and
    isset($message)){
    mail("[email protected]", $fname, $mail, $add1,
    $add2, $add3, $town, $county, $postcode, $telephone, $subject,
    $message "From: $mail");
    ?>
    -------------------------------------------------------PHP-------------------------------- ----------------------------------
    -----------------------------------------------ACTIONSCRIPT
    for the
    form----------------------------------------------------------
    stop();
    System.useCodepage = true
    this.sent.onRelease = function () {
    my_vars = new LoadVars ();
    my_vars.fname = fname_box.text;
    my_vars.mail = mail_box.text;
    my_vars.add1 = add1_box.text;
    my_vars.add2 = add2_box.text;
    my_vars.add3 = add3_box.text;
    my_vars.town = town_box.text;
    my_vars.county = county_box.text;
    my_vars.postcode = postcode_box.text;
    my_vars.telephone = telephone_box.text;
    my_vars.subject = subject_box.text;
    my_vars.message = message_box.text;
    if (my_vars.fname !="" and my_vars.mail !="" and
    my_vars.add1 !="" and my_vars.town !="" and my_vars.county !="" and
    my_vars.postcode !="" and my_vars.telephone !="" and
    my_vars.subject !="" and my_vars.message !="") {
    my_vars.sendAndLoad("script/mailer.php", my_vars, "POST");
    gotoAndStop(2);
    } else {
    error_clip.gotoAndPlay(2);
    my_vars.onLoad = function (){
    gotoAndPlay(3);
    fname_box.onSetFocus = mail_box.onSetFocus =
    add1_box.onSetFocus = add2_box.onSetFocus = add3_box.onSetFocus =
    town_box.onSetFocus = county_box.onSetFocus =
    postcode_box.onSetFocus = telephone_box.onSetFocus =
    subject_box.onSetFocus = message_box.onSetFocus = function () {
    if (error_clip._currentframe !=1) {
    error_clip.gotoAndPlay(6);
    -----------------------------------------------ACTIONSCRIPT------------------------------- ---------------------------

    that php mail function looks suspect. that should be
    mail(to,subject,message,headers,parameters)

  • Need help with a FormCalc scripting

    I am new to FormCalc and need some help. I am creating an interactive PDF in which I need a FormCalc script code for the following situation. I need to have a check box initate a script in another field. For example; I have one numeric field for quanity ordered (user input) and a check box for an optional add-on. Once the check box for the add-on is selected; I need a third field to reflect the price of the add-on * the numeric value in the quanity field.
    ProductPrice     Product Quanity          Add-On                        Total Cost
    Pd1                    2                              ($300) check box            Product Price * Product Quanity  + Add-On Price (if clicked) * Product Quanity
    Can anyone help?

    That was helpful but I still can't see to get it work. In the form I am creating The field that needs to autocalc. is to be triggered by the user clicking an add-on box. I have the add-on checkbox values set as 1=check and 0=unchecked. The idea is that when the that box is checked, the "ItemTotal" field to be calculated will be triggered to then take the Quanity field and mulitply by 300. Below is the script I tried to use and the error message returned when the Add-on box is checked.
    if (Add-onBoxName == 1) then
         Quantity * 300
    Error message in Adobe Reader when box is checked:
    Script failed (language is formcalc, context is xfa[0].form[0].topmostSubform[0].Page2[0].Add-onCheckBox[0])
    script=if (Add-onCheckBox = = 1) then
    ItemTotal = Quantity * 300
    Error: syntax error near token '300' on line 4, column 0.

Maybe you are looking for

  • Wrong message type while sending response from TP

    Hi, We are simulating a scenario in which the host is sending a Rosetta over RNIF request to TP. The request is getting completed and acknowledgement is reaching the host properly. Now we are trying to send back a response from TP for the above reque

  • Problems printing to file in LR4

    I am trying to print a jpg to file in LR4. All the settings in the print module seem to be correct an I have done this before. I am print (to file) a 20X16 print at at 240 ppi  sharpening = standard  paper = glossy jpg quality = 100% . Printing to a

  • If I don't use iBooks Author, is there still a way of publishing interactive e-books to the iBooks store?

    If so, how; what format etc? Thanks in advance for your help.

  • Compilation Error of J2EE RI.....!!!

    import org.w3c.dom.*; ^ Sample.java:103: cannot resolve symbol symbol : class Document location: class com.store.Sample public Element getXML( Document document ) ^ Sample.java:103: cannot resolve symbol symbol : class Element location: class com.sto

  • Updating Quicktime to new version

    I've tried updating Quicktime to the new version but it will not update, I've tried following the removal tips, but the add/remove function cannot remove it I get the following reply "The Installer encountered an unexpected error installing this pack