php,facebook,apache,curlRelated issues-Collection of common programming errors


  • Kermit
    php windows-server-2008-r2 iis7 sql-server-2008-r2
    I am having difficulties getting the SQL Server extension to work with PHP on Windows Server. The installation went fine and I’m able to load phpinfo through the browser. However, when I enable php_sqlsrv_54_ts.dll, it throws a 500 – Internal server error. There are no errors logged to the PHP log.Here are the steps I’ve performed:Followed the PHP manual install guide and configuring IIS to process PHP requests Downloaded & installed Microsoft Drivers 3.0 for PHP for SQL Server Downloaded &a

  • ElvisLikeBear
    php sql sql-server sql-server-2008
    I’m using PDO’s to connect to a Microsoft Server running in azure and I keep receiving the error:This is the function that I’ve written (insertUser):private function generateSalt() {return dechex(mt_rand(0, 4453456454)) . dechex(mt_rand(0, 543545435)); }private function hashPassword($originalPassword, $salt) {for($round = 0; $round < 65536; $round++){$password = hash(‘sha256’, $password . $salt);}return $password; }private function insertUser() {$salt = $this->generateSalt();$password = $

  • Jacket
    php internationalization gettext
    I know there are lots of posts for internationalization, but this is something I didn’t found while searching.I have a PHP Web application, which is pretty big right now. It’s developed actively for 4 years and wasn’t built with internationalization in mind. Text is everywhere – in plain HTML, in PHP variables, in echo’s, in the DB…Now I’m familiar with the concept of gettext and this is what i plan to use for the internationalization project of the application. However the app is not written

  • darkheir
    php jpeg jfif
    When I’m trying to save an image using the native php function imagecreatefromjpeg sometimes I have the following error:gd-jpeg, libjpeg: recoverable error: Warning: unknown JFIF revision number 2.01What I understand (I could be wrong) is that the JFIF version is higher than the one supported by the native php function.How could I process the image or at least fail gracefully? (Today the page is showing a HTTP 500 error)

  • mitai
    php codeigniter form-validation native
    I want to use a central CI setup for multiple sites. The way I handle this is I created a package called MPACK and added it to autoload in the config file of each site.Folder Structure:/main/system (CI 2 System folder)/MPACK/site1/applicationsite2/applicationInside this MPACK I have share libraries, models, helpers, etc.However, I would like to have an extended MY_Form_Validation that would be common to ALL sites. Adding the class file to /MPACK/libraries fails. Adding it to /site1/application w

  • xles
    php yii
    I’m playing around with the Yii framework, and decided to do some file foo with the finfo class in php, like so:$finfo = new finfo(FILEINFO_MIME);This should work without issue (and it works just fine outside of Yii), I don’t see why it shouldn’t. However, this isn’t the case, Yii attempts to autoload the finfo class causing the obvious error:include(finfo.php): failed to open stream: No such file or directoryIs there a way to beat Yii into submission?Edit: I still haven’t figured out why it cr

  • David Rodrigues
    php mysql
    Is there any function in MySQL that is similar to function substr_count() of PHP? Actually I need to know how many items are in a set (eg. 1,2,3 is 3 items).In a search, I found nothing that was native to this. So I made a workaround with the methods LENGTH() and REPLACE().SELECT LENGTH(“1,2,3,4”) – LENGTH(REPLACE(“1,2,3,4”, “,”, “”)) + 1;But it fail set is empty. But I can solve that with a simple IF().So, I’m searching for some more native, like, for instance:SELECT SUBSTR_COUNT(“,”, “1,2,3,4”

  • palacsint
    php beginner security file static
    I am new to Code Review and PHP.Last night I made the below image uploading class. It was the first time I made a file uploader to be used on a real site, so I thought I would share it here and on Github to get some reviews, hoping if I can perfect it with your help, I will use the class on all my future projects. <?php /*** A small, secure & fast image uploader class written in all-static* class to give an extra boost in performance.* @author Simon _eQ <https://github.com/simon-eQ

  • Orangepill
    php template
    This is the second submission for Code Review for this project but since the API changed considerably I felt it should not be taped onto the original post. To see the original post and comment see Potential Problems with this templating technique .First off the goals motivation for this technique is to reduce the number of iterative includes of a template there by bypassing a lot of the i/o bottle neck that can occur, especially in I/O bound environments. Overwhelmingly the biggest eyesore in th

  • Kriem
    php javascript jquery jwplayer
    I sometimes get this error in my jwplayer: TypeError: non-native scope objectThis means that one video out of multiple videos I have has failed to load. This makes it unreliable. My question is that is there a way to make it more reliable and permanently fix this error?Below is code:<?php$key = $_GET[‘key’]; $i = $_GET[‘i’]; $v = $_GET[‘v’];?> <div id=”myElement-<?php echo $key.’-‘.$i; ?>”>Loading the player…<script type=”text/javascript”> jwplayer(“myElement-<?php e

  • Kevin
    ruby-on-rails facebook heroku
    My problem : I developed an application with FB-connect using Ruby On Rails on Heroku. Everything is working well until we face this problem :Everytime user clicks “Sign In with Facebook” , it returned R10 (boot timeout error). It didn’t reach Facebook API at all (after I’m reading R10 docs).However, when I take out the custom domain (www.my-app.com) , then replace www.my-app.com on developers.facebook.com with my-app.herokuapp.com — you know what I mean… Then, I access the app through my-

  • begiPass
    android facebook connection hashmap provider
    I want to integrate facebook connection into my native android app to do that, I have followed the tuto of facebook doc but always I have thefollowing error : 12-24 10:03:28.359: E/ActivityThread(3569): Failed to find provider info for com.facebook.katana.provider.PlatformProvider 12-24 10:05:37.119: D/dalvikvm(4104): GetFieldID: unable to find field Ljava/util/HashMap;.loadFactor:Ffirsly, the popup of connexion is displayed but after logging I they don’t arrive to run this code : @SuppressWarni

  • Taher Saeed
    facebook mobile-safari
    I have a native iOS app with Facebook Login integrated. The login flow works when the native Facebook app is installed. However, when I delete the app, the FB login fallback on FB Mobile Safari webapp. The app switching works fine, but when controls come back to my app, the state of the session is declared FBSessionStateClosedLoginFailed.I am using Facebook SDK v3.5.2 as of June 6th, 2013 Using iPad1 iOS5.1.1/** Opens a Facebook session and optionally shows the login UX.*/- (BOOL)openSessionWith

  • Dino Rino
    android facebook
    I do do a Login flow with and without native Facebook app installed.I have this code:package com.xibio.everywhererun.facebook;import java.util.Arrays; import java.util.List;import com.facebook.AccessToken; import com.facebook.FacebookAuthorizationException; import com.facebook.FacebookOperationCanceledException; import com.facebook.Session; import com.facebook.SessionState; import com.facebook.UiLifecycleHelper; import com.facebook.model.GraphUser; import com.facebook.widget.FacebookDialog; impo

  • iDev
    ios facebook web-applications facebook-javascript-sdk facebook-ios-sdk
    I am trying to build a web app that will allow a user to login Facebook. Everything works in Firefox/Chrome/Safari (on the phone/tablet and on OSX). When the App runs on the tablet (Native UIWebview and Web-app) it loads the first page perfectly. When the user clicks the “connect with Facebook” button the app loads the Facebook logon page.After the user logs in (again, in both a Native UIWebview and a web-app) the view turns white hanging on the URL: ‘https://www.facebook.com/dialog/permissions.

  • Renan
    email phishing facebook
    I’m having a hard time figuring out whether this email a friend of mine got is legit or a scam. The weird thing is there’s only one link to facebook.com, which is the one about facebook terms. All the others are linking to em.facebookmail.com with a very long funny characters to follow. Another thing that raised suspicion was a particular grammar error and one link in Spanish. I tried searching online but all I got was opinions that are hardly believable.What should I do to check whether it’s le

  • Peter Mortensen
    android facebook
    When I try to implement Facebook Connect in my Android application, I get the following error.Login failed:invalid_key:Android key mismatch. Your key”7dje38/jMXoU9Lezug4nzmZfFUg” does not match the allowed keysspecified in your application settings. Check your applicationsettings at http://www.facebook.com/developersHow do I fix it?

  • idrysdale
    ruby-on-rails facebook opengraph koala
    I’m building a small side project to test integrating Facebook’s Open Graph into a Rails application I’m building and am running into an odd issue. I can link a user (within the application) to my Facebook account, and successfully post an open graph update, however if I disconnect the app to my Facebook account, and link it to a test user generated within Facebook I receive the following error:u.facebook.put_connections(“me”, “goodgym:accept”, mission: “http://4ztq.localtunnel.com/missions/1”)

  • bkaid
    ios facebook upload photo
    I’d be grateful for any suggestions as to how to deal with a problem I’m having posting an image to Facebook.The following code works just as I would expect:NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@”http://myserver/img.png”, @”picture”,@”My Testing”, @”name”,@”Enter some text…”, @”message”,nil];[appDelegate.facebook dialog:@”feed” andParams:params andDelegate:self];However, I really want to use an image that I capture from my camera. I’ve set up the cod

  • Pratik
    facebook facebook-opengraph opengraph
    I am trying to post using facebook open graph for test user account. But I am getting the error “An unexpected error has occurred. Please retry your request later.”I read this “Just a head’s up, not sure if it’s a change, however unsubmitted Open Graph action types (i.e. review) can only be tested with an app Administrator or Developers account. Test accounts won’t work” on http://railscasts.com/episodes/363-facebook-open-graph?view=comments#comment_161576Could someone please let me know if I ca

  • PolyGeo
    geoserver apache deployment geoexplorer
    I have been using Geoserver on Apache Tomcat in Windows and I want to install GeoExplorer. It is an OpenGeo Suite tool, and its source code is found here. I have downloaded the source code and tried to compile it using WinAnt to generate a .WAR file. However, this resulted in error messages and I am stuck. Is my way correct or what must I do to fix this problem?The error occurred when trying to build using WinAnt. The source code was added to C:\Temp\GeoExplore, then I navigated to that director

  • Ryan
    ssh apache authentication pam
    I am using Google’s open-source PAM module for two-way authentication for SSH logins and certain Apache directives. It works great, however I would like to use this only when trying to log in from an outside network, resorting only to basic username/pass for inside the network. Basically whitelisting a network. How can I accomplish this? I can’t seem to find an answer…

  • Roney Michael
    linux installation apache hadoop
    I have a POWER6 Linux Node setup as a slave in a Hadoop 1.0.4 cluster (Red Hat 4.1.2-48) Master node is RHEL node on Wintel virtual partition.On Master Sun JDK 1.6.43 is installed, and on Power slave node, IBM JDK 1.6.0 is installed.When I submit a pig script to be run on master node, it submits MAP jobs on all slave nodes and the ones on the POWER6 node fail with the following error:10 10:52:36,610 WARN org.apache.hadoop.mapred.Child: Error running child.java.lang.NullPointerExceptionat org.apa

  • gnat
    apache tomcat
    I am trying to implement load balancing using apache HTTP server and Tomcat in windows XP, using this tutorialhttp://www.slideshare.net/mohanraj_nagasamy/integrating-tomcat-and-apache-on-windows-presentationI added mod_jk.so file inside apache http server -> module directoryadded below listener under server Tag<Listener className=”org.apache.jk.config.ApacheConfig” modJk=”C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.so” />and added the same listener under host tag b

  • madth3
    apache security http-request apache-modules
    Slightly unorthodox question here:I’m currently trying to break an Apache with a handful of custom modules.What spawned the testing is that Apache internally forwards requests that it considers too large (e.g. 1 MB trash) to modules hooked in appropriately, forcing them to deal with the garbage data – and lack of handling in the custom modules caused Apache in its entirety to go up in flames. Ouch, ouch, ouch.That particular issue was fortunately fixed, but the question’s arisen whether or not t

  • Marco Dinatsoli
    java apache tomcat
    i have deployed a java server using my eclipse.I extract the war file.i installed the apache-tomcat-7.0.47 on my windows server 2003i installed the Apache Tomcat 7 service on my windows server 2003 and made it run automatically.i want to run the war file on my windows server 2003what i have triedi put the war file on my webapps on the apache-tomcat folder and then run the startup.bat which locates on the bin folder.i test the server and it works perfectlymy problemwhen i log of from my windows s

  • Piotr Dobrogost
    linux oracle apache 32bit-64bit
    I’ve migrated an Oracle database and Oracle HTTP server install from a 32-bit machine to a 64-bit machine – both machines running Linux. Oracle Database is 64-bit, but the (Apache) HTTP server is 32-bit.I use some non-Oracle DSOs (mod_ntlm for one) but whenever I run the standard “make install” type thing I end up with a 64-bit module.Is there a standard way to compile 32-bit Apache modules on a 64-bit machine?

  • tsujp
    ruby-on-rails apache deployment passenger development-environment
    My head is about to explode from the mangled mess as a result of the following few days trying to setup a development environment for Rails, Apache and Passenger.The questions I have are:Do you NEED passenger for a development environment? Can I just develop with pow.cx instead? – I am 99.99% sure the answer is no (you don’t use passenger for development), but I need confirmation since I am deeply confused now. When I deploy, I only use Passenger for that, correct? I.e. I don’t ever touch passen

  • Joan Natalie
    python apache cgi openlayers virtualhost
    i’ve been trying to execute proxy.cgi from openlayers on my computer using windows 7 and xampp. when i tried to using localhost/mymaps/cgi-bin/proxy.cgi it execute perfectly. but when i tried to execute using virtualhost it came up with Server error!The server encountered an internal error and was unable to complete your request.Error message: couldn’t create child process: 720002: proxy.cgii look at error log it said [Thu Feb 06 14:24:16 2014] [error] [client 127.0.0.1] (OS 2)The system cannot

  • Jorre
    node.js apache reverse-proxy faye
    My node server and Faye are configured to run on port 3000. I have set up the following in apache to make it run on port 80 through a reverseproxy:<VirtualHost *:80>ServerAdmin [email protected] server.comDocumentRoot /var/www/html/nodejs-chatProxyPass / http://localhost:3000/ProxyPassReverse / http://localhost:3000/ </VirtualHost>This works great, except for the fact that I have the following set up for Faye, client-side:var client = new Faye.Client(‘http://188.0.0.1:3000/f

  • Andrew WC Brown
    ruby curl rvm curb
    I’m trying to install the curb gem on my Debian machine but I’m having a hard time building the gem with native extensions. I’m using RVM.Just a list of things I’m using:debian bundler rvm ruby-1.9.2-p180 curb I’m told I have to install the following packages and I’ve done so:sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-devWhen I go ahead and do as such:gem install curbBuilding native extensions. This could take a while… ERROR: Error installing curb:ERROR: Failed to build g

  • AlexSanchez
    java json google-app-engine curl jdo
    I’m using Goole App Engine to Build my REST API, I’ve already marked my class as PersistenceCapable and also i got defined my @PrimaryKey and also marked as @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY), also i’ve already EndPoints generated. but when i type in the terminal window a curl command to insert a new entity or registry it doesn’t work. this is the code:@PersistenceCapable(identityType = IdentityType.APPLICATION)class Student{@PrimaryKey@Persistent(valueStrategy = IdGenerat

  • Steve
    ruby-on-rails curl stripe-payments
    I am trying to set up Stripe Connect for a rails 3.2.13 app. I have directed the user to Stripe and received back the authorization code from Stripe:HTTP/1.1 302 Found Location: http://localhost:3000/yourshop/stripe?scope=read_write&state=1234&code=AUTHORIZATION_CODEThe next step involves making a POST request to receive the access_token via the access_token_url, per Stripe documentation:curl -X POST https://connect.stripe.com/oauth/token \-d client_secret=sk_test_code \-d code=AUTHORIZA

  • Dave
    curl elasticsearch postgresql-9.1
    I have a Postgresql 9.1 table that includes columns “city”, “admin1”, and “country”. I would like to select unique values with the output format of “city, admin1, country”. I may have multiple entries for Rochester, New York and Rochester, Minnesota, but I only want one of each. This is to populate an elastic search index and I am using the JDBC river plugin https://github.com/jprante/elasticsearch-river-jdbc.The following SELECT does what I want in PGAdmin3’s SQL editor:SELECT city || ‘, ‘ || a

  • user2042985
    php zend-framework curl apache2 passenger
    Hello I have a strange problem,I’m using Zend Http Client with Curl Adapter to call an external API.I’m able to do nearly everything – POST and PUT are completely OKDELETE is also OK but when sending data with DELETE I always get an error in the apache error log on the server with API server:pid=25665 thr=140007665268704 file=ext/apache2/Hooks.cpp:884 time=2014-01-13 22:30:06.320 ]: Unexpected error in mod_passenger: An error occurred while receiving HTTP upload data: The timeout specified

  • blue-sky
    bash curl cygwin gcutil
    Following gcutil tutorial at https://developers.google.com/compute/docs/gcutil/ here is a step of the download instructions : However when I try this URL : “$ curl https://dl.google.com/dl/cloudsdk/release/insall_google_cloud_sdk.bash | bash”I receive this error : “$ curl https://dl.google.com/dl/cloudsdk/release/insall_google_cloud_sdk.bash |bash% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed 100 869 100 869 0

  • Whoshooter
    php wordpress curl xml-rpc
    Well I’ve been at this for over 12 hours now with now luck connecting to my WordPress XMLRPC server. Everything looks good with the server, but it’s something in this script that keeps failing.I have included all my code so far, and the error message every time I try to create an object. Any help would be much appreciated.Here is my error message;Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in MYPATHTOFILE on line 50This is line 50; $objXMLRPClientWordPress = new XMLRPC

  • XMen
    python soap curl
    While trying pycurl for some url def call_soap_curl(ncServerURL, xml, action):c = pycurl.Curl()c.setopt(pycurl.URL, ncServerURL)c.setopt(pycurl.POST, 1)c.setopt(pycurl.SSL_VERIFYPEER, 0)c.setopt(pycurl.SSL_VERIFYHOST, 0)header=[“Content-type: text/xml”,”SOAPAction:”+action,’Content-Type: text/xml; charset=utf-8′,’Content-Length: ‘+str(len(xml))]print headerc.setopt(pycurl.HTTPHEADER, header)c.setopt(pycurl.POSTFIELDS, str(xml))import StringIOb = StringIO.StringIO()c.setopt(pycurl.WRITEFUNCTION,

  • Market Exploration
    curl
    I would like to download an image that is hotlink protected. How can I forge the HTTP header with CURL to say the referer is coming from its own server?I have tried with this command but it fails. I’m not familiar with PHP and help would be much apreciated.curl -A “Mozilla/5.0” -L -b /tmp/c -c /tmp/c -s ‘http://remote-site.com/image.jpg’ > image.jpgOption looks to be CURLOPT_REFERER with curl_setopt, or curl –referer but not sure about the correct syntax.EDIT 2 :I got an error saying that cu

  • Perception
    php curl download binary
    I wrote function below:function download_xfs($url) {$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_COOKIE, ‘login=michael; xfss=08ruiweu4tuhb5xqs8’);curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);$string = curl_exec ($ch); curl_close ($ch); // Set headers }When I use download_xfs(“http://address.com/file.html”); it returns binary of file instead of actual file. Can anyone re-write this code to handle file for download?

Web site is in building