Wamp server cant enable/disable modules (for apache) - apache

I cant enable APACHE modules on WAMP-Server.
After i click the module name (which is not-checked), then server restarts, but when i go to modules, then module is not still enabled.
I even manually opened httpd.conf and enabled module, restarted server, but module is not still enabled!
Has anyone faced similar problem ? what's solution?

A couple of tips.
WAMPServer must be installed as an Administrator so when you launch the install right click the .exe and select "Run as Administrator"
WAMPServer must also be Run As Administrator
When you attempt to include or exclude a new Apache or PHP extension, WAMPserver will attempt to restart Apache so the changes takes effect. If the changes do not show up, it may just be that the menu just skipped a beat, then try a refresh by doing
right click wampmanager -> refresh
If you install WAMPServer using the "Run as Administrator" but attempt to run WAMPServer without using the "Run As Administrator" it will not have the rights to amend some of its own files. This can cause problems like this one, and many others.

solution seemed to EXIT WampServer, then modify httpd.conf manually, and starting Wamp again.

I has this same issue (drove me crazy for a while!), and in my case I had to increase the memory_limit setting in php.ini (make sure it's the right one - open from Wampmanager - it's actually in the apache folder). I set it to 512M and it worked on 2 of the 3 servers I was having issues with.
For the other one I has to add this line:
ini_set('memory_limit', '-1');
to the top of file:
[drive]/[wamprootfolder]/scripts/refresh.php
And then run the Refresh from Wampmanager (right-click the icon). DON'T FORGET TO COMMENT IT OUT/REMOVE THE LINE ONCE IT COMPLETES. This disables the limit which can cause issues if it loads a script with a memory leak, etc.
The problem is that the refresh.php script is supposed to automatically update the wampmanager.ini file (found in [wamprootfolder]) after each change, or when you run it from Wampmanager itself. With the memory setting too low, it caused the function to exit without changing the .ini file, which is why you keep seeing the same settings, version # (after an update), etc.
To test, you can load the default wamp homepage in a browser to confirm version, and then click on phpinfo() to verify what modules, etc. are actually loading. OR just look at the modified date of your wampmanager.ini file!
Once it's working right, your wampmanager.ini should update itself when you run the Refresh (or make a change).

Related

How to run a script from startup on Raspbian 10 (buster)?

