EasyPHP starting error after trying to change PHP - php

I have been using EasyPHP-12.1 for some years now but, foolishly, tried to add a different version of PHP. (I had backed up the www files but not the whole installation). I added a new version (5.6.21) to the PHP folder, selected it in the admin but it didn't work. Now the server doesn't start. It comes up with the error:
Error in Apache configuration file: AH00526: Syntax error on line 185
of C:/Server/EasyPHP/apache/conf/httpd.conf: invalid command "PHPIniDir",
perhaps misspelled or defined by a module not included
in the server configuration.
I would like to go back to the original PHP (5.4.6) or, at least, reinstall the program and copy the MySQL databases to the new installation. As I said, I have copies of all the working php pages - it's the databases that I am worried about losing.
I hope someone can get me up and running again.

I seemed to have managed to get it all working again. I found an earlier dated backup in the conf folder, renamed it and restarted. Phew!
(Made sure I am backing up all the databases and EasyPHP folder now.)

Related

Xampp not showwing my projects in browser - htdocs folder

I used windows 10 as the operating system and I installed xampp it's been a long time and it chews well, until yesterday after an error in mysql.
So I looked for solutions on the internet and I finally solved the error by copying the files from C:\xampp\mysql\backup to C:\xampp\mysql\data.
then the service mysql is well marketed even as Apache.
PhpMyadmin chews well without a problem. phpmyadmin page shows, but my code, will not show.
The problem is: my old projects exist in htdocs only display "This page does not work" and "localhost" in the title head, and nothing loads from my project files.
Note: I used codeigniter as a framework.
Note: I can navigate to a new project but for existing projects beyond that it no longer works.
Thank you P.al
Use Directly like-
http://localhost/projects/form.html
Here your files should be inside C:\XAMPP\htdocs\Projects\yourfile.html
The error in your picture appear an php script error
Edit php.ini for display error and notice in browser
display_errors = on
save the php.ini restart apache and reload page.

PHP upgraded to 7.0 on Ubuntu/server, but hasn't updated on nginx/ajenti

I am trying to upgrade my server/websites to php 7.0. I have successfully updated via terminal, i.e. 'php -v' shows the correct version.
However, it's clear that as nginx is installed on my server, I need to change a setting in the nginx configuration file as well.
I don't know much about nginx and didn't set it up originally, but I know that the configuration files are generated automatically via Ajenti V, so I don't think it's as straightforward as editing a configuration file directly.
Maybe, if I share a couple of screenshots it would help clarify the set. First Ajenti:
Then I have a config file for each domain on my server, and these are located here: /etc/nginx/conf.d/[server name].conf. Here is a screenshot of one of the files:
I can see that the php7.0-fpm.sock file is located here on my server: run/php/php7.0-fpm.sock, but I don't know if that's relevant.
Unfortunately the person who set up nginx isn't around anymore to fix this, hence the need for some assistance.

Can't run PHP after a new installation of XAMPP

