wampserver 3.2.0 +win10
Posted by: JoseGabriel (---.netvisao.pt)
Date: June 03, 2020 02:50AM

I'm new here, and I'm also new to using wamp.
when I run a .php program the browser shows me the path of the file,. for example if I write something as simple as:

<? php
$ a = 24;
var_dump ($ a);
?>
the result is "C: \ wamp \ www \ classe04.php: 3: int 24 " .
why?
thanks in advance.
JG



Edited 1 time(s). Last edit at 06/03/2020 03:14AM by RiggsFolly.

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: RiggsFolly (Moderator)
Date: June 03, 2020 03:18AM

Hi,

No idea where you got the idea to put spaces between everything, but dont

The php tag is

<?php

and NOT

<? php


So your code shoudl be

<?php
$a = 24;
var_dump ($a);
?>

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: JoseGabriel (---.netvisao.pt)
Date: June 03, 2020 11:26AM

Hello RiggsFolly, thanks for your patience.
I am an old man trying to learn new languages. I have a rule, I never ask questions in forums without first looking at existing posts for a solution.
I tested your corrected code and the result is the same.
"C: \ wamp \ www \ classe04.php: 3: int 24"
I installed another php server and the same file sends me the correct answer:
"Int 24".
For me it's a problem in the configuration of Wampserver, but where?
Thanks again.
JG

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: Otomatic (Moderator)
Date: June 03, 2020 11:41AM

Hi,

This is an effect of the xDebug extension which is installed by default.

See https://xdebug.org/docs/display

You can uncheck this extension by :

Right-Click -> PHP -> PHP Extensions -> Zend extensions -> php_xdebug

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.4
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.4
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: RiggsFolly (Moderator)
Date: June 03, 2020 07:24PM

Ahhh


By the way, what it actually looks like (which may have kelp in the recognition) is

D:\PHP-SOURCE\Testing\tst.php:12:
int(24)

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: JoseGabriel (---.netvisao.pt)
Date: June 03, 2020 08:08PM

Hello RiggsFolly,

I unchecked Right-Click -> PHP -> PHP Extensions -> Zend extension -> php_xdebug and it works well.

Now I will go to See [xdebug.org] to try to understand what is the problem.

Thanks

Options: ReplyQuote
Re: wampserver 3.2.0 +win10
Posted by: RiggsFolly (Moderator)
Date: June 03, 2020 08:25PM

It is NOT a problem and definitely NOT AN ERROR

It is just that XDEBUG (a VERY useful tool) grabs the `var_dump()` and outputs the SAME - CORRECT - DATA but in a slightly different format. It just adds the file name of where the var_dump() was run to the output, AGAIN .. Very Useful if you have a number of scripts all interacting and all of which you have added a var_dump() to in order to track down a nasty little bug smiling smiley


In short, reinstate XDEBUG and say hello to the slightly different output of a var_dump while it is enabled.

Then find an IDE like netbeans for example and read up on how to get PHP code to be dynamically debuggable like you were using VB or C# or almost any other language nowadays

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.2.0 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.19>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.