how to move website from WAMP to LAMP server [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
i built my site on WAMP and now need to move everything over to LAMP. I understand that include paths are different in LAMP. What do I need to do for the site to work without having to change my code?
phpinfo();
include_path
.:/usr/share/php:/usr/share/pear
is there anything else to look out for when moving a website from WAMP to LAMP?

The biggest issue I have when porting sites from Windows to Linux is filenames and paths. See, Linux is case-sensitive, while Windows is not.
To help you debug those and other errors, you can turn PHP errors on, by searching for and changing two settings in /etc/php5/apache2/php.ini:
error_reporting = E_ALL | E_STRICT
display_errors = On
You can also read the error log in /var/log/apache2/error.log instead of displaying all the errors.
Also, in future I suggest that you develop on the platform you are going to deploy to.

Related

PhpMyAdmin Blank Page on fodora 22 localhost server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I follow this guide to install LAMP server on fedora 22 workstation
How To Install LAMP Stack (Apache, MariaDB And PHP) In Fedora 22
Everything working well except phpmyadmin.
When i need access it of the browser
i see nothing (blank page)
How i can fix this issue ?
Any Suggestions ?
Possibly you can get more info via 2 things
1- Enabling php display_errors in php.ini file which you can find by running
php --ini
changing display_errors to on and save it then restart apache web server and revisit phpmyadmin url which should show you the error
2- looking in apache error log which mostly located in /var/log/httpd/error.log
you can use tail -f for better tshooting
tail -f /var/log/httpd/error.log
Try running phpMyAdmin's index.php over the command line. This should give you more information about the error that causes the problem.
php index.php

Remove weird looking orange PHP errors on Debian [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I set up a Debian virtual machine for local development, but funny enough any kind of PHP errors are displayed in an (too me) unusual design, with a orange table layout... How can I make PHP display errors the with the "traditional" design?
Update (added system explanation and screenshot):
It's Debian running on a virtual machine on my Mac using VirtualBox.
Based on the comment from Bojangles I investigated and found xdebug to be enabled. Disabling it removed the "orange" error output, and I now get "normal" error display.
I disabled it by removing the link to include the xdebug extension in /etc/php5/conf.d

Curious as to why system said it was loading php.ini file from different directory [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I was wondering why my system says it is running the php from the /etc/php5/apache2/php.ini
directory when in fact it was running it from the /etc/php5/cli/php.ini .
When I did a phpinfo() on a file in the directory of the folder, I received this however the changes to the configuration file wasn't impacting the server until I searched the whole system for a php.ini file and found the php.ini file under the cli/ directory:
Hopefully you can see it. I wasn't sure exactly how to put in onto SO.
it's intentional so you can easily have different configuration depending on your runtime environment.
In your environment when php runs in command line mode it uses /etc/php5/cli/php.ini.
When you access it from browser php is running from apache. So then /etc/php5/apache2/php.ini is used.

php.ini file not found [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a hosted website with cPanel. I want to modify php.ini, but I don't get where that file is on server. I tried to find the location of the file using phpinfo() and I got the location as /usr/local/lib/php.ini but when I search in file manager I'm unable to find this location.
I looked at https://stackoverflow.com/a/3401536/1989696 and followed the same steps, but I'm not sure how to tell if the webserver supports SSH or SFTP access.
Also, how can I locate the php.ini file?
Unless you have a dedicated or virtual server, you are not allowed to edit system-wide PHP settings.
If PHP runs as CGI, you'll possibly have a custom .ini file you can tweak:
... or, if your PHP version is 5.3 or greater, you can create your own .user.ini files.
If PHP runs as Apache module:
... you can use good old .htaccess.
And, of course, 95% of the PHP settings can just be changed from within PHP code:
ini_set()

Unable to open localhost? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have been using Lampp on a test machine. OS is Ubuntu 12.1. It was working fine before and running my scripts. Then it began displaying a pop-up asking me if I would like to open or save the file? I have tried changing the ports and restarted the machine and restart Lampp. Nothing has worked so far though.
Your MIME types are wrong and/or mod_php isn't loaded.
What is in the files? If they contain your PHP code, Apache is serving the files out rather than putting them through PHP. Check you are loading mod_php.
If they contain the output of the PHP code (i.e. the HTML) then they aren't being given the correct MIME types. I'm not sure where this is done, I think Apache or PHP adds the headers automatically. Check the Apache MIME types config

Categories