I have been a happy user of XAMPP for years,
but today I have updated to the latest Windows 32 bit version on a Windows 10 machine.
I couldn't see a 64 bit version.
Anyway, all went well,
and once I changed some settings, I was able to see all my old databases under the new phpMyAdmin.
But my PHP scripts are bombing out before they start.
Even phpinfo gives the same error message, which is...
"Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'F:/My Documents/OneDrive/Webs/htdocs/index.php'
(include_path='.;C:/xampp/php/pear/PEAR') in Unknown on line 0"
The test script of index.php is nothing more than
<?php echo "HELLO"; ?>
The statement in php.ini is
include_path = ".;C:/xampp/php/pear/PEAR"
and there are no other include_path statements.
The directory C:/xampp/php/pear/PEAR does exist.
The index.php file is there.
I don't know why there's a PEAR folder inside a pear folder - that's how Xampp installed it.
I have tried all variations of that include_path statement to no avail.
I have left out one of the pears.
Leaving out the include_path statement altogether just results in the PHP default which is a folder which is definitely not there, so that's no good.
My localhost is inside the OneDrive folder as you can see from the error message, but I have been doing it that way for years.
Now I cannot run any PHP scripts. Pure HTML is no problem.
The new installation of Xampp has totally replaced the old one, and its Control Panel v3.2.2 looks to be working perfectly.
phpMyAdmin seems to be working fine, but not phpinfo, as said.
I have scanned the web for answers to this, and there is plenty of forum Q&A's, but they all tell me to do what I have done.
The computer is Windows 10 Pro, and is fully up to date. Apache 2.4.33.
PHP 5.6.35. Database server is 10.1.31 MariaDB.
I've run out of ideas. Any help will be appreciated.
Thanks Mike.
You need to fix your include_path system variable to point to the correct location.
To fix it edit the php.ini file. In that file you will find a line that says, "include_path = ...". (You can find out what the location of php.ini by running phpinfo() on a page.) Fix the part of the line that says, "\xampplite\php\pear\PEAR" to read "C:\xampplite\php\pear". Make sure to leave the semi-colons before and/or after the line in place.
Restart PHP and you should be good to go. To restart PHP in IIS you can restart the application pool assigned to your site or, better yet, restart IIS all together.
first: check all the paths in the php. ini ( use a search or a grep to check them)
second: check that you don't have any extensions added twice (one in the beginning and one in the end of the file)

How to repair wamp server without re-installing?

