cURL not run in xampp v5.6.3 - apache

I try to run cURL in xampp v5.6.3 (PHP 5.6.3) last version,
In xampp/php/php.ini
extension=php_curl.dll is without ;
other php.ini i can't found in this new version of xampp,
when i try test from this http://www.mattsbits.co.uk/item-164.html
I get error:
Parse error: syntax error, unexpected 'color' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\test\check_curl.php on line 16
cURL isn't returning anything, anyone know solution ?
Thanks.

I might be a bit late with answer but i had the same issue. I recommend downgrading a bit. My old php version was 5.5.15, curl seems to work there just fine.

Related

syntax error, unexpected T_STRING PHPMAILER line 22

Parse error: syntax error, unexpected T_STRING in /home1/mast1456/public_html/src/PHPMailer.php on line 22
line 22 namespace PHPMailer\PHPMailer;
This means you're running a very old version of PHP that doesn't understand namespaces, which were introduced in PHP 5.3. You need to run at least PHP 5.5 for PHPMailer anyway, but I would recommend you use PHP 7.4 for anything you're developing now.

Expected Safari data directory does not exist

Selenium 2.41,
Mac_OSX = 10.8.5,
Safari = 6.0.5
While launching Safari driver getting error message "The expected Safari data directory does not exist: /Users/null/Library/Safari"
After googling found out code in Safari extension classes is expecting System.getenv("USER"),
if (Platform.MAC.is(current)) {
return new File("/Users/" + System.getenv("USER"), "Library/Safari");
}
Configured .bash_profile and launchd.conf file, However this does not seem to fix the issue...
When i execute syso(System.getenv("USER"); in eclipse ide its still returning "null"
Could anyone please assist in resolving this issue
Thanks In advance
That'w weird, I'm on mac and in terminal:
echo $USER
gives my user.
According to http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html the correct property for your question would be
System.getProperty("user.name")
Also have a look at System.getProperty("user.home") (but note it could get messy under Windows when using Java 7 or older).

BadMethodCallException with Selenium and PHPUnit

I keep getting this error with alot of methods I am trying to use, here are a couple of code examlpes:
$this->verifyTextPresent('Hello world');
//BadMethodCallException: The command 'verifyTextPresent' is not existent or not s
upported yet.
$this->assertEquals("197", $this->getText("xpath=(//div[#id='none']/div/table/tbody/tr/td[2]/span)[29]"));
//BadMethodCallException: The command 'getText' is not existent or not supported y
et.
$this->waitForPageToLoad("30000");
////BadMethodCallException: The command 'waitForPageToLoad' is not existent or not s
upported yet.
I am getting this error with alot of methods, and as far as i can see there is no problem with the code itself and my php version is up to date so it's nothing like that. anyone know anything about this?
getting the same problem man ...
I think there is a problem with selenium if you install it using pear. .
I tried re-installing the selenium and offered lord satan 5 pigs and 2 chicken..
still no good
now Im installing selium using composer... I'll let you know what happen..
Edit***
Turns out using using phpunit.phar is the right answr. So I updated my phpunit . removed pear installed phpunit . then updated my composer.json to install phpunit and selenium .

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.

Problems to install couponic on localhost

I'm trying to install the couponic on my localhost (xampp), but I'm getting an error message:
Strict Standards: Non-static method UFactory::getModuleAlias() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\couponic\framework\uniprogy\framework\worklets\UWorkletConstructor.php on line 254
This is one of the errors, but all of them are from the same type on the same function (getModuleAlias).
I already rename the protected/config/inital folder to protected/config/public and when I access using the url right url (localhost/couponic/install) I get these errors.
Can you help me?
The problem here is that you have install probably in localhost php 5.4 and couponic doesn't support php 5.4, to bypass this problem you will have to replace
public function getModuleAlias($module)
with
static public function getModuleAlias($module)
but more problem will come up, until uniprogy make the script working on php 5.4
Disable strict errors in your php.ini:
error_reporting = E_ALL
Right now you probably have:
E_ALL & E_STRICT
So you need to lose the E_STRICT part.
I had "E_ALL" already and it wasn't working. I switched to "E_ERROR" and that did the trick.
error_reporting = E_ERROR
E_ALL "includes E_STRICT as of PHP 6.0.0" but we're not quite there yet.