php,javascript,apache,securityRelated issues-Collection of common programming errors


  • Iain
    apache-2.2 php centos suphp
    We have a server that’s handling uploads. The memory limit is set at a ridiculously high level in php.ini (800 M).. however we have gd, which is managing the image resizing, but it is dying at about 60M of memory usage (our error log is reporting a fatal error at this stage).From all our Apache config files (CPanel/WHM managed), I can’t find a RLimitMem that’s set anywhere either.I’ve looked as well if there’s any limits set in our kernel, but can’t find anything there as well.Is there somethin

  • Haresh Vidja
    ubuntu php wordpress
    I have moved my server data PHP + WordPress and database(mysql) from one server to another server… All things working fine… but some time i got page blank in click submit button.. This problem occures some time ..I didnt get any error or fatal error in errorLog file and not get access entry in accsessLog file also on time of blank page.. Black page issue occurs some time on same taskSo how can I fix this problem..

  • Scott Pack
    apache-2.2 php centos
    So the same code works on my Ubuntu server but when I upload it to my dedicated hosting server running CentOS it seems to add an extra prefix of .:/usr/share/pear:/usr/share/php: I tried setting includepath to different things but it just doesn’t work. The file is in a directory called language in the same folder as the file that is including it and I’m using:include dirname(__FILE__).DIRECTORY_SEPARATOR.”language”.DIRECTORY_SEPARATOR.”storage.inc”; include dirname(__FILE__).”/language/language.

  • mike
    php cpanel pdo
    Getting this error: Fatal error: Class ‘PDO’ not foundHave these lines in php.ini:extension=pdo.so extension=pdo_sqlite.so extension=sqlite.so extension=pdo_mysql.soThis shows up in php.info()– –enable-pdo=shared’ ‘Have access to whm but there is no “software” tab from which to access easyapatche? Any suggestions??

  • Mahbubur R Aaman
    php centos zend-framework
    Shows PHP Fatal Errormain(): Failed opening required ‘Zend/Loader.php’I have installed ZF on /usr/share/phpzf command is working. I can create project and do other works using zf command. But while including the library path then shows the error.Am i missing something?

  • Passionate Developer
    apache-2.2 php
    I am getting below errors despite setting memory_limit in php.ini to 64mb:Fatal error: Out of memory (allocated 6291456) (tried to allocate 91284 bytes) in /home/favstayc/public_html/coverbuddy2/cake/libs/configure.php on line 1067What could I change to fix this issue?

  • BlaM
    php iis7 stdout stderr
    Okay, this is slowly getting annoying. I’m used to work with Apache Webservers and never had any of these problems. IIS seems to try to be intelligent – or whatever.Here’s my situation: My customer wants a PHP website and it is supposed to run on an Windows IIS webserver.For my development environment I could use my Apache – but just to be sure I want to do it with IIS, too. So I set up a dev-server with Windows Vista, all the latest Updates and installed IIS. Everything fine!I quickly found ins

  • WerkkreW
    apache-2.2 php varnish
    We recently migrated our site to a load balanced apache cluster behind varnish. Since that time a very small subset of users is reporting they cannot view any pages. I have narrowed the issue down quite a bit. This issue was not present before the move, the old infrastructure was a single large box.We are on Rackspace Cloud running 8 apache2 instances behind varnish 3.0 all load balanced using Rackspace Cloud load balancers (Zeus) and 2 mysql instances for a total of 10 servers, all linux.Use

  • Uvais Ibrahim
    php php-extensions pecl expect
    I got some serious error while installing expect extension in PHP.I ran sudo pecl install channel://pecl.php.net/expect-0.3.1I got error like this while running make,running: make /bin/bash /tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/libtool –mode=compile cc -I. -I/tmp/pear/temp/expect -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/include -I/tmp/pear/temp/pear-build-rootvXp7LZ/expect-0.3.1/main -I/tmp/pear/temp/expect -I/usr/include/php5 -I/usr/include/php5/main -I/u

  • Justin808
    php http httpd hostgator
    OK, so I’m uploading a 350meg zip file. The file one uploaded is unzipped and the contents are processed. The processing consists of reading in a data file, then copying and thumbnailing images, the adding data to a database. This is all once process start to finish. I can see in the log that the datafile is processed. I can see on the filesystem the thumbnails get created. But then it looks like the whole this starts over from scratch with blank post data and it fails.When I look at the httpd l

  • Jamal
    javascript jquery datetime plugin twitter
    I’ve built a Twitter plugin recently and was wondering if I could get some feedback on it. There is also a PHP side that grabs the actual tweets and I can post that code if it’s needed.http://jsfiddle.net/cKfDd/;(function ( $, window, document, undefined ) { /************************************* Plugin Functions *************************************/ /*************************************/ Plugin.prototype.init = function () {var params = [ ‘?user=’ + this.options.user,’&limit=’

  • adambender
    javascript best-practice
    I come from a Java background so my desire for proper unambiguous logging is strong. I prefer using the console to using some other gui widget however, in the browser I know that I can’t always count on the console to exist or for it to have all the levels I might like. To remedy this I worked up the following console sanitizer and I was curious what drawbacks it might have.function configureConsoleLog() {“use strict”;var logMethods = [ ‘trace’, ‘debug’, ‘log’, ‘info’, ‘warn’, ‘error’ ], i;if (!

  • palacsint
    javascript php google html5
    I am newbie at JavaScript, I am using PHP to get data from a MySQL database, and use the data to drop multiple markers into google map. Please give me some suggestion to my code, really appreciate for any your advice.<?php require_once ‘Common/system_start.php’; $sql=”select * from tab_mem order by sn desc “; $result= mysql_query($sql); $data=mysql_fetch_assoc($result); $row=mysql_num_rows($result);header(“Content-type: text/xml”);// Iterate through the rows, adding XML nodes for eachwhile (

  • Brandon Wamboldt
    javascript node.js
    I’m looking for some general feedback about the layout and structure of my code. Basically just any feedback, as I’m not super happy about this code, but I’m not sure how to improve it further.’use strict’;/* jshint node: true */var fs = require(‘fs’); var os = require(‘os’); var nodemailer = require(‘nodemailer’); var rimraf = require(‘rimraf’); var config = require(‘../config’); var dropbox = require(‘../lib/dropbox-sync’); var mysql = require(‘../lib/mysql-back

  • user2456359
    php javascript wordpress
    I’m struggling with adding the jQuery to the templated I transfered to WordPress, From what I’ve already learned from WordPress you need to use WordPress functions to include js files, is that always neccasary? Could somebody please take a look at the function I’ve written?header.php<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘HTML_type’);?>” charset=”<?php bloginfo( ‘charset’ ); ?>”

  • Fran Verona
    php javascript jquery ajax
    I have a PHP file with the following code:<html><head><!– HEAD –><?php require_once ‘Language.php’; ?></head><body><script type=”text/javascript”>$.get(‘step2.php’,function(data){// Do something});</script></body> </html>As you can see, I’m trying to load some content via Ajax call. The problem is that step2.php contains some PHP code:<div class=”step-content table-bordered”><h3><?php echo $Lang->get(‘create_s2_title

  • Sean
    javascript node.js gruntjs livereload
    PC Specs: Windows 7 Enterprise x64I’m running grunt.js on a project and recently started receiving an error when attempting to run ‘grunt watch’.Grunt worked fine yesterday but today I started seeing:Running “watch” task Waiting…Fatal error: listen EACCESI read another question here: Cloud 9 and Grunt.jsthat lead me to remove ‘options: {livereload: true}’ from Gruntfile.jsrunning watch again works as intended. Is there a way to reconfigure grunt or livereload to get livereload working with G

  • Asenar
    javascript php jquery callback
    i have make an php editor with so much effort but i cant print the fatal error. and want to print the fatal error. How to do this. I have code for run the php through eval function here is my jsfiddle – **http://jsfiddle.net/3c7F6/3/** I want to print an fatal error. Please help me to do this.please check the code and give me the suggestion

  • Septagram
    javascript fatal-error
    Is it possible to terminate script on a certain condition with a specific error message? Exceptions are not an option, as they can be catched, thus avoiding termination.Update:I’d prefer the universal approach, but if there’s none, then it’s for the in-browser JavaScript. Error should be silent, and the error message should only go into the browser error log.

  • Ates Goral
    javascript gruntjs
    I removed the old grunt first,and I install the new grunt.But I got an error:D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4)Fatal error: Unable to find local grunt.If you’re seeing this message, either a Gruntfile wasn’t found or grunt hasn’t been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide: http://gruntjs.com/getting-startedIs there haven’t a grunt in my system path, or somethi

  • kiamlaluno
    apache
    I am receiving this error message after enabling a module. I am running Ubuntu on a Vbox. My php-apache.ini file has this line:; Maximum input variable nesting level; http://php.net/max-input-nesting-levelmax_input_nesting_level = 200I thought this was the correct setting for nesting functions, however, since it is set to 200 and I am erroring at 100, it may not be. Is there another setting or file I am missing? Is there any other Drupal related file that holds that setting? How can I find it

  • Toni Michel Caubet
    php apache memcached pecl
    I installed memcache via ssh, with:$ pecl install memcacheAnd this was the output: https://pastee.org/w63syAnd added this line to etc/php.iniextension=memcache.soAnd when tring to initialize:/* MEMCACHE */ $memcache = new Memcache(); $memcache->pconnect(‘localhost’,11211);I get:Fatal error: Class ‘Memcache’ not found in /home/piscolab/public_html/website.com/includes/sql.php on line 25what am i doing wrong?I found this question but the problem was about his shared server, I am under a VPSEDI

  • dbrin
    php apache httpd prado
    We are using one application with httpd server. For performance, I moved httpd from prefork.c to worker.c, then i restart httpd.now i am getting following error .Fatal ErrorClass file for ‘DOMDocument’ cannot be found.Debug Backtrace1 — PradoBase::autoload(‘DOMDocument’)2 TXmlDocument.php:385 — spl_autoload_call(‘DOMDocument’)3 TXmlDocument.php:371 — TXmlDocument->loadFromString(‘ <parameters> <parameter id=”siteTitle” value=&q…’)4 TParameterModule.php:75 — TXmlDocument

  • Daniele
    php mysql apache mysqli phpinfo
    I have a really strange error. My httpd server have been working fine until last Wednesday, when I uninstalled the MS SQL and visual studio C#. When I restarted the PC, Ii discovered that some parts of the Environment variable PATH disappeared…Almost all the problems where recovered, The only one that cannot be adjusted is my httpd server… or the PHP configuration, I don’t know. I have already uninstalled the Apache server, PHP and MySql and resintalled them again… I have done this lots of

  • David
    php apache .htaccess error-handling
    I current have this set in my htaccess:php_value error_reporting -1I want the log to only log fatal errors. What do I replace -1 with to do this?

  • PeeHaa
    php apache shutdown error-log
    We are using LAMP Architecture. PHP Shutdown function is capturing some fatal errors. But these fatal errors are not logged in apache error_log files. We have used two versions of PHP. Both the versions are functioning similarly. Versions: php-5.2.17 and php-5.3.14

  • racky
    php mysql linux apache
    I have PHP 5.2.3, apache2.x, mysql 5.x on a Linux machine. EVerything was working fine untill yesterday. This morning all of a sudden one of the php files started to throw “Fatal error: Call to a member function execute() on a non-object in”. I use PDO (prepare, execute, close cursor etc). Have you ever come across this problem? does someone know a fix for this please.Many thanks, R

  • Adam Lynch
    php apache mongodb installation wamp
    I’m trying to execute this:<?php// connect $m = new Mongo();?>But I get the following error:Fatal error: Class ‘Mongo’ not found in C:\wamp\www…..Info:PHP: 5.38 MongoDB: mongodb-win32-i386-2.0.2 MongoDB PHP Driver: mongo-1.1.4-php5.3vc6ts WampServer: 2.2 OS: Windows 7 Enterprise SP1I’ve followed the MongoDB installation fine (incl. adding the DLL to ext & php.ini), I’ve started mongod.exe and WAMP is running.What does this imply is missing/incorrect?Edit:I have got it running

  • Ghada Salem
    php apache imagemagick
    I am trying to install imagemagic php extension under WampServer 2.I’ve downloaded and installed ImageMagick . I’ve chosen ImageMagick-6.8.8-10-Q16-x86-dll.exe I’ve downloaded the php extension. I’ve moved the dll extension I just downloaded to C:\wamp\bin\php\php5.4.16\ext\ I’ve altered php.ini (accessed it through wamp tray icon > right-click > PHP > php.ini) and added “extension=php_imagick.dll”, without the quotes, to the extensions lists. I restarted Apache. Not noticing the extension disp

  • billybobisking
    php apache geolocation geoip
    I have installed net_geoip on my web host and am encountering the error Fatal error: Class ‘Net_GeoIP’ not found in /home/heyitspr/public_html/beta_simplecraft.biz/index.php on line 3 when I run the script that is posted below:$geoip = Net_GeoIP::getInstance(‘GeoIP.dat’, Net_GeoIP::SHARED_MEMORY); $country_name = $geoip->lookupCountryName($_SERVER[‘REMOTE_ADDR’]);print_r ($country_name);I am new to installing plugins with apache so please explain it in simpler terms. Thanks

  • Stormvirux
    linux security debian logging audit
    Is there a log file that logs information when the values set in /etc/security/limits.conf are exceeded? If the values are too tight in the above file the clients using the website hosted on the server sees errors such as [FATAL] failed to allocate memory . But I wont be intimidated about it. So is there a log? If not is there a way to make it log when the values are exceeded?

  • kiamlaluno
    7 database security
    Lots of times here I’ve been told that using views custom php fields, filters or others is a bad practice, because putting php in the sql is dangerous.My question is, if you only call to a function, that you defined in a module, is it still as bad?Sometimes, especially for Views, making a custom handler, or, other example, a custom token, can be really heavy. What are the risks if I make a custom field that only calls a function? Is it as dangerous and “forbidden”?

  • Jamal
    php security pdo
    I have used this guide to implement prepared statements in order to avoid SQL Injection.I made some tests and no error was shown. However, I would like to ask you if you see any flaw in the code, so that I can improve it.This is the code for a simple login:<form action=”conexion_PDO.php” method=”post”> <label>User:</label> <input type=”text” name=”user”> <label>Pass:</label> <input type=”password” name=”pass”> <input type=”submit” value=”Ingresar”>

  • teresko
    spring security spring-mvc
    web.xml:<?xml version=”1.0″ encoding=”UTF-8″?><web-app><servlet><servlet-name>myweb</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><load-on-startup>1</load-on-startup></servlet><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:myweb-security.xmlclasspath:myweb-servlet.xml</param-value></context-param><listener><l

  • JL.
    c# security
    I am having a problem using the signedCMS.decode routine. See the code below. The error seems to occur when the file size is too big in this case 11MB. private static void RemoveZfoSignature(string zfoFileName) {byte[] fileContents = File.ReadAllBytes(zfoFileName);var contentInfo = new ContentInfo(fileContents);var signedCms = new SignedCms(contentInfo);// This line throws the error 100% of the timesignedCms.Decode(fileContents);signedCms.RemoveSignature(0);byte[] outfile = signedCms.ContentInfo

  • mkuff
    security java-ee-7 wildfly
    On my way to migrate from jboss 7 to wildfly i encountered another problem. When calling an rest service which is protected by @RolesAllowed(“ADMIN”) i get the following error:13:46:44,359 ERROR [org.jboss.as.ejb3.invocation] (default task-1) JBAS014134: EJB Invocation failed on component TestFacade for method public java.lang.String net.dice.facade.TestFacade.generateTestdata(): javax.ejb.EJBAccessException: JBAS013323: Invalid Userat org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(

  • Jorge
    java spring security rest spring-security
    I’m a newbie in Spring and Spring Security and I am having this error: An Authentication object was not found in the SecurityContextA little part of the securityApplicationContext.xml is:<bean id=”authenticationProcessingFilter” class=”org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter”><property name=”authenticationManager” ref=”authenticationManager”/> </bean><security:http auto-config=”true”/><security:global-method-security secured

  • Axel Knauf
    java security weblogic container-managed
    ScenarioWe are using Weblogic Server 10.3.4 to run our webapp which has security constraints enabled in order to require a user to sign in before he/she can use the application. The user and group information shall reside in the application database, the authentication shall be handled by WLS (the container).I have set up a database schema as described in this blog article, set up a new Security Realm “app.realm” in WLS console and defined a SQLAuthenticator inside it. After having restarted WLS

  • Gigi
    c# wpf security encryption credentials
    In a WPF application, I would like to provide the typical “Remember Me” option to remember credentials and use them automatically next time the application is launched.Using a one-way hash is clearly not an option, and while I can store credentials in isolated storage or in the registry, there is one issue to deal with when encrypting the credentials.If I use a symmetric key encryption algorithm, I will need to store the key somewhere. And if the key is, for example, hardcoded in memory, then I

  • Woland
    java security applet classnotfoundexception certificate-revocation
    I’m using html & jnlp to deploy the applet. The applet is signed by externally generated certificate because it needs all-permissions. It works fine on Java 1.6. On Java 1.7 it throws ClassNotFoundException being unable to find applet’s main class.The code has been compiled using 1.6 and I need it working on both 1.6 and 1.7.index.html:<body><!– … –><script src=”https://www.java.com/js/deployJava.js”></script><script>var attributes = {code:’com.alu.ds.webui.

Web site is in building