After making changes in php.ini by uncommenting
extension=php_openssl.dll
My Windows-8 system got shutdown due to power failure and later i use to get this error when i try to start wamp server
Later visiting some link i added the below code to wampmanager.ini file as it was empty
Now the first error got fixed and now throwing this error mentioned below:
Later i also installed visual c++ 2008 to fix this error but unsuccessful. I have many important databases which i have not taken back up also. I am trying to repair this wamp server without re-installing. Can anybody please assist me with this.
Thanks in Advance
go to the wamp/scripts folder
open console
run:
php refresh.php
this should recreate wampmanager.ini
(requires wampmanager.tpl file in wamp folder.
taken from http://sourceforge.net/p/wampserver/feature-requests/10/#750b)
This document may help you How to uninstall WAMPServer without actually uninstalling it
The idea is that you uninstall your current version without actually running the unninstall and without actually deleting any files from your existing install.
You then rename the current wamp folder and then install the same version of wamp, make sure it works, and then copy all your sites and databases to the new installed wamp. If you install exactly the version of WAMP you have currently then you can copy the whole of the .../mysqlx.y.z/data folder and all you databases and users should be there on the new install.
This gets over whatever damage was done to your existing install. You may need to edit the php.ini and httpd.conf to match your existing configuration. I suggest you do not do a straight copy of either of these files as that may just get you to where you are now.
Fixed by installing wamp again into the same directory by renaming the older wamp. I just replaced wampmanager.ini file of new to the old one. Earlier it was just a little piece of code i pasted in wampmanager.ini file. But now it is a big one which fixed this issue. Thanks a lot for you guys, your suggestions saved my time. I did not change anything with php.ini also.
Backup all YOUR databases in SQL format and store the backups somewhere safe.
Stop All Services.
Remove the Apache Service.
Remove the MySQL Service.
Exit WAMPServer.
Rename your current \wamp folder to \wamp_old (This is your backup. DONT FORGET THIS STEP)
To all intents and purpose, you have uninstalled WAMPServer now.
7. Download and Install the new WAMPServer version
(32bit is recommended, 64bit is only for geeks and 64bit PHP is not yet fully converted to 64bit)
Change NOTHING! Check it works in its out of the box state.
Clear your browser cache ( CTRL+F5 ) to avoid any funnies with cached content.
Run localhost
Run phpMyAdmin (If asked for a Username and password; username = root / password = (nothing, leave this blank)
Run \wamp\www\testmysql.php. you will need to edit the file and change the "mysql_connect('127.0.0.1', 'root', '')"
If you want to bring some/all of your old versions of Apache/PHP/MySQL into the new WAMPServer
(Remember, one of the big advantages in WAMPServer is the ability to switch between versions of Apache/PHP and MySQL)
Apache: copy \wamp_old\bin\apache\apachex.y.z folder to \wamp\bin\apache\apachex.y.z
PHP: copy \wamp_old\bin\php\phpx.y.z folder to \wamp\bin\php\phpx.y.z
MYSQL: copy \wamp_old\bin\mysql\mysqlx.y.z folder to \wamp\bin\mysql\mysqlx.y.z
To tell WAMPServer about the old version of Apache/PHP/MySQL you just copied across run a "refresh",
right click the wampmanager icon -> Refresh
Give it a few seconds to go find all the new versions.
Compare your old configs with the new configs, move over any of your local change/requirements.
Remember, config parameters change between versions of Apache/PHP/MySQL !
Make sure your old changes are still required, valid, legal. ( Check the upgrade notes provided by all 3 software providers )
If it all goes horribly wrong. Check the bottom of this Doc to see how to unwind all these changes easily if you get problems.
help you
I have had the same issue. I am working with WAMP 2.5 version. The content of "wampmanager.ini" is OK but it's possible that the php path is wrong. Check folders of section [StartupAction], in my case my php version is "php5.5.12". Surely the error message "The directory name is invalid" was for this.
In win10 you can just right click on the wampmanager.ini file in the root and select Restore Previous Version, then just choose one from a few days ago when it worked.
i have similair issue in the morning and searched SO and other forums but none of the solution worked for me.
It was
syntax error on line number 561 (due to MariaDB)
After checking all wamp installation for MariaDB, i find out that file at root: wampmanager.conf contain lines about MariaDB. I removed all of those and then restarted wamp. It worked like charm!
Rename the wamp folder, you can just add a 1 or 0 to somehing like wamp641 then
re-install wamp server
3.copy paste the mysql and project folders from Bin and WWW respectively from the renamed wamp folder to the newly created folder after installation so that you dont loose any database and project files from your previous projects.
4 start your wamp and it should work well.

FuelPHP "invalid data source name" error

I'm trying to set up a FuelPHP app, and I've run into a puzzling problem. Every time the app tries to connect to the database, I get the following error:
Fuel\Core\Database_Exception [ Error ]: invalid data source name
I've set FUEL_ENV to "stage" in Apache's VirtalHost configuration and the database credentials in fuel/app/config/staging/db.php seem to be correct: I can log in to PhpMyAdmin using the same username and password. I'm stumped as to what else to try - any advice would be much appreciated.
In case it helps, I'm using FuelPHP 1.4 on an Amazon EC2 instance running Ubuntu 12.04 LTS on which I've installed MySQL and PHP via apt-get. I have another app (on another instance) running an older version of FuelPHP (1.2.1) which runs with no problems.
Incidentally, this question is probably closely related to this one, but I'm asking it as a separate question because the problem I'm having is not limited to the command line.
Ok, this has taken far too long to get to the bottom of, but it turns out to be simple to fix: for some reason, in FuelPHP 1.4 the stage environment's config directory is called staging (in previous versions it was stage).
I don't know whether this is a directory naming mistake, or whether this is a new name and something somewhere in FuelPHP hasn't been updated to use it, but I found changing the directory's name to 'stage' fixed the problem.
I had the same issue when running unit tests with FuelPHP's oil utility. If you're running into this issue, it most likely is a configuration issue.
To debug, somewhere in the code that isn't working put something like the following to see what environment FuelPHP is trying to use:
<?php
echo "env: " . Fuel::$env;
exit;
In my case, it showed it was trying to use the 'Test' environment. Since I didn't have a 'test' folder in my app's config folder, it was failing.
In most versions of FuelPHP, however you have the Fuel::$env set in your .htaccess file will work throughout all versions of FuelPHP. However in older versions, you may run into this issue.
You can either edit the bootstrap.php file and manually set the FuelPHP environment how you want, or setup the environment that it's trying to use.
Apache web server: SetEnv FUEL_ENV DEVELOPMENT Hope this helps someone
For those of you who none of this worked make sure of two things
there are multiple db.php files /fuel/app/config/development/db.php. check environment as #Chad Hutchins mentioned and double check the username and password is correct
Make sure /var/mysql/mysql.sock exists. In my case I was using /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock so i needed to create a symlink. Followed the instructions here
Hope that helps someone

Categories