Tag Archives: php

phpmyadmin showing php script [duplicate]

Questions: This question already has an answer here: PHP code is not being executed, instead code shows on the page 18 answers Answers: Its seems that your server(Apache) is not recognizing php script as PHP language to be executed. At first check whether PHP is enable or not by running the following command in your… Read More »

PHP: socket_write hangs when client disconnects while writing

Questions: While I’m receiving data in my iOS app (some data is received, but not all) I purposely quit the app and socket_write hangs on the server. Here is the relevant code: error_log(“start write”); $sent = socket_write($client, $string, $length); error_log(“end write”); I get the “start write” message in my error log, but that’s it, it… Read More »

Getting VHosts working with EasyPHP

Questions: So I’ve been trying to setup vhosts on my new Windows 10 Installation with EasyPHP Devserver 16.1. I’ve modified etc/vhosts to include my new domain (mysite.local), which works, but still points to the default easyphp directory. So I modified httpd-vhosts.conf to point that domain to my new directory: <VirtualHost *:80> DocumentRoot “C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www”… Read More »

PHP returns error 500 in browser, but not in shell

Questions: I’m currently experimenting with a PHP plugin called Mosquitto PHP (https://github.com/mgdm/Mosquitto-PHP/). I’ve got it all installed right, and under ‘php -m’ it seems to show up properly. I’m using a small test code to see if it in it’s basic form works: <?php $c = new Mosquitto\Client; $c->onConnect(function() use ($c) { $c->publish(‘mgdm/test’, ‘Hello’, 2);… Read More »

How make PHP session work using subdomain and AJAX?

Questions: I’m working in a PHP project that uses subdomains, sessions and Ajax. But unfortunately I can’t make it work! I’ll try explain: Let’s assume that I’m at this domain: app.mysite.com/index.php At this domain, I have a form that performs an Ajax request to mysite.com/functions/execute.php (without any subdomain) In the first line of execute.php, I… Read More »

How output buffering blocks in PHP/Apache works?

Questions: Suppose I am echoing random data from PHP to browser. Total amount of random data is about XGb and echo is done in YKb chunks. ob_start() is not used. Will echo calls block after PHP and Apache buffers are full (client is not capable of consuming data with the same speed it is generated)?… Read More »

PHPUnit and SimpleTest on Apache and Nusphere PhpED

Questions: I have a requirement that I need to run the tests through commandline as well as through a graphical debugger. The graphical debugger should run the code on Apache. I tried SimpleTest and it works well as in both the cases but PHPUnit only works on commandline. I am using NuSphere PhpED to debug… Read More »