I'm following Kevin Skoglund's "Php using MySQL" tutorials on lynda.com. In the installation he uses sudo a lot to configure stuff and open files. All of this is on the terminal for Macintosh computers. He starts the apache server using sudo apachectl start or restart. He also opens many pages with the nano text editor(which is used in the terminal) and he uses sudo before the majority of the commands. The pages he goes into are things like php.ini.
Before I started his course, I installed php and MySQL in a different way, that caused some problems with the 'socket'(I'm not too familiar with what a socket is). So that's why I had to go to the installation chapter to install everything the sudo way(I'm aware that sudo is more dangerous than smoking at a petrol station).
So now when I go to textmate, it constantly requires my user password to save files and the files in my project drawer glow red. Also, even if I do type my password, it makes the sound that means "YOU CAN NOT DO THIS!". Could you please tell me how to make everything stop requiring passwords? PLEASE HELP! Thanks.
Edit: Ok, when I use ls -la in my php folder, the files come up with "rw-r--r--". Anyone know how to change the permissions?
Related
I am not a Pro at server side scripting so here goes one small problem I am having and hopefully someone out there will be able to point me in the right direction.
I am transferring a site to a new shared hosting in Godaddy. In the process installatron didn't migrate correctly so I had to pick up where it left off and manually did the rest. After checking the PHP info I noticed that the MySQL Extension is not installed.
I did some research online and came up with this code to create an installation of the extension. My only problem is that I do not know where to add this code.
# apt-get install php5-mysqlnd
Do I add it to my php.ini file? do I input this through my cmd prompt? or Do I add it to my htaccess file?
I thought the CMD was the proper way to go but I don't mess around with CMD too often so I am slowly getting better at it.
Is this the proper way to go?
Do I use the same credentials to log in via CMD as FTP, cPanel or ???
Thank you for your constructive inputs.
Hi guys i need help to fixed this Symfony configuration issues on my mac. Am using OS X El Capitan:
Am new on Symfony and l get this result after installation.
Configuration checker
This script analyzes your system to check whether is ready to run Symfony applications.
Major problems
Major problems have been detected and must be fixed before continuing:
app/cache/ or var/cache/ directory must be writable
Change the permissions of either "app/cache/" or "var/cache/" directory so that the web server can write into it.
app/logs/ or var/logs/ directory must be writable
Change the permissions of either "app/logs/" or "var/logs/" directory so that the web server can write into it.
Recommendations
Additionally, to enhance your Symfony experience, it’s recommended that you fix the following:
intl ICU version installed on your system (56.1) should match the ICU data bundled with Symfony (55.1)
In most cases you should be fine, but please verify there is no inconsistencies between data provided by Symfony and the intl extension. See https://github.com/symfony/symfony/issues/15007 for an example of inconsistencies you might run into.
a PHP accelerator should be installed
Install and/or enable a PHP accelerator (highly recommended).
#Kkinsey beat me to it, but here are the official instructions you need to follow for macOS:
http://symfony.com/doc/current/setup/file_permissions.html#using-acl-on-a-system-that-supports-chmod-a-macos
It's a permission problem with the var folder (if you are using Symfony3).
The ICU error is really a warning.
If you are using PHP 7.0, then you don't need an accelerator.
Open the Terminal app, go to the Symfony directory, and type:
sudo chmod 777 app/logs/
sudo chmod 777 app/cache/
You'll be asked for your password. If you need more information, read Understanding Unix Permissions.
As for ICU, I wouldn't worry about it if there are no problems. As for a PHP accelerator, I'd wait and analyze performance. ionCube or Zend Optimizer are your likely choices; a quick Google Search indicates they are available...
Basically My aim is to use the following script on my website
php-upload-progress-bar
I want to first of all set it up on my local server which is on ubuntu 10.04 and i am using xampp1.7.7 and then upload it on my website which is hosted by dreamhost web hosting which uses php5.2
The main requirement of above script is to have APC .
My problem is that i am unable to set up APC on both server (my local and on dreamhost)
I have followed many tutorials to install it but coudn't install it
Can someone give me some idea about using APC and installing it to run above script??
I have already followed following tutorials and guides
Dreamhost wiki
Stack answer
PS;I am not using apache2 service.my php path is /opt/lampp/htocs
Please help me i am stuck in this and also i am using that upload script because i can not use flash,html5 or php5.3 acording to client requirement so i need a solution for upload progress bar using APC so that it will run in all browser and with php5.2
Thanks in advance
Please feel free to contact DreamHost support for more immediate assistance. As for the APC extension, it is not enabled on our php 5.2 or php 5.3 options, as you mentioned. The easiest way to do this will likely be to compile the apc module for php 5.3 and then setup the custom phprc file for it under your user. This wiki details the process:
http://wiki.dreamhost.com/PHP.ini#Compiling_PHP_5.3_extensions
-- I tested doing a install right now, the steps were:
Download the APC package from PECL: http://pecl.php.net/package/APC
extract it, enter the directory, run phpize, then run:
./configure --with-php-config=/usr/local/php53/bin/php-config
then make
mkdir -p ~/.php/5.3
cp modules/apc.so ~/.php/5.3
then edit the file ~/.php/5.3 and put into it:
extension=/home/USER/.php/5.3/apc.so
(replacing USER with your real ssh username)
save it, and you should be good to go.
Feel free to write us at support if you have any additional questions.
I'm trying to build a post-to-wall system. I followed a tutorial and it looks like I'm fairly close. However, loads of warnings come up when I post instead of the actual post. Do I need to setup a database somwewhere? I've never done much with PHP or databases, so excuse my ignorance.
http://beulahprint.ie/facebook_wallpost_system/
This all depends on whether you have underlying access to the machine that you are doing your development on.
If it is a linux machine and you are able to log into it then the following command will work for Red Hat (and it's derivatives: fedora, centos, etc...) as well as deban based systems such as ubuntu:
mysql --version
If this command reports some form of error they you will probably need to install mysql with one of the following commands:
sudo yum install mysql-server
OR
sudo apt-get install mysql-server php5-mysql
The sudo part makes you superuser so that you may install the software (not everyone) can install software you know. When you have run this command the computer will go through all the normal steps to install the software, but it will ask you a number of questions like: what would you like the root password to be? what IP is mysql going to run on? Luckily MySql fills most of these in by default.
If you are running on windows then it is just a matter of downloading the installation file from the mysql website, double clicking the .exe, and following the installation steps.
Good luck!
EXTRA: If you are looking for an easy way to access your mysql database you can't go far wrong with 'MySQL GUI Tools', just google it.
All of the errors you are seeing are due to a missing database and the inclusion of db files. You'll need to connect to the database (using PDO or MySQLi) and update it with the content you are entering. Looks like you are about halfway there.
In the past, I used WAMPserver on windows to parse PHP for me. This is a pre-configured package, focussed on working with MySQL.
When I tried to run PostgreSQL, I got error messages that said that my version of PHP wasn't compiled to work with PostgreSQL.
So, I've recently uninstalled WAMP and every associated with it. I've downloaded Apache 2.2.11 with openSSL, installed as admin(you know, run the command prompt as administrator, cd to the directory where the download was done and have it executed, so the install was done as admin).
That's that. I now have Apache installed, "it works" shows up, so I'm that far.
Now I'm wondering, do I download the exe and install, or the zip, or something else.
What is the best thing to do to make sure that the PHP on my system can handle everything I can ever throw at it?
Also, PHP first, or MySQL/Postgre first.
And lastly, what about PEAR? I need PEAR installed, which isn't standard on Windows. I'm guessing the pear.bat file in the PHP downloads will do that for me?
EDIT: I see one close vote, yet no comment as to why. It makes me wonder how people who are so lazy and rude got to have somany points.
I would recommend downloading the zip package, as configuring php is not really that difficult, and it allows you to add features as needed.
As for whether first to install php or MySQL/PostgreSQL, - it does not really matter. You can install them in any order.
Your guess regarding PEAR is quite correct
i haven't used wamp before, so i can't comment on that
i do however use xampp which sounds very similar
in xampp if i want to enable postgres support i edit the php.ini file and uncomment the postgres section of the ini file, same with any of the extensions that i need
perhaps this might be an alternative you can try if you get stuck
There are many ways to setup a HTTP server/PHP/database machine. Sometimes the behaviour of your development setup will differ from the live server's.
I would recommend finding out the setup your web host is using, then getting a vmware appliance image that fits that as close as possible and get any additional software using it's package manager (which is easier that installing stuff on Windows).
Setup a file sharing link between the VM and the host, make sure you can view the VM's port 80 in a browser running in your host OS and you're set.