Showing posts with label Problem. Show all posts
Showing posts with label Problem. Show all posts

Saturday, April 26, 2014

php laravel 4 "You need to specify a file path to store the seed.

This Error happened because your php version is not loading the openssl extension , check the php.ini file and un-comment  this line :

;extension=php_openssl.dll


to be like this :

extension=php_openssl.dll

Saturday, August 17, 2013

SQLSTATE[42S02]: Base table or view not found: 1146 Table - Laravel Eloquent

If you got this error and you know for sure  that you are having the table name in your  database, Then the problem is the prefix of the table, why is that ?
I have my model declared like this :

class tableName extends Eloquent{} 

Now eloquent will take in account that table name in the database is table_names , As you see, it will add underscore before the capital letter and "s" for plural .this will happen by default unless you explicitly declare the name of the table inside the model class like this:

class tableName extends Eloquent{

protected $table = 'tableName'; 


}

Or Avoid the Capital letter in the name of the model.

Friday, May 3, 2013

Wamp cannot load extensions- php5apache2_4.dll - Windows 7

Wamp is Automating every thing that's the great thing of this web server , So , If you enable the extension from the menu (Icon Tray-> Php Menu  ->Extensions) ,Wamp will un-comment the extension in your php.ini  automatically , you don't need to do anything.

Please Note : that there are three Php Initial files came with Wamp , one in Php Directory , the second in Apache->Bin Directory and the third is called phpForApache.ini and located in php directory.

We are talking here about the second file that located in Apache->Bin  folder and that file must be showed in the results of Phpinfo() function as "Loaded Configuration File " variable .

So, Don't Comment anything . wamp will do it for you , what you need to do Solve Any Problem is to check the Variable 'Extension_dir' in php.ini file , the directory must be related to the apache folder .I meant that the path to the Php extensions directory must be not  = "ext", Because that mean, the folder is inside the Apache->Bin  Folder , and that's not right . Just write the full Path to the extension Directory.

Another thing to mention here that is very important if you are going to play with wamp , when you switch the php version through the system tray menu, Wamp  will copy the phpForApahce.ini from php version directory to Apache version directory .
Then it will change  any line contain "LoadModule  And Php" with the  line from another file called "wampserver.conf" that is located in php folder which is relevant to the apache version.

Two files are  important to wamp to load php extension successfully on is the php.ini in the php directory and the other is in apache/bin directory they must include the same extension and the same extension_dir






Sunday, February 10, 2013

Wamp on Windows 7 Startup

Problem:
Localhost is running automatically on Windows 7 start up .
To Solve that Just change its Startup type from Automatic to Manual  through the services panel .
From the command prompt enter : Services.mcs
Enter
look for Wampapache and Wampmysqld  Services and change their startup type to Manual



If you want to run Wamp whenever Windows startup then change manual to Automatic

Monday, January 28, 2013

Apache 2.* Wamp Stop Working on Orange Icon

On Windows 7, Wamp server  used to run smoothly with no problems and suddenly the server stop working, if the server is ok the tray icon will be in green color, that  is sign of healthy wamp server, but now  I get only at orange color tray icon.
As usual the first thing to do in thiss case is to check the logs file to see the error message that was saved there, but another shock was there is no error message in Apache log files.

The Problem was that ,Skype is conflicting Apache because Skype use port 80 as an alternative connection port, So when Skype is started before you start apache it will use the 80 port, but if Skype is started after then port 80 will be dominated by Apache on Wamp.

What to do :
In Skype from the Main menu choose Tools then Options then Advanced and uncheck the chckbox that is titled by  "use port 80 and 443 as alternatives for incoming connections"

Happy Wamping.

Tuesday, January 22, 2013

Apache 2.* only serve the first virtual host - Windows 7 + WAMP

This is a problem that cost me 3 days googling and searching every where without any hints or clues to the way that I should take to solve this problem.
But It was very easy if you try to stop thinking that google can solve all of yourproblems , just relax and try to solve it by yourself.
That's what I did , the server was running great for more than 6 months now, and suddenly I cannot reach my virtual hosts.
My  $1 million dollar advice to any one face such a problem or any other one is "First Check Log files".
What I had there is 


[error] (OS 11001)No such host is known.  : Could not resolve host name

And that means the system don't know how to reach the name domain that you write in the address bar. So the Problem was in Domain Resolution. that lead to host file.

When I checked the host file I cannot find any problem. All virtual hosts had their right IP addresses "127.0.0.1".
But Apache Said he cannot reach this file , means  there are security rules prevent apache from opening this file. 
Yes, It is a secured file by windows and to allow any application to use this file you have to give the application the right permissions. So Apache on windows to be able to read host file and run virtual host must be "Run As Administrator". That is it .

Long Road for Dummies like me , but a very good tutorial to know that I can solve things my self.