php,permissions,wkhtmltoimageRelated issues-Collection of common programming errors


  • Taimoor
    php parse-error mybb
    I’m inserting this code in the <head> </head> for a mybb forum:<?php if(isset($_REQUEST[‘url’])): // <– only include jQuery if url set ?> <link rel=”stylesheet” href=”http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css” /> <script src=”http://code.jquery.com/jquery-1.8.3.js”></script> <script src=”http://code.jquery.com/ui/1.9.2/jquery-ui.js”></script> <script>$(function() {$( “#dialog-modal” ).dialog({height: 140,modal: true});});

  • lethalMango
    php
    Just a quick question – and I’m sure really basic!I have the following code:function checkThings($foo, $bar) {…if ($valid) {return $results;} else {return false;} }On the other end of this I am currently doing$check = checkThings($foo, $bar); if ($check === false) {echo “Error”; } else {echo $check; }Is writing the following the same?$check = checkThings($foo, $bar); if (!$check) {echo “Error”; } else {echo $check; }Which method is the preferred method if both are correct?Thanks 🙂

  • Nashi
    php soapui esb wso2esb wsf
    few days ago I started to work on my own WebServices. I decided to use WSO2 WSF/PHP framework and according to http://wso2.org/project/wsf/php/2.0.0/docs/manual.html created my first helloService. Here’s code:function greet($message) {$responsePayloadString = <<<XML<greetResponse>Hello Client!</greetResponse>XML;$returnMessage = new WSMessage($responsePayloadString);return $returnMessage; } $service = new WSService(array(“operations” => array(“greet”))); $service->repl

  • Hubert
    php header echo alert
    I have a system for users to apply for permit…when they select their permits they wish to retire, my system should be able to check if the meet the criteria or if they have applied for that permit before to prevent spam.However, i have a very big problem.If i put header(‘Location:s_success.php’); the alert wouldn’t appear. For example, because user can choose 1 or 2 or more permits, .ScenarioLets say the choose one permit which they are eligible to apply for and another permit which they are n

  • Darryl Hein
    php class object variable-variables
    Is something like the following possible in PHP?$blah = ‘foo1’;class foo2 extends $blah {//… }class foo1 {//… }This gives an error.I want to dynamically set $blah so I can extend whatever class I want.Edit: The reason for wanting to do this because I wanted to use a function out of another class in a related class. In the end it would have been something like:Final extends foo1 extends foo2 extends foo3 extends foo4 extends parent { … }In the end I decided to instantiate the other class wi

  • AME
    php rets
    Am a trying to create a PHP (PHrets) script that downloads all real estate listing information from a specific area and saves all of the listings data (CSV file and photos) on my web server. Note: A single listing may have up to 20 photos.I am using PHrets to retrieve MLS listing data and it works great for creating a CSV of data. However, I would like to modify this code to loop through each listing’s photos and download them onto my web server with the following name convention: MLSID-PHOTOID.

  • KoolKabin
    php class static member
    I am trying to access static member of a class.my class is:class A {public static $strName = ‘A is my name’public function xyz(){..}.. } //Since i have bunch of classes stored in an array $x = array(‘A’); echo $x::$strName;I am getting error while printing. How can i print ‘A is my name’

  • Michael Moussa
    php zend-framework phpunit zend-session
    I am getting numerous errors exactly like this one:Zend_Session_Exception: Session must be started before any output has been sent to the browser; output started in /usr/local/zend/share/pear/PHPUnit/Util/Printer.php/173When running my application’s test suite. This is with PHPUnit 3.5.10 and PHP 5.3.5.There is no mysterious, unexpected whitespace output that is causing this. I’ve determined that the “output being sent to the browser” is the actual output from the PHPUnit tests being executed.

  • PHPst
    java php regex pcre
    In PHP and Java, I applied /^[^\pL]*|[^\pL]*$/ to ???-A- and I got *A**. I applied a symmetric pattern and got an asymmetric result! Why? I wonder why its output is not *A*?Pattern says that every thing except letter in the end of string should be replaced by *, it’s also greedy and should replace all non-letter stuff together.Alos note in RegexBuddy I get *A* that is what I expect.Update: I simplified the question to focus my main concern.

  • Gordon
    php oop class
    I want to make a PHP class, lets say Myclass.php. Now inside that class I want to define just the class itself and some instance variables. But all the methods must come from a Myclass_methods.php file. Can I just include that file into the class body?I have good reasons why I want to seperate this. In short, I’ll have a backend in which I can change the business logic of a class, while all other things must remain untouched. The system maintains all the ORM and other stuff for me.But if this is

  • Newbie_Hewie
    permissions directory wix custom-action createfolder
    We’re using WiX to bundle up our ASP.NET code into an MSI installer, and we need to set the [ComputerName]\IIS_WPG group to have modify permissions on a folder (named “CO”) under the installation directory. The directory structure looks like this after installC:\inetpub\wwwroot\MyApp\COThe CO folder is actually part of the .NET solution file, and when the application is bundled into an MSI, the CO folder is included automatically because there are XML files underneath it which are marked as “Co

  • Soner Gönül
    c# asp.net-mvc permissions
    I have an ASP.NET MVC application which creates and returns a text file (> 100 MB in size). Calling the MVC application via a web browser works fine and it takes about 15 minutes to create the file and then return it.To schedule the creation of this file, I’ve created a C# console application that calls the above MVC application and makes it create the file and return it to the console application which writes it down to disk for later use. Running this console application works fine while using

  • TheNoob
    svn apache permissions
    I had a perfectly working svn+apache install where I was using per directory access control to restrict access to various parts of the repository. In particular, no one had access to the top level in the repository [/]. People had access to folders like [/www] etc. I was specifying these permissions in a file (svn-access-file).I had to move to a new machine. So I installed subversion-1.6.3 and httpd-2.2.11 on it, and modified the conf file to mimic the conf file on the old machine (and I copied

  • Sean M
    linux svn permissions
    I’ve been using SVN to track my projects, and I’ve run into a problem several times.svn: Directory “/programming/projects/mydirectory” containing working copy admin area is missingI bet you’re familiar with that one. What seems to be making this happen is when I try to “svn add” a directory that I don’t have write permission to. Instead of saying “you don’t have permission to do that, try something else,” SVN puts my working copy in a messed-up state where it can’t be updated or checked in. W

  • Alex
    python osx memory permissions
    I am writing code with python that might run wild and do unexpected things. These might include trying to save very large arrays to disk and trying to allocate huge amounts of memory for arrays (more than is physically available on the system).I want to run the code in a constrained environment in Mac OSX 10.7.5 with the following rules:The program can write files to one specific directory and no others (i.e. it cannot modify files outside this directory but it’s ok to read files from outside) T

  • learningOracle
    oracle security permissions user
    I’m a novice in administration and trying to improve security on our Oracle database.Currently, a non-privileged user can see a list of all other users in SQL Developer by expanding the “Other Users” icon, in the database navigation tree.How does one restrict privileges so users will only see those (other) users that have granted them a privilege on some object (rather than all users, whether privilege has been granted or not).Thanks.

  • jkhoffman
    wordpress permissions memcached wpmu
    I have a highly optimized WordPress multisite (WPMU) installation running on Amazon EC2, RDS, Nginx, PHP-FPM, APC, BatCache and Memcached.APC is only running at the PHP level, to cache opcodes, but I’m not using it for WordPress’s object cache. For that, I’m using BatCache+Memcached.All of this is running amazingly well, super fast under load, etc., but I just ran into an unexpected problem.I logged in as a test user, created a new blog, and when I logged into /wp-admin it told me I didn’t have

  • MoonLight
    c# asp.net file permissions download
    i have a handler for download files like below : using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.IO; using NiceFileExplorer.Classes;namespace NiceFileExplorer {/// <summary>/// Summary description for HandlerForMyFE/// </summary>public class HandlerForMyFE : IHttpHandler, System.Web.SessionState.IRequiresSessionState{private HttpContext _context;private HttpContext Context{get{return _context;}set{_context = value;}}public void Proce

  • Dylan Beattie
    c# .net security permissions system.io
    In C#, System.IO.File.Delete(filePath) will either delete the specified file, or raise an exception. If the current user doesn’t have permission to delete the file, it’ll raise an UnauthorizedAccessException.Is there some way that I can tell ahead of time whether the delete is likely to throw an UnauthorizedAccessException or not (i.e. query the ACL to see whether the current thread’s identity has permission to delete the specified file?)I’m basically looking to do:if (FileIsDeletableByCurrentUs

  • Ruben Bartelink
    permissions wix wix3
    I am new to WIX. I am using util:PermissionEx for creating ACLs. I can successfully set rights like read, write, read & execute but I am unable to find any information about setting Modify Permission. I have tried using “Append” attribute to achieve this functionality (this seems to be the only attribute that may do the desired) But using this, the following compilation error appears: “error CNDL0004: The util:PermissionEx element contains an unexpected attribute ‘Append’.”Could you please h

  • Don Rzeszut
    php permissions wkhtmltoimage
    Problem: running wkhtmltoimage from a browser (localhost/run.php) fails (doesn’t finish, generates a crash report) when pulling some sites (http://tmz.com is one). It seems to be related to plugins (DirectorShockwave for instance). Most sites work just fine from the browser (if not –disable-javascript fixes them)Environment: OSX 10.8, wkhtmltoimage 0.10.0 rc2, Chrome & FirefoxI’ve tried various combinations of settings (wkhtmltoimage –disable-plugins –load-error-handling ignore –disable

Web site is in building