I am working on a shopping cart function for a website and have stumbled across this error: Fatal error: Unsupported operand types in … on line xx I think this may be because I am performing some math between a variable and a value within an array. What I am not sure of is how to perform math on a
PhpStorm debugger not stopping at BreakPoints; keeps waiting for xdebug _SESSION_
Updated question : PhpStorm | WebMatrix (IISExpress) | Xdebug.remote_port | — Which Port(s) to put where? I’m running localhost web server on my Windows machine with WebMatrix and IISExpress. I’ve installed PHP and Xdebug in it and they both are working. I have a local WordPress install. I’m…
PHP PDO Error in Select Statement
I am having some issues with PDO. First issue is that in my connection string, I cannot use variables defined in another file (tried include & require). It gives me an error and shows the …
Execute an external program in php and return output file download link
I’m trying to run file_creator.exe via PHP which accepts some arguments and produces an output file. so how can I get the name of output file in order to produce the download link? Answer You will want to use shell_exec() function in PHP (http://php.net/manual/en/function.shell-exec.php) to run your exe…
Convert XML to CSV with PHP
I’m using the following code to convert my XML file to a CSV format. Unfortunately, it seems to not be recognizing each entry in the XML and so the XML file ends up being blank. An example of my XML file is below… Any ideas what I did wrong? Answer Try this
MySQL wrong syntax but no line 114
I am getting the following error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 114 but my …
Validation errors in AJAX mode
Currently I use this to display validation errors via ajax: if (data.validation_failed == 1) { var arr = data.errors; $.each(arr, function(…
Python is Garbling a Salt Generated from PHP and Stored in Mysql
I am exporting, by scraping it with http requests since the host won’t give me database access, a forum and importing it into a mysql database for vbulletin. In vbulletin users have unique password salts, and it generates password hashes using this algorithm: I’m using a python script to read stor…
Redirect /index.php – wordpress
I want that if someone got link to my site, lets say: www.bla.com/index.php , he will redirect to www.bla.com. or in another words – remove the index.php. Here is my .htaccess file: Either if someone got link: www.bla.com/camera/index.php – it will redirect to www.bla.com/camera/. For now, the sit…
phpunit –debug still displays only dots
I want to see which test is currently executed during a phpunit run. I use the –debug param but still only get dots: $ phpunit –debug PHPUnit 3.7.19 by Sebastian Bergmann. Configuration read …