Search Results

Search found 11280 results on 452 pages for 'zend newbie dev'.

Page 18/452 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Is perfectionism a newbie's friend or enemy? [closed]

    - by Akromyk
    Possible Duplicate: Where do you draw the line for your perfectionism? I see that the development community is very focused on doing things the right way and personally I would like to do the same too, however, is it a good or bad idea for a newbie to focus on design principles, design patterns, and commenting code when getting started, or is it better to let creativity run wild and potentially write sloppy code. Where should a newbie draw the line?

    Read the article

  • ZF2: Get url parameters in controller

    - by koko
    I have experienced Zend Framework 1 and I've build some apps with that framework. Now, I'm experimenting Zend Framework 2, but I'm stuck on the url parameters. I've setup my routing like this: // Setup for router and routes 'Zend\Mvc\Router\RouteStack' => array( 'parameters' => array( 'routes' => array( 'default' => array( 'type' => 'Zend\Mvc\Router\Http\Segment', 'options' => array( 'route' => '/[:slug]', 'constraints' => array( 'slug' => '[a-zA-Z][a-zA-Z0-9_\/-]*' ), 'defaults' => array( 'controller' => 'Htmlsite\Controller\BootController', 'action' => 'index', 'slug' => 'home' ), ), ), 'home' => array( 'type' => 'Zend\Mvc\Router\Http\Literal', 'options' => array( 'route' => '/', 'defaults' => array( 'controller' => 'Htmlsite\Controller\BootController', 'action' => 'index', ), ), ), ), ), ), As you can see, I've tried to make a variable slug. How can I access this variable?

    Read the article

  • Calling MSSQL stored procedure from Zend Controller ? Any other approaches?

    - by Bhavin Rana
    MSSQL and DB, Zend as PHP Framework, I am using this way to call SP with I/P Parameters and to get O/p Parameters. It seems I am writing SQL code in PHP. Any other good approaches? $str1 = "DECLARE @Msgvar varchar(100); DECLARE @last_id int; exec DispatchProduct_m_Ins $DispatchChallanId,'$FRUNo',$QTY,$Rate,$Amount, ".$this->cmpId.",".$this->aspId.",".$this->usrId.",@Msg = @Msgvar OUTPUT,@LAST_ID = @last_id OUTPUT; SELECT @Msgvar AS N'@Msg',@last_id AS '@LAST_ID'; ";//Calling SP $stmt = $db->prepare($str1); $stmt->execute(); $rsDispProd = $stmt->fetchAll(); $DispatchProductId = $rsDispProd[0]["@LAST_ID"];//get last ins ID as O/p Parameter

    Read the article

  • xvidcap: Error accessing sound input from /dev/dsp

    - by stivlo
    I'm running Ubuntu 11.10 and I'm trying xvidcap to record a screencast with audio from the microphone, however it can't record any sound: $ xvidcap --file appo.avi --cap_geometry 700x500-0+0 Error accessing sound input from /dev/dsp Sound disabled! Sure enough /dev/dsp doesn't even exist: $ sudo ls -lh /dev/dsp ls: cannot access /dev/dsp: No such file or directory I found a blog post about fixing xvidcap sound input, however if I try the suggestion I get: $ sudo modprobe snd-pcm-oss FATAL: Module snd_pcm_oss not found. So the question is, how can I create /dev/dsp? The problem behind the problem is: how can I record sound from the microphone with xvidcap? So workarounds are welcome too. UPDATE: I've followed the suggestion of James, and something has improved. The error accessing /dev/dsp is gone, however now I get: [oss @ 0x8e0c120] Estimating duration from bitrate, this may be inaccurate xtoffmpeg.c add_audio_stream(): Can't initialize fifo for audio recording Now when I record xvidcap appears in the recording tab of pavucontrol and I can choose Audio stream from Internal Audio Analog Stereo or Monitor of Internal Audio Analog Stereo, I tried both just in case, but the video is still mute. UPDATE 2: I found that "Monitor of" is the one to record application sounds, while for microphone, I should choose "Internal Audio Analog Stereo". To rule out other problems, such as with the microphone, I tried with gnome-sound-recorder and it works. Actually I jumped on my chair, since the volume was too high! :-)

    Read the article

  • Missing /dev/xconsole causes rsyslog to stop as well as all other services

    - by George Van Tuyl
    We are running Ubuntu-10.04.04LTS in Hyper-V environments. We found that the services ssh http or anything else stopped because the rsyslog daemon had died with the message unable to find the /dev/xconsole file. I fixed it temporarily with the following. FILE=/dev/xconsole if [ -e $FILE ]; then echo "$FILE exists Carry on!" else mknod -m 640 /dev/xconsole c 1 3 chown syslog:adm /dev/xconsole echo "Created $FILE." fi The problem is that I can not get rsyslog daemon to process these 8 lines when I restart the daemon. Also restarting the daemon removes the /dev/xconsole file and we are back to all service stopped. In addressing this problem I have inserted the if--fi lines after the start and restart conditions in the rsyslog script. The problem is I do not get an echo to stdio. Does someone have an idea on how to make the rsyslog report to stdio when it creates the /dev/xconsole device. Thanks George Van Tuyl

    Read the article

  • Module configuration and layout configuration in zend framework.

    - by Prasanth P
    Hi all, I got some codes from other articles for configuring module and layout in zend framework. I tried with in my local. i didn't get different layout for default and admin module. Here is my code for configuring module and layout for zend framework. configs/application.ini [production] # Debug output phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 # Include path includePaths.library = APPLICATION_PATH "/../library" # Bootstrap bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" admin.bootstrap.path = APPLICATION_PATH "/modules/admin/Bootstrap.php" admin.bootstrap.class = "admin_Bootstrap" # Front Controller resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.env = APPLICATION_ENV # Session resources.session.name = "ZendSession" resources.session.save_path = APPLICATION_PATH "/../data/session" resources.session.remember_me_seconds = 86400 # Layout resources.layout.layout = "layout" resources.layout.layoutPath = APPLICATION_PATH "/layouts" admin.resources.layout.layout = "admin" admin.resources.layout.layoutPath = APPLICATION_PATH "/modules/admin/layouts" # Views resources.view.encoding = "UTF-8" resources.view.basePath = APPLICATION_PATH "/views/" resources.view[] = resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" resources.modules[] = resources.view[] = admin.resources.view[] = [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 application/Bootstrap.php <?php /** * Ensure all communications are managed by sessions. */ require_once ('Zend/Session.php'); Zend_Session::start(); class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { protected function _initDoctype() { $this->bootstrap( 'view' ); $view = $this->getResource( 'view' ); $view->navigation = array(); $view->subnavigation = array(); $view->headTitle( 'Module One' ); $view->headLink()->appendStylesheet('/css/clear.css'); $view->headLink()->appendStylesheet('/css/main.css'); $view->headScript()->appendFile('/js/jquery.js'); $view->doctype( 'XHTML1_STRICT' ); //$view->navigation = $this->buildMenu(); } /*protected function _initAppAutoLoad() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'default', 'basePath' => APPLICATION_PATH )); return $autoloader; }*/ protected function _initLayoutHelper() { $this->bootstrap('frontController'); $layout = Zend_Controller_Action_HelperBroker::addHelper( new ModuleLayoutLoader()); } public function _initControllers() { $front = Zend_Controller_Front::getInstance(); $front->addModuleDirectory(APPLICATION_PATH . '/modules/admin/', 'admin'); } protected function _initAutoLoadModuleAdmin() { $autoloader = new Zend_Application_module_Autoloader(array( 'namespace' => 'Admin', 'basePath' => APPLICATION_PATH . '/modules/admin' )); return $autoloader; } protected function _initModuleutoload() { $autoloader = new Zend_Application_Module_Autoloader ( array ('namespace' => '', 'basePath' => APPLICATION_PATH ) ); return $autoloader; } } class ModuleLayoutLoader extends Zend_Controller_Action_Helper_Abstract // looks up layout by module in application.ini { public function preDispatch() { $bootstrap = $this->getActionController() ->getInvokeArg('bootstrap'); $config = $bootstrap->getOptions(); echo $module = $this->getRequest()->getModuleName(); /*echo "Configs : <pre>"; print_r($config[$module]);*/ if (isset($config[$module]['resources']['layout']['layout'])) { $layoutScript = $config[$module]['resources']['layout']['layout']; $this->getActionController() ->getHelper('layout') ->setLayout($layoutScript); } } } application/modules/admin/Bootstrap.php <?php class Admin_Bootstrap extends Zend_Application_Module_Bootstrap { /*protected function _initAppAutoload() { $autoloader = new Zend_Application_Module_Autoloader(array( 'namespace' => 'admin', 'basePath' => APPLICATION_PATH . '/modules/admin/' )); return $autoloader; }*/ protected function _initDoctype() { $this->bootstrap( 'view' ); $view = $this->getResource( 'view' ); $view->navigation = array(); $view->subnavigation = array(); $view->headTitle( 'Module One' ); $view->headLink()->appendStylesheet('/css/clear.css'); $view->headLink()->appendStylesheet('/css/main.css'); $view->headScript()->appendFile('/js/jquery.js'); $view->doctype( 'XHTML1_STRICT' ); //$view->navigation = $this->buildMenu(); } } Please go through it and let me know any knows how do configure module and layout in right way.. Thanks and regards, Prasanth P

    Read the article

  • Installing Ubuntu 12.04.1 x64 with Fake RAID 1 [SOLVED]

    - by Arkadius
    I had: Software: Dual boot with Windows XP Ubuntu 10.04 LTS x32 Hardware Fake RAID 1 (mirroring) with 2x1 TB: Partition 1 - Windows Partition 2 - SWAP Partition 3 - / (root) Partition 4 - Extended Partition 5 - /home Partition 6 - /data arek@domek:/var/log/installer$ sudo fdisk -l Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000de1b9 Device Boot Start End Blocks Id System /dev/sda1 * 63 524297339 262148638+ 7 HPFS/NTFS/exFAT /dev/sda2 524297340 528506369 2104515 82 Linux swap / Solaris /dev/sda3 528506370 570468149 20980890 83 Linux /dev/sda4 570468150 1953118439 691325145 5 Extended /dev/sda5 570468213 675340469 52436128+ 83 Linux /dev/sda6 675340533 1953118439 638888953+ 83 Linux Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000de1b9 Device Boot Start End Blocks Id System /dev/sdb1 * 63 524297339 262148638+ 7 HPFS/NTFS/exFAT /dev/sdb2 524297340 528506369 2104515 82 Linux swap / Solaris /dev/sdb3 528506370 570468149 20980890 83 Linux /dev/sdb4 570468150 1953118439 691325145 5 Extended /dev/sdb5 570468213 675340469 52436128+ 83 Linux /dev/sdb6 675340533 1953118439 638888953+ 83 Linux arek@domek:/var/log/installer$ ls -l /dev/mapper/ total 0 crw------- 1 root root 10, 236 Oct 7 20:17 control lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha -> ../dm-0 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha1 -> ../dm-1 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha2 -> ../dm-2 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha3 -> ../dm-3 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha4 -> ../dm-4 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha5 -> ../dm-5 lrwxrwxrwx 1 root root 7 Oct 7 20:17 pdc_jhjbcaha6 -> ../dm-6 I wanted to upgrade from 10.04 x32 to 12.04 x64 using FRESH installation. So, run installation of Ubuntu 12.04.1 x64 LTS using alternate CD. During the installation I selected manual partitioning and to: - Use and Format / (root) - Use and Format SWAP - Use and Keep data on /home - Use and Keep data on /data After I clicked "Continue" I get error creating and formatting SWAP partition. I go to terminal with Alt + F2 (?) and hit enter. I discovered that there was visible RAID as only disk with NO partitions. Something like this: arek@domek:/var/log/installer$ ls -l /dev/mapper/ lrwxrwxrwx 1 root root 7 Oct 7 20:17 /dev/mapper/pdc_jhjbcaha -> ../dm-0 arek@domek:/var/log/installer$ ls -l /dev/dm* brw-rw---- 1 root disk 252, 0 Oct 7 20:17 /dev/dm-0 So I switched to log console Alt+F3 (?) and saw errors like below: Oct 7 14:02:45 check-missing-firmware: /dev/.udev/firmware-missing does not exist, skipping Oct 7 14:02:45 check-missing-firmware: /run/udev/firmware-missing does not exist, skipping Oct 7 14:02:45 check-missing-firmware: no missing firmware in /dev/.udev/firmware-missing /run/udev/firmware-missing Oct 7 14:02:45 anna-install: Installing dmraid-udeb Oct 7 14:02:45 anna[12599]: DEBUG: retrieving dmraid-udeb 1.0.0.rc16-4.1ubuntu8 Oct 7 14:02:49 anna[12599]: DEBUG: retrieving libdmraid1.0.0.rc16-udeb 1.0.0.rc16-4.1ubuntu8 Oct 7 14:02:49 anna[12599]: DEBUG: retrieving kpartx-udeb 0.4.9-3ubuntu5 Oct 7 14:02:49 disk-detect: Serial ATA RAID disk(s) detected. Oct 7 14:02:55 disk-detect: Enabling dmraid support. Oct 7 14:02:55 disk-detect: RAID set "pdc_jhjbcaha" was activated Oct 7 14:02:55 HERE --> dmraid-activate: ERROR: Cannot retrieve RAID set information for pdc_jhjbcaha Oct 7 14:02:56 check-missing-firmware: /dev/.udev/firmware-missing does not exist, skipping Oct 7 14:02:56 check-missing-firmware: /run/udev/firmware-missing does not exist, skipping Oct 7 14:02:56 check-missing-firmware: no missing firmware in /dev/.udev/firmware-missing /run/udev/firmware-missing Oct 7 14:02:57 main-menu[428]: DEBUG: resolver (libnewt0.52): package doesn't exist (ignored) Oct 7 14:02:57 main-menu[428]: DEBUG: resolver (ext2-modules): package doesn't exist (ignored) Oct 7 14:02:57 main-menu[428]: INFO: Menu item 'partman-base' selected Oct 7 14:02:57 kernel: [ 316.512999] NTFS driver 2.1.30 [Flags: R/O MODULE]. Oct 7 14:02:57 kernel: [ 316.523221] Btrfs loaded Oct 7 14:02:57 kernel: [ 316.534781] JFS: nTxBlock = 8192, nTxLock = 65536 Oct 7 14:02:57 kernel: [ 316.554749] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled Oct 7 14:02:57 kernel: [ 316.555336] SGI XFS Quota Management subsystem Oct 7 14:02:58 md-devices: mdadm: No arrays found in config file or automatically Oct 7 14:02:58 partman: No matching physical volumes found Oct 7 14:02:58 partman: No volume groups found Oct 7 14:02:58 partman: Reading all physical volumes. This may take a while... Oct 7 14:02:58 partman-lvm: No volume groups found Oct 7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha' Oct 7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha' Oct 7 14:02:58 partman: Error running 'tune2fs -l /dev/mapper/pdc_jhjbcaha' Oct 7 14:06:11 HERE --> partman: mkswap: can't open '/dev/mapper/pdc_jhjbcaha2': No such file or directory Oct 7 14:07:28 init: starting pid 401, tty '/dev/tty2': '-/bin/sh' Oct 7 14:15:00 net/hw-detect.hotplug: Detected hotpluggable network interface eth0 Oct 7 14:15:00 net/hw-detect.hotplug: Detected hotpluggable network interface lo As You can see there are 2 errors Oct 7 14:02:55 dmraid-activate: ERROR: Cannot retrieve RAID set information for pdc_jhjbcaha and Oct 7 14:06:11 partman: mkswap: can't open '/dev/mapper/pdc_jhjbcaha2': No such file or directory I looked in the internet and try to run command "dmraid -ay" and get something like that: dmraid -ay /dev/mapper/pdc_jhjbcaha -> Already activated /dev/mapper/pdc_jhjbcaha1 -> Successfully activated /dev/mapper/pdc_jhjbcaha2 -> Successfully activated /dev/mapper/pdc_jhjbcaha3 -> Successfully activated /dev/mapper/pdc_jhjbcaha4 -> Successfully activated /dev/mapper/pdc_jhjbcaha5 -> Successfully activated /dev/mapper/pdc_jhjbcaha6 -> Successfully activated Then I returned to installer with Alt+F1 (?) and click "Return" to return to partitioning menu. I did NOT change anything just selected again "Continue" and everything goes smoothly. I hope this will help someone. arkadius

    Read the article

  • Swap partition not recognized (The disk drive with UUID=... is not ready yet or not present)

    - by ladaghini
    I think I had an encrypted swap partition, because I chose to encrypt my home directory during the installation. I believe that's what the line with /dev/mapper/cryptswap1 ... in my /etc/fstab is all about. I did something to bork my swap because on the next boot, I got a message (paraphrased): The disk drive for /dev/mapper/cryptswap1 is not ready yet or not present. Wait to continue. Press S to skip or M to manually recover. (As a side note, pressing S or M seemed to do nothing different from just waiting.) Here's what I've tried: This tutorial on how to fix the swap partition not mounting. However, in the above, the mkswap command fails because the device is busy. So I booted from a live USB, ran GParted to reformat the swap partition (which showed up as an unknown fs type), and chrooted into the broken system to try that tutorial again. I also adjusted /etc/initramfs-tools/conf.d/resume and /etc/fstab to reflect the new UUID generated from formatting the partition as a swap. That still didn't work; instead of /dev/mapper/cryptswap1 not present, "The disk drive with UUID=[swap partition's UUID] is not ready yet or not present..." So I decided to start afresh as though I never had created a swap partition in the first place. From the Live USB, I deleted the swap partition altogether (which, again showed up in GParted as an unknown fs type), removed the swap and cryptswap entries in /etc/fstab as well as removed /etc/initramfs-tools/conf.d/resume and /etc/crypttab. At this point the main system shouldn't be considered broken because there is no swap partition and no instructions to mount one, right? I didn't get any errors during startup. I followed the same instructions to create and encrypt the swap partition, starting with creating a partition for the swap, though I think fdisk said a reboot was necessary to see changes. I was confident the 3rd process above would work, but the problem yet persists. Some relevant info (/dev/sda8 is the swap partition): /etc/fstab file: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda6 during installation UUID=4c11e82c-5fe9-49d5-92d9-cdaa6865c991 / ext4 errors=remount-ro 0 1 # /boot was on /dev/sda5 during installation UUID=4031413e-e89f-49a9-b54c-e887286bb15e /boot ext4 defaults 0 2 # /home was on /dev/sda7 during installation UUID=d5bbfc6f-482a-464e-9f26-fd213230ae84 /home ext4 defaults 0 2 # swap was on /dev/sda8 during installation UUID=5da2c720-8787-4332-9317-7d96cf1e9b80 none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 output of sudo mount: /dev/sda6 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) /dev/sda5 on /boot type ext4 (rw) /dev/sda7 on /home type ext4 (rw) /home/undisclosed/.Private on /home/undisclosed type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=cbae1771abd34009,ecryptfs_fnek_sig=7cefe2f59aab8e58) gvfs-fuse-daemon on /home/undisclosed/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=undisclosed) output of sudo blkid (note that /dev/sda8 is missing): /dev/sda1: LABEL="SYSTEM" UUID="960490E80490CC9D" TYPE="ntfs" /dev/sda2: UUID="D4043140043126C0" TYPE="ntfs" /dev/sda3: LABEL="Shared" UUID="80F613E1F613D5EE" TYPE="ntfs" /dev/sda5: UUID="4031413e-e89f-49a9-b54c-e887286bb15e" TYPE="ext4" /dev/sda6: UUID="4c11e82c-5fe9-49d5-92d9-cdaa6865c991" TYPE="ext4" /dev/sda7: UUID="d5bbfc6f-482a-464e-9f26-fd213230ae84" TYPE="ext4" /dev/mapper/cryptswap1: UUID="41fa147a-3e2c-4e61-b29b-3f240fffbba0" TYPE="swap" output of sudo fdisk -l: Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xdec3fed2 Device Boot Start End Blocks Id System /dev/sda1 * 2048 409599 203776 7 HPFS/NTFS/exFAT /dev/sda2 409600 210135039 104862720 7 HPFS/NTFS/exFAT /dev/sda3 210135040 415422463 102643712 7 HPFS/NTFS/exFAT /dev/sda4 415424510 625141759 104858625 5 Extended /dev/sda5 415424512 415922175 248832 83 Linux /dev/sda6 415924224 515921919 49998848 83 Linux /dev/sda7 515923968 621389823 52732928 83 Linux /dev/sda8 621391872 625141759 1874944 82 Linux swap / Solaris Disk /dev/mapper/cryptswap1: 1919 MB, 1919942656 bytes 255 heads, 63 sectors/track, 233 cylinders, total 3749888 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xaf5321b5 /etc/initramfs-tools/conf.d/resume file: RESUME=UUID=5da2c720-8787-4332-9317-7d96cf1e9b80 /etc/crypttab file: cryptswap1 /dev/sda8 /dev/urandom swap,cipher=aes-cbc-essiv:sha256 output of sudo swapon -as: Filename Type Size Used Priority /dev/mapper/cryptswap1 partition 1874940 0 -1 output of sudo free -m: total used free shared buffers cached Mem: 1476 1296 179 0 35 671 -/+ buffers/cache: 590 886 Swap: 1830 0 1830 So, how can this be fixed?

    Read the article

  • Which is easier to learn, Zend Framework, CakePHP or CodeIgniter?

    - by Kwame Boame
    I am new to programming but I know HTML, CSS and Jquery. I am a web designer but want to expand my skill to application development with frameworks. Specifically, PHP frameworks. I want to know which of the frameworks mentioned in the question is difficult to master. Also, my friend wants me to learn Ruby on Rails/ Python instead of PHP. What's your best advice for a newbie programmer who is looking to build online software/apps in the near future; say, after 3 months/6 months or a year of study and practice?

    Read the article

  • dojo.xhrPost and Zend Framwork action, no POST data, not using a form

    - by sims
    Hi all, I'm trying to send some data via dojo.xhrPost to an Zend Controller Action. I can see the data being sent in Firebug console. However, when inspecting the post data, the array is empty. I'm not sure if it is possible to send an arbitrary string of data via dojo.xhrPost without using a form. This is probably a very n00b mistake. In any case, I'll post my code here and see what you all think. In my layout script I have: <?php $sizeurl = $this->baseUrl() . '/account/uisize'; ?> function resizeText(multiplier) { if (document.body.style.fontSize == "") { document.body.style.fontSize = "1.0em"; } document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.1) + "em"; var size = document.body.style.fontSize; var xhrArgs = { url: "<?= $sizeurl; ?>", postData: size, handleAs: "text" } dojo.xhrPost(xhrArgs); } Then my action is: public function uisizeAction() { $this->_helper->viewRenderer->setNoRender(); $this->_helper->layout->disableLayout(); print_r($_POST); $request = $this->getRequest(); if ($request->isXmlHttpRequest()) { $postdata = $request->getPost(); print_r($postdata); if ($postdata) { $user = new Application_Model_DbTable_User(); $user->updateSize($postdata); } } } I'm pretty sure that post data from a form is an array with the form elements' names as the keys. When looking at the dojo.xhrPost examples on the dojo campus web site (http://docs.dojocampus.org/dojo/xhrPost second one to be precise), it looks as if I can just send a string of data. How do I access this data from a Zend Controller Action? I'm using ZF 1.10 and Dojo 1.4.2 Thanks for your help! PS I'd try to ask on one of the related questions, but I cannot seem to comment.

    Read the article

  • Zend Framework subdomain+subfolder router rewrite problem

    - by zf_novice
    I'm new to Zend Framwork and this is an issue I've been struggling for several hours already... I'm trying to chain Hostname and standard Route in order to get url with subdomain+subfolders ie.: http:// lang.mydomain.com/myapplication/public/controller http:// lang.mydomain.com/myapplication/public/controller/action (sorry for the empty space in the address, this site won't allow links) Basically what I have done in Bootstrap is: // add language to default route $routePath = new Zend_Controller_Router_Route( ':controller/:action/*', array('controller'=>'index','action' => 'index','module'=>'default') ); $routeHostname = new Zend_Controller_Router_Route_Hostname( ':lang.mydomain.com', array('lang'=>$lang) ); $frontController = $this->getResource('FrontController'); $router = $frontController->getRouter(); $router->addRoute('default', $routeHostname->chain($routePath)) $frontController->setRouter($router); it finds the route ok, but every time I generate url in view or layout by $this-url() <?php echo $this->url( array( 'controller'=> 'guestbook', 'action' => 'sign', 'lang' => Zend_Registry::get('lang'), ), 'default', true) ?>"> I get http:// lang.mydomain.com/controller instead of http:// lang.mydomain.com/myapplication/public/controller I've been trying to set baseUrl on front controller but no luck... Also I've tried the static route with myapplication/public or following standard route: 'myapplication/public/:controller/:action/*' - it result with "An error occurred Page not found Exception information: Message: No route matched the request" and empty request Is there any way to assembly subdomain with subfolder in Zend Framwork?? EDIT: I changed above to: $frontController->setBaseUrl('.'); // add language to default route $routePath = new Zend_Controller_Router_Route( 'quickstart/public/:controller/:action/*', array( 'controller'=>'index', 'action' => 'index', 'module'=>'default', ) ); and it works form me, although I'm not sure whether it's been correct approach...

    Read the article

  • Zend Framework how to echo value of SUM query

    - by Rick de Graaf
    Hello, I created a query for the zend framework, in which I try to retrieve the sum of a column, in this case the column named 'time'. This is the query I use: $this->timequery = $this->db_tasks->fetchAll($this->db_tasks->select()->from('tasks', 'SUM(time)')->where('projectnumber =' . $this->value_project)); $this->view->sumtime = $this->timequery; Echoing the query tells me this is right. But I can't echo the result properly. Currently I'm using: echo $this->sumtime['SUM(time)']; Returning the following error: Catchable fatal error: Object of class Zend_Db_Table_Row could not be converted to string in C:\xampp\htdocs\BManagement\application\views\scripts\tasks\index.phtml on line 46 Line 46 being the line with the echo in my view. I've been searching now for two days on how to figure this out, or achieve the same result in a different way. Tried to serialize the value, but that didn't work either. Is there somebody who knows how to achieve the total sum of a database column? Any help is greatly appriciated! note: Pretty new to zend framework...

    Read the article

  • Huge mysql table with Zend Framework

    - by Uffo
    I have a mysql table with over 4 million of data; well the problem is that SOME queries WORK and SOME DON'T it depends on the search term, if the search term has a big volume of data in the table than I get the following error: Fatal error: Allowed memory size of 1048576000 bytes exhausted (tried to allocate 75 bytes) in /home/****/public_html/Zend/Db/Statement/Pdo.php on line 290 I currently have Zend Framework cache for metadata enabled, I have index on all the fields from that table.The site is running on a dedicated server with 2gb of ram. I've also set memory limit to: ini_set("memory_limit","1000M"); Any other things that I can optimize? Those are the types of query that I'm currently using: $do = $this->select() ->where('branche LIKE ?','%'.mysql_escape_string($branche).'%') ->order('premium DESC'); } //For name if(empty($branche) && empty($plz)) { $do = $this->select("MATCH(`name`) AGAINST ('{$theString}') AS score") ->where('MATCH(`name`) AGAINST( ? IN BOOLEAN MODE)', $theString) ->order('premium DESC, score'); } And a few other, but they are pretty much the same. Best Regards

    Read the article

  • FlashBuilder 4 and Zend Framework error

    - by sig
    I am trying to use adobe flash builder 4 with a php service. I had it set up an older macbook running leopard, but just tried to set it up on my new laptop running snow leopard. I did all the same steps.. set the Flex Server to be PHP, set the web root and url. Then I go to Data-Connect To PHP and point it to a php file I have in my web root. It says it needs to install Zend, and claims it does so successfully, but then when I try to continue, I get an error. I don't understand.. this same setup works on my older laptop. (Yes, I checked the amf.production was false) Unable to retrieve operations and entities from the file Make sure that Zend Framework is installed correctly and the parameter "amf.production" is not set to true in the amf_config.ini file located in the project output folder. false), true);$default_config-merge(new Zend_Config_Ini($configfile, 'zendamf'));$default_config-setReadOnly();$amf = $default_config-amf;// Store configuration in the registryZend_Registry::set("amf-config", $amf);// Initialize AMF Server$server = new Zend_Amf_Server();$server-setProduction($amf-production);if(isset($amf-directories)) { $dirs = $amf-directories-toArray(); foreach($dirs as $dir) { // get the first character of the path. // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path $length = strlen($dir); $firstChar = $dir; if($length = 1) $firstChar = $dir[0]; if($firstChar != "/"){ // if the directory is ./ path then we add the webroot only. if($dir == "./"){ $server-addDirectory($webroot); }else{ $tempPath = $webroot . "/" . $dir; $server-addDirectory($tempPath); } }else{ $server-addDirectory($dir); } }}// Initialize introspector for non-productionif(!$amf-production) { $server-setClass('Zend_Amf_Adobe_Introspector', '', array("config" = $default_config, "server" = $server)); $server-setClass('Zend_Amf_Adobe_DbInspector', '', array("config" = $default_config, "server" = $server));}// Handle requestecho $server-handle();

    Read the article

  • Zend Framework or CakePHP?

    - by gorzan
    My group is going to attempt to build a new CMS from scratch, designed to serve the needs of our organization. It should be noted that none of us have any formal programming education, but we've picked up this and that from developing different websites, among others the one our community uses now. We've decided to program the new CMS in PHP, with total MVC seperation. Not wanting to re-invent all the little cogs and wheels needed for such a potentially large project as this, we've been looking into using a PHP framework, and some googling and blog-surfing landed us in a discussion: Zend vs Cake? Anyone have any useful input here? Also, any other tips for embarking on this project would be appreciated. (Except for suggestions for existing CMSes, we know they're out there.) EDIT: It seems I was a bit unclear. None of us are NEW to PHP - in fact, we all have fairly extensive experience from previous projects, including the current solution our community's website runs on which we built ourselves. The decision to not use an existing CMS is a very informed one, so although I appreciate all the good suggestions we really are going to do this ourselves. So. Zend vs Cake?

    Read the article

  • Problem with Zend Project

    - by Fincha
    Hello, i write a script and it works perfectly, on my local server. I have uploaded it on my server and now I getting this Problem Parse error: syntax error, unexpected '{' in /homepages/46/d319011794/htdocs/suche/public/index.php on line 18 an here is my index.php <?php error_reporting(E_ALL || E_STRICT); define('APPLICATION_PATH', realpath(dirname(__FILE__)) . '/../application'); set_include_path( APPLICATION_PATH . '/../library' . PATH_SEPARATOR . '../application/models' . PATH_SEPARATOR . get_include_path() ); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); new App_Connect(); try { //Line 18 require '../application/bootstrap.php'; } catch(Exception $exception) { echo "<html><body>Fehler beim bootstraping"; if(defined('APPLICATION_ENVIROMENT') && APPLICATION_EVIROMENT != 'production') { echo "<br><br>" . $exception->getMessage() . "<br>" . "<div align='left'>Stack Trace: " . "<pre> " . $exception->getTraceAsString() . "</pre></div>"; } echo "</body></html>"; exit(1); } Zend_Controller_Front::getInstance()->dispatch(); This is a Zend Project... so may be some one know what to do...

    Read the article

  • Setting routes in application.ini in Zend Framework

    - by Paul Watson
    I'm a Zend Framework newbie, and I'm trying to work out how to add another route to my application.ini file. I currently have my routes set up as follows: resources.router.routes.artists.route = /artists/:stub resources.router.routes.artists.defaults.controller = artists resources.router.routes.artists.defaults.action = display ...so that /artists/joe-bloggs uses the "display" action of the "artists" controller to dipslay the profile the artist in question - that works fine. What I want to do now is to set up another route so that /artists/joe-bloggs/random-gallery-name goes to the "galleries" action of the "artists" controller. I tried adding an additional block to the application.ini file (beneath the block above) like so: resources.router.routes.artists.route = /artists/:stub/:gallery resources.router.routes.artists.defaults.controller = artists resources.router.routes.artists.defaults.action = galleries ...but when I do that the page at /artists/joe-bloggs no longer works (Zend tries to route it to the "joe-bloggs" controller). How do I set up the routes in application.ini so that I can change the action of the "artists" controller depending on whether "/:gallery" exists? I realise I'm probably making a really stupid mistake, so please point out my stupidity and set me on the right path (no pun intended).

    Read the article

  • CLI include paths to run zend framework via cron

    - by summerg
    I wrote a command line utility using Zend Framework to do some nightly reporting. It uses a ton of the same functionality the accompanying site. It works great when I run it by hand, but when I run it on cron I have include path issues. Seems like it should be easily fixed with set_include_path, but maybe I'm missing something? My directory structure looks like this: /var/www/clientname/ application Globals.php commandline commandline_bootstrap.php public_html public_bootstrap.php library Zend In public_bootstrap.php I use set_include_path without a problem, relative to the current directory: set_include_path('../library' . PATH_SEPARATOR . get_include_path()); If I understand correctly, in commandline_bootstrap.php I need to put in the absolute path, so cron knows where everything is. My file starts like this: error_reporting(E_ALL); set_include_path('/var/www/clientname/library' . PATH_SEPARATOR . get_include_path()); require_once "../application/Globals.php"; But when I run it via cron I get the following error: PHP Fatal error: require_once(): Failed opening required '../application/Globals.php' (include_path='/var/www/clientname/library/') in /var/www/clientname/commandline/zfcli.php on line 11 I think PHP is accepting my new path, because when I run it command line and dump the phpinfo I can see: include_path = /var/www/clientname/library/:.:/usr/share/pear:/usr/share/php = .:/usr/share/pear:/usr/share/php I admit the syntax here looks a little strange, but I can’t figure out how to fix it. Any suggestions would be greatly appreciated. Thanks summer

    Read the article

  • UTF8 charset, diacritical elements, conversion problems - and Zend Framework form escaping

    - by imanc
    Hey, I am writing a webapp in ZF and am having serious issues with UTF8. It's using multi lingual content through Zend Form and it seems that ZF heavily escapes all of these characters and basically just won't show a field if there's diacritical elements 'é' and if I use the HTML entity equivalent e.g. é it gets escaped so that the user will see 'é'. Zend Form allows for having non escaped data, but trying to use this is confusing, and it seems it'd need to be used all over the place. So, I have been told that if the page and the text is in UTF8, no conversion to htmlentities is required. Is this true? And if the last question is true, then how do I convert the source text to UTF8? I am comfortable setting up apache so that it sends a default UTF8 charset heading, and also adding the charset meta tag to the html, but doing this I am still getting messed up encoding. I have also tried opening the translation csv file in TextWrangler on OSX as UTF8, but it has done nothing. Thanks! L

    Read the article

  • Receive JSON payload with ZEND framework and / or PHP

    - by kent3800
    I'm receiving a JSON payload from a webservice at my site's internal webpage at /asset/setjob. The following is the JSON payload being posted to /asset/setjob: [{"job": {"source_filename": "beer-drinking-pig.mpg", "current_step": "waiting_for_file", "encoding_profile_id": "nil", "resolution": "nil", "status_url": "http://example.com/api/v1/jobs/1.json", "id": 1, "bitrate": "nil", "current_status": "waiting for file", "current_progress": "nil", "remote_id": "my-own-remote-id"}}] This payload posts one time to this page. The page is not meant for viewing but parsing the JSON object for the id and current_status so that I can insert it into a database. I'm using Zend framework. HOW DO I receive this payload in Zend? Do I $_GET['json']? $_POST['job']? None of these seem to work. I essentially need to assign this payload to a php variable so that I can then manipulate it. I've tried: $jsonStrGet = var_dump($_GET); $jsonStrPost = var_dump($_POST); And I've tried: $response = $this-getResponse(); $body = $response-getBody(); Blockquote Any help would be much appreciated! Thanks.

    Read the article

  • Zend Framework - counting rows in select clause ?

    - by moogeek
    Hello! I'm investigating Zend Framework and currently stucked in counting resulting rows of sql query... Every method I try (from documentation and some blogposts and tutorials) returns an error (like Call to undefined function) or simply gives the incorrect value. I've tried this: $checkquery = $db->select() ->from('users', 'COUNT(*)') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=fetchRow($checkquery)->num; ...then this one: $checkquery = $db->select() ->from('users', '*') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=count($checkquery->fetchAll()); and even: $checkquery = $db->select() ->from('users', '*') ->where('login = ?', $login) ->where('password = ?', $password) ->query(); $checkrequest=$checkquery->fetchAll()->num; Also rowCount() and count(fetchRow()) and count(fetchAll()->toArray()). But always I got an error message or duplicate inserts in db in further insert function. So what is the correct way to do the resulting row calculation in select clause in Zend Framework 1.9 (I use this one) ?

    Read the article

  • Good Hosting Providers With Zend Framework Support

    - by manyxcxi
    I currently use ixwebhosting for my hosting services. They're cheap and work (most of the time). The databases are horribly slow, the servers are horribly slow, and their support (though usually prompt) is tough to deal with. That being said, they're cheap, I've got like 20 domains hosted in my account, none of them are high volume, and they work JUST good enough- until today. This isn't meant to be a condemnation of ixwh though. Their prices are very low for what they do offer and most things work just fine, most of the time. I need to be able to host web apps written with Zend Framework in a fairly easy fashion. The server performance can't be worse than what I've already had (a pretty low hurdle to clear), and I don't want to spend $30/mo. These are not money making websites- they're projects. My requirements are PHP 5.3, ZF support, MySQL databases, multiple domains- not much. Who should I look at, and who should I look out for? Also- I put this on SO instead of SF because of the Zend Framework specific requirement. If I'm wrong, do as you wish.

    Read the article

  • PHP / Zend Framework: Which object would handle a complex table join?

    - by Thomas
    I think one of the more difficult concepts to understand in the Zend Framework is how the Table Data Gateway pattern is supposed to handle multi-table joins. Most of the suggestions I've seen claim that you simply handle the joins using a $db-select()... Zend DB Select with multiple table joins Joining Tables With Zend Framework PHP Joining tables wthin a model in Zend Php Zend Framework Db Select Join table help Zend DB Select with multiple table joins My question is: Which object is best suited to handle this kind of multi-table select statement? I feel like putting it in the model would break the 1-1 Table Data Gateway pattern between the class and the db table. Yet putting it in the controller seems wrong because why would a controller handle a SQL statement? Anyway, I feel like ZF makes handling datasets from multiple tables more difficult than it needs to be. Any help you can provide is great... Thanks!

    Read the article

  • performance comparision between Zend Lucene and Java Lucene

    - by Carson
    Zend Lucene and Java Lucene are built in PHP and java repectively, and PHP language has a higher level than java. Just wondering How big the performance difference among these two, regarding to index building and data searching? Is it much more effective to let java create and rebuild index, and let php use the index?

    Read the article

  • Displaying locale percentage number with Zend Framework

    - by Ronedog
    Does anyone know how to display a percentage format based on the locale using the zend framework? I've tried this below and it doesn't work for some reason: $xx = Zend_Locale::getTranslation(null, 'PercentNumber'); // This outputs: "#,##0%" for locale 'en_us' $percentage = Zend_Locale_Format::getNumber(133.3678, array('number_format' => $xx, 'locale' => $lang_LOCALE)); The output of $percentage is 133.3678. Thanks.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >