I have just purchased a MacBook Air and am having trouble setting up my development environment. On windows I used WAMP with fairly few problems, and on OSX I'm using MAMP.
the windows development environment is working as needed, and I'm using an exact copy to start out on the mac
When I visit the phpMyAdmin page I am able to log in, and make changes to the database.
My application is based off of the Zend Quickstart tutorial, so I am using the error controller that comes with that (I haven't changed it)
My application will work up until the point I call to connect to the database:
$dbAdapter->getConnection(); results in:
"An error occurred
Application error"
As you can see there is no information about the error. Typically an error will have a code and description, whatever is causing this error is not providing any information.
Please help! Thanks.
EDIT: The answer was indeed that my virtual host was not set up correctly, and left the environment variable undefined, which caused the application to run as if in production. This caused the application to attempt to access a database that doesn't exist on my local dev env. Thanks so much for the help!
Current OSX has built in php, apache. you need to install mysql. for few months I'm using Zend server community edition. You may try this. its easy to install and maintainable through GUI
Related
I have machine on which I lack admin privileges. I was not able to install xampp server on it. So I tried portable version of xampp. But I was getting error while starting Apache server and MySQL. The log file is not getting created.
Also many tutorials online use NetBeans which is also I am not able to install due lack of admin privileges.
I have postgres and apache tomcat working on my machine, which I used for Java Spring development. I also have eclipse installed on my machine. So I was thinking if I can manually configure eclipse, postgres, tomcat to develop php without installing xampp or netbeans.
Is it possible? If yes how do I do it? Is there any tutorial / link / webpage explaining the same?
If you can install jetbrains PhpStorm it has a built in server but due to lack of privileges i think it is not posiible though, so here are two links i have for you, hope you will able to find an answer..
https://www.eclipse.org/articles/article.php?file=Article-EclipseDbWebapps/index.html
https://www.enterprisedb.com/postgres-tutorials/how-connect-postgres-database-using-eclipse-and-netbeans
if you use php framework like laravel, cakephp etc.
Those have own development server to run application.
and for the database you can use sqlite database.
that not require xampp server
I'm trying to run a copy of a joomla site (that works perfectly on the hosting) but, when I put all its files on my directory and install its BD just works administrator site but the site itself keeps in white screen.
I update its configuration file (configuration.php) exactly:
-DB
User
Password
Host
DB & DB prefix no changes needed
-Logs
log_path = 'C:\wamp\www\sitename\logs'
tmp_path = 'C:\wamp\www\sitename\tmp';
I don't know what to do, I don't understand (I'm new with Joomla)
Joomla version: 3.5.1
PHP: 7.0
A white screen usually is a sign of a server error of any kind. A first step to identify the underlying problem is to enable the debug mode and set the error reporting to development. You should then get an error message instead of the white screen.
In general, it is a good idea to use a tool like Akeeba Backup to transfer sites. It takes care of some environmental differences between the production server and localhost. You can even utilise another database management system.
Its not much complicated.. As you said you have already configure DB, Prefix, Host and Password.
So verify it again and suggest to check your localhost PHP version and online PHP version. Its create problem if your PHP version and live PHP version are different.
And make sure the PHP libraries you used on live site, these all need to install on your local PC too.
and make error_reporting maximun to check exact error and tell me error you get.
Please do this and if still you have issue than please wirte comment me, we will find more about your issue.
Thank You.
I'm trying to put my application on a new server, the configuration is the same as the development server and at the development server it runs fine. But when I go to the live server, the first page works fine but the second page shows an ERR_EMPTY_RESPONSE error. This has never occurred to me.
The server is an amazon ec2 Debian 7 server with apache2.2.22 and PHP 5.4.4-14+deb7u7, there is no mysql database because the application connects to a mssql database within the same cluster. The symfony version is 2.4.2
I've searched the internet for a solution but all you get that's it's apc and a known bug at apc but I don't use apc for this application. I also don't use the following modules:
APC
xCache
suhosin
xDebug
The apache logs doesn't show anything weird and the Symfony2 logs also.
I'm kind of lost here so if anyone knows a solution please tell.
I did a complete reinstall of the server and that did the job, no clue where it went wrong the last time...
i don't know how to say that in technical terms. and i think this is the reason to why i cant get good answer from Google.
i have xampp on my local winxp machine. i use it for developing websites locally then upload these files to my clients shared hosting accounts.
the problem that in 2 years i have always found differences between how xampp works and how the web server work.
some code work locally but dont remotely and the opposite. also flash behave differently on xampp than the remote web server.
is there is a way i can get the server configuration and use it with xampp like get the server php.ini and use it with xampp?
In fact XAMPP may behave different than your production system's web server.
This might be annoying at first, but it is definitely manageable.
Some thoughts:
Run
<?php
echo phpinfo();
?>
on both systems and check different features.
If a feature of PHP is marked as experimental, just drop it.
In case you need to deploy on different production servers, prepare a script called grabProperties.php and add code which checks essential properties you know to be in use. Output the result in some normalized way, so you may use another script to compare results and prepare a nice report.
Certain features activated in XAMPP are not enabled on most web hoster's server - e.g. Flash support. Before using these features, first ensure they are present on your production system.
You are always free to change php.ini. Thus, you may enable or disable modules in such a way, that you dev system mimics your production system's settings.
I wonder, that Flash problems relate to PHP itself. More likely, problems relate to erroneous code.
That said...
I do write PHP for quite some time. Upgraded XAMPP on dev and Apache/PHP/MySQL on production system several times. But not a single application failed to work after the upgrade.
Several times, I moved from dev Windows and production Linux to dev Mac OS X. Even there, everything worked fine immediately.
Needless to note, that not a single line of code needs to be changed between dev and prodution systems.
The essential point to to write high quality code is based on a defensive style.
Check as much input parameters of as much methods as possible (see assert()).
Log all errors to a log-file and visualize it using your admin backend (see set_error_handler()).
Use type-hints as often as possible (see type-hinting)
Set the maximum error level and code in such a way, that not a single warning appears.
Still unsatisfied?
In case you are still unsatisfied with XAMPP, prepare a virtual machine with VirtualBox, install some Linux edition and enable apache, mysql and php.
If your hoster's server is on linux - which is very likely - there should't be a big problem configuring the virtual LAMP server in a similar way.
What are the benefits of installing mamp or another package vs enabling php in httpd.conf and manually installing mysql? I am really not sure of which option is better and would love some info.
Thanks,
MAMP and other packages are usually pre-configured and come with other tools like phpMyAdmin, SQLite Manager, SSL, code optimizers. If you think you're handy enough to do what others have done, go ahead. But it'll save you a lot of time and trouble by grabbing what's already available.
I've used MAMP for over two years now and I love it.
For me, I didn't want to configure PHP and MySQL with Apache. On my old computer I installed MySQL and then phpMyAdmin and had a lot of fun trying to get it all working. (But I'm not good with terminal and bash commands)
I installed MAMP on my new computer just because it does all the work for me. When I want to debug a php script, I just fire up my local server and make a few changes.
Imo, MAMP/WAMP = Easy get up and go in a development environment.
If you are running a business critical app, you may be better off with a LAMP stack