I am trying to increase the file upload size for phpMyAdmin so I can import a SQL database.
In order to do so I need to edit php.ini. However, I can't find it on my computer. I am using MAMP on a Win 10 machine. Can someone show me how to do it?
You will probably find php.ini in
C:\MAMP\conf\
On my mac, running MAMP I have a few locations that would be the likely php.ini,
so I edited the memory_limit to different values in the 2 suspected files,
to test which one effected the actual MAMP PHP INFO page details.
By doing that I was able to determine that this was the correct php.ini:
/Applications/MAMP/bin/php/php7.2.10/conf/php.ini
Assuming MAMP uses same directory structure on PC, then it would just be the php(number) that would differ depending on what PHP is set in your MAMP Preferences.
MAMP keep its php.ini in the following location.
/Aplications/MAMP/conf/bin/php/**{current php version}**/conf/php.ini
Ex: /Aplications/MAMP/conf/bin/php/php7.2.8/conf/php.ini
Related
I purchased a fancy little "visual menu maker" over at envato (Code Canyon) from here: https://codecanyon.net/item/z-menu-maker-drop-down-and-mega-menu/9240528
I was using their sample app where you can test out the tool and I was able to create a nice little menu for my site. But you have to purchase a license to export the code.
I purchased the license and the first "Getting Started" requirement is to "Start your Web Server and open the index.html file. This is where I'm lost. BTW... for reference, you can scroll to the bottom of that documentation page to see all the files that were included in the download.
When I try to open that "index.html" file in my browser, it doesn't load.
I followed some instructions to get my native Mac Apache server running, and everything seems to be working, with my localhost, but I don't know how to open this file through my Apache Web Server.
Any help would be so appreciated!!
I am assuming you have your Apache installed on your Mac under /etc/apache2 folder
If you want to serve your html files and related components, you need to tell apache from where to find your files
So , you need to configure apache so that it can server your files.
first you need to open an terminal from lunch menu then go to the apache2 installation directory
cd /etc/apache2
Then you need to open httpd.conf file and make necessary changes,
sudo nano /etc/apache2/httpd.conf
You will see "DocumentRoot" line/. Change it with your directory where you put your files.
Change also Directory path with yours. (It should be in same config file such as
with
<Document "some_path">
Then you should restart apache server with command
sudo apachectl restart
Now you can try to access your file . you can also check http://localhost to validate
You need to put the files somewhere within the DocumentRoot of your Apache web server, and then you should be able to visit them with http://localhost/ (assuming the index.html file is in the root of the DocumentRoot).
I'm not familiar with the default setting of DocumentRoot on the Mac port of Apache, but you should be able to find that quite easily in the configuration. On Linux that would commonly be found somewhere under /etc/apache2 or /etc/httpd.
There may be further configuration needed if the files expect some sort of server-side module to be activated (e.g. PHP), but it sounds like they are just plain HTML.
Some good answers were given but I think this particular app needed a few extra steps in order to work properly.
The developer got back to me and told me I'd need to install a MAMP solution in order to run the app.
So I installed that and then took the unzipped folder and all its contents in this folder /MAMP/htdocs/
Then when I visit http://localhost:8888/ZMenuMaker/ the app runs without a hitch!
I have installed wordpress on my webserver, but I want to export the database to my localhost until I finish the site, then upload the database to the server.
I tries exporting through phpmyadmin but when importing it into my localhost phpmyadmin (on wamp) it give some errors.
Is this possible or there is easier options.
Check your phpmyadmin can import to a large size, if it cannot, amend your php.ini upload sizings
upload_max_filesize = 10M
Also you can upload a .sql as a .zip through phpmyadmin.
Also check your database exists that you need to upload the file into. Without you actually stating the issue there isn't much more to go on.
I'm running an install of WP (3.5.2) on MAMP. Some queries are outputting stuff the way they should (post count, last 5 posts etc) but one isn't. This is a query going through about 550 custom posts and displaying information. I've got 'posts_per_page' => '-1' in the arguments array and I noticed when I change the value to 100 I do get output. The loop of the query goes through all the custom post types and for each post it gets about 10 meta values. On my live website this is all working as expected.
I'm not very skilled in server setups and MAMP so I was wondering if this has anything to do with MAMP (or MySQL) being limited to a certain amount of database requests or something?
Webserver: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8x DAV/2 PHP/5.4.10
It was a memory problem like Ennui suggested. I did two things to resolve my issue:
1:Changed max_allowed_packet to 1024M in MySQL (see here)
Added --max_allowed_packet=1024M to /Applications/MAMP/bin/startMysql.sh and restarted MAMP
2: Changed memory_limit in php.ini (my method below or see here)
Open /Applications/bin/php/php5.4.10/conf/php.ini, look for memory_limit and change it (for me it was 32M, changed it to 1024M) and restart MAMP. If your using another version of php, look in your php version folder instead of php5.4.10.
I don't know if memory_limit was the problem or if it was a combination of PHP and MySQL since only changing max_allowed_packet didn't resolve my issue, but the two steps above work!
I'm trying to understand how MAMP manages the Apache web server but I cannot find the index.* file that is being served as the MAMP start page.
The virtual hosts configuration, httpd-vhosts.conf, is not included and Applications/MAMP/htdocs contains only my own site so how/where is http://localhost/MAMP/?language=English configured? The preferences for my installation of MAMP show that the 'Start page URL' is /MAMP/, is that an alias for another directory?
Instead of MAMP/htdocs like you might expect, you will find all the "start page" stuff in MAMP/bin/mamp (e.g. the English language page is MAMP/bin/mamp/English/index.php).
This is due to the following line in MAMP/conf/apache/httpd.conf:
Alias /MAMP "/Applications/MAMP/bin/mamp"
A Word of Caution
If you are using MAMP as a quick-and-easy web server (as many blogs recommend, since Apple annoyingly eliminated "Web Sharing" from the System Preferences), then these maintenance pages are available to everyone everywhere (thanks to the Allow from all you'll see in the config file near the alias). Everyone in the world can see your full php configuration and edit your database. The following aliases are also problematic.
Alias /phpMyAdmin "/Applications/MAMP/bin/phpMyAdmin"
Alias /SQLiteManager "/Applications/MAMP/bin/SQLiteManager"
You could try to lock down MAMP, but it's probably easier to just not use MAMP, since it is not intended to be used for live websites. As the MAMP website itself says:
MAMP was created primarily as a PHP development environment for Macintosh computer and should therefore not be used as Live Webserver for the Internet. In this case, we recommend that you use Mac OS X server with the provided Apache or a Linux server.
Hi Goto Applications from finder
open up the MAMP folder
then open up htdocs
I'm using MAMP PRO on my Mac (running OSX 10.8 Mountain Lion).
Today I added a new host and managed to name it sitename .org which now making me unable to access it online.
Fist I tried to rename the host - didn't work.
Then I tried to remove the host - didn't work.
Tried to rename the folder (wich also was named sitename.org) - didn't work.
So basically now I cannot access this particular site at all.
I've set the correct disk location and everything, but it just uses "Document-Root: /Applications/MAMP/htdocs". Even now, after I've removed the host, it still says" "erver name: sitename.org".
Also restated the machine...
Does anyone know how I can fix this?
I believe MAMP Pro sets all the apache settings on launch, saving them in its preferences plist or some such, so:
Start MAMP Pro
click to the sites tab
click the + button below
fill in the details for your site (desired local url eg sitename or sitename.dev)
restart MAMP
There is a video for Mamp Pro here: http://www.youtube.com/watch?v=4hMW8sTFftI
if you have any cruft from trying to set this up manually, check in your /etc/hosts file, remove any lines that relate to your 'sitename.org'. This way, your machine will look online for sitename.org rather than thinking that the site should be served locally.
You may need to flush your dns cache? for 10.8 try:
sudo killall -HUP mDNSResponder