Hide PhP Error in localhost/subfolder
Posted by: bahalul (---.range86-178.btcentralplus.com)
Date: January 10, 2018 11:49PM

Hi there,
I have backup joomla 2.5 website in my local pc and wanted to develop from my pc. But It's always showing error. Ex: "Strict standards: Only variables should be assigned by reference in E:\wamp64\www\subfolder\administrator\components\com_joomlaquiz\component.legacy.php on line 26
Call Stack".

I have disabled "display_errors" from php setting and checked php.ini that it's "; display_errors". But still my localhost/subfolder page showing lots of errors like above.

1 - Windows version used (Specify version number AND whether 32 or 64 bit) Ans: Microsoft windows 7 professional 64 bit
2 - Version WampServer (Specify version number AND whether 32 or 64 bit) Ans: WampServer Version 3.1.0 64bit
3 - Apache Version Ans: Apache 2.4.27
4 - PHP Version Ans: PHP 5.6.31
5 - MySQL Version Ans: MySQL 5.7.19
5a - MariaDB version if applicable Ans: MySQL 5.7.19
6 - What colour is the WampServer icon (in the notification area of the taskbar) Ans: Green

When all goes well it should be green, but it may be red or orange.

If the WampServer icon is NOT GREEN please ensure you have looked at these files :-
a - Apache error log
-- ( wampmanager -> Apache -> Apache error log )
-- ( wampmanager -> Apache -> Apache access log )
b - MySQL error log ( wampmanager -> MySQL -> MySQL log )
b1 - MariaDB error log ( wampmanager -> MariaDB -> Mariadb log )
c - PHP error log ( wampmanager -> PHP -> PHP error log )

Depending on the error, one or all of the above may be empty so also look at
d - The windows event viewer
--- Windows Key + R to launch the run dialog then enter eventvwr.exe and press the OK button
--- - On the left side of the windows click 'Windows Logs -> Applications'
--- - Look for the names 'Apache Service' or 'MySQL' in the Source column which have a error symbol in the first column.

If you find any errors that you cannot fix for yourself please post the COMPLETE EXACT error message in your question.


7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines? Ans:
127.0.0.1 ne.com
::1 ne.com

127.0.0.1 never
::1 never

* Active means no # at the beginning of the line.


If the WampServer icon is green:

8 - Do you have access to localhost (Homepage WampServer)? Ans: Yes
8a - If so, is there an error message at the bottom of the page? Ans: No

9 - Do you have access to phpMyAdmin? Ans: Yes

10 - If you refer to an error message, please include the EXACT wording of the error in your post:
Ans: E:\wamp64\www\subfolder\administrator\components\com_joomlaquiz\toolbar.joomlaquiz.php on line 31
Call Stack
# Time Memory Function Location
1 0.0010 260272 {main}( ) ...\index.php:0
2 0.1730 6718088 JAdministrator->dispatch( ) ...\index.php:46
3 0.1740 6719840 JComponentHelper::renderComponent( ) ...\application.php:153
4 0.6750 13956736 include_once( 'E:\wamp64\www\subfolder\administrator\components\com_joomlaquiz\toolbar.joomlaquiz.php' ) ...\helper.php:359"
11 - If you use an Antivirus and / or Firewall, please include the names of these Ans: All are disabled
12 - What is the full path to the installation of WampServer (e.g. D:\wamp\) Ans: E:\wamp64
13 - If you have one or more Virtual Hosts defined, please show their definition(s) Ans: ne.com
never



Can anyone assist me to tell how can I hide this php error, please?

Options: ReplyQuote
Re: Hide PhP Error in localhost/subfolder
Posted by: Otomatic (Moderator)
Date: January 11, 2018 09:39AM

Hi,

In the file :
Left-Click Wampmanager tray icon -> PHP -> php.ini
Replace :
error_reporting = E_ALL
by
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

But the real solution is to update Joomla with the latest version. Joomla 2.5 is a very old version.

Apply Update 3.1.1 to your version of Wampserver
Wampserver update 3.1.1
You can see the contents of error_reporting in the PHP settings.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Hide PhP Error in localhost/subfolder
Posted by: bahalul (---.range86-178.btcentralplus.com)
Date: January 11, 2018 03:21PM

Hi Otomatic (Moderator)
Thanks for your responce. I have changed that error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
from error_reporting = E_ALL
But still I am shown following error
Strict standards: Only variables should be assigned by reference in E:\wamp64\www\subfolder\administrator\components\com_joomlaquiz\component.legacy.php on line 26

Issue 2:
Also I have just noticed if i turn off tick from display_error at php setting by mouse, php.ini is showing
display_errors = On
I have mannually wriiten there now.
display_errors = Off


Issue 3: Do I need to uninstll my old WampServer Version 3.1.0 64bit to install Wampserver update 3.1.1 or can i just overwrite that installer.exe on top of my old "WampServer Version 3.1.0 64bit" files?

I hope you may assist me now or anyone else, PLEASE

Options: ReplyQuote
Re: Hide PhP Error in localhost/subfolder
Posted by: Otomatic (Moderator)
Date: January 11, 2018 04:15PM

Hi,

> Do I need to uninstll my old WampServer Version 3.1.0 64bit to install Wampserver update 3.1.1
When you install a Windows update, do you have to uninstall Windows?


> But still I am shown following error
Did you restart Wampserver?
You must "refresh" after making the changes.
Right-Click wampmanager tray icon -> Refresh

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 01/12/2018 11:33AM by RiggsFolly.

Options: ReplyQuote


Sorry, only registered users may post in this forum.