I have designed a GUI that I want to run as soon as I turn on my Raspberry Pi. It is currently set up to automatically log in as user on startup, but if that makes the process more difficult I can change that. My Raspi runs on Raspbian 10 (buster), which has made things difficult since I can only find tutorials for Raspbian 8 or so.
I have tried modifying autostart folder, but it is not in the same location as it was in previous Raspbian versions and doesn't seem to be working the way it used to. Tutorials have said to create a .desktop file in /home/pi/.config/autostart but I don't have a .config folder, or at least it's hidden. For me, autostart is in /etc/xdg/autostart and when I try to create a new file here using nano in the terminal, I get the message [Directory '/etc/xdg/autostart' is not writable] and it doesn't save my file.
I have also tried calling my script in /etc/rc.local but it did nothing. Some have said it doesn't work for GUIs.
Here's what I type into terminal:
$ nano /etc/xdg/autostart/gui.desktop
and a new file pops up, but at the bottom I get the warning [Directory '/etc/xdg/autostart' is not writable]
How can I get my GUI script to run on startup with Raspbian 10 (buster)?
There are a number of issues here, first when you are looking at tutorials recognize that Linux distros are built in layers, for simplicity let's say your "layer stack" looks like this: kernel, systemd, x11, xdg, lxde. The kernel boots, then starts systemd, which then starts x11 (and a lot of other stuff), x11 starts xdg (and some other stuff, I think), lxde is started by either x11 or xdg I'm not sure which.
You want to add something to this process, you can do it at the kernel level (bad idea), at they systemd level (probably not right unless its a daemon), at the x11 level (still probably bad as you still don't have a user session yet), or at the xdg or lxde level.
xdg is probably the right place as it has all you need ( a gui, a user session) while being common (xdg will still work if you switch window managers, probably)
With that out of the way, why isn't your solution of modifying xdg working? It's because '/etc/xdg/autostart' is a system configuration directory. Any changes made to it will apply to all users. You may want this, but the system is trying to protect other users on your system and only allows root to make changes to everyone. If you want to do that use "sudo" (documented elsewhere on stack exchange and the internet). If you want to do it just for you use ~/.config/autostart, (https://wiki.archlinux.org/index.php/XDG_Autostart) you might need to create that directory with "mkdir ~/.config/" and then "emacs ~/.config/autostart"
Would it be better to have the python program run in a terminal window from startup? That way you would see what it is doing in case of errors.
If so, perhaps check this out https://stackoverflow.com/a/61730679/7575617
By the way, in the file manager, hit CTRL+H to toggle viewing hidden files and folders.

Frustrated with WampServer

I've downloaded WampServer twice. The specifications for my WampServer are: "Apache/2.4.17 (Win64) PHP/5.6.16 - Port defined for Apache: 80" and for MySql: "5.7.9 - Port defined for MySQL: 3306". The first time, it worked for sometime (2 weeks) and then it started to complain about:
*** ERROR *** The PHP configuration loaded file is: - should be: C:/wamp64/bin/apache/apache2.4.17/bin/php.ini or c:/wamp64/bin/php/php5.6.16/phpforapache.ini".
When I tried to try to move php.ini files to the right locations there was many of them ("for production ,"for development", "phpforapache" and one that just said it was an ini file). Since I was getting the error that no mbstring extension was found, I went ahead and made sure i un-commented ;extension=php_mbstring.dll from all those ini files. Guess what, nothing worked.
So I decided to uninstall WampServer and downloaded it again. It worked. But after I shut my computer down, it gave the same exact problems as before.
I've been looking online to see how I can fix this problem. There are many solutions but none of them seem to work. There's one where there must not be Internet Information Services on, one where I have to set the system environment variable value to the path of my php ini file, one where I must make sure no other service or program is using port 80. I have made sure that port 80 isn't accessed by other programs already.Then, other solutions mentioned that i should change 127.0.0.1 on my httpd.conf file to "all". Finally, there's another problem that says Skype should not be turned on. I do have Skype for business, but is not turned on. I've tried to delete it and uninstall many times, but somehow is not going away. However, WampServer has worked for me in the past.
More strange things: The only way that WampServer will turn green is if I double tap on the desktop icon. Then, it asks me if I will allowed it to make changes to my hard drive. I've tried stopping services and restarting them, but it wont start this way. Also, when I typed localhost it takes me to the WampServer homepage, but if I try to access "phpMyAdmin" it gives me that the extension to "mbstring" is not found. Here is probably the strangest of all: When I click on my task manager and check for services running on my computer, it says that "wampmysql64" and "wampapache64" are both running, while the the icon for WampServer is red. Also, if i test the files under the www folder: one of them is called "testmysql.php" it gives me this error: Fatal error: Class 'mysqli' not found in C:\wamp64\www\testmysql.php on line 7. The other file "test_sockets.php" gives the server error: Extension PHP sockets not loaded.
I don't know why this product is out there if it will do as it pleases: move files, change ports and all these extensive checks that must be made in order to make sure it works. Am seriously looking for an alternative. Sad, cause the graphical interface seems so easy to understand and navigate through.
Please can someone give me a hand. I am seriously thinking about uninstalling WampServer, loading it again and giving it another go. But, i know all those problems will come back.
I ran into the same problems as you did, and I got the answer by checking on their forums. To begin with, exit Wampserver. According to this page*, you should take the following steps:
Open a command prompt window, and run as administratorC:\Windows\system32>
Move to the apache directory C:\Windows\system32>cd C:\wamp\bin\apache\apache2.4.17\binC:\wamp\bin\apache\apache2.4.17\bin>
Create a symbolic link linking the php.ini to phpForApache.ini in the PHP directory
C:\wamp\bin\apache\apache2.4.17\bin>mklink php.ini C:\wamp\bin\php\php5.6.15\phpForApache.ini
You should get a response that sayssymbolic link created for php.ini <<===>> C:\wamp\bin\php\php5.6.15\phpForApache.ini
For Wampserver to run correctly, it has to be run as administrator. So locate the desktop and start menu shortcuts for Wampserver and right-click. Then select Properties > Shortcut > Advanced and check Run as administrator
After applying changes, you can start up Wampserver again and it will run normally.
*The page is in French, so you may need to run it through Google Translate
I resolved that issue: I just renamed the file phpForapache.ini in the php directory to php.ini, then I copied this php.ini to apache directory; finally all the troubles is resolved.
I hope this helps you.
Thanks for the answer #tizak. What I did is I uninstall wampserver and downloaded the previous version for my 64 bit machine. It hasn't given me any problems.

phpStorm 7 Code completion stopped working

I have been working with phpStorm and it had suddenly stopped showing suggestions for code completion. When i do Ctrl + space its behaving correctly by showing all the possible options in a drop down.
I have followed the below link and have did invalidate cache but still of no use.
PhpStorm code completion doesn't show core classes/extensions
My Setup is:
OS: Mac - 10.9.2 (Mavericks)
PHPStorm: 7.1.3
I just had the same problem, fixed it when I realized I mistakenly put PHPStorm in Power Save Mode. Click the little fellow on the bottom right of your PHPStorm window and switch that off
Indeed, the Power saving mode (File > Power Saving Mode) allow you to disable the code inspection functionnality.
However sometimes the PhpStorm code analysis failed and you lost your code completion. In this case you juste have to ask for a new code analysis (File > Synchronize [CTRL+ALT+Y]) or invalid the cache and force a restart (File > Invalid cache / Restart).
Hope that helps.
Invalidating the cache did not work for me, but this did:
Enable power save mode (File > Power Save Mode), then disable it.
If your are using a Linux distro (Ubuntu, Debian, Centos) etc, it is due to ibus.
Just change the Shortcut (run: ibus-setup and change to Super+Ctrl+Space for instance) and everything will be fine again.
Or (my favorite): uninstall ibus if you are not using it.
In a Debian/Ubuntu distro should be:
sudo apt-get remove ibus
Ctrl+Space autocompletion should be back.
It was power saving mode for me too. It's an option at the bottom of the File menu.
install a previous version
https://www.jetbrains.com/phpstorm/download/other.html
Worked for me after I tried everything.
I struggled with this for a few hours this morning. After invalidation of caches, a complete reinstall, etc.. nothing worked.
I closed phpstorm and removed the .idea folder in the filesystem. I then renamed the project folder and reopened it. Autocomplete was now working!
I noticed that phpstorm then created the old project directory in the background, even though I did not open it and put a .idea folder in it. Something is obviously corrupted here.
" ... stopped showing suggestions for code completion".
On mac you can invoke it by fn+ctrl+space.
Going to php-storm -> Settings -> Keymap -> Set Active Changelist you can see it is associated with ^+space.
on windows ctrl+space

#1 - Can't create/write to file '/var/folders/

I get the following error(see. figure) in my Xampp and can not access mySQL through XAMPP and phpMyAdmin. In this link-1 and link-2 possible solution is given; but none of them woks in Mac OS 10.9
I assume the problem is with configuration file my.cnf which is located in the /Applications/XAMPP/xamppfiles/etc/my.cnf.
Any suggestion will be appreciate. Thanks.
Completely stop XAMPP, this means stop apache, ftp and mysql.
Open the program called Terminal.
Type in sudo -i to become root (or do su root if the first doesn’t work for you).
You are most probably asked for a password which you have to enter while no characters are displayed.
Execute chmod 600 /Applications/XAMPP/xamppfiles/etc/my.cnf .
Exit your root shell with exit or just close Terminal.
Restart XAMPP (apache, ftp and mysql).
From: http://slopjong.de/2009/08/31/houston-i-cant-write-to-file/
Solution
Reinstall Xampp. Before reinstalling delete all the files, take away your htdoc and database folder to other place of your hdd.
The database location in Mac OS-10.9 is
cd '/Applications/XAMPP/xamppfiles/var/mysql/'
Htdoc location
cd '/Applications/XAMPP/xamppfiles/htdocs/'
When you complete reinstallation put all the folders to corresponding location and your database will be automatically update.
I looked some other solution but none of them seems work. I was scare if I remove the database to other location and import later will it work or not. And luckily it works, but as precaution careful when you remove big database.

XDEBUG Not working on netbeans

I know this is repeated question. But I am not able to fix my problem even after going through all the posts. I am trying to debug the php on net beans. But it does not stop on first line or not even on break point. Below is the configuration I am using.
[xdebug]
zend_extension="g:/php/ext/php_xdebug-2.0.4-5.2.8-nts.dll"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port="9002"
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
I also set the 9002 port in netbeans. It keeps on waiting to connect to xdebug and when I click on finish debugger session, it gives me below error.
I tried all possible solutions. But could not resolve the issue.
Please help me to fix this. I am trying for last 3 days. :( :(
If you're using Zend Server, you need to make sure you load xDebug before zend extension manager.
extension_dir="C:\Program Files (x86)\Zend\ZendServer\lib\phpext"
zend_extension="C:\Program Files (x86)\Zend\ZendServer\lib\phpext\php_xdebug.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
zend_extension="C:\Program Files (x86)\Zend\ZendServer\lib\ZendExtensionManager.dll"
Please check this. In your php.ini make sure all this options are enabled. Otherwise add it in the end of your php.ini file.
[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.default_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
Check the path(/usr/lib/php5/20121212/) for xdebug.so in your file system accordingly change zend_extension value. Then restart your apache.
1st line zend_extension value is here for ubuntu users. I think that variable no need to change. Please uncheck the stop at First line(tools->options->php->Debugging).