This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

stuck on day 3 error when run(php symfony propel:insert-sql)

Discussion around this tutorial for symfony 1.2-1.4

stuck on day 3 error when run(php symfony propel:insert-sql)

by nickleefly » Sun Mar 18, 2012 9:14 am

i am using xampp on ubuntu
my symfony verions:
root@www:/home/sfprojects/jobeet# php symfony -V
symfony version 1.2.12 (/home/sfprojects/jobeet/lib/vendor/symfony/lib)

i installed pdo_mysql

root@www:/home/sfprojects/jobeet# php -m
Code: Select all
[PHP Modules]
apc
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib


[Zend Modules]

when i restart apache server,
it says Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll

I'm new to symfony, i guess its configured wrong somewhere in php.ini
root@www:/home/sfprojects/jobeet# /opt/lampp/lampp restart
Code: Select all
Stopping XAMPP for Linux 1.7.7...
XAMPP: XAMPP-Apache is not running.
XAMPP: XAMPP-MySQL is not running.
XAMPP: XAMPP-ProFTPD is not running.
XAMPP stopped.
Starting XAMPP for Linux 1.7.7...

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.


when i use " php symfony propel:insert-sql " still says
Some problems occurred when executing the task:
build-propel.xml:275:1: [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)]
If the exception message is not clear enough, read the output of the task for more information

root@www:/home/sfprojects/jobeet# php symfony propel:insert-sql

Code: Select all
  This command will remove all data in your database. 
  Are you sure you want to proceed? (y/N)             
                                                       
y
>> schema    converting "/home/sfprojects/jobeet/config/schema.yml" to XML
>> schema    putting /home/sfprojects/jobeet/config/generated-schema.xml
>> propel    Running "insert-sql" phing task
Execution of target "insert-sql" failed for the following reason: /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:275:1:  [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)]
    [phing] /home/sfprojects/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:275:1:  [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)]
                                                                                                                                                     
  Some problems occurred when executing the task:                                                                                                   
    build-propel.xml:275:1:  [wrapped: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)] 
    If the exception message is not clear enough, read the output of the task for more information                                                   
                                                                                                                                                     
>> file-     /home/sfprojects/jobeet/config/generated-schema.xml


databases.yml is like this:
Code: Select all
dev:
  propel:
    param:
      classname: DebugPDO
test:
  propel:
    param:
      classname: DebugPDO
all:
  propel:
    class: sfPropelDatabase
    param:
      classname: PropelPDO
      dsn: 'mysql:host=localhost;dbname=jobeet'
      username: root
      password: xxxxxx
      encoding: utf8
      persistent: true
      pooling: true


Thanks for any help
i google around, couldn't figure out
really appreciate any experts help me move on
nickleefly
Junior Member
 
Posts: 7
Joined: Sun Mar 18, 2012 8:58 am